What is sinkholing?
Sinkholing is the redirection of traffic away from its original destination and into a controlled location, known as a sinkhole. Why? During the Locked Shields cyber exercise we observed unwanted traffic heading to specific domains. We decided to redirect those domains to a machine we controlled, where we could analyse the (encrypted) communications.
The infected machines were communicating over encryption and we didn't have the private key — we were relying on the fact that they wouldn't verify the server certificate (we used a simple openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes). They didn't verify it, so we were able to identify the content of the requests at the endpoint. The HTTPS server was a modified SimpleHTTPServer. We successfully uncovered the content, identified the infected machines, and eliminated the infection.
Sinkholing is a fairly effective method — and that certainly wasn't the last time we used it.