A script that uses nmap to sweep a subnet looking for ports with SSL certs, then querying those certs to discover upcoming expiration dates.
/kɔnˈtrɔ.la/ - inspection (the act of examining something, often closely) [Polish] (audio)
A script that uses nmap to sweep a subnet looking for ports with SSL certs, then querying those certs to discover upcoming expiration dates. Besides discovery, it can also do more traditional tracking using a host based file that you provide. See usage for an example configuration.
There are plenty of scripts out there that will check SSL/TLS certificates and let you know when they’re due for renewal, but none (that I’ve found) that can optionally sweep a subnet, finding live hosts with ports presenting SSL certifcates, and then querying those certificates for their expiration dates, and finally displaying themm in a easy to read manner online.
The html report is built using Bootstrap, written to the html/
directory by default, and is straightforward in its presentation
git clone https://github.com/philcryer/kontrola.git
cd kontrola
domains.txt
file, adding domains you want be checked
./kontrola
Check the html/
directory for the output report
/32
of the subnet the host is running on
discovery="yes" ./kontrola
discovery="yes" discovery_subnet="10.10.0.0/32" ./kontrola
(Possible) upcoming features
kontrola -d
to do discovery, instead of setting the variable and running itkontrola -e
to have the report emailed (again, PDF would be better for this than the html out)Like most (all?) good software, kontrola
builds off of other excellent open source projects. At first I was using scripts I found on GitHub, that were excellent, but didn’t do all of what I wanted. I integrated some ideas from the following projects. If kontrola
doesn’t do what you need, look at these as options
Other outstanding open source projects used to build, presesnt, and search the reports
MIT License
Copyright (c) 2019 Phil Cryer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.