ysoserial.net is an open-source .NET deserialization payload generator, rather than a standalone malware family. It aggregates gadget chains that can trigger code execution when vulnerable applications deserialize attacker-controlled objects. Its View State plugin supports constructing malicious ASP.NET ViewState payloads; attackers possessing the required validation keys and, where applicable, decryption keys can generate payloads that pass application integrity checks on Windows IIS servers.
Its gadget collection includes chains for loading .NET assemblies into memory and disabling runtime restrictions on other deserialization gadgets. These mechanisms can execute attacker-supplied code within IIS worker processes without requiring a conventional web shell on disk. Subsequent capabilities depend on the supplied payload rather than the generator itself. ysoserial.net gadget chains have been used against Microsoft Exchange by Obstinate Mogwai, while Shedding Zmiy incorporated its XamlAssemblyLoadFromFile gadget into the custom BADSTATE framework. The tool is not exclusive to any threat actor.
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
3 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The structure of the observed VIEWSTATE payloads indicated that the attackers generated them using ysoserial.net.
The structure of the observed VIEWSTATE payloads indicated that the attackers generated them using ysoserial.net.
«...Shedding Zmiy используют самописный гаджет, который распаковывает и вызывает гаджет XamlAssemblyLoadFromFile из набора ysoserial.»
22 distinct techniques documented for this family, organized by ATT&CK tactic.
The content repeatedly states that threat actors 'obtained,' 'acquired,' or 'used' publicly available, open-source, legitimate, or modified tools such as Mimikatz, Cobalt Strike, PsExec, Empire, Impacket, and many others.
Obstinate Mogwai эксплуатирует уязвимости десериализации VIEWSTATE для повторного возвращения.
It is also possible to send the __VIEWSTATE parameter in the URL via a GET request. The only limiting factor is the URL length that limits the type of gadgets that can be used here.
So we generated a payload with ysoserial.net ... -c "whoami > C:\x.txt".
ysoserial.exe -g ObjectDataProvider -f Json.Net -c "powershell -enc ..." ... PowerShell with -EncodedCommand, -enc, -ec, bypass, or unrestricted.
The provided ysoserial payload executes `cmd /c nslookup yuwewp90p365hx64wh7rumz8kzqxem.burpcollaborator.net`.
Instead of calling Process.Start() now we move on eval JScript. With JScript, we can do many things with scripting instead of spawning cmd.exe / powershell.exe.
ysoserial .net TypeConfuseDelegate gadget fires → Process.Start("cmd /c ...") ← LocalSystem identity
With TypeConfusedDelegate we can invoke the method arbitrarily ... How about XamlReader.Parse() ? XamlReader.Parse is a public/static also, so we can easily call it with TypeConfusedDelegate
2: Creating a virtual file (ghost file) by abusing the Virtual Path Provider in .NET... This solution has minimal complexity for the tester as a web shell can be directly embedded within the initial exploit code.
A low-privileged local attacker can send YSoSerial.NET-generated BinaryFormatter payloads to the localhost-bound endpoint to achieve code execution as NT AUTHORITY\SYSTEM.
# TTP # T1211 — Exploitation for Defense Evasion (Defense Evasion)
TypeConfuseDelegate depends on System.Configuration.Install.dll / System.Management.dll ... all available on the target.
As the targeted box might not send any requests externally, automated scanners should use a payload that causes a short delay on the server-side. This can be achieved by executing the following ASP.NET code as an example to create a 10-second delay: System.Threading.Thread.Sleep(10000);
With TypeConfusedDelegate we can invoke the method arbitrarily ... How about XamlReader.Parse() ? XamlReader.Parse is a public/static also, so we can easily call it with TypeConfusedDelegate
gadget ActivitySurrogateSelector can use to load a DLL via Assembly.Load() function. | The patch almost patching for Deserialization Sink inside Exchange, so we can be sure that this time it’s a deserialization vulnerability.
This blog post attempts to give insights into its features, security measures, and especially its weaknesses/vulnerabilities that often result in remote code execution.
"deserialization vulnerabilities can affect a wide variety of languages and libraries..."; "we will limit our scope to attacks that occur over HTTP."; "common languages/object types exploited... serialized Java objects, .NET ViewStates, pickled Python objects, and serialized PHP objects."
Abuse of Deserialization for RCE: With the sysadmin API token, the attacker interacts with application API endpoints, targeting a deserialization function. By injecting a malicious payload into this process, arbitrary code execution is achieved on the server.
The executed command was "whoami," and the resulting file showed "iis apppool\sitecoresc.dev.local."
As the targeted box might not send any requests externally, automated scanners should use a payload that causes a short delay on the server-side. This can be achieved by executing the following ASP.NET code as an example to create a 10-second delay: System.Threading.Thread.Sleep(10000);
This repository contains a vulnerable C# application (client/server) that uses .NET Remoting over HTTP... It also includes a copy of ysoserial.net... changed to work with .NET Framework 2.0... this project can be used to exploit applications that use .NET Framework v2.0
Tại đây, method này gọi tới EntitySerializer.Deserialize(), EntitySerializer.Deserialize() gọi tiếp tới DataContractSerializer.ReadObject() ... hoàn toàn có thể RCE với DataContractSerializer ... kiểu dữ liệu được deserialize quá lỏng lẻo
Sign ysoserial.net payload with an HMAC using RCEvil.NET: RCEvil.NET.exe -u /Default.aspx -v 000102030405060708090a0b0c0d0e0f10111213 -m SHA1 -p /wEyxBEAAQAAAP////8...
8 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.