Closed Gby56 closed 1 month ago
I think that any subdomain (ex. Z.Y.X.domain.tld
) queried in Shodan will still display results from the (root) domain (ex. X.domain.tld
, X2.domain.tld
). Am I understanding this correctly?
Yes that's exactly what's happening ! And the problem is that we assemble the requested domain from the user, via the cli, with the subdomains from the root domain, from Shodan's API.
This basically generates fake subdomains, that don't exist at all. docs.api.hackerone.com
is an obvious one
Describe the bug A clear and concise description of what the bug is.
First, enumerate the parent domain.
Then, enumerate a subdomain, and notice that zendesk2, docs, all of these subdomains suddenly appear underneath api.hackerone.com ?
Subfinder version Include the version of subfinder you are using,
subfinder -version
v2.6.6The bug is exactly here https://github.com/projectdiscovery/subfinder/blob/6537b327867861ec4eb90d07604f8bb79bdce88d/v2/pkg/subscraping/sources/shodan/shodan.go#L79
Because subdomains are generated from concatenating the user input (api.hackerone.com) with the API response, which is giving you the subdomains of hackerone.com, NOT api.hackerone.com.
cc @dwisiswant0