fix(attack): keep mobile/ICS techniques and their tactics, fix TLP and IOC parsing - #14
Merged
SkxOverKill merged 1 commit intoAug 12, 2026
Conversation
…d IOC parsing * Mobile and ICS ATT&CK bundles use mitre-mobile-attack / mitre-ics-attack as their STIX source and kill-chain names instead of mitre-attack. attackId() only matched "mitre-attack", so every mobile/ICS technique was skipped in parseBundle (if (!id) continue), and the kill-chain filter emptied their tactics. Both now accept all three domain names. * AMBER_STRICT indicators were exported to STIX with AMBER's marking (marking-definition--f88d31f6-...) instead of the TLP 2.0 AMBER+STRICT one (marking-definition--939a9414-...), downgrading the label consumers see. Fixed the mapping. * parseBulk/extractIocs split on any comma, truncating URLs like https://evil.com/a,b into a partial URL plus garbage. Commas are now only treated as separators when whitespace follows them.
Owner
|
Hi @nkbeast, Thanks a good find will go ahead and merge it |
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.
Three independent fixes, each with regression tests.
1. Mobile/ICS ATT&CK techniques were silently dropped (src/lib/attack/stix.ts)
The mobile and ICS bundles shipped by MITRE use their own STIX source and kill-chain names (
mitre-mobile-attack,mitre-ics-attack) instead of the enterprisemitre-attack. Two spots instix.tsonly matchedmitre-attack:attackId()returnednullfor every mobile/ICS technique, soparseBundleskipped them entirely (if (!id) continue) — the whole MOBILE and ICS domains parsed to empty.tacticsfor those domains, so even the matrix view had no columns.Both now accept all three MITRE domain names via a shared
MITRE_SOURCE_NAMESset.2. AMBER_STRICT exported to STIX as AMBER (src/lib/export/formats.ts)
TLP_TO_STIX_MARKING["AMBER_STRICT"]pointed at AMBER's marking (marking-definition--f88d31f6-…) instead of the OASIS TLP 2.0 AMBER+STRICT marking (marking-definition--939a9414-2ddd-4d32-a0cd-375ea402b003). STIX consumers therefore saw the stricter label downgraded to AMBER. Fixed the mapping.3. IOC bulk parsing truncated URLs containing commas (src/lib/ioc/normalize.ts, src/lib/ioc/extract.ts)
parseBulksplit on any comma (/[\t;,]+|\s{2,}/), sohttps://evil.com/a,bwas parsed as the truncated URLhttps://evil.com/aplus anunparsedb— despite the code comment saying commas inside URLs must not split. The single-value pathparseIndicatorhandles the same input correctly. Commas are now only treated as separators when whitespace follows them, in bothparseBulkand the client-sideextractIocs(so server and preview agree). The existing "does not split a URL containing a comma" test never actually contained a comma; it now does.Tests
attackIdreadsmitre-mobile-attack/mitre-ics-attackreferencesparseBundlekeeps tactics from mobile/ICS kill chainsAMBER_STRICTwith the AMBER+STRICT marking, distinct from AMBERparseBulkkeeps a URL with a comma intact (full value asserted)Verification
vitest run— 179 passed (12 files)tsc --noEmit— cleaneslint— 0 errors (3 pre-existing warnings insrc/lib/sigma/generate.ts)