µBlock, a lean and fast blocker

Discussion in 'other software & services' started by gorhill, Jun 23, 2014.

  1. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,802
    Location:
    Italy
    That article refers to the Webp vulnerability (CVE-2023-4863) that has been patched in browsers.
    I have personally elsewhere recommended a different rule in unpatched browsers.
    However, it only works with declared webp files.
    Likewise the rules in your article.
    This would not be limiting because the exploit image is a (nearly invisible) webp image that could be injected into a legitimate website.
    I insert a non-malicious example:



    https://raw.githubusercontent.com/mistymntncop/CVE-2023-4863/main/bad.webp
     
  2. Jan Willy

    Jan Willy Registered Member

    Joined:
    Jan 29, 2021
    Posts:
    295
    Location:
    Netherlands
    Yes, all important browsers have it patched. Nevertheless, some people don't like webp.
     
  3. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,258
    Location:
    .
    I wonder why...
     
  4. Jan Willy

    Jan Willy Registered Member

    Joined:
    Jan 29, 2021
    Posts:
    295
    Location:
    Netherlands
    Personally I have no problem with webp. If you google then you will find concerns about compatibility and image-quality. Also there was a vulnerability problem. I think further discussion about it, would be off topic. But if someone wants to know more, then an interesting article could be: https://www.makeuseof.com/windows-chrome-saving-images-as-webp/
     
  5. Brummelchen

    Brummelchen Registered Member

    Joined:
    Jan 3, 2009
    Posts:
    6,298
    in fact there "was", no more.
    its one to block webp and get bigger jpg or png files instead* for any reason, or to spread information about already fixed issues. also png and jpg had and currently have vulnerabilities, forgot?
    https://securelist.com/png-embedded-malicious-payload-hidden-in-a-png-file/74297/
    https://umbrella.cisco.com/blog/picture-perfect-how-jpg-exif-data-hides-malware
    https://arstechnica.com/security/20...-jpg-and-txt-files-under-exploit-since-april/
    at least you have to block all types of image, dont you?

    BTW the links on the mozilla page to cve and more are not public because the vulnerability is still ITW and will threaten users with older browser - where my mercy is very limited.
     
  6. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,258
    Location:
    .
    Good reasoning, besides web devs are increasingly using webp format, so it seems.
     
  7. stapp

    stapp Global Moderator

    Joined:
    Jan 12, 2006
    Posts:
    27,172
    Location:
    UK
    Just wondering if someone can tell me why this image shows both jpg and webp extension.

    Go here and right click on the smiling man and select Image Properties. (This is a right-click option in Vivaldi)

    https://www.emsisoft.com/en/anti-malware-home/

    Screenshot 2023-12-15 053407.jpg
     
  8. nicolaasjan

    nicolaasjan Registered Member

    Joined:
    Sep 23, 2018
    Posts:
    985
    Location:
    The Netherlands
    But that won't automagically convert .webp to .jpg...

    Instead, you can fool the page to serve you the real .jpg (or .png) with the extension "Don't Accept image/webp". :)
    If these are not available on the server, just convert the saved .webp locally with a convenient .bat file:
    Code:
    @ECHO OFF
    FOR %%a IN ("*.webp") DO ffmpeg -i "%%a" -qmin 1 -q:v 1 -bsf:v mjpeg2jpeg "%%~na".jpg
    (`-qmin 1 -q:v 1` saves in best possible quality)
    Of course FFmpeg must be in you PATH.

    Linux command:
    Code:
    for i in *.webp; do ffmpeg -i "${i}" -qmin 1 -q:v 1 -bsf:v mjpeg2jpeg "${i%.webp}.jpg"; done
    The 277KB .webp image from your example is then converted into a 723KB .jpg.
     
  9. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,258
    Location:
    .
    Exactly, there was. There's no point trying to block loading of webp images if you use an updated chrome or firefox browser, imho.
     
  10. nicolaasjan

    nicolaasjan Registered Member

    Joined:
    Sep 23, 2018
    Posts:
    985
    Location:
    The Netherlands
    The image URL is:
    Code:
    https://www.emsisoft.com/wp-content/uploads/2021/08/eam-hero-b.jpg.webp 
    It obviously saves as .webp.
    No idea why they gave it a double extension...

    But with the extension I mentioned above, they serve you a .jpg instead. :)
    (not available for Chromium browsers...)
     
  11. stapp

    stapp Global Moderator

    Joined:
    Jan 12, 2006
    Posts:
    27,172
    Location:
    UK
    That's what got me really. Thanks for your thoughts.
     
  12. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,802
    Location:
    Italy
    Last edited: Dec 15, 2023
  13. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,100
    Location:
    Canada
    Thanks to a member of another forum pointing out this yokoffing github link, I've been using the "Pro" Setup Example for about a week now, and it's been serving me better than any other uBO setup I've ever used before :thumb:

    Code:
    "selectedFilterLists": [
        "user-filters",
        "ublock-filters",
        "ublock-badware",
        "ublock-privacy",
        "ublock-quick-fixes",
        "ublock-unbreak",
        "easylist",
        "easyprivacy",
        "urlhaus-1",
        "plowe-0",
        "ublock-annoyances",
        "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/LegitimateURLShortener.txt",
        "https://raw.githubusercontent.com/DandelionSprout/adfilt/master/BrowseWebsitesWithoutLoggingIn.txt",
        "https://raw.githubusercontent.com/yokoffing/filterlists/main/privacy_essentials.txt",
        "https://raw.githubusercontent.com/yokoffing/filterlists/main/annoyance_list.txt",
        "https://raw.githubusercontent.com/yokoffing/filterlists/main/youtube_clear_view.txt",
        "https://filters.adtidy.org/extension/ublock/filters/2_optimized.txt",
        "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/personal.txt",
        "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/spam-tlds-ublock.txt",
        "https://raw.githubusercontent.com/stephenhawk8054/PrivacyExtended/main/privacy_extended.txt"
      ],
    The only filter of my own I'm currently using is a cosmetic one to get rid of those annoying google call-outs: ||ogs.google.ca/widget/callout$subdocument
     
  14. nicolaasjan

    nicolaasjan Registered Member

    Joined:
    Sep 23, 2018
    Posts:
    985
    Location:
    The Netherlands
    Yes, I have used a similar one (900.000 users). :)
    But the Firefox one I mentioned does more: it prevents the serving of .webp, if possible.
    (the .jpg or .png images that the server then sends are of better quality also, though larger in size)

    But I think we are a bit offtopic now. :)
     
  15. nicolaasjan

    nicolaasjan Registered Member

    Joined:
    Sep 23, 2018
    Posts:
    985
    Location:
    The Netherlands
    Ai, I have 496 filters of my own. :D

    Do you mean this with Google callouts?:

    58fe20ed-a062-4efa-b76f-b3d9aa584a8f.jpg

    (Ungoogled) Chromium doesn't have that. :)
     
    Last edited: Dec 15, 2023
  16. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,802
    Location:
    Italy
  17. Sampei Nihira

    Sampei Nihira Registered Member

    Joined:
    Apr 7, 2013
    Posts:
    3,802
    Location:
    Italy
    I would like to use this rule in "my filters" and remove the JShelter extension:

    Code:
    *##+js(nowebrtc)
    But I have some problems in some websites.
    I wonder if the new rules introduced in UBO can disable WebRTC in a less aggressive way.

     
  18. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,100
    Location:
    Canada
    i had a bunch of my own, which are all backed up, but I wanted to wipe the slate clean with the yokoffing setup.

    no actually this one:

    google callout.png

    I have ungoogled-chromium installed, but unfortunately it won't play video content from tsn[.]ca :( Chrome will, but not ungoogled or Chromium.
     
    Last edited: Dec 15, 2023
  19. Jan Willy

    Jan Willy Registered Member

    Joined:
    Jan 29, 2021
    Posts:
    295
    Location:
    Netherlands
    @Stupendous Man
    Concerning your .gif issue on volkskrant.nl
    I used next setting in uBO and the gif image didn't show up.
    Schermafbeelding 2023-12-15 194409.jpg
    Schermafbeelding 2023-12-15 194558.jpg
    I didn't research further, but it seems that most other images are unaffected.
    Perhaps it's not the solution you really want, but it's a possibility.
     
    Last edited: Dec 15, 2023
  20. nicolaasjan

    nicolaasjan Registered Member

    Joined:
    Sep 23, 2018
    Posts:
    985
    Location:
    The Netherlands
  21. Stupendous Man

    Stupendous Man Registered Member

    Joined:
    Aug 1, 2010
    Posts:
    3,097
    Location:
    the Netherlands
    Ah, thanks very much, Jan Willy.
    Clever thinking, differentiating on image size. :thumb:
    Those GIFs at Volkskrant.nl are enormous in comparison to the regular images.
    However, as I don't want uBlock Origin to block other media elements, not at other sites either, I would need to find a 'sweet spot' for the selected file size so that GIFs at Volkskrant.nl are blocked and nothing else.
    Thanks again for the clever thinking. :)
     
  22. Stupendous Man

    Stupendous Man Registered Member

    Joined:
    Aug 1, 2010
    Posts:
    3,097
    Location:
    the Netherlands
    As I don't use or even have a Google Account, I use this filter rule to block those 'Sign in to Google' annoyances :
    ||accounts.google.com/gsi/iframe/select$subdocument

    I don't remember if uBlock Origin element picker mode offered the one that you chose, and if so, why I selected the one that I chose. Anyhow, it works nicely.
     
    Last edited: Dec 15, 2023
  23. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,100
    Location:
    Canada
    Nice :) I did use uBO element picker to create the one I use.
     
  24. PokerNemo

    PokerNemo Registered Member

    Joined:
    Nov 18, 2020
    Posts:
    27
    Location:
    NY
    Does anyone have an optimal and/or lite setup that blocks a lot of crap but doesn't eat resources for Brave Ihttps://pasteboard.co/HQNk1NTMnszT.jpg do have a good ram but I think my list of 110k net and 44 cosmetic is a bit much no?
     
  25. Stupendous Man

    Stupendous Man Registered Member

    Joined:
    Aug 1, 2010
    Posts:
    3,097
    Location:
    the Netherlands
    I do not know about Brave.
    I use Firefox snap on Kubuntu on old hardware with 4 GB RAM, and uBlock Origin with 109k network filters + 119k cosmetic filters, and I think it feels quite snappy.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice