Racoon Stealer Leverages Telegram for C2

Introduction

Raccoon Stealer is a fairly new tool that is able to extract passwords, browser cookies, email credentials, plugin/extension data, and crypto wallet files. The malware can download and execute arbitrary files through command-and-control and has become a very popular tool of choice as of late.

According to Avast, Raccoon Stealer has been observed being distributed through downloaders like GCleaner and Buer Loader since 2019, and has seen multiple updates since original release.

In the recent research paper provided by the Avast team, analysts point out that their samples of the malware appeared to be distributed in the form of game cheats, patches, game mods, or other popular software. Raccoon Stealer can be used by anyone who buys it so the scope of delivery themes is endless.

Technical Analysis (Shortened)

Raccoon Stealer is written in C/C++ via Visual Studio. The malware does several checks on an infected machine before executing the main payload. Once of these checks includes determining the locale of the victim. If the machine uses the following locale set, the malware will not work:

  • Russia
  • Ukrainian
  • Belarusian
  • Kazakh
  • Kyrgyz
  • Armenian
  • Tajik
  • Uzbek

As for C2 communications, the stealer has four critical values hardcoded into every sample analyzed.


First, the MAIN_KEY is decrypted. The Telegram Gate URLs are decoded and decrypted and stored as a value in the sample. Through Base64 decoding and then RC4 decrypting the binary data using MAIN_KEY, the Telegram Gates are uncovered in plaintext.


The Raccoon Stealer requests a Telegram Gate, which will return a webpage containing a channel name and a status in Base64. The Avast team notes in their research that the prefix is always five characters long and the postfix is always six characters long. They are removed and it becomes another Base64 to decode. This, will result in an encrypted C2 URL.



The stealer uses the TELEGRAM_KEY (a string) as an RC4 key to decrypt the C2 URL. In this example, the C2 decrypted to the following (sanitized): hxxp://91.219.236[.]18/

A query is made by the malware with PC information and the BotID. The string is RC4 encrypted using a MAIN_KEY and Base64 encoding.

The C2 receives a POST request containing the data and sends back a Base64 and MAIN_KEY encrypted response signaling that the Telegram infrastructure is the core components of storing C2 addresses.

Additional information regarding the prevalence of Raccoon Stealer and Avast's conclusion can be read here.


Comments

Popular posts from this blog

Russian GRU Unit 29155 recent operations