Add OpenSSH TCP forwarding channel activity detection - #6144
Add OpenSSH TCP forwarding channel activity detection#6144marvalous123 wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Welcome @marvalous123 👋
It looks like this is your first pull request on the Sigma rules repository!
Please read the SigmaHQ conventions to ensure your contribution adheres to best practices and includes all the necessary elements for a successful review.
Also check CONTRIBUTING.md for more information on how to contribute to the Sigma rules repository, specifically proper testing and validation of your rules.
Thanks again, and welcome to the Sigma community! 😃
If you want to engage more with the community for official support, general discussions or announcements:
|
Hi maintainers, just checking whether this rule is in the right direction for SigmaHQ. The main review question is whether the |
This might be useful to some, but DEBUG is practically never enabled so I think the use for this will be very limited. Usually systems might allow specific messages ID from debug but to my knowledge SSH doesn't (but I could be wrong). We don't currently have a dedicated category we can put this. Hence I will mark this as not possible for now. And revisit it at a later date. If you think has value or argue for keeping it feel free to comment and we can reevaluate the decision. Thanks for the contribution. |
|
Thanks for reviewing it — that makes sense. I agree the Thanks again for taking the time to look at it. |
Summary
This draft PR adds a Linux/OpenSSH
sshdrule for SSH TCP forwarding channel activity visible in OpenSSH DEBUG logs.The rule looks for debug log strings related to local/dynamic forwarding via
direct-tcpipand remote forwarding viatcpip-forward/forwarded-tcpipchannels.Linked rule idea issue: #6117
Important review question
The main review question is whether SigmaHQ wants coverage that depends on OpenSSH
LogLevel DEBUG.In my testing:
LogLevel VERBOSEshowed authentication/disconnect activity, but not useful forwarding channel details.LogLevel DEBUGexposed the forwarding channel strings used by this rule.This may be most useful for monitored bastions, jump hosts, deception systems, high-risk SSH servers, or controlled monitoring labs where DEBUG logging is intentionally enabled.
Detection strings
Examples covered by the rule:
Validation
Local validation completed:
Result:
Repository tests also passed locally:
Note: running
sigma checkwithtests/sigma_cli_conf.ymlfailed locally before rule validation because my installed Sigma CLI validator set did not includesigmahq_fieldname_cast, which the repo config attempts to remove. Plain Sigma validation and the repo Python checks passed.False positives
Expected false positives include legitimate administrator use of SSH local, dynamic SOCKS, or remote forwarding, especially on bastion/jump hosts and developer workflows.