找回密码
 开放注册

QQ登录

只需一步,快速开始

微信登录

微信扫码,快速开始

搜索
查看: 1322|回复: 0

入侵常用vbs提权

[复制链接]

4

主题

19

回帖

41

牛毛

初生牛犊

初学

积分
41
发表于 2010-6-5 21:35:48 | 显示全部楼层 |阅读模式 来自 黑龙江省大庆市
3389端口查询
   
Dim ReadComputerName
Set ReadComputerName=WScript.CreateObject("WScript.Shell")
Dim TSName,TSRegPath
TSRegPath="HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\PortNumber"
TSName=ReadComputerName.RegRead(TSRegPath)
WScript.Echo("TermService port is:"&TSName)
列iis信息
Set ObjService=GetObject("IIS://LocalHost/W3SVC")
For Each obj3w In objservice
If IsNumeric(obj3w.Name) Then
   sServerName=Obj3w.ServerComment
   Set webSite = GetObject("IIS://Localhost/W3SVC/" & obj3w.Name & "/Root")
   ListAllWeb = ListAllWeb & obj3w.Name & String(25-Len(obj3w.Name)," ") & obj3w.ServerComment & "(" & webSite.Path & ")" & vbCrLf
   End If
Next
WScript.Echo ListAllWeb
Set ObjService=Nothing
WScript.Quit

VBS连接access
On Error Resume Next
dim db
db="insidert.mdb"
Set rs=CreateObject("ADODB.RecordSet")
Set conn=CreateObject("ADODB.Connection")
conn="Provider=Microsoft.Jet.OleDb.4.0;Jet OLEDB:Database Password=cq110insider;Data Source=" &db
rs.open "select * from insiderinfo where insidernumber=''123****7890''",conn,1,2
if rs.eof and rs.bof then
else
rs("sparetime")=9000
rs.update
end if
vbs操作注册表
Dim OperationRegistry
Set OperationRegistry=WScript.CreateObject("WScript.Shell")
Dim Read_Data1,Read_Data2
Read_Data1=OperationRegistry.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ie4\setup\path")
msgbox Read_Data1
vbs 劫持

Dim AutoRunProgram
Set AutoRunProgram=Wscript.CreateObject("Wscript.Shell")
RegPath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\"
Type_Name="REG_SZ"
Key_Name="Debugger"
Key_Data="calc.exe"
AutoRunProgram.RegWrite RegPath&Key_Name,Key_Data,Type_Name

vbs 读取目录所有文件

Function TreeIt(sPath)
Set oFso = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFso.GetFolder(sPath)
Set oSubFolders = oFolder.Subfolders
Set oFiles = oFolder.Files
For Each oFile In oFiles
  wscript.echo oFile.Path
Next
For Each oSubFolder In oSubFolders
  wscript.echo oSubFolder.Path ''目录''
  TreeIt(oSubFolder.Path)''递归
Next
Set oFolder = Nothing
Set oSubFolders = Nothing
Set oFso = Nothing
End Function
TreeIt "c:\www1\"
vbs正则表达式
Str = "<img src=""123.Gif"" alt=""dsddfsa"" >     <img src=""123.jpG"" > <img src=""123.jpg""><IMG SRC=123.JPG>"
Function getImages(Str)
      Set re = New RegExp
      re.Pattern = "<img(.+?)src=""*([^\s]+?)""*(\s|>)"
      re.Global = True
      re.IgnoreCase = True
      Set Contents = re.Execute(Str)
      For Each Match in Contents '' 遍历匹配集合。
          Images = Images + Match.SubMatches(1) + "|"
      Next
      getImages = Mid(Images, 1, Len(Images) -1)
End Function
MsgBox(getImages(Str))

文章转载自『非安全中国网』
您需要登录后才可以回帖 登录 | 开放注册

本版积分规则

帮助|Archiver|小黑屋|通信管理局专项备案号:[2008]238号|NB5社区 ( 皖ICP备08004151号;皖公网安备34010402700514号 )

GMT+8, 2025-4-27 09:36 , Processed in 0.132802 second(s), 33 queries .

Powered by Discuz! X3.5

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