title | description |
---|---|
Steampipe Table: shodan_host - Query Shodan Hosts using SQL |
Allows users to query Shodan Hosts, specifically providing details about devices connected to the internet, their characteristics, and potential vulnerabilities. |
Shodan is a search engine that lets users find specific types of computers connected to the internet using a variety of filters. Some have also described it as a search engine of service banners, which are metadata that the server sends back to the client. This can be information about the server software, what options the service supports, a welcome message or anything else that the client can find out before interacting with the server.
The shodan_host
table provides insights into devices connected to the internet and their characteristics. As a security analyst, you can explore device-specific details through this table, including their IP addresses, hostnames, operating systems, and potential vulnerabilities. Utilize it to uncover information about devices, such as their geographical locations, open ports, and the services running on them.
Important Notes
- You must specify the
ip
in thewhere
clause to query this table.
Analyze the settings to understand the basic details of a specific host, such as its location, operating system, and open ports. This can be useful for network administrators to assess the security posture of their systems.
select
*
from
shodan_host
where
ip = '8.8.8.8';
select
*
from
shodan_host
where
ip = '8.8.8.8';
Explore the basic information associated with a specific IP address. This can be useful to understand the characteristics of a host, which can aid in network management and security assessments.
select
*
from
shodan_host
where
ip = '8.8.8.8';
select
*
from
shodan_host
where
ip = '8.8.8.8';
Explore which services are currently open on a specific host. This is useful for understanding potential vulnerabilities and security risks associated with open services on a host.
select
ip,
s.*
from
shodan_host as h,
jsonb_array_elements_text(h.ports) as host_port,
shodan_service as s
where
ip = '8.8.8.8'
and host_port::bigint = s.port;
select
ip,
s.*
from
shodan_host as h,
json_each(h.ports) as host_port,
shodan_service as s
where
ip = '8.8.8.8'
and host_port.value = s.port;
Analyze the geographical details of a specific internet host. This is useful for understanding the physical location of a host, which can be essential in security analysis or network management scenarios.
select
ip,
city,
country_code
from
shodan_host
where
ip = '8.8.8.8';
select
ip,
city,
country_code
from
shodan_host
where
ip = '8.8.8.8';