Re: Search country from list in crt.sh

76 views
Skip to first unread message
Message has been deleted

r...@sectigo.com

unread,
Jul 7, 2023, 5:20:41 AM7/7/23
to crt.sh
There aren't any suitable database indexes to enable that sort of search to be done efficiently.  Subject:countryName isn't indexed at all.

Please take a look at https://github.com/robstradling/CeRTSearcH, which uses the publicly accessible postgres database at crt.sh:5432.  The following command will trawl through the entire database (until you press CTRL+C) and write details of all certs with Subject:countryName=US to a file.

./CeRTSearcH -q US -sanType NONE -subjectType 2.5.4.6 -startID 1 2> country_equals_us.json

Please note: It will take several days to process all of the records that currently exist.

To apply your additional "that have a CA like a digecert" filter, you could either (1) edit the SQL in certsearch.go before running that command, or (2) use "jq" afterwards to extract the results of interest from country_equals_us.json.

On Wednesday, July 5, 2023 at 3:13:08 PM UTC+1 Ferti wrote:
Hi everyone, first thanks a lots to rodd for this tool,
i would like ask how i can search list of sites in crt.sh that have a CA like a digecert and from country=US at same time.
i tried put C=US in the bar but this appear error

Matthew McPherrin

unread,
Jul 10, 2023, 10:41:33 AM7/10/23
to r...@sectigo.com, crt.sh
As an alternative, Censys does index country, so you could use a certificate search there like:

parsed.subject.country=US and parsed.issuer.organization=`DigiCert Inc` and labels=`ever-trusted`

--
You received this message because you are subscribed to the Google Groups "crt.sh" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crtsh+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/crtsh/e0fe9a99-a90e-48b8-b26b-ec3bfbfd813an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages