Howdy! This is part of a regular series of posts in which we’ll highlight useful, interesting, and otherwise cool queries for use with Censys Search and ASM. If you have any questions, similar queries, or custom versions of this week’s highlight, let us know!
This week, I want to show off our recently-released relative time frame functionality.
You can use these in ASM and Search queries to easily find and analyze items based on dynamic time periods that are relative to the current time. The following example queries illustrate how to use this functionality.
In ASM:
- Assets discovered today: association_date: tnow/d TO *]
- Risk discovered in the past 3 days: risks.discovered_at: anow-3d TO *]
- Domains expiring tomorrow: domain.expiration_date: t* TO now+1d]
In Search:
- Hosts updated in the past hour: last_updated_at: anow-1h TO *]
- Hosts with CVEs that have a KEV added in the past 6 months: cves.kev.date_added: enow-6M TO *]
- Certificates that were revoked in the past 8 hours: revocation.crl.revocation_time: mnow-8h TO *]
There is more info about relative time frames available in our docs for ASM and Search.