Skip to content

ssh_brute module may generate false positives due to empty success regex #1183

@berardifra

Description

@berardifra

While reviewing the SSH brute force module, I noticed a logic issue that may lead to false positive results.

In modules/brute/ssh.yaml, the successful_login condition is defined with an empty regex:

response:
  condition_type: or
  conditions:
    successful_login:
      regex: ''
      reverse: false

An empty regex matches any response, meaning failed authentication attempts, errors, or banners could be interpreted as successful logins.

Impact:
• False positives in SSH brute force scans
• Misleading output for users
• Unreliable detection of successful authentication

Suggestions:
• Define a proper success pattern (if exposed by the SSH library)
• Or remove/disable the success condition until a reliable indicator is available
• Or document the limitation explicitly

Environment:
• OS: macOS
• Module: modules/brute/ssh.yaml

Related issues:

This issue focuses specifically on a logic/configuration problem in the module definition that may contribute to unreliable results.

Found during manual review of modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions