Host Query Examples
Use the tables of example queries in this doc to learn about the Censys Search Language and the searchable data available for hosts.
Examples of Search Language Features
The first table below provides working queries you can use to learn the Censys Search Language for querying hosts.
The first column indicates the Censys Search Language feature showcased in the query, the second column provides a description of the query, and the third column presents the query syntax, which is linked to the results page on search.censys.io.
Search Feature | Query Description | Link | Query |
---|---|---|---|
Full Text Search |
Search for hosts whose parsed data contains the word hello |
|
|
Full Text Search |
Search for hosts whose parsed data contains the words hello and world although not necessarily together |
|
|
Full Text Search |
Search for hosts whose parsed data contains the phrase hello world |
|
|
Field:Value Pairs |
Search for hosts with an HTTP service whose HTML title indicates it is exposing a directory |
|
|
Exact Match Operator |
Search for hosts with an HTTP service whose hashed body content indicates that it is a Brute Ratel C4 server |
|
|
Boolean Logic |
Search for hosts in the U.S. with any reference to the string "teslamate" |
|
|
Set Operator |
Search for hosts that have any of the following ports open: 22, 23, 24, 25 |
|
|
Boolean Logic |
Search for hosts that have no HTTP services |
|
|
Boolean Logic |
Search for hosts that have at least one non-HTTP service |
|
|
Wildcards |
Search for hosts with at least one service presenting a certificate during a TLS handshake |
|
|
Regular Expressions (Paid users only) |
Search for hosts presenting certificates with a name foo1, foo2, foo3…foo100 followed by any value |
|
|
Ranges |
Search for hosts whose IP address falls within the specified range |
|
|
Ranges |
Search for hosts whose location is within a box specified by its geographic coordinates (TIP: draw a box on this map and open Search with the coordinate ranges populated!) |
|
|
Nested field queries |
Search for hosts running the SSH protocol on ports other than 22 and 2222 |
|
|
Nested field queries |
Search for hosts running Elasticsearch on port 443 |
|
|
Nested field queries |
Search for hosts with a an HTTP service with an open directory list and suspicious file names in their contents |
|
Examples of Host Attributes
The next table provides working queries you can use to learn about the data model of hosts.
The first column describes the top-level host attribute showcased in the query, the second column provides a description of the query, and the third column presents the query syntax, which is linked to the results page on search.censys.io.
Host Attribute | Query Description | Link | Query |
---|---|---|---|
Perspective |
Search for hosts with services that were last observed by Censys Scanners within NTT and TELIA ISPs |
|
|
Web Servers |
Search for hosts with a page title on the HTTP service containing the word "dashboard" |
|
|
Web Servers |
Search for hosts that have an HTTP service that responded with a 500 status code |
|
|
Web Servers |
Search for hosts that have specific HTTP header value pairs |
|
|
TLS |
Search for hosts that have an RDP service that is presenting a certificate |
|
|
TLS |
Search for hosts with a service using TLSv1.0 encryption |
|
|
TLS |
Search for hosts presenting a certificate with the string "localhost" in the subject_dn |
|
|
Software |
Search for hosts running Microsoft IIS 7.5 |
|
|
Software with CPE URIs |
Search for hosts running Microsoft Exchange |
|
|
Searching CPE Software, OS, Product, Manufacturer |
Search for hosts with a service running OpenSSH version 7.6p1 software on Linux version 18.04. |
|
|
Searching CPE Software, OS, Product, Manufacturer |
Search for hosts running a Raspberry Pi product |
|
|
Searching Location |
Search for hosts in Russia |
|
|
Search Location |
Search for hosts in Israel, excluding Tel Aviv |
|
Some of these examples were gathered from community resources like this!
Diàtaxis: reference
Comments
0 comments
Article is closed for comments.