Now that Internet DNS hijacking is common, it is easy for operators to implement DNS hijacking, what is DNS hijacking? Baidu Encyclopedia is introduced as follows:
DNS hijacking, also known as domain name hijacking, refers to intercepting domain name resolution requests within the hijacked network, analyzing the requested domain names, and releasing requests outside the scope of review, otherwise returning a fake IP address or doing nothing to make the request unresponsive.
Today, I want to crack the program I wrote, the program needs http authentication to run normally, so crack the program, you can forge the http response content, to make the program think that I am an authenticated user, fake http response, there are many methods, today I thought about it, can you use the DNS hijacking method to forge the corresponding IP address of the domain name, so as to forge the http response content.
To implement DNS hijacking, the easiest way is the hosts file, there are a lot of specific methods on the Internet, today, let's write a DNS hijacking gadget in C#
The first step was that we wrote the program at that time, and the purpose of the program was to put the programwww.itsvse.comThe parsing points to 127.0.0.1, I have built an 80-port website with IIS, not to mention this step, the source code is at the bottom.
The second step is to modify the DNS server of the machine to 127.0.0.1, as shown in the figure below:
The third step is to start the program we have written, and then, we access it with the websitewww.itsvse.com, you will find that the content returned by the website is not the content of our real website! The content of another web page has been completely forged, as shown below:
When we open Baidu, we will find that Baidu cannot be opened because we only respondwww.itsvse.comThe resolution of domain name requests is ignored by other domain name resolutions, as shown in the figure below:
How do we deal with DNS hijacking? There are many ways, but there are policies and countermeasures, is the spear strong or the shield powerful?
Haha, Done.
Source code download:
Tourists, if you want to see the hidden content of this post, please Reply
|