Skip to content

Commit

Permalink
Update references to JS Restrictor to JShelter (codebase)
Browse files Browse the repository at this point in the history
* Github repository
* JSR
* Restrictor

However, some files in tests have hardcoded filenames containing JSR.
Github pages not updated (only partially). The idea is that I did not
updated files that are going to bre removed. Github pages index/README
not updated.
  • Loading branch information
polcak committed Jan 25, 2022
1 parent d5c121f commit 1dbb87b
Show file tree
Hide file tree
Showing 71 changed files with 181 additions and 176 deletions.
4 changes: 2 additions & 2 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: jsrestrictor
Upstream-Name: JShelter
Upstream-Contact: Libor Polcak <[email protected]>
Source: https://github.com/polcak/jsrestrictor
Source: https://pagure.io/JShelter/webextension

# Files that we think are not copyrightable
Files: .gitignore .gitmodules tests/common_files/webbrowser_drivers/DOWNLOAD WEB DRIVERS HERE.md tests/unit_tests/package-lock.json tests/unit_tests/package.json
Expand Down
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@
"notifications",
"browsingData"
],
"short_name": "JSR",
"short_name": "JShelter",
"version": "0.6.3"
}
6 changes: 3 additions & 3 deletions common/fp_detect_background.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
* its sharing. To learn more about Browser Fingerprinting topic, see study "Browser Fingerprinting: A survey" available
* here: https://arxiv.org/pdf/1905.01051.pdf
*
* The FPD module uses JSR wrapping technique to inject logic that allows log API calls and accesses for every visited web page
* and its frames. Logged JS APIs can be specified in wrappers-lvl_X.json file, where X represents corresponding JSR level.
* The FPD module uses wrapping technique to inject logic that allows log API calls and accesses for every visited web page
* and its frames. Logged JS APIs can be specified in wrappers-lvl_X.json file, where X represents corresponding JShelter level.
*
* Detector of fingeprinting activity is based on chosen heuristics that can be defined in form of API groups. Groups represents
* a set of APIs that have similar but specific purpose. Access to group is triggered when a certain amount APIs is accessed.
* Hierarchy of groups creates a tree structure, where access to root group means fingerprinting activity. Groups can be configured in
* groups-lvl_X.json file, where X represents corresponding JSR level.
* groups-lvl_X.json file, where X represents corresponding JShelter level.
*
* The FPD evaluate API groups with every request made in scope of certain browser tab. When FPD detects fingerprinting activity,
* blocking of subsequent requests is issued. Local browsing data of fingerprinting origin are cleared to prevent caching extracted
Expand Down
12 changes: 6 additions & 6 deletions common/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
</section>
<nav class="menu">
<ul>
<li><a href="options.html">Main JSR settings</a></li>
<li><a href="options.html">Main JShelter settings</a></li>
<li><a href="options_domains.html">Specific domain level configuration</a></li>
<li><a href="options_advanced.html">Advanced options</a></li>
<li>
<p>External links</p>
<ul>
<li><a href="https://polcak.github.io/jsrestrictor/test/test.html">Test page</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/levels.html">Levels</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/permissions.html">Permissions</a></li>
<li><a href="https://github.com/polcak/jsrestrictor/">Source code</a></li>
<li><a href="https://github.com/polcak/jsrestrictor/issues">Open issues</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/credits.html">Credits</a></li>
<li><a href="https://JShelter.org/levels/">Levels</a></li>
<li><a href="https://JShelter.org/permissions/">Permissions</a></li>
<li><a href="https://pagure.io/JShelter/webextension/">Source code</a></li>
<li><a href="https://pagure.io/JShelter/webextension/issues">Open issues</a></li>
<li><a href="https://JShelter.org/credits/">Credits</a></li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion common/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function prepare_level_config(action_descr, params = wrapping_groups.empty_level
<input id="level_id" ${params.level_id != "" ? "disabled" : ""} value="${escape(params.level_id)}"></input>
</div>
<div>
<span class="table-left-column">This ID is displayed above the JSR icon. If you use an
<span class="table-left-column">This ID is displayed above the JShelter icon. If you use an
already existing ID, this custom level will replace the original level.</span>
</div>
<div class="main-section">
Expand Down
12 changes: 6 additions & 6 deletions common/options_advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
</section>
<nav class="menu">
<ul>
<li><a href="options.html">Main JSR settings</a></li>
<li><a href="options.html">Main JShelter settings</a></li>
<li><a href="options_domains.html">Specific domain level configuration</a></li>
<li><a href="options_advanced.html">Advanced options</a></li>
<li>
<p>External links</p>
<ul>
<li><a href="https://polcak.github.io/jsrestrictor/test/test.html">Test page</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/levels.html">Levels</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/permissions.html">Permissions</a></li>
<li><a href="https://github.com/polcak/jsrestrictor/">Source code</a></li>
<li><a href="https://github.com/polcak/jsrestrictor/issues">Open issues</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/credits.html">Credits</a></li>
<li><a href="https://JShelter.org/levels/">Levels</a></li>
<li><a href="https://JShelter.org/permissions/">Permissions</a></li>
<li><a href="https://pagure.io/JShelter/webextension/">Source code</a></li>
<li><a href="https://pagure.io/JShelter/webextension/issues">Open issues</a></li>
<li><a href="https://JShelter.org/credits/">Credits</a></li>
</ul>
</li>
</ul>
Expand Down
12 changes: 6 additions & 6 deletions common/options_domains.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
</section>
<nav class="menu">
<ul>
<li><a href="options.html">Main JSR settings</a></li>
<li><a href="options.html">Main JShelter settings</a></li>
<li><a href="options_domains.html">Specific domain level configuration</a></li>
<li><a href="options_advanced.html">Advanced options</a></li>
<li>
<p>External links</p>
<ul>
<li><a href="https://polcak.github.io/jsrestrictor/test/test.html">Test page</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/levels.html">Levels</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/permissions.html">Permissions</a></li>
<li><a href="https://github.com/polcak/jsrestrictor/">Source code</a></li>
<li><a href="https://github.com/polcak/jsrestrictor/issues">Open issues</a></li>
<li><a href="https://polcak.github.io/jsrestrictor/credits.html">Credits</a></li>
<li><a href="https://JShelter.org/levels/">Levels</a></li>
<li><a href="https://JShelter.org/permissions/">Permissions</a></li>
<li><a href="https://pagure.io/JShelter/webextension/">Source code</a></li>
<li><a href="https://pagure.io/JShelter/webextension/issues">Open issues</a></li>
<li><a href="https://JShelter.org/credits/">Credits</a></li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion common/wrappingS-GEO.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
wrapping_function_args: "successCallback, errorCallback, origOptions",
/** \fn fake Geolocation.prototype.watchPosition
* Geolocation.prototype.watchPosition intended use concerns tracking user position changes.
* JSR provides four modes of operaion:
* JShelter provides four modes of operaion:
* * current position approximation: Always return the same data, the same as getCurrentPosition()
* * accurate data: Return exact position but fake timestamp
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/stores.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

## Install JSR
## Install JShelter

* [Firefox](https://addons.mozilla.org/en-US/firefox/addon/javascript-restrictor/)
* [Opera](https://addons.opera.com/en/extensions/details/javascript-restrictor/)
Expand Down
10 changes: 5 additions & 5 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Title: Building from scratch

### GNU/Linux and Mac OS

1. Go to the project repository: [https://github.com/polcak/jsrestrictor](https://github.com/polcak/jsrestrictor).
1. Go to the project repository: [https://pagure.io/JShelter/webextension](https://pagure.io/JShelter/webextension).
2. Download the desired branch, e.g. as zip archive.
3. Unpack the zip archive.
4. Run `make`.
Expand All @@ -11,20 +11,20 @@ Title: Building from scratch
`make debug`.
5. Import the extension to the browser.
* Firefox: [https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/](https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/)
* Use the file `firefox_JSR.zip` created by `make`.
* Use the file `jshelter_firefox.zip` created by `make`.
* Chromium-based browsers:
1. Open `chrome://extensions`.
2. Enable developper mode.
3. Click `Load unpacked`.
4. Import the `chrome_JSR/` directory created by `make`.
4. Import the `jshelter_chrome/` directory created by `make`.

### Windows

1. Install Windows Subsystem for Linux (WSL): [https://docs.microsoft.com/en-us/windows/wsl/install-win10](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
2. Go to the project repository: [https://github.com/polcak/jsrestrictor](https://github.com/polcak/jsrestrictor).
2. Go to the project repository: [https://pagure.io/JShelter/webextension](https://pagure.io/JShelter/webextension).
3. Download the desired branch, e.g. as zip archive.
4. Unpack the zip archive.
5. Open the JSR project folder in WSL, run `make`.
5. Open the JShelter project folder in WSL, run `make`.
* Make sure that `zip` and all other necessary tools are installed.
* Note that EOL in `fix_manifest.sh` must be set to `LF` (you can use the tool `dos2unix` in WSL to convert `CR LF` to `LF`).
6. On Windows, import the extension to the browser according to the instructions for Linux (above).
2 changes: 1 addition & 1 deletion docs/credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Title: Credits

**Zbyněk Červinka** developed a [proof-of-concept version](https://github.com/cervinka-zbynek/masters-thesis) of this extension as a part of his [master's thesis](https://www.fit.vut.cz/study/thesis/21274/) (in Czech).

**Martin Timko** developed first public versions upto [0.2.1](https://github.com/polcak/jsrestrictor/releases/tag/0.2.1) as a part of his [master's thesis](https://www.fit.vut.cz/study/thesis/21824/). He also ported the extension to Chrome and Opera.
**Martin Timko** developed first public versions upto [0.2.1](https://pagure.io/JShelter/webextension/archive/0.2.1/webextension-0.2.1.zip) as a part of his [master's thesis](https://www.fit.vut.cz/study/thesis/21824/). He also ported the extension to Chrome and Opera.

**Pavel Pohner** developed the Network Boundary Scanner as a part of his master's thesis.

Expand Down
3 changes: 2 additions & 1 deletion docs/test/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
</head>
<body onload="initClock(); updatePerformanceLabelEvery(200); getHW();">
<p><a href="https://polcak.github.io/jsrestrictor/">Home Page</a></p>
<p>You can try <a href="https://amiunique.org/">Am I Unique</a> or <a href="https://panopticlick.eff.org/">Panopticlick</a> to learn how identifiable you are on the Internet and test JavaScript Restrictor Extension</p>
<p>You can try <a href="https://amiunique.org/">Am I Unique</a> or <a
href="https://panopticlick.eff.org/">Panopticlick</a> to learn how identifiable you are on the Internet and test JShelter Extension</p>
<hr>

<h1>jShelter Test Page</h1>
Expand Down
4 changes: 2 additions & 2 deletions docs/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ title: Release history
* We use NSCL to wrap APIs in iframes and workers
* It is no longer possible to access unwrapped functions from iframes and workers (Pagure issue #2, Github issue #56)
* Ignore trailing '.' in domain names when selecting appropriate custom level.
* Do not freeze wrappers to prevent fingeprintability of the users of JSR. We wrap the correct function
* Do not freeze wrappers to prevent fingeprintability of the users of JShelter. We wrap the correct function
in the prototype chain instead.
* navigator.getGamepads() wrapper added
* navigator.activeVRDisplays() and navigator.xr wrappers added
Expand Down Expand Up @@ -157,7 +157,7 @@ ide-Channel Attacks](https://misc0110.net/web/files/jszero.pdf)
* Network boundary shield prevents web pages to use the browser as a proxy between local network and the public Internet. See the [Force Point report](https://www.forcepoint.com/sites/default/files/resources/files/report-attacking-internal-network-en_0.pdf) for an example of the attack. The protection encapsulates the WebRequest API, so it captures all outgoing requests.
* Allow multiple custom levels
* Do not modify DOM of displayed pages (the modifications were detectable by the page scripts and may
reveal that the user is running JSR)
reveal that the user is running JShelter)
* Canvas fingerprinting: originally, only `toDataURL` was blocked. The extension now blocks `CanvasRenderingContext2D.prototype.getImageData` and `HTMLCanvasElement.prototype.toBlob`.
* Block additionaly methods to get performance data.
* Unfortunately, we do not migrate old settings as the levels were redesigned and several features
Expand Down
2 changes: 1 addition & 1 deletion firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"notifications",
"browsingData"
],
"short_name": "JSR",
"short_name": "JShelter",
"version": "0.6.3",
"browser_specific_settings": {
"gecko": {
Expand Down
26 changes: 13 additions & 13 deletions tests/common_files/scripts/build_JSR_package.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# JavaScript Restrictor is a browser extension which increases level
# JShelter is a browser extension which increases level
# of security, anonymity and privacy of the user while browsing the
# internet.
#
Expand All @@ -21,16 +21,16 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

# Go to root directory of JSR project.
# Go to root directory of JShelter project.
cd ..\..\..\

# Create directory for JSR package if does not exists. Like "touch" on Linux.
New-Item -ItemType Directory -Path ".\tests\common_files\JSR" -Force
# Create directory for JShelter package if does not exists. Like "touch" on Linux.
New-Item -ItemType Directory -Path ".\tests\common_files\JShelter" -Force

# Create xpi package of JSR for Mozilla Firefox from zip archive created by make.
Copy-Item ".\firefox_JSR.zip" -Destination ".\tests\common_files\JSR\firefox_JSR.xpi" -Force
# Create xpi package of JShelter for Mozilla Firefox from zip archive created by make.
Copy-Item ".\jshelter_firefox.zip" -Destination ".\tests\common_files\JShelter\firefox.xpi" -Force

$JSRPath = Get-Location
$JShleterPath = Get-Location

# Get path to chrome.exe.
$Chrome = "C:\Program Files\Google\Chrome\Application"
Expand All @@ -43,16 +43,16 @@ if (-Not (Test-Path $Chrome\chrome.exe -PathType Leaf)) {
}
cd $Chrome

# Create crx package of JSR for Google Chrome from source files.
# Create crx package of JShelter for Google Chrome from source files.
# | Out-Null force PowerShell to wait when packaging by Chorme is completed.
.\chrome.exe --pack-extension=$JSRPath\chrome_JSR | Out-Null
cd $JSRPath
.\chrome.exe --pack-extension=$JShelterPath\build\chrome | Out-Null
cd $JShleterPath

# Remove unnecessary file created during crx package creating.
Remove-Item ".\chrome_JSR.pem" -Recurse -Force
Remove-Item ".\build\chrome.pem" -Recurse -Force

# Move crx package of JSR to right location (same as xpi package of JSR).
Move-Item ".\chrome_JSR.crx" -Destination .\tests\common_files\JSR\chrome_JSR.crx -Force
# Move crx package of JSR to right location (same as xpi package of JShelter).
Move-Item ".\build\chrome.crx" -Destination .\tests\common_files\JShelter\chrome.crx -Force

# Go back to common scripts directory.
cd .\tests\common_files\scripts
22 changes: 11 additions & 11 deletions tests/common_files/scripts/build_JSR_package.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# JavaScript Restrictor is a browser extension which increases level
# JShelter is a browser extension which increases level
# of security, anonymity and privacy of the user while browsing the
# internet.
#
Expand All @@ -23,7 +23,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

# Go to root directory of JSR project.
# Go to root directory of JShelter project.
cd ../../../

# Set executable permission.
Expand All @@ -35,20 +35,20 @@ make clean
# Build.
make

# Create directory for JSR package if does not exists.
mkdir -p ./tests/common_files/JSR
# Create directory for JShelter package if does not exists.
mkdir -p ./tests/common_files/JShelter

# Create xpi package of JSR for Mozilla Firefox from zip archive created by make.
cp -f ./firefox_JSR.zip ./tests/common_files/JSR/firefox_JSR.xpi
# Create xpi package of JShelter for Mozilla Firefox from zip archive created by make.
cp -f ./jshelter_firefox.zip ./tests/common_files/JShelter/firefox.xpi

# Create crx package of JSR for Google Chrome from source files.
google-chrome --pack-extension=./chrome_JSR >/dev/null 2>&1
# Create crx package of JShelter for Google Chrome from source files.
google-chrome --pack-extension=./build/chrome >/dev/null 2>&1

# Remove unnecessary file created during crx package creating.
rm -rf ./chrome_JSR.pem
rm -rf ./build/chrome.pem

# Move crx package of JSR to right location (same as xpi package of JSR).
mv -f ./chrome_JSR.crx ./tests/common_files/JSR/chrome_JSR.crx
# Move crx package of JShelter to right location (same as xpi package of JShelter).
mv -f ./build/chrome.crx ./tests/common_files/JShelter/chrome.crx

# Go back to common scripts directory.
cd ./tests/common_files/scripts
10 changes: 5 additions & 5 deletions tests/fpd_tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Instruction how to run FPD tests

Fingerprinting detection (FPD) tests for web browser extension Javascript Restrictor verify that required JavaScript APIs
Fingerprinting detection (FPD) tests for web browser extension JShelter verify that required JavaScript APIs
are wrapped and all specified accesses to them are properly logged according to evaluating heuristics.

# SET UP TEST ENVIRONMENT
Expand All @@ -9,7 +9,7 @@ are wrapped and all specified accesses to them are properly logged according to

These programs and tools are required to be installed:
* [PHP](https://www.php.net/downloads/)
* Browser supported by JSR:
* Browser supported by JShelter:
* [Google Chrome](https://www.google.com/chrome/)
* [Mozilla Firefox](https://www.mozilla.org/en-US/firefox/new/)
* [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10) (only for Windows)
Expand All @@ -22,12 +22,12 @@ These programs and tools are required to be installed:
1. Open `about:debugging` in the URL bar.
2. Click `This Firefox`.
3. Click `Load Temporary Add-on`.
4. Import the `firefox_JSR.zip` archive.
4. Import the `jshelter_firefox.zip` archive.
* Chromium-based browsers:
1. Open `chrome://extensions`.
2. Enable developper mode.
3. Click `Load unpacked`.
4. Import the `chrome_JSR/` directory.
4. Import the `jshelter_chrome/` directory.
3. Visit `localhost:8000` and choose test from menu.
4. **IMPORTANT:** After testing, use *Ctrl+C* in Terminal/WSL to close testing server and revert extension files.

Expand Down Expand Up @@ -64,4 +64,4 @@ You can add custom test scripts to describe more complex scenarios with these si
* Body of the test function wrap into try-catch construction (do not count access if exception occurs).
* Call method `addWrapper(wrappers, *api_name_string*, *access_type_string*, *access_number_int*)` at the end of the function test body for every accessed API that should be wrapped and counted for testing.

Example of custom test script is available in *tests/fpd_tests/tests/custom.js*.
Example of custom test script is available in *tests/fpd_tests/tests/custom.js*.
4 changes: 2 additions & 2 deletions tests/fpd_tests/common/csv_to_wrappers.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# JavaScript Restrictor is a browser extension which increases level
# JShelter is a browser extension which increases level
# of security, anonymity and privacy of the user while browsing the
# internet.
#
Expand Down Expand Up @@ -133,4 +133,4 @@ sed -i '$ s/.$//' $OUTPUT

cat << EOF >> $OUTPUT
]
EOF
EOF
4 changes: 2 additions & 2 deletions tests/fpd_tests/common/wrapper_to_test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# JavaScript Restrictor is a browser extension which increases level
# JShelter is a browser extension which increases level
# of security, anonymity and privacy of the user while browsing the
# internet.
#
Expand Down Expand Up @@ -127,4 +127,4 @@ cat << EOF >> $tests_path
};
EOF

echo "DONE!"
echo "DONE!"
Loading

0 comments on commit 1dbb87b

Please sign in to comment.