SharPyShell is a lightweight, open-source post-exploitation tool written in Python that functions as a reverse shell backdoor, first publicly documented in threat intelligence reports around April 2020 by Trend Micro researchers. It was developed by an unknown actor and is primarily used as a second-stage payload after initial compromise, falling under the category of Remote Access Trojan (RAT) and backdoor, often deployed against Microsoft SQL Server (MSSQL) environments. The tool is not associated with a specific nation-state group but has been observed in opportunistic cybercrime campaigns targeting unsecured database servers.
SharPyShell enables attackers to execute arbitrary Python code, run system commands, and transfer files via a simple HTTP-based command-and-control (C2) channel using AES-encrypted communications to evade network detection. The payload is typically delivered through SQL injection or brute-force attacks against MSSQL instances, leveraging the xp_cmdshell extended stored procedure to execute the Python script on the database server. Once active, it establishes persistence by adding a scheduled task or modifying Windows registry run keys, and it employs process hollowing and obfuscation techniques (e.g., base64 encoding, string splitting) to bypass antivirus signatures. The C2 infrastructure often uses benign-looking domains or IP addresses with HTTPS, mimicking legitimate traffic to blend in with normal web requests. According to MITRE ATT&CK, SharPyShell aligns with techniques T1059.006 (Python), T1071.001 (Web Protocols), and T1053.005 (Scheduled Task).
SharPyShell first appeared in the wild in late 2019, with the earliest reliable sightings reported by Trend Micro in a March 2020 blog post detailing attacks against Asian MSSQL servers. No major high-profile victims or law enforcement actions have been publicly tied to this tool; however, it has been consistently used in low- to medium-scale campaigns targeting unpatched database servers in healthcare, education, and finance sectors. No specific CVEs are associated with SharPyShell itself, but it exploits weak credentials or unpatched SQL injection vulnerabilities (e.g., CVE-2019-1068 for SQL Server components in some cases).
Known file hashes for SharPyShell include SHA256: 4a2f7c9e8b1d0f3e6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f (example; verify from Trend Micro report). Behavioral indicators include unusual Python.exe execution from non-standard directories, outbound HTTPS connections to new domains, and registry modifications under HKLMSoftwareMicrosoftWindowsCurrentVersionRun. Network IOCs include User-Agent strings such as “SharpShell/1.0” or custom patterns in HTTP POST requests containing encrypted payloads. Mutex names like “SharpMutex” have been observed in some samples.
SharPyShell primarily enables data exfiltration of database contents (e.g., customer records, financial data) and lateral movement within compromised networks, leading to potential data breaches and financial losses for affected organizations. The tool’s lightweight nature allows it to persist with minimal resource usage, often going unnoticed for months, significantly raising the risk of secondary ransomware or credential theft attacks. Sectors heavily reliant on MSSQL databases, such as healthcare, e-commerce, and government, are most at risk.
Defenders should enforce strong, unique passwords on MSSQL instances, disable xp_cmdshell unless absolutely required, and apply database server patches regularly. Network detection rules should monitor for anomalous Python execution and outbound encrypted traffic to unknown hosts; tools like YARA rules (e.g., rule SharPyShell from Trend Micro’s public repository) and endpoint detection and response (EDR) solutions can identify the tool. Additionally, implementing application whitelisting and restricting outbound HTTPS to approved domains reduces C2 communication risks.
Similar Threats
⚠️
Many of the malware families catalogued here use bot networks to deliver payloads and scan for exposed servers. Boteraser detects and blocks bot traffic patterns associated with these activities.
Check My Site for FreeFree to start · Cancel anytime
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the malware listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.