FoggyWeb
- Type
- Backdoor
- Capabilities
- Credential theftExfiltrationPersistencePost exploitationDefense evasionDLL sideloading
- Platforms
- Windows
FoggyWeb is a targeted .NET post-exploitation backdoor used by NOBELIUM, now tracked as Midnight Blizzard and also known as APT29, a Russian cyberespionage actor attributed to the Foreign Intelligence Service (SVR). Observed in use since at least April 2021 and publicly disclosed in September 2021, it targets on-premises Windows servers running Active Directory Federation Services (AD FS). Deployment occurs after attackers obtain administrative access to an AD FS server, providing persistent access to sensitive identity infrastructure.
Its loader uses DLL search order hijacking during AD FS service startup, decrypts an encrypted payload in memory, and loads the managed backdoor into the same .NET application domain as legitimate AD FS code. This gives FoggyWeb access to AD FS resources under the service account's permissions. It retrieves and remotely exfiltrates the AD FS configuration database and decrypted token-signing and token-decryption certificates. Theft of this cryptographic material can enable subsequent abuse of federated authentication.
FoggyWeb configures custom HTTP listeners that monitor incoming GET and POST requests and intercept those matching attacker-defined patterns resembling legitimate AD FS traffic. GET requests trigger data retrieval, with responses disguising stolen information as validly formatted WebP content using compression and XOR encoding. POST requests allow attackers to deliver and execute additional .NET assemblies in memory or dynamically compile and execute C# source code. Encrypted payload storage, legitimate-looking resource-file masquerading, and in-memory execution help conceal its activity.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Techniques & procedures
30 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
Known Exploited Vulnerabilities ... CVE-2018-13379 ... CVE-2019-11510 ... CVE-2019-19781 ... CVE-2023-42793 ... ProxyLogon ... ProxyShell
Execution
4 techniques
Execution
[FoggyWeb](https://attack.mitre.org/software/S0661)'s loader can use API functions to load the [FoggyWeb](https://attack.mitre.org/software/S0661) backdoor into the same Application Domain within which the legitimate AD FS managed code is executed.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661)'s loader can call the <code>load()</code> function to load the [FoggyWeb](https://attack.mitre.org/software/S0661) dll into an Application Domain on a compromised AD FS server.(Citation: MSTIC FoggyWeb September 2021)
...uses the LoadLibraryExW() function to load additional modules... execute additional plugins by loading the respective DLLs... loaded and executed DLLs in memory during runtime... loads a dynamic library (.dylib file) using dlopen() and obtains a function pointer... using dlopen() and dlsym()... calls LoadLibrary then executes exports from a DLL.
[FoggyWeb](https://attack.mitre.org/software/S0661)'s loader has used DLL Search Order Hijacking to load malicious code instead of the legitimate `version.dll` during the `Microsoft.IdentityServer.ServiceHost.exe` execution process.(Citation: MSTIC FoggyWeb September 2021)
Persistence
2 techniques
Persistence
APT29 has been observed gaining persistence via backdoor and web shell malware variants, manipulating and adding accounts to compromised networks, conducting password spraying attacks to gain access to additional accounts...
APT29 routinely cleans up by removing their tools and backdoors once legitimate remote access is secured, often deploying a web shell on Microsoft Exchange servers after a successful compromise.
Privilege Escalation
1 technique
Privilege Escalation
APT29 has been observed gaining persistence via backdoor and web shell malware variants, manipulating and adding accounts to compromised networks, conducting password spraying attacks to gain access to additional accounts...
Stealth
9 techniques
Stealth
The content repeatedly describes payloads, strings, configuration files, scripts, URLs, and binaries being obfuscated or encoded using Base64, XOR, RC4, AES, RSA, hex encoding, custom algorithms, and other methods across many malware families and threat actors.
[FoggyWeb](https://attack.mitre.org/software/S0661) can compile and execute source code sent to the compromised AD FS server via a specific HTTP POST.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661) has been XOR-encoded.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661) can masquerade the output of C2 commands as a fake, but legitimately formatted WebP file.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661) can be disguised as a Visual Studio file such as `Windows.Data.TimeZones.zh-PH.pri` to evade detection. Also, [FoggyWeb](https://attack.mitre.org/software/S0661)'s loader can mimic a genuine `dll` file that carries out the same import functions as the legitimate Windows `version.dll` file.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661) can be decrypted in memory using a Lightweight Encryption Algorithm (LEA)-128 key and decoded using a XOR key.(Citation: MSTIC FoggyWeb September 2021)
...uses the LoadLibraryExW() function to load additional modules... execute additional plugins by loading the respective DLLs... loaded and executed DLLs in memory during runtime... loads a dynamic library (.dylib file) using dlopen() and obtains a function pointer... using dlopen() and dlsym()... calls LoadLibrary then executes exports from a DLL.
[FoggyWeb](https://attack.mitre.org/software/S0661)'s loader has used DLL Search Order Hijacking to load malicious code instead of the legitimate `version.dll` during the `Microsoft.IdentityServer.ServiceHost.exe` execution process.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661)'s loader has reflectively loaded .NET-based assembly/payloads into memory.(Citation: MSTIC FoggyWeb September 2021)
Credential Access
6 techniques
Credential Access
[FoggyWeb](https://attack.mitre.org/software/S0661) can configure custom listeners to passively monitor all incoming HTTP GET and POST requests sent to the AD FS server from the intranet/internet and intercept HTTP requests that match the custom URI patterns defined by the actor.(Citation: MSTIC FoggyWeb September 2021)
FoggyWeb can retrieve configuration data from a compromised AD FS server.
[FoggyWeb](https://attack.mitre.org/software/S0661) can retrieve token signing certificates and token decryption certificates from a compromised AD FS server.(Citation: MSTIC FoggyWeb September 2021)
MITRE ATT&CK Mappings: APT29 Credential Access T1606: Forge Web Credentials .001: Web Cookies .002: SAML Tokens
新型攻擊技術 GoldenSAML 首先在 2017 年時被發現...所以只要攻擊 ldP 也就是 AD FS,竊取 ldP 的 Private Key,攻擊者便可以任意偽造身分透過 SP 進行身分驗證。
GoldenSAML 攻擊的前提是必須竊取 AD FS 伺服器上的 Private Key。
Discovery
3 techniques
Discovery
[FoggyWeb](https://attack.mitre.org/software/S0661) can configure custom listeners to passively monitor all incoming HTTP GET and POST requests sent to the AD FS server from the intranet/internet and intercept HTTP requests that match the custom URI patterns defined by the actor.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661)'s loader can enumerate all Common Language Runtimes (CLRs) and running Application Domains in the compromised AD FS server's <code>Microsoft.IdentityServer.ServiceHost.exe</code> process.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661)'s loader can check for the [FoggyWeb](https://attack.mitre.org/software/S0661) backdoor .pri file on a compromised AD FS server.(Citation: MSTIC FoggyWeb September 2021)
Lateral Movement
1 technique
Lateral Movement
[FoggyWeb](https://attack.mitre.org/software/S0661) can allow abuse of a compromised AD FS server's SAML token.(Citation: MSTIC FoggyWeb September 2021)
Collection
3 techniques
Collection
[FoggyWeb](https://attack.mitre.org/software/S0661) can retrieve configuration data from a compromised AD FS server.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661) can invoke the `Common.Compress` method to compress data with the C# GZipStream compression class.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661) can use a dynamic XOR key and a custom XOR methodology to encode data before exfiltration. Also, [FoggyWeb](https://attack.mitre.org/software/S0661) can encode C2 command output within a legitimate WebP file.(Citation: MSTIC FoggyWeb September 2021)
Command and Control
3 techniques
Command and Control
[FoggyWeb](https://attack.mitre.org/software/S0661) has the ability to communicate with C2 servers over HTTP GET/POST requests.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661) can receive additional malicious components from an actor controlled C2 server and execute them on a compromised AD FS server.(Citation: MSTIC FoggyWeb September 2021)
[FoggyWeb](https://attack.mitre.org/software/S0661) has used a dynamic XOR key and custom XOR methodology for C2 communications.(Citation: MSTIC FoggyWeb September 2021)
Exfiltration
1 technique
Exfiltration
[FoggyWeb](https://attack.mitre.org/software/S0661) can remotely exfiltrate sensitive information from a compromised AD FS server.(Citation: MSTIC FoggyWeb September 2021)
Recent activity
26 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.