Discock Stealer - Another Polymorphic Malware like WASP Stealer

January 13, 2023

What is the package name: http5

When was it released: Jan 3, 2023

Which version we are talking about: 0.0.1

How many times it was downloaded in 30 days: 61

What the package says it to be: “A small example package”

Where we started

We first observed a package performing “starjacking” in the project https://github.com/pypa/sampleproject. We flagged the package for further investigation.

What did we discover from our analysis

From our preliminary analysis, the name ‘http5’ looked suspicious and a victim could fall prey to this package as it sounded like a new version of HTTP library or any such popular package like “HTTP3” . So, we started analyzing the code. During our analysis, we came across the name ‘billythegoat356’ in the source code and  a quick search yielded very few results from which we learned that there is a similar campaign “WASP Stealer” tracked by Checkmarx’ supply chain security research team. Based on the similarity of the code-base and obfuscation techniques as explained in their blog and also their research on hunting for WASP stealer lead us to attribute “Discock Stealer” to “WASP Stealer”.

During our further analysis, it was noted that the package was obfuscated using “Hyperion” and specially crafted to target hosts running Windows Operating Systems. Once the package is installed and executed on the victim’s host, it fetches a malicious piece of python code and saves it on the victim machine. Later the package tries to collect sensitive information such as cookies, saved passwords in a browser, saved cookies of gaming applications and steals financial information from crypto wallets. All the discovered data is saved inside 2 files named wppassw.txt and wpcook.txt. The saved data is later exfiltrated through a discord webhook API. Additionally, it also collected victim’s geo location based on the public IP address.

A deep-dive into the code

As we can observe from the screenshot below the http5 package initially creates a file with a random name in the temp directory of the victim’s host which then fetches a malicious piece of code downloaded from the stage-1 – hxxps[:]//www[.]ciqertools[.]xyz/discock/nigger

Registry Editor

The hosted malicious code looks like the code of packages mentioned in Checkmarx research blog posts on WASP Stealer. Also, it can be observed that it is using Hyperion obfuscator to obfuscate its code. Since, it was not possible to conclude anything based on the static code analysis quickly, we decided to conduct a dynamic analysis in our sandbox environment.

Registry Editor

While we executed the python code inside a sandbox Linux environment, there was no indication of any network communications or system calls made, and it immediately exited. Hence, we decided to test it further on Windows environment.
When we executed the python code on Windows, we noted that it tries to perform multiple lookups.

Process Monitor

All the discovered data is saved inside 2 files named wppassw.txt and wpcook.txt. The saved data is later exfiltrated through a discord webhook API. Along with this it also collects the victim’s geo-location based on the public IP address. The behaviour is quite similar to previously known malicious packages shared on Kaspersky blog.

All these collected information was exfiltrated to gofile.io & discord webhook API.

Process Monitor

What do we conclude

Though we understand the objective of the adversary here, we are not certain how widespread is their campaign. Attacks on the software supply chain kept evolving day by day. The level of obfuscation used in this package to circumvent the security measures is a strong indication and highlights the importance of conducting a thorough analysis of open-source dependencies in use. We also observed few researchers (claimed as) who published similar packages with malicious content such as ”cxcxcx”. At some point we also thought this package could be one among them. However, we continue to research and track the campaign irrespective of any ecosystem.

MITRE ATT&CK Techniques

table { border-collapse: collapse; width: 100%; margin: 20px 0; border-radius: 8px; font-family: 'DM Sans', sans-serif; /* Webflow-friendly font */ font-size: 14px; color: #1a313f; } th, td { padding: 8px 20px; border: 1px solid rgba(255, 255, 255, 0.2); text-align: left; } th { font-weight: bold; background-color: rgba(255, 255, 255, 0.12); } tr:nth-child(odd) { background-color: rgba(0, 0, 0, 0.05); /* Added subtle banding for visual clarity */ }
Initial accessT1195.001Compromise Software Dependencies and Development Tools
ExecutionT1059.006Command and Scripting Interpreter: Python
Defense EvasionT1140Deobfuscate/Decode Files or Information
Credentials AccessT1555.003
T1606.001
T1539
T1552.001
Credentials from Web Browsers
Forge Web Credentials: Web Cookies
Steal Web Session Cookie
DiscoveryT1083File and Directory Discovery
Command and ControlT1071Application Layer Protocol: Web Protocols
Exfiltration Over Alternative ProtocolT1048Exfiltration Over Alternative Protocol

Indicators of Compromise

YARA rule based on some observed strings

You can download the rule from here

Authors:

  1. Dhanesh Hitesh Dodia – Security Researcher, Loginsoft
  2. Kartik Singh – Security Researcher, Loginsoft

References used in our Research

WASP Attack on Python — Polymorphic Malware Shipping WASP Stealer; Infecting Hundreds Of Victims

In early November, several malicious packages were reported by Phylum and CheckPoint.

Hunting for Malicious Code: The Dangers of WASP Stealer

WASP Stealer, for those of you who aren’t familiar, is an open-source malware

Phylum Discovers Dozens More PyPI Packages

Last week, our automated risk detection platform alerted us to some suspicious activity in dozens of newly published PyPI packages.

Get notified

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

BLOGS AND RESOURCES

Latest Articles