xShock: Shellshock Exploit


xShock: Shellshock Exploit

xShock is an open-source tool used for exploiting the Shellshock family of security bugs within the Unix Bash shell. xShock allows the user to search for CGI vulnerability, specific files and for vulnerable directories. After finding the exposed files, the user can remotely run commands and gain access to services which use Bash to process requests.

Unix Bash Shell: GNU Bash or simply Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. It’s a command processor that typically runs in a text window where the user types commands that cause actions. Bash can also read and execute commands from a file, called a shell script. (Source: Wikipedia)

xShock: Shellshock Exploit

After running xShock, the user must submit a url, after which the program will search for a cgi-bin within the url. If a cgi-bin is found, the user must submit the address of the cg-bin and the wordlist which the software is to run through. It will then search for vulnerable directories within the cgi-bin which contain the entries in the wordlist. The user can then access the vulnerable directory and run the desired commands.

Founded directories will be saved in vulnurl.txt file, results of the executed commands in response.txt.

Features:

  • Search for vulnerable CGI
  • Scan for directories
  • Run commands on exposed CGI
  • Show vulnerable URL’s
  • Change proxy

Supported Platforms:

  • Linux

Requirements:

  • Python 3+

Install xShock

Clone the GitHub repo:

$ git clone https://github.com/capture0x/xShock/

Navigate to the working directory and install the requirements:

$ cd xShock
$ pip3 install -r requirements.txt

Basic Usage

Enter the following command:

$ python3 main.py
 @@@  @@@   @@@@@@   @@@  @@@   @@@@@@    @@@@@@@  @@@  @@@  
 @@@  @@@  @@@@@@@   @@@  @@@  @@@@@@@@  @@@@@@@@  @@@  @@@  
 @@!  !@@  !@@       @@!  @@@  @@!  @@@  !@@       @@!  !@@  
 !@!  @!!  !@!       !@!  @!@  !@!  @!@  !@!       !@!  @!!  
  !@@!@!   !!@@!!    @!@!@!@!  @!@  !@!  !@!       @!@@!@!   
   @!!!     !!@!!!   !!!@!!!!  !@!  !!!  !!!       !!@!!!    
  !: :!!        !:!  !!:  !!!  !!:  !!!  :!!       !!: :!!   
 :!:  !:!      !:!   :!:  !:!  :!:  !:!  :!:       :!:  !:!  
  ::  :::  :::: ::   ::   :::  ::::: ::   ::: :::   ::  :::  
  :   ::   :: : :     :   : :   : :  :    :: :: :   :   :::
  
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  
 @~~~               SHELL SHOCK TOOL                   ~~~@
  
 @~~~~             INSTAGRAM==>TMRSWRR                ~~~~@
  
 @~~~~~~          CODED BY HULYA KARABAG            ~~~~~~@
  
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  
 @@@              WELCOME TO XSHOCK TOOL                @@@
  
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  
 Proxies saved  proxy.txt
  
  
 |~~|~~|~~|         WELCOME TO XSHOCK            |~~|~~|~~|  
  
 1) CGI VULN SCAN
 2) DIRECTORY SCAN
 3) RUN COMMAND WITH FOUNDED CGI
 4) SHOW VULNERABLE URLS
 5) UPDATE PROXY
 6) EXIT
  
 Please update proxies from 5 first...
  
        PLEASE SELECT ENTRY  : 

xShock Usage Examples

CGI Vulnerability

Checks cgi-bin directory on the target site:

http://targetsite.com

Directory Scan

Scans url on the target site.. Works with wordlists, but don’t forget to enter full path of wordlist after the url:

http://targetsite.com/cgi-bin
/usr/share/wordlists/dirb  --> This is directory of wordlist. Not file!

Run command with founded CGI

Running commands in the found urls is possible by entering the url in the vuln.txt file:

http://targetsite.com/cgi-bin/status
Documentation Box
Download Box