Example Host Queries in Censys Search Language
Use these example queries to learn about the Censys Search Language and the searchable data available for hosts. For more information about search syntax, see Censys Query Language Syntax.
The table below provides working queries you can use to learn the Censys Search Language for querying hosts.
The first column is the Censys Search Language showcased in the query. The second column describes the query. The third column is the query syntax, linked to the Results page on search.censys.io.
Search Type |
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 1 non-HTTP service |
|
|
Wildcards |
Search for hosts with at least 1 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 |
|
|
Relative time |
Search for hosts updated in the past hour |
|
|
Relative time |
Search for CVEs with a KEV added in the past 6 months |
|
|
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 TipDraw 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 |
|
The table provides working queries you can use to learn about the data model of hosts.
The first column shows the top-level host attribute showcased in the query. The second column describes the query. The third column is the query syntax, linked to the Results page on search.censys.io.
Some of these examples were gathered from community resources like this!
Host Attribute |
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. |
|
Comments
0 comments
Article is closed for comments.