Censys Search

Censys is a search engine that enables researchers to ask questions about the hosts and networks that compose the internet. Censys collects data on hosts and websites through daily ZMap and ZGrab scans of the IPv4 address space, in turn maintaining a database of how hosts and websites are configured.

Using the Censys search auxiliary module, we can use the Censys REST API to access the same data accessible through the web interface. The search endpoint allows searches against the current data in the IPv4, top million websites, and certificates indexes, using the same search syntax as the primary site.

To use the Censys S earch auxiliary module, you first need to create a free account at the  https://censys.io/ website to get your API ID and secret.

To use the Censys Search auxiliary module, we will set the Censys dork to packtpub.com, the search type to ipv4, followed by your secret and API ID, and type run to run the module:

msf > use auxiliary/gather/censys_search 
msf auxiliary(censys_search) > set CENSYS_DORK packtpub.com
CENSYS_DORK => packtpub.com
msf auxiliary(censys_search) > set CENSYS_SEARCHTYPE ipv4
CENSYS_SEARCHTYPE => ipv4
msf auxiliary(censys_search) > set CENSYS_SECRET JIxvPzj0RJkqOqd9cFNRYqNkHzH7E3en
CENSYS_SECRET => JIxvPzj0RJkqOqd9cFNRYqNkHzH7E3en
msf auxiliary(censys_search) > set CENSYS_UID ec421f73-d438-1c48-15b3-5de240bef531
CENSYS_UID => ec421f73-d438-1c48-15b3-5de240bef531
msf auxiliary(censys_search) > run
...

[+] 138.68.148.235 - 443/https,22/ssh,80/http
[+] 83.166.169.235 - 80/http
[+] 83.166.169.228 - 80/http
[+] 151.248.166.228 - 443/https,80/http
[+] 151.248.166.228 - 443/https,80/http
[*] Auxiliary module execution completed
msf auxiliary(censys_search) >