cranepet
11/17/2017 - 2:24 AM

CD-CVE-2017-8529

CD-CVE-2017-8529 VBScript Registry Key LANDesk IEM Patch NGC

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