Skip to content

make_ip_type(): Invalid hostname #2101

Description

@liquidsec

lightfuzz branch, to reproduce:

poetry run bbot -m httpx hunt -t https://hv-impact.edc.org/ hunt is to enable parameter extraction

2024-12-19 05:21:27,194 [ERROR] bbot.scanner scanner.py:1319 Error in excavate.handle_event((HTTP_RESPONSE("{'url': 'https://hv-impact.edc.org/admin/', 'timestamp': '2024-12-19T05:21:26.73...", module=httpx, tags={'in-scope', 'ip-34-198-65-201', 'dir', 'cloud-ip', 'http-title-access-denied-miechv-tarc', 'cloud-amazon', 'spider-danger', 'status-403'}), {})): /home/redacted/bbot/bbot/core/helpers/misc.py:685:make_ip_type(): Invalid hostname: "None"
2024-12-19 05:21:27,194 [TRACE] bbot.scanner logger.py:162 Traceback (most recent call last):
  File "/home/redacted/bbot/bbot/scanner/scanner.py", line 1296, in _acatch
    yield
  File "/home/redacted/bbot/bbot/modules/base.py", line 1627, in _worker
    forward_event = await self.handle_event(event, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/modules/internal/excavate.py", line 1216, in handle_event
    await self.search(
  File "/home/redacted/bbot/bbot/modules/internal/excavate.py", line 1061, in search
    await self.yara_preprocess_dict[rule_name](result, event, discovery_context)
  File "/home/redacted/bbot/bbot/modules/internal/excavate.py", line 158, in preprocess
    await self.process(yara_results, event, yara_rule_settings, discovery_context)
  File "/home/redacted/bbot/bbot/modules/internal/excavate.py", line 626, in process
    await self.report(
  File "/home/redacted/bbot/bbot/modules/internal/excavate.py", line 258, in report
    event_draft = await self.report_prep(event_data, event_type, event, tags, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/modules/internal/excavate.py", line 212, in report_prep
    event_draft = self.excavate.make_event(event_data, event_type, parent=event)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/modules/base.py", line 487, in make_event
    event = self.scan.make_event(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/scanner/scanner.py", line 987, in make_event
    event = make_event(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/core/event/base.py", line 1774, in make_event
    return event_class(
           ^^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/core/event/base.py", line 224, in __init__
    self.parent = parent
    ^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/core/event/base.py", line 569, in parent
    hosts_are_same = (self.host and parent.host) and (self.host == parent.host)
                      ^^^^^^^^^
  File "/home/redacted/bbot/bbot/core/event/base.py", line 327, in host
    self.host = self._host()
                ^^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/core/event/base.py", line 1019, in _host
    return make_ip_type(self.data["host"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/redacted/bbot/bbot/core/helpers/misc.py", line 685, in make_ip_type
    raise ValueError(f'Invalid hostname: "{s}"')
ValueError: Invalid hostname: "None"

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions