Post Reply 
Path Blocking with Metacharacters
Apr. 01, 2016, 10:18 PM (This post was last modified: Oct. 16, 2018 09:12 PM by Faxopita.)
Post: #22
RE: Path Blocking Using Wildcard Characters
The Non-political Correctness Block Rules

The ruleset mainly intends to block “illegitimate” requests to third-party domains underlying, for example, news sites, based on typical path patterns used by the tracking/ad industry. Useful if your blacklist does not contain the tracking domain yet.

The ruleset is very well active on my own configuration. For “consuming” the web, it's near-ideal. For buying stuffs online, prepare to completely whitelist some shops or unblock only problematic requests by reviewing the latest crunched requests in your logfile.

The ruleset is especially useful if you are really angry, frustrated and furious against the ad/tracking industry. Though not 100% impervious to tracking, it should be a real option to consider if you want to protect, for example, your little family against insidious tracking. Why? Because the ruleset is “quite” susceptible, as you will quickly notice… It's also a good alternative to blocking JavaScript everywhere because the requests initiated by running JavaScript codes will be blocked: OS and browser specs, screen size and resolutions, sites you visit, hashes, id, IP, geolocation, web-based cryptomining, etc.

Notes #1:
  • If you use ProxHTTPSProxyMII, visit its config file and add payment processors in section SSL Pass-Thru so that the path blocker does not apply to them. Or, if you prefer, prevent Privoxy from viewing HTTPS connexions in times of payments; HTTPS proxy port temporarily set to 8118 instead of 8079.
    Examples:
    Code:
    [SSL Pass-Thru]
    *.arcot.com
    *.sagepay.com
    paymentportal*.exact3ex.co.uk
  • My ruleset is fine for browsing any news site (with, sometimes, broken webpages), but is a nightmare when visiting some commercial sites… You'll need to activate Privoxy log, choose the relevant debug options and then unblock some requests that are, in fact, legitimate for the site to run properly.

—–-
Activate permanently Privoxy's logfile. Clear it daily—for example, with a cron job—so it doesn't inflate indefinitely. Make sure debug 1024 is not commented out in Privoxy's config file!

You review the latest blocked queries to fix browsing issues. You can grep lines containing Blocked: instances. Create an alias to speed up the process…

If you just want to clear Privoxy's logfile content at 8 p.m. daily:
Code:
0 20 * * * echo $(grep "toggle?\(mini=y&\)\?set=\(enable\|disable\)" /private/var/log/privoxy/logfile.log | tail -1) > /private/var/log/privoxy/logfile.log
(if every hour, replace `20` by `*`)

Same job but at reboot time only:
Code:
@reboot    echo $(grep "toggle?\(mini=y&\)\?set=\(enable\|disable\)" /private/var/log/privoxy/logfile.log | tail -1) > /private/var/log/privoxy/logfile.log

To list your cron jobs: `contrab -l`.
-–—

Humble opinion about the rule set RefusedPath.action: I find it useful—given its susceptibilities—to protect against malvertising (have a look at this website and that one, BTW), to kill questionable request attempts based on their path patterns, including those from email spams. I personally can no longer navigate the web without it. The rule set is the result of a thorough daily analysis—started in Nov. 2014—of my Privoxy's log file.

Malvertising: malvertising involves the triggering of a chain of queries; at some point, this ruleset will likely block at least one of them, thus stopping the malware to be downloaded.

Think about it. My personal configuration is such that out of 100 requests, 30 to 35 of them are routinely blocked. It also blocks at least 20,000 request attempts per week, or close to one million “useless” (analytics, avatars, fonts, stats, widgets) and “illegitimate” (ads and tracking) request attempts annually. Now, how much is the total size of these resources that did not get downloaded over that period? Along with these big numbers, I still enjoy a far more than acceptable web browsing experience.

When I read this or that, I do definitely want to use my unforgiven set of rules! Oh, by the way, this one is a very good report on today's tracking practices…


Test any visited site with whotracks.me for fun…
Don't forget to read the other posts #18 and #21 as well…


Notes #2:
  • Last update: December 2017.
  • Included: my own exception list so you won't scrach your head in attempting to whitelist the same sites you happen to visit as me: Amazon, YouTube, GitHub, etc.

-–—

Minuscule donations are always appreciated…
Code:
BTC --> 34WKogWorDoReJ2MSxw8rTsrGD87VMAPJY
BCH --> 1AXwyMdtMFZktZPvXScC58ESUZXptmjvge
DASH -> XusJsETR6PwDnG4Gde7cvGeRhXzUJFSxtD
ETH --> 0xb829FA99AA9AB31C32590dbc88B837bC5D91453e
ETC --> 0x059F128357331c346Ad2E23F95a4639beC3f0b3a
LTC --> MK7vxk93A1M6HHAYT38W8NPJSb8zANqCia
ZEC --> t1JNCuxdZEWUPBQiAzxZPUMqb4BM87sxs9H
DOGE -> DBPAUuCaez4JYGobAn4RHNNhFXwa9u1W6N
STRAT > SgG6jAHuxQfzW1QBaWyQRVdCdSq514BcyM

—–-

Download counter for the July release: 37 Thumbs Up


Attached File(s)
.zip  VerySuspicious-December-2017.zip (Size: 436.71 KB / Downloads: 629)
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
Path Blocking with Metacharacters - Faxopita - Aug. 10, 2015, 10:19 PM
RE: Path Blocking Using Wildcard Characters - Faxopita - Apr. 01, 2016 10:18 PM

Forum Jump: