Artificial intelligence news.
Straight from the original announcements.

Databricks: Injecting Domain Knowledge Helps LLMs Catch Binary Malware in npm

October 16, 2026, 17:37By the AI News Bites Editorial TeamSource: Databricks
Databricks: Injecting Domain Knowledge Helps LLMs Catch Binary Malware in npm
Image: Databricks

Databricks researchers report that adding pre-computed static evidence to the prompt sharply improves how LLMs triage npm packages that hide malware in compiled binaries. In their tests, failures among seven budget models at the escalation threshold fell from 50% to 4%, according to the company.

Key points
  • Of 11,413 corroborated npm package-versions, 3.8% (432) bundle a binary, but these fail to reach a decisive malicious verdict 14.4% of the time versus 6.2% for source-only packages, per Databricks.
  • Capability profiles inject a roughly 1,800-token summary of static evidence into the prompt before the LLM reasons.
  • Budget-tier failures at the escalation threshold fell from 50% to 4% (3 of 70) with profiles.
  • 32 of 35 detection failures recovered, and no model returned a benign verdict on any payload.
  • GPT-5.4-nano improved from 0/10 to 7/10, the only model that did not reach full detection with profiles.

Why bundled binaries are a weak spot

Databricks has collected npm malware samples since November 2025. Of the 11,413 package-versions it scanned and corroborated through OSV npm malware advisories, 96.2% hide their payload in the package source or fetch it from an external server. The remaining 3.8%, or 432 package-versions, bundle a binary.

The share is small, but the company argues the risk during triage is outsized. A stripped, opaque binary carries no source for tools to read, and it can sit inside a facade of clean source and metadata, which can push an LLM toward a benign verdict. Across OSV-confirmed npm malware, Databricks says packages with binaries fail to reach a decisive malicious verdict more than twice as often as source-only ones (14.4% versus 6.2%).

The scanner and the capability profiles

To support the research community, Databricks built a scanner that monitors the npm registry in real time. A static stage runs first, using YARA on the tarball, Semgrep and the npm registry API on the JavaScript and metadata, and a binary-analysis module over the compiled artifact. The output is assembled into a structured prompt, and the LLM returns a verdict with reasoning, requesting additional files over up to three rounds.

The fix the team proposes is a capability profile. Each profile is a declarative playbook that encodes one malicious technique, such as credential harvesting or persistence, as a set of weighted conditions over the scanner's static evidence. Each profile scores that evidence against suspicious, malicious and critical thresholds, a scale separate from the model's own verdict. When a threshold is reached, the engine injects a structured summary of about 1,800 tokens into the prompt before the model reasons. The model still forms its own verdict and, in the experiment, could override a firing profile entirely.

Databricks contrasts this with prior work that instruction-tunes open-source models on expert-authored data. That route, it says, cannot reach closed, hosted models and requires retraining as threats change. Supplying the expertise at inference avoids both problems.

How the test was built

The team created five payload types as native Node.js addons: a credential stealer (sysmon-native), a dropper/backdoor (buildchain-native), a reverse shell (netpulse-native), a cryptominer stub (hashworker-native) and a persistence tool (taskd-native). Each is wrapped in a professional package.json, README, JavaScript bindings and binding.gyp. The sysmon stealer was built across an obfuscation ladder, from a readable baseline to a hardened build with symbols stripped and strings XOR-encoded. That produced ten payloads in total. Databricks chose single-byte XOR deliberately, because unlike a stronger cipher such as RC4 it leaves no structural markers in disassembly.

Nine models from seven providers were tested: seven budget models, four of them open-weight, and two higher-capability baselines, Claude Sonnet 4.6 and Kimi K3. Claude Opus 4.6 was run only as a cost reference. Each payload was scanned twice per model, with and without profiles, at temperature 0, identical prompts and an 8192-token output cap. A verdict of HIGHLY_SUSPICIOUS or MALICIOUS counted as a detection.

Results: budget models close the gap

Without profiles, the budget tier failed on 35 of 70 tests (50%), 20 of them outright benign, and fell short of the malicious bar on 51 (73%). The two baselines never failed at the escalation threshold and missed the malicious bar once. According to Databricks, the budget failures followed repeatable, model-specific patterns rather than random error. Gemini alone matched the baselines on detection, though the company says it did so through confabulated reasoning rather than genuine analysis.

With profiles enabled, 32 of the 35 detection failures (91%) recovered, and no model returned a benign verdict on any payload. Failures at the escalation threshold fell from 50% to 4% (3 of 70), and at the malicious bar from 73% to 34%. Per-model detection rates without and with profiles included:

  • GPT-5.4-nano: 0/10 to 7/10
  • Qwen3-Next 80B: 1/10 to 10/10
  • Llama 3.1 8B: 4/10 to 10/10
  • Gemma 3 12B: 5/10 to 10/10
  • Claude Haiku 4.5: 6/10 to 10/10
  • GLM 5.3 Flash: 9/10 to 10/10

GPT-5.4-nano was the exception among models that failed without profiles: its three residual failures stayed at suspicious on three payloads. The clearest single case, per the report, was Qwen3-Next on the obfuscated sysmon-native stealer. It returned benign at 0.98 and recommended allowlisting without profiles, then returned malicious at 0.98 and recommended blocking with them, on byte-identical input, after four profiles fired.

What it means for security teams

The findings suggest that cheaper models, which a team could realistically run across a whole codebase or registry feed, can be pushed much closer to frontier-level triage on binary payloads without retraining. Databricks also reports that the evidence strengthens verdicts from Sonnet and Kimi, which were already correct, so the profiles reinforce rather than distort a model that already reasons well.

The results come from a controlled set of crafted payloads, not live traffic, and a third of budget-tier tests still fell short of the malicious bar even with profiles. The approach is also tied to the scanner's static evidence, which the company says covers source and binary techniques across npm and PyPI.

Related news

Google reports Agent Anomaly Detection benchmark results
Safety and ethicsNovember 12, 2026

Google reports Agent Anomaly Detection benchmark results

Google says its Agent Anomaly Detection feature flagged 87% of harmful instructions that AI agents carried out in tests against five public, non-Google-written security…

Microsoft finds Lazarus backdoor that can hijack AI agents
Safety and ethicsNovember 10, 2026, 21:52

Microsoft finds Lazarus backdoor that can hijack AI agents

Microsoft researchers have identified Lazarus, a backdoor technique that can reprogram dormant neurons in an AI model and make an otherwise normal agent execute…

FAR.AI says simple text attacks bypass Kimi K3.1 Pro safeguards
Safety and ethicsNovember 10, 2026

FAR.AI says simple text attacks bypass Kimi K3.1 Pro safeguards

A few lines of text can bypass Kimi K3.1 Pro’s safeguards on up to 99.4% of tested harmful requests, according to a FAR.AI security stress test. The researchers say the…