-
Notifications
You must be signed in to change notification settings - Fork 1
feat(cti): ingest HABIT external assistant URL and map to phishing (T1566.002) #22286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |||||
|
|
||||||
| def test_ingest_normalization(): | ||||||
| items = normalize_items() | ||||||
| assert len(items) == 5 | ||||||
| assert len(items) == 6 | ||||||
| assert items[0]["title"] == "Polish officials blame Russian domestic spy agency for Dec 29 cyberattacks" | ||||||
| assert "content_hash" in items[0] | ||||||
|
|
||||||
|
|
@@ -26,6 +26,10 @@ def test_mapper_rules(): | |||||
| ai_mapping = mappings[1] | ||||||
| assert any(m["control"] == "Repo Hardening (Branch Protection)" for m in ai_mapping["mappings"]) | ||||||
|
|
||||||
| # Check conference external URL social-engineering surface | ||||||
| habit_mapping = mappings[5] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Accessing the mapping by a hardcoded index (
Suggested change
|
||||||
| assert any(m["control"] == "URL Sandboxing and Domain Allowlisting" for m in habit_mapping["mappings"]) | ||||||
|
|
||||||
| def test_pipeline_output_structure(): | ||||||
| # This just tests the logic integration | ||||||
| items = normalize_items() | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -56,6 +56,18 @@ def map_item(cti_item): | |||||||||||||||||||||
| "trigger": "Typosquatting detected" | ||||||||||||||||||||||
| }) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Rule 5: Human-AI persuasion / conference external URL solicitation | ||||||||||||||||||||||
| if ( | ||||||||||||||||||||||
| "human-ai persuasion" in full_text | ||||||||||||||||||||||
| or "external domain solicitation" in full_text | ||||||||||||||||||||||
| or "conference demos" in full_text | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new rule classifies any item containing Useful? React with 👍 / 👎. |
||||||||||||||||||||||
| ): | ||||||||||||||||||||||
|
Comment on lines
+60
to
+64
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current matching logic has two issues:
Using
Suggested change
|
||||||||||||||||||||||
| mappings.append({ | ||||||||||||||||||||||
| "technique": "Phishing: Spearphishing Link (T1566.002)", | ||||||||||||||||||||||
| "control": "URL Sandboxing and Domain Allowlisting", | ||||||||||||||||||||||
| "trigger": "External assistant URL solicitation detected" | ||||||||||||||||||||||
| }) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| return { | ||||||||||||||||||||||
| "source_url": cti_item["source_url"], | ||||||||||||||||||||||
| "mappings": mappings | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key
urlis used here, but the TTP mapper inservices/ttp_mapper/src/mapper.py(line 72) expectssource_url. This discrepancy will likely cause aKeyErrorduring the mapping phase if the item is passed directly to the mapper.