Skip to content

Add Ligolo-ng tunneling tool detection#5818

Open
SecMab wants to merge 13 commits intoSigmaHQ:masterfrom
SecMab:SecMab-patch-1
Open

Add Ligolo-ng tunneling tool detection#5818
SecMab wants to merge 13 commits intoSigmaHQ:masterfrom
SecMab:SecMab-patch-1

Conversation

@SecMab
Copy link

@SecMab SecMab commented Dec 31, 2025

Detects Ligolo-ng agent and proxy execution for network pivoting

  • MITRE ATT&CK: T1572 (Protocol Tunneling)
  • Covers renamed binaries via OriginalFileName field
  • Addresses detection gap for modern tunneling tools

Summary of the Pull Request

This PR adds detection for Ligolo-ng, a modern tunneling tool used for network pivoting. Currently, SigmaHQ has no coverage for this tool despite its widespread use in penetration testing and adoption by threat actors.

Changelog

new: Ligolo-ng Tunneling Tool Execution

Example Log Event

N/A - New detection rule (not a false positive fix)

Fixed Issues

N/A - New rule submission

SigmaHQ Rule Creation Conventions

  • Followed SigmaHQ naming conventions
  • Applied proper MITRE ATT&CK tagging (T1572)
  • Used unique UUID v4 identifier
  • Set status to 'experimental' for new rule

Detects Ligolo-ng agent and proxy execution for network pivoting
- MITRE ATT&CK: T1572 (Protocol Tunneling)
- Covers renamed binaries via OriginalFileName field
- Addresses detection gap for modern tunneling tools
@github-actions github-actions bot added Rules Review Needed The PR requires review Windows Pull request add/update windows related rules labels Dec 31, 2025
Copy link
Collaborator

@swachchhanda000 swachchhanda000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SecMab,

Thank you for your contribution!. keep them coming.

However, Before we start with PR review, please make sure:

  1. Your rule follow the sigma standard specification . You can also check related rules which are already merged on the repo.
  2. All automated checks and actions are passing

PSA: We also appreciate corresponding evtx log for regression test.

@swachchhanda000 swachchhanda000 added Author Input Required changes the require information from original author of the rules Additional Data Needed labels Jan 1, 2026
Copy link
Member

@frack113 frack113 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to fix your yaml to pass the workflow:

======================
= Linting YAML files =
======================
Error: /windows/process_creation/proc_creation_win_hktl_ligolo_ng.yml:19:13: [error] wrong indentation: expected 14 but found 12 (indentation)
Error: Process completed with exit code 1.

…ITRE URL

- Fixed date format to ISO 8601 (YYYY-MM-DD)
- Corrected YAML indentation errors
- Removed MITRE ATT&CK URL from references
- Maintained detection logic with proper structure
@SecMab
Copy link
Author

SecMab commented Jan 1, 2026

EVTX Samples for Regression Testing.zip

Attached Sysmon Event ID 1 (Process Creation) logs from test environment.

Test Scenarios Executed:

File Test Case Detection
Agent-with-connect flag.evtx agent.exe -connect selection_img + selection_cli
Proxy-with-selfcert flag.evtx proxy.exe -selfcert selection_img + selection_cli
VariousCommand-Line_Flags.evtx Multiple CLI flag combinations selection_cli
VariousCommand-Line_Flags_2.evtx Additional CLI flag tests selection_cli
csrssEXE_...evtx Renamed binary (csrss.exe) selection_cli
svchostEXE_...evtx Renamed binary (svchost.exe) selection_cli

Key Findings:

  • selection_img: Detects original agent.exe and proxy.exe filenames
  • selection_cli: Detects -connect, -selfcert, and -ignore-cert flags
  • ℹ️ selection_originalfilename: OriginalFileName field is empty in Ligolo-ng PE headers, but renamed binaries are still detected via selection_cli

Environment:

  • Windows 11 with Sysmon
  • Ligolo-ng v0.6.2 (Core detection logic remains consistent across versions up to v0.8.2)

Future Improvements:

  • Daemon mode flags (--daemon, -d). It is not critical for initial rule.
  • Config file detection (Sysmon ID 11), is on roadmap for separate rule.

All test scenarios successfully detected by the rule.

FYI @swachchhanda000 @frack113

Comment on lines 26 to 28
- '-connect'
- '-ignore-cert'
- '-selfcert'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

many tools use that type of cli option.
You can not have a high rule with many FP.
Look at https://github.com/SigmaHQ/sigma/blob/6fe7343bf79306884b05837d5e03bcbcb141ce50/rules/windows/process_creation/proc_creation_win_nltest_recon.yml as example.

Comment on lines 18 to 19
- '\agent.exe'
- '\proxy.exe'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- '\agent.exe'
- '\proxy.exe'

These names are also very generic. When writing a rule about hktl,
we try to use the very specific process names, originalfilename or imphash.

In some cases, we also use command lines that may include combinations of flags or any specific strings which is unique to that specific tool only.

Please have a look at other HKTL or PUA rules on the repo for better understanding and make the changes accordingly.
Thanks

- Changed from OR to AND logic to reduce false positives
- Added CLI switch spacing following SigmaHQ patterns
- Added T1090.001 MITRE tag for Internal Proxy
@SecMab
Copy link
Author

SecMab commented Jan 26, 2026

Rule Updated - False Positive Reduction

Thank you @frack113 and @swachchhanda000 for the excellent feedback! I've refactored the rule following your guidance and studied similar rules in the repo.

Changes Made

1. AND Logic Implementation (addressing @frack113's feedback)

  • Generic process names (agent.exe, proxy.exe) now require specific CLI flags
  • Changed from 1 of selection_* to (img AND cli) combinations
  • Pattern follows nltest_recon.yml approach

2. Tool-Specific Detection (addressing @swachchhanda000's feedback)

  • Separated agent and proxy detection with their unique flags
  • Agent: -connect, -ignore-cert (connection flags)
  • Proxy: -selfcert, -laddr, -autocert (server flags)
  • Added "ligolo" keyword fallback for renamed/relocated binaries

3. CLI Switch Spacing

  • Added spaces following patterns from Evil-WinRM, Chisel, and Exchange rules
  • Flags with values: -connect (space before + after)
  • Boolean flags: -ignore-cert (space before only)

4. Additional Improvements

  • Added attack.t1090.001 (Internal Proxy) MITRE tag
  • Added Kali Linux tools reference

This approach maintains level: high while significantly reducing false positives by requiring both process identification AND tool-specific command-line arguments.

@swachchhanda000 swachchhanda000 removed Author Input Required changes the require information from original author of the rules Additional Data Needed labels Feb 19, 2026
@swachchhanda000 swachchhanda000 added this to the Sigma-March-Release milestone Feb 19, 2026
Comment on lines +25 to +35
Image|endswith: '\agent.exe'
CommandLine|contains:
- '-connect'
- '-ignore-cert'
- '-retry'
selection_proxy:
Image|endswith: '\proxy.exe'
CommandLine|contains:
- '-autocert'
- '-laddr'
- '-selfcert'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like the best option possible, but i think the selection might still be prone to FPS issues? What are your thoughts on this, @nasbench?

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

Labels

Review Needed The PR requires review Rules Windows Pull request add/update windows related rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments