Jump to content
Sign in to follow this  
supersonic

Control Java Runtime Environment 7 (JRE7) security settings

Recommended Posts

supersonic

Hi,

it's about time to give something back to the AutoIt community! :)

Currently you can read a lot about security issues regarding JRE7. Therefore it's quite useful to control the JRE7 settings file named "deployment.properties". Due to its own "special" format it is quite unmanageable. With the help of this script you can manage JRE7 security settings in the "#deployment.properties" section. With the help of PSEXEC you can remotely deploy such settings.

Example - DISABLE (current user only):

#NoTrayIcon
;~ #RequireAdmin

#include ".\_JRE7_Security.au3"

AutoItSetOption("MustDeclareVars", 1) ; Opt()

; Example (DISABLE [current user only]).

Local $iJRE7_MSIEEnable = _JRE7_MSIEEnable(False)
ConsoleWrite("_JRE7_MSIEEnable() -> [" & $iJRE7_MSIEEnable & "][" & @error & "][" & @extended & "]" & @CRLF)

; [http://www.h-online.com/security/news/item/Java-certificate-checks-botched-1817879.html],
; [http://www.heise.de/security/meldung/Java-pfuscht-bei-Zertifikatschecks-1817775.html].
Local Const $aJRE7_DeploymentPropertiesUDS[2][2] = [ _
        ["deployment.security.validation.crl=", ""], _
        ["deployment.security.validation.ocsp=", ""]]
$___JRE7_DEPLOYMENT_PROPERTIES_UDS = $aJRE7_DeploymentPropertiesUDS
Local $iJRE7_SecurityLevel = _JRE7_SecurityLevel()
ConsoleWrite("_JRE7_SecurityLevel() -> [" & $iJRE7_SecurityLevel & "][" & @error & "][" & @extended & "]" & @CRLF)</autoit>

Example - ENABLE (current user only):

#NoTrayIcon
;~ #RequireAdmin

#include ".\_JRE7_Security.au3"

AutoItSetOption("MustDeclareVars", 1) ; Opt()

; Example (ENABLE [current user only]).

Local $iJRE7_MSIEEnable = _JRE7_MSIEEnable()
ConsoleWrite("_JRE7_MSIEEnable() -> [" & $iJRE7_MSIEEnable & "][" & @error & "][" & @extended & "]" & @CRLF)

; [http://www.h-online.com/security/news/item/Java-certificate-checks-botched-1817879.html],
; [http://www.heise.de/security/meldung/Java-pfuscht-bei-Zertifikatschecks-1817775.html].
Local Const $aJRE7_DeploymentPropertiesUDS[2][2] = [ _
        ["deployment.security.validation.crl=", "true"], _
        ["deployment.security.validation.ocsp=", "true"]]
$___JRE7_DEPLOYMENT_PROPERTIES_UDS = $aJRE7_DeploymentPropertiesUDS
Local $iJRE7_SecurityLevel = _JRE7_SecurityLevel()
ConsoleWrite("_JRE7_SecurityLevel() -> [" & $iJRE7_SecurityLevel & "][" & @error & "][" & @extended & "]" & @CRLF)

The script has the status "work in progress" - I am pretty sure it can be improved. Any constructive suggestions are welcome. Note: Use it at your own risk!

_Registry.au3

_JRE7_Security_U21.au3

Edited by supersonic

Share this post


Link to post
Share on other sites
redsoul

trying to use it in my project

thanks~~~

Share this post


Link to post
Share on other sites
supersonic

I've updated the main script to meet the needs of JRE7 U21+.

Edited by supersonic

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×