Learn Penetration Testing
上QQ阅读APP看书,第一时间看更新

Shodan

Shodan is not your average search engine. It's often referred to as the search engine for hackers. On its website, Shodan is referred to as the world's first search engine for interconnected devices. Shodan is accessible via https://www.shodan.io as shown in Figure 3:

Figure 3: The landing page for https://www.shodan.io

What is so unique about Shodan? Search engines such as Google and Bing index websites, but Shodan indexes everything, such as webcams, databases servers, medical devices, routers, and so on. Anything that is connected to the internet is indexed by Shodan.

As defined by the founder of Shodan, John Matherly, in his book, Complete Guide to Shodan, the algorithm of Shodan is simple.

1. Create a random IPv4 address
2. Look at the list of ports that Shodan understands and pick a random port
3. Using the IPv4 address generated in step 1 and the port generated in step 2, perform a connection and grab the banner
4. Repeat step 1

This algorithm does not merely crawl websites—it finds everything and indexes it. Let's take a look at some of the queries that can be run with Shodan.