Skip to content

Detect new malware families and release 1.8.1 - #49

Merged
ifBars merged 3 commits into
mainfrom
release/core-1.8.1
Sep 11, 2026
Merged

ifBars merged 3 commits into
mainfrom
release/core-1.8.1

Conversation

@ifBars

@ifBars ifBars commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • detect BetterPatrols and BloodAndBanners.Core as the Pawns.app autorun dropper family
  • detect ValleyPolygamy as the blockchain-resolved Java stager family
  • require behavior-based family matches independently of exact hashes, then retain exact known-sample anchors
  • track the newauth quarantine sample and retain Rexon findings without prematurely assigning a family
  • bump Core, declared, WASM package, and lockfile versions to 1.8.1

Validation

  • focused version/sample/classifier tests: 42 passed
  • quarantine bookkeeping/family tests: 25 passed
  • full solution: 1,715 passed, 18 skipped, 0 failed
  • Release build and MLVScan.Core.1.8.1.nupkg creation succeeded
  • Detects BetterPatrols and BloodAndBanners.Core as the Pawns.app autorun dropper family.
  • Detects ValleyPolygamy as the blockchain-resolved Java stager family.
  • Adds behavior-based family matching while retaining exact known-sample hash matches.
  • Tracks the newauth quarantine sample and preserves Rexon findings without premature family assignment.
  • Adds archive payload, coordinated delivery, data exfiltration, data infiltration, and encoded string pipeline analysis.
  • Updates ZipFile.ExtractToDirectory operation classification.
  • Releases Core, declared, WASM package, and lockfile version 1.8.1.
  • Validation passed: 42 focused tests, 25 quarantine and family tests, and 1,715 full-solution tests with 18 skipped and 0 failures.
  • Release build and MLVScan.Core.1.8.1.nupkg creation succeeded.
Author Lines added Lines removed
ifBars Not provided Not provided

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T03:41:43.423065Z 0a031f7 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: f1db69e3-b39b-436d-849b-1c3e0f1d99b4

📥 Commits

Reviewing files that changed from the base of the PR and between c78422c and 0a031f7.

⛔ Files ignored due to path filters (1)
  • MLVScan.WASM/npm/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (19)
  • Directory.Build.props
  • MLVScan.Core.Tests/Integration/NewSampleThreatFamilyTests.cs
  • MLVScan.Core.Tests/Integration/ThreatFamilyQuarantineTests.cs
  • MLVScan.Core.Tests/Unit/Rules/CoordinatedPayloadDeliveryRuleTests.cs
  • MLVScan.Core.Tests/Unit/Rules/EmbeddedArchivePayloadRuleTests.cs
  • MLVScan.Core.Tests/Unit/Rules/RuleFactoryTests.cs
  • MLVScan.Core.Tests/Unit/Services/DataFlowOperationClassifierTests.cs
  • MLVScan.Core.Tests/Unit/Services/NewThreatFamilyClassifierTests.cs
  • MLVScan.WASM/npm/package.json
  • MLVScanVersions.cs
  • Models/Rules/CoordinatedPayloadDeliveryRule.cs
  • Models/Rules/DataExfiltrationRule.cs
  • Models/Rules/DataInfiltrationRule.cs
  • Models/Rules/EmbeddedArchivePayloadRule.cs
  • Models/Rules/EncodedStringPipelineRule.cs
  • RuleFactory.cs
  • Services/DataFlow/DataFlowOperationClassifier.cs
  • Services/ThreatIntel/ThreatFamilyCatalog.NewSamples.cs
  • Services/ThreatIntel/ThreatFamilyCatalog.cs

📝 Walkthrough

Walkthrough

The change adds post-analysis malware detection rules, two threat-family definitions, rule registration, classifier and integration tests, quarantine coverage, and coordinated version updates from 1.8.0 to 1.8.1.

Changes

Threat detection and classification

Layer / File(s) Summary
Post-analysis detection rules
Models/Rules/*, Services/DataFlow/DataFlowOperationClassifier.cs
Rules now detect suspicious downloads, transformed host data sent over networks, embedded ZIP/JAR payloads, encoded security-relevant strings, and ZIP extraction operations.
Payload correlation and rule registration
Models/Rules/CoordinatedPayloadDeliveryRule.cs, RuleFactory.cs
A coordinated rule identifies archive delivery with autorun persistence and concealed execution, plus blockchain-resolved Java staging. Both new rules are included in the built-in rule set.
Threat-family definitions and matchers
Services/ThreatIntel/ThreatFamilyCatalog*.cs
The catalog adds Pawns.app archive-dropper and blockchain Java-stager families with exact hashes, behavior variants, required findings, and evidence.
Rule and classification validation
MLVScan.Core.Tests/**
Tests cover synthetic rule inputs, rule registration, ZIP extraction classification, behavior and exact-hash matches, new quarantine samples, awaiting-model behavior, and wrapper isolation.
Release version updates
Directory.Build.props, MLVScanVersions.cs, MLVScan.WASM/npm/package.json
Project, core, and WASM package versions change from 1.8.0 to 1.8.1.

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AssemblyScanner
  participant RuleFactory
  participant ScanRules
  participant ThreatFamilyClassifier
  participant ScanResultMapper
  AssemblyScanner->>RuleFactory: CreateCoreRules()
  RuleFactory->>ScanRules: Execute initial and post-analysis rules
  ScanRules-->>AssemblyScanner: Return findings
  AssemblyScanner->>ThreatFamilyClassifier: Classify findings and hash
  ThreatFamilyClassifier-->>AssemblyScanner: Return family and variant
  AssemblyScanner->>ScanResultMapper: Map scan result with raw bytes
  ScanResultMapper-->>AssemblyScanner: Return disposition and match details
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/core-1.8.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77a201417c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +43 to +45
foreach (var namespaceGroup in module.Types
.Where(static type => !string.IsNullOrWhiteSpace(type.Namespace))
.GroupBy(static type => type.Namespace, StringComparer.Ordinal))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Include global-namespace types in coordinated analysis

Removing or omitting namespaces is enough to bypass both new behavior-family detections: when all relevant types have an empty namespace, this filter creates no groups, so CoordinatedPayloadDeliveryRule never emits the coordinator finding required by either family matcher. Hashless builds of the same droppers would therefore evade the behavior-based classification this change is intended to provide; group global types under an explicit assembly-level scope instead of discarding them.

Useful? React with 👍 / 👎.

Comment on lines +47 to +51
var namespaceTypes = namespaceGroup.SelectMany(EnumerateTypeAndNested).ToList();
var methods = namespaceTypes
.SelectMany(EnumerateMethods)
.Where(static method => method.HasBody)
.ToList();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Correlate payload signals beyond a shared namespace

When unrelated types share a namespace, all of their methods, calls, and literals are pooled before the later Any checks. A normal application can therefore combine an updater that downloads/extracts a ZIP, a separate component that writes a Run key, and another helper that launches with hidden settings into a Critical coordinator finding; the Pawns matcher then labels it a KnownThreat and recommends blocking. Require these signals to belong to a connected call graph or otherwise proven execution cluster rather than merely the same namespace.

Useful? React with 👍 / 👎.

Comment on lines +80 to +84
bool hasTransform = method.Body.Instructions.Any(static instruction => instruction.OpCode == OpCodes.Xor) ||
calls.Any(called =>
called.Name.Contains("Xor", StringComparison.OrdinalIgnoreCase) ||
called.Name.Contains("Encrypt", StringComparison.OrdinalIgnoreCase) ||
called.Name.Contains("Encode", StringComparison.OrdinalIgnoreCase));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require a data-flow link before reporting exfiltration

When a method reads Environment.MachineName, performs any unrelated XOR/encrypt/encode operation, and makes any network send, these independent booleans produce a High DataExfiltrationRule finding even though no value is shown to flow from the host-data source through the transform to the send. For example, an ordinary telemetry or registration method that URL-encodes a machine name and calls HttpClient.SendAsync is reported as exfiltration regardless of destination; verify the operand flow into the request rather than treating mere co-occurrence as a transfer.

Useful? React with 👍 / 👎.

@ifBars
ifBars merged commit 9082dfa into main Sep 11, 2026
1 of 2 checks passed
@ifBars
ifBars deleted the release/core-1.8.1 branch September 11, 2026 03:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a031f7c66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1049 to +1050
(declaringType == "System.IO.Compression.ZipFile" &&
methodName == "ExtractToDirectory") ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not treat ZIP extraction as an obfuscation transform

When an installer or updater calls ZipFile.ExtractToDirectory and later writes ordinary installation state with RegistryKey.SetValue in the same method, this new Transform classification satisfies HasTransform plus HasRegistrySink in DataFlowPatternEvaluator, producing an ObfuscatedPersistence finding that seeds a Suspicious, blocking disposition. ExtractToDirectory is a void filesystem operation and does not transform the value written to the registry, so model archive extraction separately or require an actual value-flow relationship before treating it as an obfuscation transform.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant