How to block DNS queries with only 1 config file

Hello everyone, this is IRISnoir from Hackingarise. Bringing to you another tutorial. Today, I will discuss about DNS query blocking.

But first, if you don’t know what DNS is or what they even mean, you should take a look at this. Also read this too if you want to understand what I’m babbling about.

Now, Malwares can use this to their advantage if you don’t know how to self secure. Luckily, this is why I am here, as a friend, to help you.

Now, what you need to do is to edit this configuration file:
Yes. This bad boy right here.

But before that, the requirements must meet:
– R0OT privilege
– A text editor (Captain obvious)
And that’s about it. But missing any of these will lead to failure.

First, getting Root privilege is relatively easy.
Next, mounting read-write is with this command:
mount -o rw,remount /system
If you want to mount it back to read-only then use:
mount -o ro,remount /system

You need root and /system mounted read-write in order to edit this file.

If the requirements meet, you can edit the file:
Use your text editor on /etc/hosts

And no, not /data/data/com.termux/files/usr/etc

After opening the editor, you can see: localhost
What you wanna do to secure yourself from bad places is to add:

Now, for example, is a bad, bad place that will do something malicious to you if you enter it. You can do this to secure yourself from it. When you accidentally press it with your fat fingers, it won’t do anything or give a virus.

The /etc/hosts file will always be read before a DNS query is made. The system will personally conduct it. If a DNS query is approved, you can view the site and vice versa, but if it is denied, the site will look like it’s not even alive and up and you will be presumed dead to them.

System: NEXT! Can I come in?

System: NEXT! Can I come in?

I hope that you find this useful. If you do, why not share it with your friends. Remember, stay safe and ethical as we are NOT responsible for any of your malicious acts.


Leave a Reply

Your email address will not be published. Required fields are marked *