Quick Guide: Shodan & Censys

Started by d4mn2 replies31 views

Hi Cayenne

Both Shodan and Censys constantly scan the internet and collect data about exposed hosts, open ports, running services, and SSL certificates.

The main thing to understand: you don't need to scan anything yourself. Both platforms already have huge databases of collected data. You just search through them using filters and queries.

Shodan (shodan.io)

Getting Started

First, create an account. The free plan is pretty limited, so you'll get more filters and search results with a paid subscription.

Once you're in, just type your query into the search bar. Planning to use the CLI or write scripts? Grab your API key from your profile.

Basic Filters

Here are some of the filters you'll probably use the most:
Hidden contentLog in and reply to this thread to unlock it.
Log in to unlock
You can also combine multiple filters in one query. For example:

org:"DarkWeb" port:22 country:Italy

This will narrow down the results to hosts matching all three conditions.

Useful Features

A few other things worth checking out:

- Facets - shows stats for your search results, such as countries, ports, and products. Pretty useful when you want to get a quick overview.
- Host lookup - run `shodan host <IP> to see everything Shodan has collected about a specific address.
- Shodan Monitor - keeps an eye on your IP addresses and sends alerts when something changes, like a newly exposed port.

CLI & Python

You don't have to use the web interface for everything. Shodan also has a CLI and a Python library, which are handy for automation.

Code
```bash
pip install shodan
shodan init YOUR_API_KEY
shodan host 8.8.8.8
shodan search "apache country:Italy"

Censys (censys.io)


Censys is another major player in this space, but there's one thing to keep in mind: the platform has moved to a new interface at platform.censys.io.

The new platform uses CenQL, so some query syntax and field names are different from what you might remember from the old Censys Search 2.0.

Getting Started

Create an account first. The free plan comes with limits on queries and data access.

You can enter queries directly into the search bar. For automation, you'll also need an API token, which you can generate in your account settings.

Query Examples (New Platform)

Here are a few basic CenQL examples:
Hidden contentLog in and reply to this thread to unlock it.
Log in to unlock
You can combine conditions using operators like:

- and
- or
- not


What Makes Censys Useful?


Censys is especially good when it comes to SSL/TLS certificates.

For example, you can look for certificates containing your domain name and find hosts associated with it.

The platform has two main sections:

- Hosts - information about IP addresses and their exposed services.
- Certificates - information about SSL/TLS certificates.

There's also a Python library (pip install censys) and a CLI, so you can automate searches instead of doing everything manually.

Typical Use Cases

So, what can you actually use these platforms for?

- Finding forgotten assets - old subdomains, test servers, forgotten infrastructure, and other assets that might still be exposed to the internet.
- Checking exposed software - figuring out which services and software versions are visible from the outside.
- Comparing results - search for the same IP, domain, or service in both Shodan and Censys. Their databases don't always show the same information, so checking both can give you a better picture.


Enjoy yourself

Last edited by d4mn

"[/hide]" doesn't work in code blocks, you need to put it before the codeblock starts, hope this helps :D
_______________

Data broker

"[/hide]" doesn't work in code blocks, you need to put it before the codeblock starts, hope this helps :D

ty!!
Love1

You must log in or register to reply here.

Back to Tutorials