vbscript CD-CVE-2017-8529

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript CD-CVE-2017-8529相关的知识,希望对你有一定的参考价值。

Dim strComputer, strBranch, strKeyPath, strKeyName, strDWordValue
Dim objNetwork, objReg
Const HKEY_LOCAL_MACHINE = &H80000002

Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

strBranch = HKEY_LOCAL_MACHINE
strKeyPath1 = "SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ENABLE_PRINT_INFO_DISCLOSURE_FIX"
strKeyPath2 = "SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ENABLE_PRINT_INFO_DISCLOSURE_FIX"
strKeyName = "iexplore.exe"
strDWordValue = 1

Log ("********** Begin detection for the registry keys ********** ")
If CheckRegValues (strBranch, strKeyPath1, strKeyPath2, strKeyName) = True Then
ReportRepairResult  True, "The required DWORD values WERE NOT present in the registry."
' MsgBox "The required DWORD values ARE NOT present in the registry."
Else
ReportRepairResult  False, "The required DWORD values WERE present in the registry."
' MsgBox "The required DWORD values ARE present in the registry."
End If
Log ("********** End detection for the registry keys **********")

Function CheckRegValues (branch, path1, path2, name)
 Dim value
 
 objReg.GetDWORDValue branch, path1, name, value
 If value = strDWordValue Then
  Log ("The 64-bit registry DWORD value was found.")
  CheckRegValues = False
 Else
  Log ("Setting the 64-bit registry DWORD value.")
  objReg.SetDWORDValue branch, path1, name, strDWordValue
  CheckRegValues = True
 End If

 objReg.GetDWORDValue branch, path2, name, value
 If value = strDWordValue Then
  Log ("The 32-bit registry DWORD value was found.")
  CheckRegValues = False
 Else
  Log ("Setting the 32-bit registry DWORD value.")
  objReg.SetDWORDValue branch, path2, name, strDWordValue
  CheckRegValues = True
 End If
 
End Function

以上是关于vbscript CD-CVE-2017-8529的主要内容,如果未能解决你的问题,请参考以下文章

vbscript VBScript中

vbscript VBSCRIPT_EMAIL

vbscript SHA-256哈希的VBScript代码

vbscript 使用VBScript发送电子邮件

vbscript VBScript:运行本地或远程策略。

vbscript VBScript将可用磁盘空间写入文件