Skip to content

CrazyComputer2008/WindowsCAMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

WindowsCAMonitor

Introduction

This project is originally designed for Kener to support Windows CA monitoring and report its status to the API using a Powershell script.
All the parameters were designed just like the way it shows in pkiview.msc to act as an alternative.
Actually you can use any Status Page Service because it just use Invoke-WebRequest to send status to APIs...

Requirements

  • A Functioning Windows Server CA (You can use pkiview.msc to view that)
  • A Client installed with Powershell v5 or later to host the script (Better on Windows 7 & Server 2008 R2 and later versions)
  • A Path to put all the CRL&Certificates temporarily
  • A Computer with OpenSSL installed (Only for OCSP Support)
  • If you're only using Windows and don't use Linux or Unix based systems, you can download OpenSSL here

Usage

  1. Use pkiview.msc to check your CA is functioning
  2. Write down all the information in pkiview.msc
  3. Change the variables according to your environment (Using the information from the above step)
  4. Generate a request body for OCSP testing using OpenSSL (Listed Below)
  5. Get your CA certificate and a certificate which was revoked
  6. Put all the Files under the same path with the script
  7. Test the script before production
  8. Set the script to run every x minute as you like (Use Scheduled Tasks Manager shipped with Windows)
  9. Done!

How to generate OCSP request body

  1. Create an OCSP request to work with, this also will produce a POST to the OCSP responder
    openssl ocsp -noverify -no_nonce -respout OCSP.resp -reqout OCSP.req -issuer CA.cer -cert Revoked.cer -url "your_ocsp_address" -header "HOST" "your_ocsp_host" -text
  2. Put the OCSP.req file under the same path with the script

Acknowledgements

  1. Huge thanks for UNMITIGATED RISK providing the method to generate ocsp request body!
  2. Thanks Kener for Status Pages and the idea!

About

A Powershell Script To Monitor Windows CA And Report Status Using APIs (Kener)

Resources

License

Stars

Watchers

Forks

Contributors