From ce7503453cb41fd0471fad664e8c3b0dd80ce002 Mon Sep 17 00:00:00 2001 From: nullius Date: Sat, 30 Dec 2017 21:55:46 +0000 Subject: [PATCH] Import v1.0.7.1 from a.m.o. This is a huge jump. Sorry, I will not manually import all intermediary versions to track development. Significant changes: - Major feature: Now works with Firefox 52 / current Tor Browser. Closes #2. - Major feature: Error page. Closes #3. - Major feature: Whitelist. Closes #4. - Regression: Indentation/style is busted. Reopens #1. --- src/icons/icon-16.png | Bin 0 -> 508 bytes src/icons/icon-32.png | Bin 0 -> 1264 bytes src/icons/icon-48.png | Bin 1587 -> 1949 bytes src/icons/icon-64.png | Bin 2037 -> 2371 bytes src/manifest.json | 26 +++++-- src/setwhitelist.html | 18 +++++ src/setwhitelist.js | 44 ++++++++++++ src/stop_cf_mitm.js | 155 +++++++++++++++++++++++++++++++++++------- 8 files changed, 215 insertions(+), 28 deletions(-) create mode 100644 src/icons/icon-16.png create mode 100644 src/icons/icon-32.png create mode 100644 src/setwhitelist.html create mode 100644 src/setwhitelist.js diff --git a/src/icons/icon-16.png b/src/icons/icon-16.png new file mode 100644 index 0000000000000000000000000000000000000000..9f24ca2ed77e0e62a456d508854a57f49b704f9c GIT binary patch literal 508 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbMf!vLQUS0Md)k@)NN$#1vieqS#8 z|NsAwA3wfb<@suJ+UEnsU#_nD^77fYyPMu`jsLb(_2acoKm}hO9DTPX{_C4JFBXS> zJ5>DO!Go7CUp`t{bEzZse0RpN&dl@esh^Kdm@;MBj2SahQ_~F%4IQ1GwY9ZP%q*Rp zTnY+`7A;wF`SRtu`uc!?fb{fCJ3Bi+KfnC^{QCM97Z(>TEvf(Iv3|4t8Z-H$7IgMS}P~zl{OXX zto7beUK^3r^mvc#mZFkoUOzK08!Kl$8&R(~8#4`inIG-Hy?`b$CV9KNu>Qz@c^t^$ zEbxddW?8eR=RLG}_)Usv`EjEq2bwAqg+AQkTE;usLRuJoxg;jwY|^z`=8n)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7}ueLtj?lArn zCp5q9jK&kw7ytZ(W>RlLO(&f(c)@A>oPWGS72^WxGiNa6A!OOi%>BxcWm!Ka=M`wr zt%URqPn7yEygE*~f+-2an4y0@08oB30dOm94f6MFc_>ui_YxTCL5$7E2q0^FKc-0p zed+m!N>+6lze9AJ?cu(L?7jIt`MRn5`mV0>$7e%hEc+tIQJd};hKHY=`TM#aCx3nW z!R)QnHFNa*N9R#kSj5v66FoDF$#f&fv7@D>!uNoq&Jn&o&*rMF9@#0tC2^JVaLv0c;3SUY3brg0EfdO@n-Nr&@`1s)a>Hof{+8D zp9z-*+S=PCv2o|2 z)oO9<*fD%2x`yQBWGw&La%eQYe14b&aOiM23X4lf`0U2n_;ZdSJpo{~n;SYhm8h$$ zM|*pR)@(MJ`A&Cqbbs9AAs)bbPfy6@x2juOS|zHkZpqcFiHMGlCL>RV4I4Hf^5{_z zr(nJ3dQ?~6bo47YB+Sv5h{&VFN#5vGc7fDITifkwk|ZUX{sGA}zv0=hl$Mq`azJo! zF!l!p;nJm#8+)``_rJe?8e*}SZ(J9!H^3Yp9}k0J2(Q2XCw~G+hj*h-p{cnAO49J? z=qTboj7N4(E*csdvCGE?{{H?53=G7<&`?ru5JBYKx7)u4Kn&PZRxZP<+h4_Y@9jk1 z_{W*E2n!3xz<`$jT>eKA-`KzZO#)5@J~ye=J@SqYCHTBmU;hPS"], +"permissions": ["webRequest","webRequestBlocking","","storage","activeTab"], +"options_ui": { + "page": "setwhitelist.html", + "browser_style": true +}, "icons": { + "32": "icons/icon-32.png", "48": "icons/icon-48.png", "64": "icons/icon-64.png" }, -"background": { - "scripts": ["stop_cf_mitm.js"] +"browser_action": { +"browser_style": true, +"default_icon": { + "16": "icons/icon-16.png", + "32": "icons/icon-32.png" +} +}, +"background": {"scripts": ["stop_cf_mitm.js"]}, +"applications": { + "gecko": { + "id": "{d86b44dd-ef12-4f28-ab1c-ea32664490ac}", + "strict_min_version": "52.0" + } } } \ No newline at end of file diff --git a/src/setwhitelist.html b/src/setwhitelist.html new file mode 100644 index 000000000..4304a2648 --- /dev/null +++ b/src/setwhitelist.html @@ -0,0 +1,18 @@ +
+[Whitelist]
+1. Add FQDN you want to ignore. One FQDN per line. Click "Save".
+2. Open new tab and visit whitelisted website.
+
+
+[Advanced]
+
+
+
+
+
+
+
+
+ +
+ \ No newline at end of file diff --git a/src/setwhitelist.js b/src/setwhitelist.js new file mode 100644 index 000000000..5d009b417 --- /dev/null +++ b/src/setwhitelist.js @@ -0,0 +1,44 @@ +function saveWhitelist(e) { +e.preventDefault(); +//WHITELIST +// check each line and remove bad fqdn (simple check) +var cf_tmpdata=document.querySelector("#myset_cfwhite").value.split("\n"); +for (var i=0;ib}).reduce(function(a,b){if (a.slice(-1)[0]!==b){a.push(b);};return a;},[]);// -duplicate +cf_tmpdata=cf_tmpdata.filter(v=>v!='');// -empty +cf_tmpdata=cf_tmpdata.join("\n"); +browser.storage.local.set({myset_cfwhite: cf_tmpdata}); +document.querySelector("#myset_cfwhite").value=cf_tmpdata; +//workaround - simplewarn didn't work as expected if igncj is active +if (document.querySelector("#myset_xsimplewarn").checked){document.querySelector("#myset_xigncj").checked=false;} +//ADVANCED +if (document.querySelector("#myset_xincapsula").checked){browser.storage.local.set({myset_xincapsula: "y"});}else{browser.storage.local.set({myset_xincapsula: "n"});} +if (document.querySelector("#myset_xgshield").checked){browser.storage.local.set({myset_xgshield: "y"});}else{browser.storage.local.set({myset_xgshield: "n"});} +if (document.querySelector("#myset_xsucuri").checked){browser.storage.local.set({myset_xsucuri: "y"});}else{browser.storage.local.set({myset_xsucuri: "n"});} +if (document.querySelector("#myset_xignhttp").checked){browser.storage.local.set({myset_xignhttp: "y"});}else{browser.storage.local.set({myset_xignhttp: "n"});} +if (document.querySelector("#myset_xigncj").checked){browser.storage.local.set({myset_xigncj: "y"});}else{browser.storage.local.set({myset_xigncj: "n"});} +if (document.querySelector("#myset_xsimplewarn").checked){browser.storage.local.set({myset_xsimplewarn: "y"});}else{browser.storage.local.set({myset_xsimplewarn: "n"});} +} +function loadWhitelist(){ +function setCurrentChoice(r){ +//WHITELIST +document.querySelector("#myset_cfwhite").value = r.myset_cfwhite||""; +//ADVANCED +if (r.myset_xincapsula=='y'){document.querySelector("#myset_xincapsula").checked=true;}else{document.querySelector("#myset_xincapsula").checked=false;} +if (r.myset_xgshield=='y'){document.querySelector("#myset_xgshield").checked=true;}else{document.querySelector("#myset_xgshield").checked=false;} +if (r.myset_xsucuri=='y'){document.querySelector("#myset_xsucuri").checked=true;}else{document.querySelector("#myset_xsucuri").checked=false;} +if (r.myset_xignhttp=='y'){document.querySelector("#myset_xignhttp").checked=true;}else{document.querySelector("#myset_xignhttp").checked=false;} +if (r.myset_xigncj=='y'){document.querySelector("#myset_xigncj").checked=true;}else{document.querySelector("#myset_xigncj").checked=false;} +if (r.myset_xsimplewarn=='y'){document.querySelector("#myset_xsimplewarn").checked=true;}else{document.querySelector("#myset_xsimplewarn").checked=false;} +} +function onError(e){console.log(`CFMITM_CFG Error:${e}`);} +var getting=browser.storage.local.get(); +getting.then(setCurrentChoice, onError); +} +document.addEventListener("DOMContentLoaded", loadWhitelist); +document.querySelector("form").addEventListener("submit", saveWhitelist); \ No newline at end of file diff --git a/src/stop_cf_mitm.js b/src/stop_cf_mitm.js index c438d2bce..74c4f4c9b 100644 --- a/src/stop_cf_mitm.js +++ b/src/stop_cf_mitm.js @@ -6,8 +6,38 @@ * http://www.crimeflare.com/ */ -function analyzemydata(res) { - //console.log("mitmdetector: scanning: "+res.url); +var cf_ignore=[]; +var cf_history=[];//used by whitelist-from-warnpage +var stop_incapsula=0; +var stop_gshield=0; +var stop_sucuri=0; +var ign_phttp=0; +var ign_rescj=0; +var do_simplewarn=0; + +function whitelist_reload(w){ +//WHITELIST +if (w.myset_cfwhite){ +var tmp_whitelist=w.myset_cfwhite; +tmp_whitelist=tmp_whitelist.split("\n").filter(v=>v!=''); +cf_ignore=tmp_whitelist; +//console.log(cf_ignore); +}else{cf_ignore=[];} +//ADVANCED +if (w.myset_xincapsula=='y'){stop_incapsula=1;}else{stop_incapsula=0;} +if (w.myset_xgshield=='y'){stop_gshield=1;}else{stop_gshield=0;} +if (w.myset_xsucuri=='y'){stop_sucuri=1;}else{stop_sucuri=0;} +if (w.myset_xignhttp=='y'){ign_phttp=1;}else{ign_phttp=0;} +if (w.myset_xigncj=='y'){ign_rescj=1;}else{ign_rescj=0;} +if (w.myset_xsimplewarn=='y'){do_simplewarn=1;}else{do_simplewarn=0;} +} + +function onError(e){console.log(`CFMITM Error:${e}`);} + +function analyzemydata(res){ +var lmcfg=browser.storage.local.get();lmcfg.then(whitelist_reload,onError);// load latest settings without restarting a browser + +//console.log("CFMITM: scanning: "+res.url); var cflink = document.createElement('a'); cflink.setAttribute('href',res.url); var cf_hostname = cflink.hostname; @@ -15,30 +45,109 @@ function analyzemydata(res) { var cf_gothead = res.responseHeaders; cflink = null; - if ((cf_protocol == 'http:' || cf_protocol == 'https:') && - cf_hostname.length >= 4) { - //console.log("mitmdetector: testing...: "+res.url); - var is_cloudflare_infected=0; // 2 to confirm +//whitelisted by default (destination is same) +if (cf_hostname.endsWith('.cloudflare.com')||cf_hostname=='cloudflare.com'){return;} +if (stop_incapsula==1){if (cf_hostname.endsWith('.incapsula.com')||cf_hostname=='incapsula.com'){return;}} +if (stop_gshield==1){if (cf_hostname.endsWith('.withgoogle.com')||cf_hostname.endsWith('.google.com')){return;}} +if (stop_sucuri==1){if (cf_hostname.endsWith('.sucuri.net')||cf_hostname=='sucuri.net'){return;}} +//whitelisted +if (cf_ignore.includes(cf_hostname)){return;} +if (cf_protocol=='http:' && ign_phttp==1){return;} +if (ign_rescj==1 && /^http(.*)\.(js|css|jpg|jpeg|gif|png|tif|ico|svg|woff|woff2|ttf|cur|ani)(|\?(.*))$/.test(res.url)){return;} - for (var i=0; i < cf_gothead.length; i++) { - var cfv=cf_gothead[i]; - if (cfv['name'] == 'cf-ray' && cfv['value'] != undefined) { - is_cloudflare_infected += 1; - } - if (cfv['name'] == 'server' && cfv['value'].includes("cloudflare")) { - is_cloudflare_infected += 1; - } - if (is_cloudflare_infected == 2) { - break; - } - } - if (is_cloudflare_infected >= 1) { - console.log('SECURITY_WARN: Cloudflare Detected: '+res.url); - return {redirectUrl: "https://0.0.0.0/"}; // just drop the connection - } + if ((cf_protocol == 'http:' || cf_protocol == 'https:') && cf_hostname.length >= 4) { + +//console.log("CFMITM: testing...: "+res.url); + +var mitm_isdetected=0; +var mitm_cdnname='Cloudflare'; + +for (var i=0;i +if (mitm_isdetected>=2){break;} +} + + +var cfblockscreen=''; +if (mitm_isdetected>=1){ + +//add to history (used in gotwhitelistrequest()) +if (cf_history.length>=10){cf_history=[];} +if (!cf_history.includes(cf_hostname)){cf_history.push(cf_hostname);} + + +if (do_simplewarn!=1){// block + +console.log('SECURITY_WARN: '+mitm_cdnname+' MiTM Detected: '+res.url); +cfblockscreen='document.documentElement.innerHTML=atob(\'PGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiPjxoZWFkPjx0aXRsZT5JbnNlY3VyZSBDb25uZWN0aW9uPC90aXRsZT4KPCEtLQpUaGlzIFNvdXJjZSBDb2RlIEZvcm0gaXMgc3ViamVjdCB0byB0aGUgdGVybXMgb2YgdGhlIE1vemlsbGEgUHVibGljIExpY2Vuc2UsIHYuIDIuMC4KSWYgYSBjb3B5IG9mIHRoZSBNUEwgd2FzIG5vdCBkaXN0cmlidXRlZCB3aXRoIHRoaXMgZmlsZSwgWW91IGNhbiBvYnRhaW4gb25lIGF0IGh0dHBzOi8vbW96aWxsYS5vcmcvTVBMLzIuMC8uCi8vLS0+CjxsaW5rIGlkPSJmYXZpY29uIiByZWw9Imljb24iIHR5cGU9ImltYWdlL3gtaWNvbiIgaHJlZj0iZGF0YTppbWFnZS94LWljb247YmFzZTY0LEFBQUJBQUVBRUJBQUFBRUFJQUJvQkFBQUZnQUFBQ2dBQUFBUUFBQUFJQUFBQUFFQUlBQUFBQUFBQUFRQUF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J0RvIHlvdSByZWFsbHkgd2FudCB0byBhZGQg\')+\''+cf_hostname+'\'+atob(\'IHRvIHdoaXRlbGlzdD8nKSl7ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2FjbGluaycpLnNyYz0naHR0cHM6Ly8wLjAuMC4wL2NmbWl0bV9hZGRvbi9hbGxvdy8=\')+\''+cf_hostname+'?'+btoa(cf_hostname)+'\'+atob(\'Jzt9Ij5BZGQgRXhjZXB0aW9uPC9idXR0b24+CjwvZGl2Pgo8L2Rpdj4KPC9kaXY+CjxkaXYgc3R5bGU9ImRpc3BsYXk6bm9uZSI+PGlmcmFtZSBpZD0iYWNsaW5rIiBzcmM9Imh0dHBzOi8vMC4wLjAuMC9jZm1pdG1fYWRkb24vIj48L2lmcmFtZT48L2Rpdj4KPC9ib2R5PjwvaHRtbD4=\');window.stop();'; +var blockingCFnow=browser.tabs.executeScript(res.tabId,{code: cfblockscreen});blockingCFnow.then(()=>{return {cancel: true};},onError); + +}else{// warning only + +console.log('SECURITY_ALERT: '+mitm_cdnname+' MiTM Detected: '+res.url); +cfblockscreen='var orig_dt=document.title;setInterval(function(){var link=document.querySelector("link[rel*=\'icon\']")||document.createElement(\'link\');link.type=\'image/x-icon\';link.rel=\'icon\';link.href=\'data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOzk4OKpMSkq6UE9PulRTU7pXV1e6W1tbul1dXbpbW1u6WFhYulVVVbpTU1O6UFBQukxMTLotLS2bAAAAOzY0NJ7Y3Nz/v9zh/8He4//D4eb/xuTp/8jm6//I5On/x+Po/8bj6f/E4ef/wt/l/8Hd4/+/2d//3N/f/xkZGYU2NTWd2N7e/xekxf8WueD/Frrh/xa74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D4AAAAVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAIABAAAAAAAAAAAAAIABAACAAwAAwAMAAOAHAADgBwAA8A8AAPAPAAD4HwAA+D8AAPw/AAD+fwAA//8AAA==\';document.getElementsByTagName(\'head\')[0].appendChild(link);if (!document.title.startsWith(\'[!!\') && !document.title.includes(\'!!]\')){document.title=\'[!!'+mitm_cdnname+'!!] \'+orig_dt;}},2500);'; +var warningCFnow=browser.tabs.executeScript(res.tabId,{code: cfblockscreen});warningCFnow.then(function(){},onError); + +} +} + } return; } -browser.webRequest.onHeadersReceived.addListener(analyzemydata,{urls: [""]},["blocking","responseHeaders"]); +function gotwhitelistrequest(r){ +var v_whitelist=r.url.replace('https://0.0.0.0/cfmitm_addon/allow/','',).split('?',2); +if (v_whitelist.length==2){if (/^([0-9a-z.-]{4,200})$/.test(v_whitelist[0]) && v_whitelist[1]==btoa(v_whitelist[0])){ +if (cf_history.includes(v_whitelist[0])){// found in history, assume this request is valid +console.log('CFMITM: Adding to whitelist: '+v_whitelist[0]); +var _gwr=browser.storage.local.get();_gwr.then(function(r){ +var _currentwhitelist=v_whitelist[0]+"\n";if (r.myset_cfwhite){_currentwhitelist+=r.myset_cfwhite;} +_currentwhitelist=_currentwhitelist.split("\n");for (var l=0;l<_currentwhitelist.length;l++){ +if (!/^([0-9a-z.-]{1,})\.([a-z]{2,20})$/.test(_currentwhitelist[l])||_currentwhitelist[l].startsWith(".")||_currentwhitelist[l].includes("..")|| +_currentwhitelist[l].endsWith(".cloudflare.com")||_currentwhitelist[l]=='cloudflare.com'|| +_currentwhitelist[l].endsWith(".incapsula.com")||_currentwhitelist[l]=='incapsula.com'|| +_currentwhitelist[l].endsWith(".withgoogle.com")||_currentwhitelist[l].endsWith(".google.com")){_currentwhitelist[l]='';} +} +_currentwhitelist=_currentwhitelist.slice().sort(function(a,b){return a>b}).reduce(function(a,b){if (a.slice(-1)[0]!==b){a.push(b);};return a;},[]);// -duplicate +_currentwhitelist=_currentwhitelist.filter(v=>v!='');// -empty +_currentwhitelist=_currentwhitelist.join("\n"); +browser.storage.local.set({myset_cfwhite: _currentwhitelist}); +cf_ignore=_currentwhitelist.split("\n").filter(v=>v!='');//update whitelist +browser.tabs.executeScript({code: 'location.reload();'}); +},onError); +} +}} +return {cancel: true}; +} + +browser.webRequest.onHeadersReceived.addListener(analyzemydata,{urls:["http://*/*","https://*/*"]},["blocking","responseHeaders"]); +browser.webRequest.onBeforeRequest.addListener(gotwhitelistrequest,{urls:["https://0.0.0.0/cfmitm_addon/*"]},["blocking"]); +browser.browserAction.onClicked.addListener(function(t){browser.runtime.openOptionsPage().then(function(){},onError);});