Repository navigation
fix(commands): detect DNS lookups that carry data out (#143) - #151
Merged
batrapulkit merged 3 commits intoOct 29, 2026
Merged
batrapulkit merged 3 commits into
batrapulkit merged 3 commits into
Conversation
- Check DNS-querying tools (ping, nslookup, dig, host, Resolve-DnsName) for command/variable substitutions ($(...), backticks, $VAR, $env:...) or encoded payload labels (20+ chars of hex/base64). - Classify suspicious lookups as irreversible with plain-English explanation: 'sends data out inside a DNS name'. - Add ping, ping6, nslookup, dig, host, and resolve-dnsname to KNOWN programs. - Keep standard developer DNS lookups (e.g. ping google.com, ping -c 3 192.168.1.1, dig github.com, nslookup api.openai.com) unflagged in test_no_false_alarm. - Add test coverage in tests/test_commands.py for CVE-2025-55284 DNS exfiltration patterns.
…a long ordinary hostname isn't held) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eck) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #143
What changed
Commands performing DNS queries (
ping,nslookup,dig,host,Resolve-DnsName) that carry data out inside the target hostname (such as in CVE-2025-55284) previously classified asotherand ran without approval.They now classify as
irreversiblewith the plain-English reason"sends data out inside a DNS name", waiting for teammate approval.ping,ping6,nslookup,dig,host,resolve-dnsname).$(...), backticks,$VAR,$env:...,${...}) in DNS arguments.c2stLWFudC1hcGkwMy14eXo.attacker.example).ping,ping6,nslookup,dig,host, andresolve-dnsnametoKNOWNprograms.ping google.com,ping -c 3 192.168.1.1,dig github.com,nslookup api.openai.com) remain unflagged intest_no_false_alarmandtest_everyday_work_is_not_held.How I checked it
pytest -qpasses (1,420 passed)pytest tests/test_commands.pypasses (386 passed)python tests/e2e_business_scenario.pypasses (18/18 passed)squidbrake explainoutputsirreversible: sends data out inside a DNS name(exit 1) on suspicious lookups andother(exit 0) on everyday lookups