White Hat Institute

Attack web server with Websploit

Websploit is an open-source tool, utilized for testing web applications and networks. It is created in Python and uses modules to perform different exercises, for example, directory examining, man-in-the-middles, and wireless assaults. The capacity of this tool is very similar to Metasploit and incorporates many of its plugins to add more functionality.

The new Kali Linux distribution should come pre-installed with this tool, but in any case, if you don’t have it, use the “apt install” command to download it.

Ex: (root@kali:~# apt install websploit).

After the installation process, you can run it from anywhere in the terminal by typing “websploit.”

websploit 1

On the welcome page, type “show modules” to list all available modules that can be used with websploit.

Here is a list of possible modules:

Web Modules Description

— — — — — — — — — — — — — —

To scan directories of Apache users, use “web/apache_users.”

To scan directories, use “web/dir_scanner.”

For information gathering utilizing Metasploit Wmap, use “web/wmap.

To scan the PHPMyAdmin login page, use “web/pma.”

Network Modules Description

— — — — — — — — — — — — — —

For ARP Cache Denial of Service attack, use “network/arp_dos.”

For the Middle Finger of Doom attack, use “network/mfod.”

For Man in The Middle attackuse “network/mitm.”

For Man Left in The Middle attack, use “network/mlitm.”

For TCP Kill attack, use “network/webkiller.”

For fake update attacks utilizing DNS Spoof, use “network/fakeupdate.”

To create a fake Access Point, use “network/fakeap.”

Exploit Modules Description

— — — — — — — — — — — — — —

For Metasploit Autopwn service, use “exploit/autopwn.”

For Metasploit Browser Autopwn service, use “exploit/browser_autopwn.”

For Java Applet attack utilizing HTML, use “exploit/java_applet.”

Wireless Modules Description

— — — — — — — — — — — — — —

To jam Wi-Fi, use “wifi/wifi_jammer.”

To perform the Wi-Fi DoS attack, use “wifi/wifi_dos.”

websploit 2

For this example, we will be using the “network/mitm” module to perform a man-in-the-middle attack. Type “network/mitm” to select the module followed by the “show option” command to list all available options.

websploit 3

Set the router IP and target IP then type “run” to start the process. If you want to change the sniffer option, you can select it from the provided sniffer list. For this tutorial, we kept the default sniffer, which is the “driftnet.” Driftnet monitors network traffic and gathers JPEG, GIF, and other image files to display them on the screen. It is a horrific breach of privacy and shouldn’t be used by anyone anywhere. It can also extract MPEG audio data from the network and play it for you.

websploit 4

Once our victim searches for any image on the internet browser, the websploit’s MITM module will capture the traffic and send the sniffer results to the attacker machine.

websploit 5

As you can see in the screenshot below, we managed to receive driftnet sniffer results.

websploit 7

There are a few ways to avoid ARP poisoning or ensure your safety. The following are a few of these methods: using a static MAC address, a VPN, managed package review, and encryption are some options.

Any of these techniques put a lot of strain on system administrators. Mapping devices with static IP and MAC addresses, for example, can help avoid some attacks but is difficult to manage, particularly in large networks. Attacks, on the other hand, can be avoided by using packet analysis and filtering tools to detect anomalies in network traffic. Another option is to use a VPN, but this adds to the cost and complexity. 

Stable protocols such as HTTPS and SSL can also be used in the network as an alternative. Naturally, this solution will raise costs, especially in large networks. The encryption of packets to ensure the secure transmission of data without altering the network’s operation is one of the easiest and most cost-effective solutions for solving this security issue in the network environment.