这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Gby56
Copy link
Contributor

@Gby56 Gby56 commented Sep 24, 2024

Hi ! I noticed that the Shodan source was completely falsely reporting subdomains when querying a subdomain.

Shodan returns all subdomains they can find under the parent domain from the query (if you ask api.example.com, you get all subdomains for example.com regardless.)

Their API response format is

{
  "domain": "example.com",
  "tags": [],
  "subdomains": [],
  "data": [],
  "more": true
}

The bug was that we assembled the subdomains with the queried subdomain, making fake subdomains attached to the queried domain.

Query: test.example.com

Actual subdomains under example.com:

Current bug output:

Expected:

  • test.example.com (itself)

@Gby56
Copy link
Contributor Author

Gby56 commented Sep 25, 2024

Fixing the tests
EDIT: nevermind, I think the tests are mostly broken due to timeout, APIs throwing errors etc...
I think the bug is pretty serious though, given how many false positives it generates, @dwisiswant0 could you take a look ?

@ehsandeep ehsandeep added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Sep 25, 2024
@dwisiswant0
Copy link
Member

Seems like the previous implementation was already correct, right? I don't see any results outside of what I had input. What am I missing here? How are you reproducing this issue? It would be better if you could go ahead and create the issue first.

image

@Gby56
Copy link
Contributor Author

Gby56 commented Sep 26, 2024

Sure thing, here is the issue with screenshots and clearer explanation.
I think the screenshots explain perfectly the behavior of the Shodan API, and why an extract filtering is required for subfinder if a subdomain is enumerated, to only get children of the subdomain.

#1389

PS: I think example.com is not a great example 😅 I just saw that the shodan API returns barely anything on that, it's better to use hackerone.com

@Gby56
Copy link
Contributor Author

Gby56 commented Sep 26, 2024

I think we're all OK here, thanks for the help @dwisiswant0 ! This should greatly increase quality, the difference is significant, from 70 subdomains on analysiscenter.veracode.com, to 4, the bug was generating quite some false positives

@dwisiswant0
Copy link
Member

Superseded by #1392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue] Shodan source reports false subdomains when enumerating a subdomain

4 participants