infobyte / infobyte/faraday_plugins

Wrong Parsing of Service Name in Shodan Plugin

Open
#31 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
61
Forks
22
PR merge metrics
No merged PRs in 30d

Description

When initiating a scan using the Shodan plugin, it sets the default service as 'http' for all hosts. This issue is found on line 72 in "plugins/repo/shodan/plugin.py":
s_id = self.createAndAddServiceToHost(h_id, "http", protocol=transport, ports=port)

To fix this, we can replace it with:
service = vuln_dict.get('_shodan').get('module')
s_id = self.createAndAddServiceToHost(h_id, service, protocol=transport, ports=port)

This change will dynamically set the service name based on the Shodan module.

Thank you

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open plugins/repo/shodan/plugin.py and inspect line 72, including how vuln_dict and its _shodan data are populated. Confirm that the service name currently defaults to http, then verify that the created service uses the Shodan module value instead; done means scans no longer assign http to every host.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.