• News
  • Security
  • Products
  • About Seqrite
Blogs on Information Technology, Network & Cybersecurity | Seqrite Blog
  • News
  • Security
  • Products
  • About Seqrite
Home  /  Malware • Ransomware • Security  /  Ransomware As A Tool – LockerGoga
Ransomware As A Tool – LockerGoga
03 July 2019

Ransomware As A Tool – LockerGoga

Written by Ghanshyam More
Ghanshyam More
Malware, Ransomware, Security

Ransomware authors keep experimenting with the development of payload in various dimensions. In the timeline of ransomware implementations, we have seen its evolution from a simple screen locker to multi-component model for file encryption, from novice approach to a sophisticated one. The Ransomware as a Tool has evolved in wild and one of them has been received in the Quick Heal lab. This sample is identified as LockerGoga and it is unique as it acts as a tool giving various options for performing encryption.

Like any standard command-line tool, LockerGoga Ransomware shows help information for reference. On execution with parameter -h, it shows options like “-v” for the print version of LockerGoga and “-m” [Email ID as an argument] parameter to specify email id of the attacker for payment, in case victim wants to decrypt encrypted files. The same email id is mentioned in ransom note to contact for price of decrypter.

Fig. 1: Command Line Options

LockerGoga uses Boost library for parsing command line arguments.

Fig. 2: Implemented in Boost Library

Last option in the command line tool “-p” allows to select the process in which malicious code needs to inject; if process name is not provided, then by default it will inject code into “winlogon.exe“.

The received sample contains four executable components inside it, such as

  1. encrypt32.dll
  2. encrypt64.dll
  3. {random_name}.exe (32 bit)
  4. {random_name}.exe (64 bit)

Upon execution, the malware drops dll component according to system architecture as mentioned above, at location %AppData%/Local/Temp

Then it will inject the shell code and RSA Public Key of 1024 bit to the process “winlogon.exe” or in the process specified as an argument. The injected shell code is used to load dropped encrypt**.dll with the help of ldrloaddll.

The encrypt**.dll has an export function “encryptStart”. This function contains code used to enumerate all drives and folders to generate a list of files present in it. All files list is stored in file C:\cl.log.

Fig. 3: Content of cl.log

For every single file listed in C:\cl.log, it drops an executable file with {random name}.exe in %AppData%/Local/Temp or C:\Windows\Temp depending upon 64 or 32 bit architecture of the system and invoke that {random_named}.exe in a loop with -k{public key} {file_path(i.e. file to be encryp)} as the command line argument.

Unique thing about LockerGoga Ransomware is that for every single file, it creates a new process, encrypts that file and terminates that process. By this technique, it might evade anti-ransomware product. While encryption happens, it consumes most of the CPU resources almost up to 90%.

Fig. 4: Encryption of files listed in C:\cl.log

After finishing the encryption of each file, it writes file name in C:\cl.log.

Encryption Process:

It uses two encryption algorithms, AES-128bit for file content encryption and RSA-1024 bit to encrypt AES key used for file content encryption.

Generation of AES Key:

 Initially, it used “CryptGenRandom” API to generate the random seed of 32(20h) bytes. Then it used another 32(20h) byte from resource section to make a key stack of 40h byte, which was used for generating AES key.

Along with Boost library, LockerGoga Implements Crypto++ Library for encryption process which makes reversing the sample very difficult.

Fig. 5: Random seed from Crypt Random
Fig. 6: Generation of AES Key

Implementation of Crypto++ library enables AES new instruction set (AES-NI) which were introduced by Intel in 2009.

AESKEYGENASSIST and AESENC instruction are used to implement AES encryption,

AESKEYGENASSIST is used for round key expansion and AESENC is used to perform one round encryption of AES.

Fig 7: AES-NI instructions

After all above operations, it generates 32-byte data from which 16 bytes are used as Key and other 16 bytes as an Initialization Vector (IV).

Fig 8: AES Key and IV layout

Malware changes file extension to .locked before encrypting it.

Fig. 9: File Rename to .locked

The public key used in the encryption is in PEM format

Fig. 10: Public key used in this variant

Convert them into Microsoft Blob format shown below.

Fig 11: Public key in MS BLOB Format
Fig 12: AES Key and IV encrypted with RSA Public Key

Along with Key (10h), IV (10h) and 8h bytes used as file size (i.e. file to be encrypted) are encrypted by RSA-1024 bit with ‘MGF1 (SHA-1)’ (i.e. mask generation function for the OAEP padding scheme) and appended to the end of the file.

Fig 13: File Content Encrypted with AES Key and IV

After that it encrypts the file content with AES key and IV in CTR mode with a key length of 128 bits.

Conclusion:

LockerGoga has shown a unique and rare mechanism for encrypting files by creating one master and multiple slave process.

Key features:

Use Boost Library for handling complex mathematical computation.

Instead of using Microsoft Crypto API for encryption, implemented the Crypto++ library (Boost Software License)

IoCs:

1E8A6AABF4ADF3AE1890A4C8A2CFF276 – LockerGoga

91976DBD489FEAE2D8719545C8DE304A- encrypt32.dll

174E3D9C7B0380DD7576187C715C4681-encrypt64.dll

E9E6EBC6A0D5183FC8E66472B3419F1E-{random_name}.exe-64 bit

A52F26575556D3C4ECCD3B51265CB4E6 – {random_name}.exe-32 bit

Subject Matter Expert:

Goutam Tripathy, Rahul Sharma, Manisha Prajapati | Quick Heal Security Labs

 Previous PostWhy someone needs VPN?
Next Post  Protect sensitive information with Seqrite Encryption
Ghanshyam More

About Ghanshyam More

Ghanshyam is a security researcher at Quick Heal Security Labs. He is interested in reverse engineering and analyzing security vulnerabilities and...

Articles by Ghanshyam More »

Related Posts

  • SnakeKeylogger: A Multistage Info Stealer Malware Campaign

    March 25, 2025
  • SVC New Stealer on the Horizon

    March 21, 2025
  • Ransomware Attack Over Publicly Shared SMB2 Connections and Staying Protected with Seqrite

    March 11, 2025
Featured Authors
  • Seqrite
    Seqrite

    Follow us for the latest updates and insights related to security for...

    Read more..
  • Sanjay Katkar
    Sanjay Katkar

    Sanjay Katkar is the Joint Managing Director of Quick Heal Technologies...

    Read more..
  • Mahua Chakrabarthy
    Mahua Chakrabarthy

    A tea connoisseur who firmly believes that life is too short for dull content....

    Read more..
Topics
apt (19) Cyber-attack (35) cyber-attacks (58) cyberattack (16) cyberattacks (13) Cybersecurity (322) cyber security (31) Cyber threat (33) cyber threats (48) Data (11) data breach (55) data breaches (28) data loss (28) data loss prevention (34) data privacy (11) data protection (24) data security (15) DLP (49) Encryption (16) endpoint security (107) Enterprise security (17) Exploit (14) firewall (11) GDPR (12) hackers (11) malware (76) malware attack (23) malware attacks (12) MDM (25) Microsoft (15) Network security (22) Patch Management (12) phishing (27) Ransomware (67) ransomware attack (30) ransomware attacks (30) ransomware protection (13) security (11) Seqrite (33) Seqrite Encryption (27) Seqrite EPS (33) Seqrite Services (16) UTM (34) Vulnerability (16) windows (11)
Loading
Resources
  • White Papers
  • Datasheets
  • Threat Reports
  • Manuals
  • Case Studies
About Us
  • About Seqrite
  • Leadership
  • Awards & Certifications
  • Newsroom
Archives
  • By Date
  • By Category
Loading

© 2025 Quick Heal Technologies Ltd. Cookie Policies Privacy Policies