APT

Evilnum APT used Python-based RAT PyVil in recent attacks

The Evilnum APT group has added a new weapon to its arsenal, it is a Python-based spy RAT, dubbed PyVil, designed to target FinTech organizations.

The Evilnum APT group was first spotted in 2018 while using the homonym malware. Over the years, the group added new tools to its arsenal, including custom and homemade malware along with software purchased from the Golden Chickens malware-as-a-service (MaaS) provider.

The group aimed at harvesting financial information from financial technology companies, such as trading platforms. Most of the targets are located in the EU and in the UK, but experts also observed attacks against companies in Australia and Canada.

According to researchers at Cybereason, now the threat actor has added a new tool to its arsenal, it is a Python-based remote access trojan (RAT), dubbed PyVil.

“In recent weeks, the Nocturnus team has observed new activity by the group, including several notable changes from tactics observed previously. These variations include a change in the chain of infection and persistence, new infrastructure that is expanding over time, and the use of a new Python-scripted Remote Access Trojan (RAT) Nocturnus dubbed PyVil RAT. ” reads the report published by Cybereason.

The PyVil RAT supports multiple functionalities including:

  • Keylogger
  • Running cmd commands
  • Taking screenshots
  • Downloading more Python scripts for additional functionality
  • Dropping and uploading executables
  • Opening an SSH shell
  • Collecting information such as Anti-virus products installed, USB devices connected, and Chrome version.

The PyVil RAT was recently employed in attacks against FinTech companies across the U.K. and E.U. Attackers carried out spear-phishing emails using the Know Your Customer regulations (KYC) as a lure.

PyVil RAT was compiled with py2exe to build the Windows executable and the Python code inside the py2exe is obfuscated with extra layers, in order to prevent decompilation of the payload.

The researchers extracted the first layer of Python code using a memory dump, it decodes and decompresses the second layer. The second layer of Python code decodes and loads to memory the main RAT and the imported libraries.

The PyVil RAT stores the malware settings (i.e. version, command-and-control (C2) domains) in a configuration module. The malware communicates with the C2 communications via POST HTTP requests and uses RC4 encryption with a hardcoded key encoded with Base64.

Experts noticed that the command and control infrastructure used by the Evilnum APT is expanding.

“While the C2 IP address changes every few weeks, the list of domains associated with this IP address keeps growing,” continues the report published by the experts. “A few weeks ago, three domains associated with the malware were resolved to the same IP address. Shortly thereafter, the C2 IP address of all three domains changed. In addition, three new domains were registered with the same IP address and were used by the malware. A few weeks later, this change occurred again. The resolution address of all domains changed in the span of a few days, with the addition of three new domains.”

The attacks employing the PyVil RAT are characterized by a new infection chain that includes a multi-process delivery procedure of the payload, while past attacks used only a first-stage JavaScript Trojan with backdoor capabilities to establish an initial foothold on a target.

During the infection phase, threat actors also used modified versions of legitimate executables to avoid detection.

The new infection chain starts by including just one LNK file in the ZIP archive attached to spear-phishing messages. When the LNK file is executed, a JavaScript file is called, which acts only as a first-stage dropper (the file name is ddpp.exe).

“The ddpp.exe executable appears to be a version of [Oracle] Java Web Start Launcher, modified to execute malicious code,” according to Cybereason. “When comparing the malware executable with the original Oracle executable, we can see the similar metadata between the files. The major difference at first sight is that the original Oracle executable is signed, while the malware is not.”

The malware achieve persistence using the Run registry key, it creates a scheduled task named “Dolby Selector Task” for ddpp.exe.

The “Dolby Selector Task” acts as a second stage malware that retrieves a payload by unpacking shellcode. The shellcode connects to the C2 using a GET request, and in turn receives another encrypted executable, which it saves to disk as “fplayer.exe.”

The fplayer.exe is crafted to appear as a modified version of [Nvidia’s legitimate] Stereoscopic 3D driver Installer.

Upon executing the fplayer.exe file, another shellcode is unpacked, which connects the C2 and downloads the final payload that is decrypted and loaded to memory.

“This innovation in tactics and tools is what allowed the group to stay under the radar, and we expect to see more in the future as the Evilnum group’s arsenal continues to grow.” concludes the report.

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – hacking, Evilnum)

[adrotate banner=”5″]

[adrotate banner=”13″]

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

FBI chief says China is preparing to attack US critical infrastructure

China-linked threat actors are preparing cyber attacks against U.S. critical infrastructure warned FBI Director Christopher…

4 hours ago

United Nations Development Programme (UNDP) investigates data breach

The United Nations Development Programme (UNDP) has initiated an investigation into an alleged ransomware attack…

7 hours ago

FIN7 targeted a large U.S. carmaker with phishing attacks

BlackBerry reported that the financially motivated group FIN7 targeted the IT department of a large…

18 hours ago

Law enforcement operation dismantled phishing-as-a-service platform LabHost

An international law enforcement operation led to the disruption of the prominent phishing-as-a-service platform LabHost.…

23 hours ago

Previously unknown Kapeka backdoor linked to Russian Sandworm APT

Russia-linked APT Sandworm employed a previously undocumented backdoor called Kapeka in attacks against Eastern Europe since…

1 day ago

Cisco warns of a command injection escalation flaw in its IMC. PoC publicly available

Cisco has addressed a high-severity vulnerability in its Integrated Management Controller (IMC) for which publicly…

1 day ago

This website uses cookies.