MoaAB: Mother of All AD-BLOCKING > BLOCKS ADware Malware Spyware Bloatware Ransomware

Do You Think That AD-Blocking is really a major step in Security?


  • Total voters
    6,198
Search This thread

BSDgeek_Jake

Senior Member
Oct 2, 2012
1,003
8,030
DEL
This is the best hosts file I've found on the web. I'm curious though - you have blocked many adult tube sites and also some normal sites like www.xolodilnik.ru (russian electronics site). Why did you include these?

:) All sites which are identified and detected as potential threat to a client is blocked in this hosts file. Sorry for the extreme blocking but Safety first.

You can always edit your hosts file and remove the sites which you think is safe. ;)

Enjoy Safer Android :good:
 

hisname

Senior Member
Jul 9, 2012
2,532
553
Singapore
> How to install?[/COLOR]
You have to be ROOT (su) to copy the 'hosts' file to '/etc' and '/system/etc' and setting the permissions to 'root:root' and '0444' or 'r-r-r'. Reboot you Android Baby and That It. ENJOY.





read the OP

Sent from my supercharged tank
 

comptonhubbard

Senior Member
Jul 24, 2012
1,952
485
Jersey City

infozerich

Member
Dec 9, 2012
16
14
Melbourne
Hello,
Suggestions
I'd like to suggest a few corrections to the current hosts file because I believe there may be redundant entries therein.
127.0.0.1 .hitbox.com
^should just be 127.0.0.1 hitbox.com. The existing entry would probably be more useful in a Proxy Auto-Config (PAC) file, without the prefix 127.0.0.1 of course.

Lastly, to remove the other redundant entry search for "127.0.0.1 link.p0.comBug][SiteAdvisor.p0.com". An existing entry exists for link.p0.com, but not for siteadvisor.p0.com. I think the brackets are invalid characters and probably shouldn't be there.

In future, I'd suggest scanning for errors via abelhadigital's HostsMan which also features removing duplicate entries and a more efficient arrangement of hosts file entries (maximum of 9 sites can be listed per line) - effectively saving space. Alternatively, I'd consider playing with sed educational.

Nonetheless, many thanks for sharing your knowledge. However, there are more to threats than simply having a site serving malware. It should be noted that the hosts file was not specifically designed to be implemented as a security measure. There are far more capable tools to use to secure a system. The focus should be on the network and what is accepted across that network, not just the device accessing whatever may reside on the Interwebs, e.g. legitimate sites have been compromised and hijacked; advertisements have and still are being served via IP addresses rather than domain names, not to mention the seemingly endless array of pseudo-domain names e.g. runforrestrun etc.

Furthermore, the weakness of a hosts file is the repetitiveness and exact string match required to filter content. A PAC is more better equipped to handle IP Address and domain filtering than a hosts file. A hosts file is just a map to reference locations, not to block or prevent malware from reaching a host. For example, if an existing entry exists for fs01.eviladnetwork.net.ua and fs03.eviladnetwork.net.ua, and the app is communicating via fs02.eviladnetwork.net.ua, it effectively circumvented the hosts file. A PAC would just require 1 entry to do a more effective job of blocking the eviladnetwork, such as through the use of wildcards. For further clarification, the hosts file is not analogous to signature-based preventative measures, because by its very design, it would be unsuitable for that task.

Installing the hosts file
Additionally, I noticed some users in this thread have posted some comments in relation to ADFree. Based on my observation, the concept of using a hosts file to redirect requests to sites to localhost is the same, but the _content_ is significantly different because the app retrieves hosts files from pgl.yoyo.org and perhaps the mvps hosts file. To confirm, simply inspect the hosts file after using ADFree. The hosts file the OP has uploaded contains entries specifically for use on mobile platforms.

Finally, there are numerous ways to install the hosts file, but also certain requirements that must be met.

Enough space
I've seen some hosts files that range from 5MB to 20MB, so enough space on the /system partition is necessary (checking with the command 'df' from a terminal emulator will suffice.
Permission
Generally, on Android systems, the /system partition requires enough space to make modifications. Otherwise, it will return an error. You also require root privileges since you will have to mount the /system partition as writable before modifying anything in /system and its sub-directories. Some apps such as ES File Manager have settings that simplifies the process. If you are using ADB, you can issue commands along the lines of:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
The first line requests root privileges and sends a message to superuser or SuperSU etc.
The second line mounts the /system partition to a block with the permissions rw (read-write).

To keep things simple, if you are rooted, you can just use ES File Manager (free) or Root Explorer (paid) or even the Terminal Emulator (free, requires technical knowledge) to push the hosts file to /system/etc/. If you have ADB enabled, simply run adb root and then adb push <path to your hosts file here> /system/etc/hosts. As always, verify the filesize and permission of the hosts file with ls -l /system/etc/hosts.

For unrooted users, there are many restrictions and sometimes you shouldn't change anything that might affect the functionality of your device. Simply configuring your device to use a DNS server with content filtering such as OpenDNS (Web Spam category or simply Advertisements), DynDNS (phishing, fraud, spyware, advertisements) etc. should be sufficient since the scope is so great, a hosts file cannot compare. I only mention this because it has Phishtank and other projects that I support.

Anyway, I digress.
Another way is to use symbolic links (again requires root)
You can attempt to use symbolic links to create a map. It should be noted that some features of your device, such as HTC S-ON, will prevent modifications to the /system partition.

The symlink informs the Android system that the hosts file is located somewhere else. In this case, you can setup a symbolic link that maps itself to /system/etc. Something along the lines of "ln -s <path to your hosts file here> /system/etc/hosts".

Alternatively, if you are flashing a custom ROM and can check that there is enough space on the /system partition (I usually just remove unnecessary apps) you can simply replace the hosts file with your own one. Using 7-Zip or WinZip/WinRAR or just Windows shell, you can just open up the custom ROM file and drag your hosts file into the ROM and then flash it. No need to worry about setting custom permissions either.

Anyway, usual caveats are as follows:-
If you don't understand it, don't do it - just yet.
If you are unsure, ask, but it's still your responsibility to do with it what you will. Just don't forget people who may be involved.
Does it feel right?
And, maybe I should contribute and find ways to help developers out more.
Okay, that last one was just subliminal, but you get the point :p

On a final note, a hosts file can prevent apps from calling home and serving you with an ad if there is an existing entry that matches that address - though not an IP address. Considering the number of developers and advertising agencies and networks, it is bound to miss many. In this case, patching and other workarounds exist to remove the ad-space allocated to apps.
On the other hand, some ads can contain malicious content, and it would be wise to block well known malvertising sites that deceive both the developer and the end-user. Nevertheless, some developers rely on serving ads to earn enough to support their efforts, so perhaps purchasing an ad-free version of the app is the next best step (opportunity cost lingo here) to becoming a good citizen.

If you cared enough to follow that, thank-you. I should probably just TL;DR this, but you are a smart bunch, so take care and good luck.
 
Last edited:

BSDgeek_Jake

Senior Member
Oct 2, 2012
1,003
8,030
DEL
Hello,
Suggestions
I'd like to suggest a few corrections to the current hosts file because I believe there may be redundant entries therein.
127.0.0.1 .hitbox.com
^should just be 127.0.0.1 hitbox.com. The existing entry would probably be more useful in a Proxy Auto-Config (PAC) file, without the prefix 127.0.0.1 of course.

.............................................

so take care and good luck.

Really appreciate your feedback.

All corrections are made and updated 'hosts' file is made available.

:cowboy:
 

rickgillyon

Senior Member
Jun 13, 2006
1,321
250
Whitley Bay
Thanks for this, great resource, but I've found a few URL-shortening services in the file which cause issues following links from Twitter:
Code:
bit.ly
ow.ly
t.com

I've removed these from my own version of the file but for me, they shouldn't be there. Also, as previously reported, some entry or other is killing icons and screenshots in Play...

Thanks!
 
  • Like
Reactions: BSDgeek_Jake

Top Liked Posts

  • There are no posts matching your filters.
  • 2800
    MoaAB: Mother of All AD-BLOCKING > BLOCKS ADware Malware Spyware Bloatware Ransomware

    We can only dream of 'THE' Perfect AD & Malware Blocker...

    BUT.....

    Dont wait any longer and start your quest in an AD free, Safer & Secure Experience.


    Start using MoaAB. DOWNLOAD Right Now.


    Update:
    NEW UPDATE IN PROCESS...






    The Purpose of this Project is to make Device CLEANER, FASTER, SMOOTHER & FRIENDLY.

    --------------------
    The IDEA is to Minimize the ADs... NOT Total Eradication. Respect the Good Developers and there Revenues for Living.

    FREEDOM NOTE: My ADBlocking MOD realizes that advertising and revenue is important to OEM/App Developers and this is how they earn money, BUT too much Advertisements are instrusion to privacy (I am also an App Developer but I Really Dont Like ADs). Advertisements are not automatically blocked but users have the choice whether to block or not block by manually Fashing my ADBlocking CWM MOD.

    GENERAL KNOWLEDGE: This MOD will Save you CPU Processing used in Advertisement Contents, In-App Ads, Hidden App Call-Back Home Routines, Malware/Spyware Sites, In-App User Data Collection, Definitely... Stupid Garbage from Internet and Precious Bandwidth resulting Extended Battery Life and Money Saved in Internet bills. THINK ABOUT IT.
    --------------------



    >>> What is a 'hosts' file? What it Does? Whats in it for Me?
    The 'hosts' file contains the mappings of IP addresses to host names and loaded into memory (cache) at startup. Android OS checks the 'hosts' file before it queries any DNS servers, which enables it to override addresses in the DNS. This prevents access to the listed sites by redirecting any connection attempts back to the localhost (127.0.0.1), which is a loopback and traffic is dropped instantly (saving your millions of money used by network traffic 2G/3G/4G). Another feature of the 'hosts' file is its ability to block other applications (bogus applications) from connecting to the Internet, providing the entry exists.

    'hosts' file is used to BLOCK ADs, BLOCK Banners, BLOCK 3rd Party Cookies, BLOCK 3rd Party Page Counters, BLOCK Web Bugs, BLOCK Web Hijackers, BLOCK Phishing Sites, BLOCK Malwares, BLOCK Spywares, BLOCK Trackers, BLOCK Unauthorized Application connections to web and BLOCK other Malicious activities...

    This is not 100% Protection but atleast it takes care of ALMOST ALL OF THE SECURITY ISSUES FACING FROM THE BAD SITES.

    For full Security, Use Antivirus or Security Suite from Android Market.

    >>> Performance Issue? Will my device run SLOW?
    I am using this 'hosts' file from my chilhood days and never had any performance issue to date, Although you might have a little delay in startup for few seconds (but you will not even notice) and then everything will be cool in standby and active mode. I say "Little delay is better than ADs, Malwares and Spywares..."


    Please Read this Post for RAM usage



    >>> Compatibility?
    ANDROID FAMILY: 4.x,
    5.1.x, 6.x, 7.x :angel: (5.0.x not supported, android memory leaks)
    DEVICE FAMILY: Anything which has 1 GB of RAM
    and atleast 1.2GHz CPU minimum.

    This MOD requires some amount of RAM (4MB - 8MB) and CPU for effective functionality. "Anything below the compatibility specs" might be working But wll be Slow and Laggy. PLEASE DO NOT PM me or POST on this thread for issues if so. I Don't and Won't Support.


    WiFi/Mobile: Please disable PROXY to use this 'MOD' else no blocking will happen.


    >>> How to install?
    Just Copy Paste the 'hosts' file in /system/etc or Import it in some ADBlock App locally or Import in NetGuard. Thats It. ENJOY

    >>> What is BLOCKED?

    In-App/Web ADs, In-App/Web Trackers, Malware/Spyware Domains, Tracker Cookies, Malicious Call-Back Home App Functions, Malicious 3rd Party Redirection Functions and Possibly Some Level of Virus/Trojan Protection and More...


    CAUTION: IMPORTANT NOTE to USERS This is not an APP but A Single file (MASSIVE ;)), So my packages is not altering any system functions, automating tasks, requiring frequent user interactions or installing/uninstalling system events. This package is not doing anything malicious but just sitting there and speaking/directing where to go or not... thats it. I hope All is Clear :angel: Please do not complain of bootloops, softbricks or hardbricks, i am not responsible :p

    CAUTION: IMPORTANT NOTE to APP DEVELOPERS & AD OWNERS This is not an Interception App or Reverse Engineering Code BUT an Android Standard defined for user configuration. I am trying to make my Device (which i own in terms of Hardware/Software which i Paid for) much CLEANER, FASTER, SMOOTHER & F
    RIENDLY for general use :angel:. My program will not alter any of the installed App/s or inject any interception code in your App/s :good:. All Request/s and Response/s are handled by OS (Android) layer. In no way to want to hurt the Developer BUT my priority is CLEAN DEVICE. :good:

    If anyone (Users or Developers) wants to exclude the domains or sub-domains from this MOD please PM me with possible reasons. I will be happy to help you.

    NOTE to USERS: Please Do not post your work in this thread. This is to avoid untested or duplicated or unstable work. You can defenitly share via some file share and PM the work to users OR Please create your own thread.


    >>> DISCLAIMER
    :good:

    This 'hosts' file will possible block harmful effects, active and passive intrusion of potential sites or apps but using this also/might block regular site and/or apps. YOU HAVE BEEN WARNED and USE AT YOUR OWN RISK.

    I take no responsibility of any losses and damages to your Hardware or your Software component/s caused by this piece of code. You have been given the choice of NOT FLASHING or TO FLASH the ADBlocking CWM and yourself choosen the way to stop the ADs. This MOD might also block regular domains because of the extreme blocking nature. You will also be protected from Malware/Spyware/Bloatware but limited to the extent of updates. YOU HAVE BEEN WARNED :angel: HAPPY AD-BLOCKING





    >>> DOWNLOADs For Rooted (ROOT) and Non-Rooted (via VPN) Phone/s.


    NEW UPDATE IN PROCESS...




    If You are Complaining TOOO MUCH then Please Read this


    * Direct Link for ADBlock Apps: "http://adblock.mahakala.is" super credits to
    nagpochenpo


    *
    REVERT this MOD and Reset to Stock




    Safe & DNS IP for everyones use:

    208.67.222.222
    8.26.56.26
    208.67.220.220
    8.20.247.20

    Just add the above entries in your DNS settings.


    >>> How to Know if this MOD is WORKING???
    Go here & Follow instructions
    http://ads-blocker.com/testing


    Public License for ROM and for
    Auxiliary Work
    You can Distribute my MOD with my Permissions. Distribution should include my XDA name 'BSDgeek_Jake' and Link to this 'ADBlocking MOD' thread in your Credits sections/About sections and Properly Visible to Human Eyes. Distribution should be synced with the latest MOD updates or Can be pointed to the MOD alternate download mentioned in this Post or my Profile Page. Please PM me for any queries. ;)


    NEW RULE for MoaAB Usage and Sharing:

    1.
    All permissions for shared work is NOW REVOKED except for ROM Developers. Please Re-request.

    2. No user is allowed to MIRROR or MAKE a COPY of MoaAB. Request for Permission before making any.

    3. Please Do Not FILL my thread Asking for LAST OLD NEW or FUTURE releases. Its a Free Work in my Busy Time. I dont Mind Helping, I Love to, but TOOOOOO MUCH will discourage my work.

    4. Please Search the thread before Asking for Questions. Most of are ALREADY answered and resolved. Self Help is the Best.

    5. Please use PM to share your Files, Screenshots and Configurations. Don't Post it onto my thread.

    6. Please Help me in Keeping MoaAB thread Visually Clean and Searchable.



    And... If You Like my MoaAB MOD... Remember to Press...Thanks button;)
    84
    Dear Users,
    It seems that few of us are having problems with MoaAB and getting BLOCKED due to whatever reasons also calling the dev 'idi*t'. I feel WOW.

    Let me clarify all Users that this list is "Fine Tuned" to the extent that it Blocks "Almost" all ADs and ALSO, Virus, Malware, Spyware, Bloatware and blah blah blah, Read Post No#1 for detailed information on MoaAB.

    But again its not Perfect and No MOD or Software will ever be Perfect in 100% Blocking. My MOD is constantly updated and adding hand picked blocking and just not merging plain sources but combining it will commercial sources i have access to, clearing most of the invalid blocks and giving you the Full Flexibility to customize it as per your specific needs and Not needing Daddy to Help You Out, Just Remove the entries you dont want and Thats It. If Perfect blocking is required then Go and use AdBlock, AdAway or other Apps. You are always free to use and report issues but not to silly complain of your own.

    Always report me Whats is being Blocked and What to Block and i will Happy to do it for you in my spare time as time is very important for me to be more productive and earn my living and be with my family first. This is a FREE but PREMIUM WORK for You Guys. At Least be neutral if not Appreciate.

    Cheers. :good:
    66
    to Obagleyfreer

    Thanks for this! If I already have a hosts file with lots of blocked addresses in my /etc and system/etc folders how can I add these?

    Thank you for your help

    Sent from my GT-I9100 using xda app-developers app

    Hi Obagleyfreer,

    You can append the hosts file to your '/etc/hosts' either by some terminal program (BetterTerminal) or copy your '/etc/hosts' to your PC and manually append then re-copy over USB.

    I strongly recommend to use my version of 'hosts' file over yours due to the fact that it contains updated BLOCKING Data from more than 5 sources. It also contains Custom BLOCKING Data based on my analysis.

    Happy BLOCKING.
    54
    Update: 21 March 2014

    UPDATE: 21 MARCH 2014


    Changelog:

    - Updated to latest Sources.
    - Removed lots of Not-So-Common & Least-Used Domains.
    - Updated Mobile AdBlocking Platforms.
    - Updated Malware Blocks.
    - Updated Commercial Block List, "my resources... ;)"
    - Processed User Requests.
    - aNd Other changes which i forgot...



    This Release is SUPER OPTIMIZED for Users who are in need for much lesser file size and Friendly MoaAB for there devices. All users SHOULD Flash this Release for Optimized ADBlocking experience.

    Idea is Minimum Overhead and Maximum Blocking.



    DOWNLOAD NOW !



    ENJOY :D ...
    49
    ENJOY the Latest Update...

    Sorry guys this time no Changelog.

    Cheers

    transported frm i9500 AOSP AICP