Malicious NuGet Package Sicoob.Sdk Exfiltrates Client IDs and PFX Certificates
Remove or replace the compromised Sicoob.Sdk package and revoke exposed PFX certificates.
Uninstall Sicoob.Sdk, revoke any exposed PFX certificates, and replace the SDK with a trusted version.
Summary
Security researchers discovered that the NuGet package Sicoob.Sdk, marketed as a C# SDK for Brazil’s largest cooperative financial system, was compromised in versions 2.0.0 through 2.0.4. The malicious code was designed to exfiltrate sensitive data, including client IDs and PFX certificates that are used for authentication and signing. The package masquerades as a legitimate SDK, making it difficult for developers to detect the compromise. Socket, the security firm that uncovered the issue, identified the exfiltration payload in the package’s build scripts and runtime libraries. The attackers leveraged the SDK’s ability to load certificates from the local machine, allowing them to harvest PFX files used by Sicoob’s clients. The exfiltration traffic was sent to a remote server controlled by the threat actors, and the data was used to facilitate further attacks on financial systems. The discovery highlights the risks of third‑party packages that handle cryptographic material. Researchers recommend removing the compromised package and revoking any exposed certificates immediately.
The affected versions 2.0.0, 2.0.1, 2.0.2, 2.0.3, and 2.0.4 all contain the same malicious payload. The code was obfuscated and hidden within the SDK’s authentication module, making static analysis challenging. The exfiltration mechanism used HTTP POST requests to a hard‑coded endpoint that was not publicly documented. The attackers also added a backdoor that could be triggered by a custom header, allowing remote control of the SDK. The incident underscores the importance of vetting third‑party libraries that handle sensitive credentials.
Key changes
- Versions 2.0.0–2.0.4 of Sicoob.Sdk contain a malicious payload that exfiltrates client IDs and PFX certificates.
- The SDK masquerades as a legitimate C# library for Brazil’s Sicoob cooperative financial system.
- Exfiltration traffic is sent to a remote server via obfuscated HTTP POST requests.
- The attackers added a backdoor that can be triggered by a custom header for remote control.
- The compromised code is hidden within the SDK’s authentication module, evading static analysis.
- Affected versions span 2.0.0 to 2.0.4, all containing the same malicious payload.
- The incident highlights the risk of third‑party packages handling cryptographic material.
- Socket identified the issue and released a remediation guide.