Hidden-Tear Kit gives birth to Karmen Ransomware

April 28, 2017

The SonicWall Threats Research team have recently been tracking a ransomware family known as Karmen. As expected, this ransomware encrypts various files on the system using the AES-256 encryption protocol rendering the files inaccessible until payment is made to the operators. Karmen is reported to be derived from an open source malware project hosted on github.com called Hidden Tear. Such projects make it easy for anyone to become a cyber criminal and generate malicious executable modules that can be used to infect machines on the internet. The first reported infections of this ransomware date back as far as December 2016.

Infection cycle:

The Trojan immediately reports the infection to a remote key server and sends a pregenerated unique ID:

The response is a Bitcoin payment address.

It also makes the following request to retrieve the Bitcoin ransom amount,

It then requests to download the Karmen decrypter program [Detected as GAV: Karmen.RSM_2 (Trojan)]:

Once run, it displays the following window:

The Trojan adds the following files to the filesystem:

  • %APPDATA%LocalTempadr.txt
  • %APPDATA%LocalTempbtc.txt
  • %APPDATA%LocalTempdel.bat
  • %APPDATA%LocalTempid.txt
  • %APPDATA%LocalTemplnk.txt
  • %APPDATA%LocalTempTTX49E1.tmp
  • %APPDATA%LocalTempEeGpNYHeR2QcRuKq.exe [Detected as GAV: Karmen.RSM_2 (Trojan)]

The dropped text files contain the following data:

  • adr.txt
    • 3A1zX8Vt1WUfxLtAnoo33Zk2Ebikig3RU2
  • btc.txt
    • 0.33
  • del.bat
    • @echo off
      taskkill /f /im EeGpNYHeR2QcRuKq.exe
      del %APPDATA%LocalTempEeGpNYHeR2QcRuKq.exe
      del %APPDATA%LocalTemplnk.txt
      del %APPDATA%LocalTempbtc.txt
      del %APPDATA%LocalTempadr.txt
      del %APPDATA%LocalTempdel.bat
  • id.txt
    • bcjytJMY2daB09
  • lnk.txt

The Trojan periodically sends the following request to the key server:

SonicWALL Gateway AntiVirus provides protection against this threat via the following signatures:

  • GAV: Karmen.RSM (Trojan)
  • GAV: Karmen.RSM_2 (Trojan)