Repository navigation
Optional check for disguised indicators and hidden code (--obfuscated) - #24
Closed
HaveMindHive wants to merge 1 commit into
Closed
HaveMindHive wants to merge 1 commit into
HaveMindHive wants to merge 1 commit into
Conversation
The stock checks match an indicator only when it is written forwards. This opt-in check also looks for each domain/IP stored reversed, in reverse-DNS order, bit-inverted, or reversed and bit-inverted, in the browser cache, storage and extension folders and the user-writable roots. In script files it flags open text-direction overrides (Trojan Source), long invisible-character runs (GlassWorm-style), Unicode tag smuggling, Hangul fillers, reversed URLs and reversed base64 literals. Two new evidence grades (encoded, hidden-code) keep these hits apart from contact. Every false positive seen on a real Mac is pinned as a test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
|
Thanks for this, it's a thoughtful idea. This repo is the old one, though, and we don't merge outside code into a security tool without rebuilding it ourselves. We'll look at bringing the idea into the current toolkit. Closing this one for now. |
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.
Thank you for Zero Breach. We don't know if this is something you want, so please treat it as an offer. It's opt-in, off by default, and easy to drop or reshape.
What it adds (
--obfuscated)The current checks find an indicator only when it is written forwards. Loaders that want an address to survive a string search store it some other way. YIPPHB kept its URL reversed, and the March 2026 plain-crypto-js / axios npm compromise shipped its payload reversed. This check looks for every domain and IP in the set written:
In script files it also looks for ways of hiding code that need no indicator at all:
Why we think it may be useful
These hide from plain string searches. A forward search, which is what the existing checks do, can't see any of them.
The hits are graded apart from contact. Two new evidence grades,
encodedandhidden-code, mean "worth a look, not contact, not infection". The report text says exactly that.We tuned out the false alarms on a real Mac first. We ran a wider prototype over about 130,000 files. Every hit was honest software:
i18n-ecfolder;r%=0x7fff…that a loose base64 rule mistook for data.Each one is now a regression test, and the final check found nothing on that machine. Those cases are also why the direction rule only fires on an override left open at the end of a line, not on any raw direction character.
It keeps to your rules
build.py --checkis clean.Tests: 311 pass (29 of them new) with 9 skipped, the same 9 as before. We only had Python 3.12 locally. The new code avoids 3.9+ APIs, but CI's 3.8 job is the real test.
Things you may want changed
--patterns, because it reads many more files and the code rules are heuristics rather than published indicators.hidden-codehits currently count toward "indicators found" and exit code 2, the same as pattern hits. You may prefer to keep them out of that verdict.node_modules: the user-folder walk reuses the hash check's pruning, sonode_modulesis not walked, even though that is where the 2025 npm attacks lived.Separately, we posted #23 about the tracker cookie values, in case it's of use.
HaveMindMedia
🤖 Generated with Claude Code