Skip to content

Back to the catalog

JFrog: NuGet Typosquat Rigs Betting Outcomes at Digitain
jfrog.comwriteup

JFrog: NuGet Typosquat Rigs Betting Outcomes at Digitain

JFrog Security Research disclosed Newtonsoftt.Json.Net, a typosquatted NuGet package impersonating Newtonsoft.Json that shipped a fully functional JSON library alongside a trojanized fork targeting Digitain's FG-Crash betting platform. Using HarmonyLib to patch GenerateGameResult, the payload rigs crash-game coefficients on a schedule and, in later versions, exfiltrates rigged results to a C2 server disguised as Seq structured-logging traffic; seven published versions across three generations show escalating obfuscation (Dotfuscator, then ConfuserEx) before an unobfuscated final build exposed the full attack chain and IOCs.

TL;DR A NuGet typosquat of Newtonsoft.Json secretly rigged Digitain's crash-betting game via Harmony IL patching and exfiltrated results disguised as Seq log traffic.
Document

What it is

Newtonsoftt.Json.Net (note the doubled t and .Net suffix) — a NuGet typosquat of Newtonsoft.Json. It ships a fully working trojanized fork of Newtonsoft.Json 13.0.3, so serialization behaves normally and tests pass. The nuspec forges the identity of the real library: author James Newton-King, projectUrl https://www.newtonsoft.com/json, title Json.NET, MIT license, tag json. The version scheme is 11.0.x (real Json.NET is on 13.x, so 11.x looks unremarkable in a dependency graph rather than obviously wrong).

How it works

NuGet auto-references every assembly under lib/net8.0/, so adding the "JSON library" silently loads three DLLs into the host process:

  • Newtonsoft.Json.net.dll — the trojanized fork containing the trigger
  • Newtonsoft.Values.Net.dll — the payload, imported by the JSON lib
  • 0Harmony.dll — upstream HarmonyLib runtime-patching (dual-use, benign alone)

The trigger fires from the JsonConvert.DefaultSettings setter, a common startup config point. The setter silently discards the host's ContractResolver, substitutes its own CamelCasePropertyNamesContractResolver, then calls DefaultValues.Set() to launch the payload. Later generations exfiltrate rigged results to an attacker server using the HTTP header X-Seq-ApiKey: theperfectheist2025.

Preconditions / Affected

Malicious behavior only succeeds on hosts exposing Digitain's specific game-backend method (the Harmony patch target), and only after a delay following JsonConvert.DefaultSettings initialization. On every other system it is just a working JSON library — which is why nobody goes looking. The package was discoverable on NuGet August–October 2025.

What to do

Grep dependency graphs and lockfiles for the exact package id — the doubled t is the tell:

  • Package: Newtonsoftt.Json.Net, versions in the 11.0.x scheme (e.g. 11.0.11)
  • Assemblies: Newtonsoft.Json.net.dll, Newtonsoft.Values.Net.dll shipped together
  • Network/proxy detection: outbound requests carrying header X-Seq-ApiKey: theperfectheist2025
  • Metadata tell: any package whose nuspec repository URL points at Digitain's internal TFS server / BetOnGames / FG-Crash

Caveats

  • The package is now unlisted, not removed — it won't appear in NuGet search, but at time of writing all artifacts are still downloadable directly from the package page.
  • Version-to-generation mapping is odd: Gen-1 was published after Gen-2 variants, and Gen-3's 11.0.11 shipped completely unobfuscated (JFrog speculates an accidental clean build or expired obfuscator trial, but cannot confirm).
  • This is a targeted fraud tool against one operator, not a generic info-stealer — the payload does nothing harmful on hosts lacking Digitain's backend, so absence of visible impact does not mean absence of the package.

Organisations named here

  • 185.126.237.64
  • BetOnGames
  • Digitain
  • FG-Crash
  • Newtonsoftt.Json.Net
  • theperfectheist2025

Technologies named here

  • JFrog Xray
  • JFrog Curation
  • NuGet
  • ConfuserEx
  • .NET
  • JFrog Security Research
  • Dotfuscator
  • HarmonyLib
  • Newtonsoft.Json
  • Seq

Techniques named here

  • Code obfuscation
  • Typosquatting
  • Delayed execution
  • Supply-chain attack
  • Reflection-based dynamic API resolution
  • Runtime method patching with Harmony
  • Traffic camouflage as legitimate logging

Concepts named here

  • Disclosure timeline
  • Metadata leakage of victim
  • Package unlisting
  • Rigged rounds schedule
  • Targeted precision fraud via dependency

Threat actors named here

  • Newtonsoftt.Json.Net (malicious NuGet typosquat of Newtonsoft.Json, versions 11.0.4, 11.0.5, 11.0.7, 11.0.8, 11.0.9, 11.0.10, 11.0.11, three payload generations, aimed at Digitain's FG-Crash game; author possibly an insider per JFrog)