• News
  • Security
  • Products
  • About Seqrite
Blogs on Information Technology, Network & Cybersecurity | Seqrite Blog
  • News
  • Security
  • Products
  • About Seqrite
Home  /  Manufacturing  /  Advance Campaign Targeting Manufacturing and Export Sectors in India
Advance Campaign Targeting Manufacturing and Export Sectors in India
06 July 2020

Advance Campaign Targeting Manufacturing and Export Sectors in India

Written by Pavankumar Chaudhari
Pavankumar Chaudhari
Manufacturing

Summary

Quick Heal Security Labs has observed a new malspam campaign that is targeting Manufacturing and Export industries in India. In this campaign, malware actors are making use of multiple sophisticated techniques to bypass defence mechanisms. In our analysis, we saw several Remote-Access-Tools (RAT) being used in this campaign. some of which were –

  • Agent Tesla
  • Remcos RAT
  • NanoCore RAT

The Attack starts with a phishing email containing MS Office PowerPoint files with a malicious VBA macro. Upon execution, the malicious macro uses pre-existing legitimate software to download malicious payload from Pastebin, post which the attack proceeds

Technical Details

This campaign uses multiple evasive techniques such as-

  • Use of LoLBins or living-off-the-land binaries
  • Hosting payloads on legitimate file hosting service Pastebin
  • Bypass AMSI (Antimalware Scan Interface)
  • In memory payload execution – fileless technique

Living-off-the-land binaries are built-in tools on operating systems, generally used for legitimate purposes. Attackers abuse these tools for malicious purposes so that they can achieve application control and whitelisting bypass. It also offers minimal use of custom malicious binaries.  By using Pastebin for payload hosting they can bypass network security controls. AMSI bypass technique is used to bypass in-memory PowerShell payload detection. The final payload is downloaded, and injected using Windows native binaries via leveraging file-less techniques.

Initial Attack Vector

Below is an example of a typical email in a malspam campaign:

Figure 1: Phishing email
Figure 1: Phishing email

Stage 1 VBA Macro

Once the victim opens the attachment, VBA macro gets executed after enabling it — below fig shows malicious macro. It further downloads the second stage of payload by executing mshta.exe with a parameter hXXp[:]//j[.]mp/asdxasffgdasodkasodkaos

Figure 2: VBA macro code
Figure 2: VBA macro code

Stage 2 MSHTA

The shortened link hXXp[:]//j[.]mp/asdxasffgdasodkasodkaos  redirects to hXXps://pastebin.com/raw/p0L3ZEdv. This link hosts hta files. Below fig, 3 shows decoded VBS code. This code is downloaded and executed by mshta.exe.

Figure 3: Decoded VBScript Code from Pastebin
Figure 3: Decoded VBScript Code from Pastebin

As shown in the above VBScript, code is obfuscated with multiple techniques. StrReverse function is used to de-obfuscate some strings. It performs multiple malicious activities like run next stage of VBScript code with mshta, add autorun registry entry of multiple mshta, create a schedule task to create mshta at every 80 minutes of interval, etc.

Above VBScript code refers to four different Pastebin links as below:

  • hXXp://pastebin[.]com/raw/9R26f905:
    • Execute stage 3 VBScript with help of mshta. We will discuss it in stage 3.
  • hXXp://pastebin[.]com/raw/veYin3zL:
    • Spawns PowerShell.exe via WMI to run another binary hosted at hXXp:\\pastebin[.]com \raw\pJndi7zC. This paste was removed at the time of analysis.
  • hXXp://pastebin[.]com/raw/EfCVqG1K
    • This VBScript creates autorun registry entry of powershell.exe to execute the content of registry entry “HKCU\Software\mogale”. This registry contents bitcoin hijacker code, part of code as shown below:
Figure 4: Part of the bitcoin Hijacker code
Figure 4: Part of the bitcoin Hijacker code
  • hXXp://pastebin[.]com/raw/P2EtwdW6:
    • This code executes PowerShell to load contents from hXXp://pastebin[.]com /raw/eyGv9x4B and execute in memory but this paste was removed at the time of analysis.

Stage 3 MSHTA:

In stage 3, pastebin hosted VBScript gets executed with help of mshta.exe. Below decoded VBScript code looks like:

Figure 5: Decoded VBScript Code from Pastebin
Figure 5: Decoded VBScript Code from Pastebin

This VBScript code performs below tasks – 

1.Download and execute AMSI bypass DLL in memory

Figure 6 shows the code of AMSI bypass DLL — AMSI is Antimalware Scan Interface provided for antimalware vendors. It is very efficient to de-obfuscate scripts like VBS, PowerShell, VBA Macro,etc. It scans script content while it gets executed. This interface is also useful to detect file-less malware, especially in case of PowerShell scripts. To bypass this advance detection below code is used to patch AmsiScanBuffer() function of amsi.dll.

Figure 6: Code shows the bypass function of Amsi class
Figure 6: Code shows the bypass function of AMSI class

 

Figure 7: Code to patch AmsiScanBuffer() function
Figure 7: Code to patch AmsiScanBuffer() function

 

Figure 8: Strings present in AMSI byapss DLL
Figure 8: Strings present in AMSI byapss DLL

2.Download and execute .NET injector DLL

Below function of injector DLL is responsible for injecting final payload in the provided process. In this case payload binary is injected in installUtil.exe by calling rOnAlDo::ChRiS(‘InstallUtil.exe’,$Cli2) function as shown in fig. 5.

 

Figure 9: Function of .Net injector dll
Figure 9: Function of .Net injector dll

3.Final Payload execution

The final payload is hosted on another Pastebin as shown below fig 10.  We have observed that attackers keep changing this final payload to deliver different RATs like Agent Tesla, Remcos and NanoCore RAT. At the time of our analysis, we found only Agent Tesla, but in some past cases, this campaign was distributing Remcos and NanoCore RAT.

Figure 10: Final payload hosted on Pastebin
Figure 10: Final payload hosted on Pastebin

Analysis of Agent Tesla payload

Final Agent Tesla payload is injected in one of Windows native process called InstallUtil.exe. Below figure shows injected Agent Tesla binary in memory of InstallUtil.exe.

Figure 11: Payload injected in InstallUtil.exe
Figure 11: Payload injected in InstallUtil.exe

Agent Tesla is an info-stealer malware used to steal personal information from victim’s machines like browser stored credentials, FTP password, etc. It also performs key-logging and screen capturing activities.

All stolen information is sent to C2 server.

Figure 12: Browser credential-stealing code
Figure 12: Browser credential-stealing code

 

Figure 13: Payload connects to web panel
Figure 13: Payload connects to web panel

Conclusion

This campaign is known by various names – ‘Roma225’, ‘RG’ and ‘Aggah’ are some of the popular ones. We have been following its tracks since April 2020. The attackers behind this campaign are not restricting themselves to a geography/sector, as similar campaigns have previously targeted varied organizations (including Government sector Organizations) across the globe.

Threat actors behind this campaign are likely using a Pastebin PRO account to host their payloads. Using publicly available systems such as j.mp, bit.ly and Pastebin helps the threat actor hide behind legitimate services that are likely not blocked by security solutions.  With the low confidence, the security community is linking this campaign with Pakistan based Gorgon Group.

We advise users to avoid opening attachments & clicking on web links in unsolicited emails. Organizations should consider disabling Macros across their environment

IOCs

  • 9a6ffcd34b92551d3420a91cfcb653b6
  • 9a6ffcd34b92551d3420a91cfcb653b6
  • 60FB2ACEB496C3A81C91D37AC58F93D5
  • FD9266A2E0F33EE4C26824CDF2743BFC
  • 536D03572918F4D37E3830A81D276E82
  • A4F41AF9DB1535148CDAEC0B79FCBBC9
  • C6552C9750A6217070FCD6EF59A4E6B6
  • 0AC712F8D1B974F4204B905E4591BA48
  • 47127206546C2C10699BDEBE121959BD
  • CD8486E95DC1BE8D7BE340EAFD9DC205
  • 513E8704E63139ADE4BAE0E2AF117089
  • A5D8A638F68FD463A9A38194F8E1E88E
  • 9BCEB4ED215E8950DDDB102789638C41

Subject matter experts

  • Aniruddha Dolas
  • Kalpesh Mantri
  • Pavankumar Chaudhari

 Previous PostIs the education sector turning a blind eye to cyberthreats emerg...
Next Post  Operation ‘Honey Trap’: APT36 Targets Defence Organizations i...
Pavankumar Chaudhari

About Pavankumar Chaudhari

Pavankumar is associated with Quick Heal Technologies as a Technical Lead (Research and Development) and is also a part of Vulnerability Research and Analysis Team....

Articles by Pavankumar Chaudhari »

Related Posts

  • Cybersecurity in manufacturing

    Preparing the Manufacturing Industry for New Age Cyber Attacks

    March 29, 2024
  • Is accelerating enterprise digital transformation leading to cyberthreats?

    Is accelerating enterprise digital transformation leading to cyberthreats?

    November 25, 2020
  • Cyberattacks infiltrate a merging IT-OT landscape

    IT-OT confluence creates cybersecurity gaps for enterprises

    November 20, 2020
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