Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save decidedlygray/a3ce6eef4a4a99b0d82c7fdd38a94e54 to your computer and use it in GitHub Desktop.
Save decidedlygray/a3ce6eef4a4a99b0d82c7fdd38a94e54 to your computer and use it in GitHub Desktop.
Install LetsEncrypt CA Certs on Windows Host into Burp's Java TrustStore
# ###
# install_letsencrypt_ca_certificates_for_jvm_windows.ps1
# Based on the linux script here: https://www.nuharborsecurity.com/creating-a-private-burp-collaborator-in-amazon-aws-with-a-letsencrypt-wildcard-certificate/
# Written by @decidedlygray, 20180626
#
# NOTE: Not working at the moment. Comments welcome.
# ###
# BurpSuitePro Install Location
$BurpInstallLocation="C:\Program Files\BurpSuitePro\"
$Keystore=$($BurpInstallLocation + "jre\lib\security\cacerts")
$BurpKeytool=$($BurpInstallLocation + "jre\bin\keytool")
$downloadClient = new-object System.Net.WebClient
$downloadClient.DownloadFile("https://letsencrypt.org/certs/letsencryptauthorityx1.der",$($env:TEMP + "\letsencryptauthorityx1.der"))
$downloadClient.DownloadFile("https://letsencrypt.org/certs/letsencryptauthorityx2.der",$($env:TEMP + "\letsencryptauthorityx2.der"))
$downloadClient.DownloadFile("https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.der",$($env:TEMP + "\lets-encrypt-x1-cross-signed.der"))
$downloadClient.DownloadFile("https://letsencrypt.org/certs/lets-encrypt-x2-cross-signed.der",$($env:TEMP + "\lets-encrypt-x2-cross-signed.der"))
$downloadClient.DownloadFile("https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.der",$($env:TEMP + "\lets-encrypt-x3-cross-signed.der"))
$downloadClient.DownloadFile("https://letsencrypt.org/certs/lets-encrypt-x4-cross-signed.der",$($env:TEMP + "\lets-encrypt-x4-cross-signed.der"))
cmd /c "`"`"$BurpKeytool`"`"" -trustcacerts -importcert -storepass changeit -noprompt -alias isrgrootx1 -file $($env:TEMP + "\letsencryptauthorityx1.der")
cmd /c "`"`"$BurpKeytool`"`"" -trustcacerts -importcert -storepass changeit -noprompt -alias isrgrootx2 -file $($env:TEMP + "\letsencryptauthorityx2.der")
cmd /c "`"`"$BurpKeytool`"`"" -trustcacerts -importcert -storepass changeit -noprompt -alias letsencryptauthorityx1 -file $($env:TEMP + "\lets-encrypt-x1-cross-signed.der")
cmd /c "`"`"$BurpKeytool`"`"" -trustcacerts -importcert -storepass changeit -noprompt -alias letsencryptauthorityx2 -file $($env:TEMP + "\lets-encrypt-x2-cross-signed.der")
cmd /c "`"`"$BurpKeytool`"`"" -trustcacerts -importcert -storepass changeit -noprompt -alias letsencryptauthorityx3 -file $($env:TEMP + "\lets-encrypt-x3-cross-signed.der")
cmd /c "`"`"$BurpKeytool`"`"" -trustcacerts -importcert -storepass changeit -noprompt -alias letsencryptauthorityx4 -file $($env:TEMP + "\lets-encrypt-x4-cross-signed.der")
Remove-Item $($env:TEMP + "\letsencryptauthorityx1.der")
Remove-Item $($env:TEMP + "\letsencryptauthorityx2.der")
Remove-Item $($env:TEMP + "\lets-encrypt-x1-cross-signed.der")
Remove-Item $($env:TEMP + "\lets-encrypt-x2-cross-signed.der")
Remove-Item $($env:TEMP + "\lets-encrypt-x3-cross-signed.der")
Remove-Item $($env:TEMP + "\lets-encrypt-x4-cross-signed.der")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment