JavaSript Vulnerability Detector is a result of my Master Thesis at Brno University of Technology, Faculty of Information…
JS Vulnerability Detector Extension
JavaSript Vulnerability Detector is a result of my Master Thesis at Brno University of Technology, Faculty of Information technology, graduation year 2022. The extension aims to add security features to the end-users of various websites containing vulnerable JavaScript library code. The principle of extension is following:
1. After page loads the extension scans all the JavaScript contained on the page and sends it to background script for processing.
2. If the script contains a known vulnerability (initial version focuses mostly on jQuery), it is tracked and shown in the extension popup. After detection the vulnerable script can be blocked, patched or left as is and only tracked.
All data is stored locally and can be cleared by a \"Clear\" button in the extension popup. There is no server communication going on, no data leaves the browser.
Extension runs in 4 modes:
1. disabled - no action
2. analyze - standard analysis only mode - no patching or blocking of vulnerable scripts
3. bloc - vulnerable scripts are removed from website
4. repair - experimental, vulnerable scripts are patched if possible
Currently it can detect vulnerable versions of jQuery (all up to 3.5.0) and repair them by updating them in runtime to 3.5.0 and couple more (around 30, including some of lodash, remarkjs, axios, handlebars and other vulnerabilities).
Source codes are open, available at https://github.com/xrandy00/mt_2022
Read more
1. After page loads the extension scans all the JavaScript contained on the page and sends it to background script for processing.
2. If the script contains a known vulnerability (initial version focuses mostly on jQuery), it is tracked and shown in the extension popup. After detection the vulnerable script can be blocked, patched or left as is and only tracked.
All data is stored locally and can be cleared by a \"Clear\" button in the extension popup. There is no server communication going on, no data leaves the browser.
Extension runs in 4 modes:
1. disabled - no action
2. analyze - standard analysis only mode - no patching or blocking of vulnerable scripts
3. bloc - vulnerable scripts are removed from website
4. repair - experimental, vulnerable scripts are patched if possible
Currently it can detect vulnerable versions of jQuery (all up to 3.5.0) and repair them by updating them in runtime to 3.5.0 and couple more (around 30, including some of lodash, remarkjs, axios, handlebars and other vulnerabilities).
Source codes are open, available at https://github.com/xrandy00/mt_2022
Source Manifest.json
{
"update_url": "https://clients2.google.com/service/update2/crx",
"name":"__MSG_appName__",
"short_name":"__MSG_appShortName__",
"description":"__MSG_appDescription__",
"homepage_url":"http://chrome.google.com/webstore",
"version":"1.0.0",
"version_name":"1.0.0",
"manifest_version":3,
"default_locale":"en",
"minimum_chrome_version":"88",
"action":{"default_icon":"assets/icon.png",
"default_popup":"popup.html",
"default_title":"__MSG_appName__"},
"icons":{"144":"assets/icon.png"},
"host_permissions":[""],
"permissions":["storage"],
"web_accessible_resources":[{"resources":["evaluate.js",
"popup.js"],
"matches":[""]}],
"content_scripts":[{"matches":[""],
"run_at":"document_start",
"all_frames":true,
"js":["content_script.js"]}],
"background":{"service_worker":"background.js"}}
Read more
"update_url": "https://clients2.google.com/service/update2/crx",
"name":"__MSG_appName__",
"short_name":"__MSG_appShortName__",
"description":"__MSG_appDescription__",
"homepage_url":"http://chrome.google.com/webstore",
"version":"1.0.0",
"version_name":"1.0.0",
"manifest_version":3,
"default_locale":"en",
"minimum_chrome_version":"88",
"action":{"default_icon":"assets/icon.png",
"default_popup":"popup.html",
"default_title":"__MSG_appName__"},
"icons":{"144":"assets/icon.png"},
"host_permissions":["
"permissions":["storage"],
"web_accessible_resources":[{"resources":["evaluate.js",
"popup.js"],
"matches":["
"content_scripts":[{"matches":["
"run_at":"document_start",
"all_frames":true,
"js":["content_script.js"]}],
"background":{"service_worker":"background.js"}}