Cisco devices must regenerate self-signed certificates before 2020
cisco.com
cisco.com
This serves as a good reminder of why it’s a bad idea to set expiration dates at the end of a year, where lots of people are on leave for the holidays (this notice came out only 2 days ago). Instead try sometime less complicated, like mid March or Sept.
By convention the notAfter field is filled out in Zulu timezone (ie UTC) and so these will expire simultaneously around the world.
If you disable checking all together, then an attacker doesn't need to compromise a private key. Any impersonation attack will just work.
If you require the user to accept a specific cert (and store that information) then you can just as well let the user accept an expired cert.
The current situation just creates a lot of hassle for people without any security benefit.
Key rotation is completely separate from the lifetime of a cert. You can renew certs while keeping keys constant forever. In practice, if your key gets compromised and you have to wait for the cert to expire, then you have a very big problem. Even with letsencrypt it is likely more than a month before the cert expires.
In my experience, many "security" people see this as the purpose of their job.
So the user must still connect the self-signed certificate when connecting to the device (over ssh for example).
So in this case the user generates the certificate and also accepts it.
By the way, most ssh clients will tell you if a certificate changed. So the moment your self-signed certificate is compromised you will know.
Most implementations of ssh in the wild don't use CA (or self) signed certificates. I dont know if Cisco even supports the use of ssh with certificates.
They do -- in addition to public key auth, as GhettoMaestro mentioned.
My view now is that certificates should be renewed very often - like every month, if you see something within 6 months of expiry there is a problem.
Ugh.
We built a DB to track them; nothing special, it sends email reminders. Been meaning to just publish calendar reminders, but haven't gotten to it.
We also check expiry dates on the live certificates via one of our monitoring systems (Zabbix, but this isn't a built-in check) that will start yelling, I think, 2 weeks before expiry.
you can also build scanner yourself on top of nmap and store discovered certs in one DB and link it with your configuration management db
If you have any sort of monitoring system in place, it should also be able to check for certificate expiration (or "validity" in general). Even the old antiquated nagios has had this ability since the dawn of time.
As a sort of last resort and/or where no other solution is in place, you can do what I did on a customer's network a few years ago. Fortunately, there wasn't much "security" in place (internally, at least).
nmap can easily 1) detect/identify TLS and 2) produce "grepable" output.
I simply gathered a list of all IP subnets that were in use and scanned all of it. Afterwards, it was fairly simple to go through the results and figure out which hosts were running services using TLS on which ports.
There are existing tools that can connect to services using TLS and gather the information from the presented certificate. If you can't find one that does what you need, that's no big deal, it really doesn't take much to write your own tool just for this purpose.
(In fact, something like this -- running on a host that has access to connect to all of your TLS services -- might be nice to have even if you have a "proper" solution in place. If (when?) something falls through the cracks, you'd have this as a sort of "fallback" or "backup" to alert you to anything your proper solution might have missed.)
Edit: And yes as others pointed out, right into the day or two before holiday moratorium.
It's very likely just somebody harcoded a date "in the distant future" in some OpenSSL config file or script that generates the self-signed cert.
I'm having trouble trying to come up with any link between the two.
---
In my opinion, with the exception of perhaps very small networks, no one who's "doing it right" should really be affected by this issue.
I can kinda maybe understand folks using self-signed certificates for VPNs but, really, if you're doing much at all with certificates you should either be running your own internal PKI and/or getting certificates by somewhere else.
My previous employer had literally hundreds of devices using their own self-signed certificates (for device management) on them. Many of them were the "default" certificates that shipped on the devices, so it was the same certificate shared across hundreds of devices. As someone who gives a shit about security, that drove me absolutely nuts but no one else gave a damn. (Even worse, since nearly all of these devices used the same credentials, you'd only need to MITM one of them in order to "pwn" damn near everything on the entire network!)
For stuff like web tools that might happen by least effort, but for SSH it's a bunch of extra effort, 90% of the effort of doing it properly, yet with almost none of the security benefits. Anybody who cares will use their own CA and be unaffected, anybody who doesn't care never enabled certs for SSH on the Cisco boxes.
Pretty much the same thing happens to me every year.
Things seem to have been fixed, but it was a scary mistake to make.
touch -d 'Jan 01 2030'
I initially thought 2099 but 2030 lets you poke it again in ten years :>