Shodan Basics: Search the Internet for Exposed Devices (Legally)


Google searches websites. Shodan searches everything else — every device connected to the internet. Webcams, routers, industrial controllers, databases, servers, smart TVs. If it has an IP address and an open port, Shodan probably has it indexed. Here’s how this powerful tool works, and how to use it without crossing a legal line.

What Is Shodan?

Shodan is a search engine that constantly scans the entire internet and records what it finds: open ports, banners, software versions, and sometimes even screenshots. Where Google indexes web pages, Shodan indexes services. A search for port:22 returns SSH servers. A search for webcam returns publicly reachable cameras. A search for default password finds devices still running factory credentials.

Security teams use it for defense: find your own exposed assets before attackers do. Attackers use it for offense: find the easiest targets. The tool itself is neutral. What you do with it is what matters.

Your First Searches

The free account lets you run a limited number of searches. Start with these:

  • port:22 country:IN — SSH servers in India (your own country’s exposure)
  • org:”Your Company Name” — everything Shodan has indexed under your organization
  • ssl:true port:443 — HTTPS servers with certificates, useful for finding forgotten subdomains
  • product:Apache — servers running a specific software, handy for checking your own fleet
  • has_vuln:true — devices Shodan flags as running known-vulnerable software

Filters are the real power. Combine them: port:3306 country:US finds exposed MySQL databases. city:”Mumbai” port:80 narrows to one city’s web servers.

The Legal Rules — Read This Twice

Shodan itself is legal. Accessing what you find is often not. The rules are simple:

  1. Only test what you own or have written permission to test. Searching Shodan is fine. Logging into a camera you found is not.
  2. Never try default credentials on someone else’s device. That’s unauthorized access in most countries, even if the password is “admin”.
  3. Use it on your own footprint first. Search for your organization’s name, your IP ranges, and your domains. Fix what you find exposed.

How to Protect Yourself From Shodan

The flip side of learning Shodan is learning how to disappear from it:

  • Close ports you don’t need. Every open port is a search result waiting to happen. Use a firewall to block everything except what you actually serve.
  • Change default passwords immediately. Shodan’s most damning results are devices still running factory logins.
  • Don’t expose admin panels to the internet. Routers, cameras and NAS devices belong behind a VPN, not on a public IP.
  • Keep firmware updated. Shodan indexes software versions — an old version is a flashing target.
  • Check your exposure regularly. Run a Shodan search on your own IP range once a month. What you find is what attackers find.

Level Up

  • Shodan Monitor alerts you when a new device appears under your network.
  • Shodan CLI lets you script searches and pipe results into your own tooling.
  • Pair it with Censys, a similar search engine, for a second opinion on your exposure.

Shodan is a mirror: it shows you exactly what the internet sees. Look into it, fix what it shows, and you just made yourself a much harder target.

Comments

Popular Posts