Xerosploit- A Man-In-The-Middle Attack Framework
NeMan-In-The-Middle Attacktworking is an important platform for an Ethical Hacker to check on, many of the threat can come from the internal network like network sniffing, Arp Spoofing, MITM e.t.c, This article is on Xerosploit which provides advanced MITM attack on your local network to sniff packets, steal password etc.
- 1. Introduction to Xerosploit
- 2. Man-In-The-Middle
- 3. Xerosploit Installation
- 4. PSCAN (Port Scanner)
- 5. DOS (Denial of service)
- 6. INJECTHTML (HTML INJECTION)
- 7. SNIFF
- 8. dspoof
- 9. YPLAY
- 10. REPLACE
- 11. Driftnet
For those who are not familiar with Man-in-the-middle attack, welcome to the world of internal network attacks
Dependencies
- 1. nmap
- 2. hping3
- 3. build-essential
- 4. ruby-dev
- 5. libpcap-dev
- 6. libgmp3-dev
- 7. tabulate
- 8. terminal tables
- 1. Port scanning
- 2. Network mapping
- 3. Dos attack
- 4. Html code injection
- 5. Javascript code injection
- 6. Download interception and replacement
- 7. Sniffing
- 8. DNS spoofing
- 9. Background audio reproduction
- 10. Images replacement
- 11. Drifnet
- 12. Webpage defacement and more
A man-in-the-middle attack (MITM) is an attack where the attacker secretly relays and possibly alters the communication between two parties who believe they are directly communicating with each other. There are many open source tools available online for this attack like Ettercap, MITMF, Xerosploit, e.t.c
Xerosploit is an attack tool for MITM which can run only on Linux OS to do so follow the simple steps:-
Open up terminal and type

Here it will display your network configuration including IP address, MAC address, gateway, and interface and hostname. Now run the following command on xerosploit console to know the initial commands:

In this grid, we have a list of commands for our attack and we are going for the man in middle attack, so I will choose scan command in my next step for scanning the whole network.
This command will scan the complete network and will found all devices on your network.
As you can observe that it has scanned all the active hosts. There are so many hosts in this network; you have to choose your target from the given result. I am going to select 192.168.1.105 for the man in the middle attack.


Type “dos” to load the module, it will send a succession of TCP-SYN request packet to a target’s system to make the machine unresponsive to legitimate traffic which means it is performing SYN Flood attack.
If you are aware of HPING tool then you can notice, this module is initially using HPING command for sending countless SYN request packet.

HTML injection is the vulnerability inside any website that occurs when the user input is not correctly sanitized or the output is not encoded and the attacker is able to inject valid HTML code into a vulnerable web page. There are so many techniques which could use element and attributes to submit HTML content.
So here we will replace the victim’s html page with ours. Select any page of your choice as you will notice that I have written “You have been hacked” in my index.html page which I will replace with the victim’s html page. Whatever page the victim will try to open he/she will see only the replaced one.
First, create a page as I have created & saved it on Desktop by the name of INDEX.html


Bravo! We have successfully replaced the page as you can see in the picture below.

Now run the following module to sniff all the traffic of the victim with the command:
Then enter the following command to execute that module:

When the victim will enter the username and password it will sniff and capture all the data.
Now it will open a separate terminal in which we can see all the credentials in clear text. As you can see it has successfully captured the login credentials.

It load dspoof module which will supply false DNS information to all target browsed hosts Redirect all the http traffic to the specified one IP.
Now type run command to execute module and then it will ask the IP address where you want to redirect the traffic, here we have given our Kali Linux IP.

Now, as soon as the victim will open any webpage he/she will get the page store in our web directories which we want to show him/her as shown in the picture below.

Now let’s catch the other interesting module which is yplay. It will play background video sound in the victim browser of your choice. So first execute yplay command followed by the run command and give the video i.d what you have selected.
To execute the yplay module for attack type run.

Now in no matters what the victim is doing on the laptop. If he will try to open any webpage, on the background he/shell will hear the song which we want him to listen.

I hope all the attacks were quite interesting. But the next is going to be amazing. Now we will replace all the images of the victim’s website with our images. For this first, execute the command replace followed by the run command. Don’t forget to give the path of the .png file which you have created as a surprise box for the victim.

As the victim opens any URL he/she will be amazed to see the replaced images of his/her website as shown here.

We will use the driftnet module to capture all the images the victim is surfing on the web with following commands and it will save all captured picture in opt/xerosploit/xedriftnet.

Once the attack is launched; we can sniff down all the images that he is viewing on his computer in our screen. We can do much more with this tool simply by using the move you can shake the browser contents
As you can observe that all the images what victim is viewing on his/her system are captured in your system successfully.
Hopefully! So it is needless to say that this tool XERSPLOIT is quite interesting and useful as well for performing so many attacks. I hope readers are gonna like this.


0 Comments:
Post a Comment