Contained in the Code of a New XWorm Variant

XWorm is a comparatively new consultant of the distant entry trojan cohort that has already earned its spot among the many most persistent threats throughout the globe.

Since 2022, when it was first noticed by researchers, it has undergone quite a lot of main updates which have considerably enhanced its performance and solidified its endurance.

The analyst staff at ANY.RUN got here throughout the most recent model of the malware and couldn’t refuse the chance of taking it aside to look at XWorm mechanics configurations. Right here is how they did it and what they discovered.

The XWorm pattern’s supply

The pattern in query was found in ANY. RUN’s database of malware, a repository containing detailed evaluation studies on all recordsdata and hyperlinks which have been uploaded by customers of the sandbox in public mode.

A fast take a look at the outcomes of the evaluation revealed that the pattern was initially distributed through MediaFire, a file-hosting service. The malware was packaged in a RAR archive and guarded by a password.

Determine 1: The MediaFire web page containing the archive obtain hyperlink.

Upon execution, the menace was immediately detected by Suricata guidelines and recognized as XWorm.

Determine 2: XWorm’s site visitors marked as malicious by the sandbox.

XWorm’s Ways, Strategies, and Procedures (TTPs)

The sandbox report highlighted a number of methods utilized by the pattern:

Determine 3: XWorm’s actions on the contaminated system.

MITRE T1547.001: XWorm added its shortcut to the Startup listing.

MITRE T1053.005: It used the duty scheduler to restart itself with elevated privileges, as indicated by the “/RL HIGHEST” parameter.

MITRE T1074.001: The software program was put in within the Public listing.

MITRE T1571: The malware tried to connect with a distant server, however no response was acquired.

XWorm’s failed try and evade sandbox evaluation

Because the preliminary evaluation report was a number of days previous, the staff determined to run the pattern by way of the sandbox as soon as once more to test for brand spanking new actions.

Nonetheless, after launch, the malware crashed nearly instantly. A brief investigation made it obvious that the pattern now queried a particular service to find out if it was working in a digital sandbox.

Primarily, XWorm builders carried out an evasion approach, which brought on the malicious software program to close down as quickly because it sensed a virtualized surroundings.

To beat this, the staff enabled Residential Proxy within the sandbox settings. This function replaces the digital machine’s datacenter IP deal with with one from an precise ISP, making the malware suppose it’s working on an actual person’s machine.

Determine 4: Residential Proxy supplies IP addresses from quite a few

After rerunning the pattern with Residential Proxy enabled, XWorm was efficiently executed and started its exercise.

Malware Evaluation

Analyze This Sample and More with ANY.RUN

Join and get INSTANT entry to investigate this pattern, and every other, on ANY.RUN. Do not miss out on the final word software to grasp and fight threats.

Create Free Account

On high of that, with the assistance of the MITM proxy function, it was potential to extract the data transmitted by XWorm to Telegram (MITRE T1102). The information included: the malware’s model (XWorm V3.1), the machine’s username, the OS model, and sure the sufferer’s hash.

Determine 5: XWorm collected system data (MITRE T1082).

Static evaluation of the brand new XWorm variant

After gathering all of the essential data supplied by the sandbox, the analysts started the static evaluation part of their analysis. Step one was to load the pattern into Detect it Simple (DIE), an trade customary for preliminary malware evaluation. This system rapidly decided that it was a .NET variation of XWorm.

Determine 6: DIE supplied an perception into the malware’s compiler.

From there, the one logical step for the staff was to open the file in dnSpy, a .NET debugger, which promptly revealed that the binary was topic to heavy obfuscation. Nonetheless, DIE failed to acknowledge the packer even utilizing Heuristic scanning.

Determine 7: The XWorm’s code turned out to be obfuscated (MITRE T1027).

Using de4dot, a .NET deobfuscator and unpacker, additionally didn’t have any impact.

Extra of XWorm’s evasion and persistence methods

Additional investigation of the malicious binary allowed the staff to uncover extra items of the puzzle. Particularly, quite a lot of additional mechanics utilized by the malware had been discovered:

Virtualization detection: XWorm used the WMI question “Select * from Win32_ComputerSystem” to test for VmWare or VirtualBox environments.

Determine 8: The malware exploited Home windows Administration Instrumentation (MITRE T1047).

Debugger detection: It additionally ran the CheckRemoteDebuggerPresent API perform to see if it was being debugged.

Determine 9: Xworm tried to evade debugger evaluation.

Sandboxie detection: The binary scanned the system to see if the SbieDll.dll library was loaded.

Determine 10: SbieDll.dll is related to Sandboxie, a sandbox-based isolation program.

Datacenter IP test: Xworm queried the machine to find out if it was hosted in a knowledge middle.

Determine 11: The malware’s IP scanning explains the rationale behind its preliminary crash.

Persistence: XWorm used the registry and the duty scheduler to determine a persistent presence on the system.

Determine 12: The code revealed the malware’s skill to change the registry.

Extraction of XWorm’s configuration

Subsequent, the analysts discovered a constructor that seemed like a block containing settings. They used a perform to reassign a few of its fields. The malware first computed an MD5 hash from a worth within the presumed settings part.

It then copied the obtained worth twice into a brief array, however attributable to an off-by-one error, the MD5 was not being copied solely twice. The staff used the obtained array as a key to decrypt the incoming base64 strings utilizing AES in ECB mode.

Additionally they discovered that the sphere used was a mutex. Your complete course of is described intimately in ANY.RUN’s weblog article “XWorm: Technical Analysis of a New Malware Version.”

XWorm’s configuration

The whole configuration of XWorm’s new variant is as follows:





AES key




Sleep time


USB drop file




Log file


Telegram token


Telegram chat id



Acquiring configurations of the newest malware is essential however time-consuming. To make it extra environment friendly, you possibly can run your samples by way of the ANY.RUN sandbox to entry the required data in seconds.

Examine it your self utilizing the XWorm sample. Plus, ANY.RUN gives a 14-day free trial of its high plan to safety groups to assist them take a look at the capabilities of the service.

Discovered this text fascinating? Observe us on Twitter and LinkedIn to learn extra unique content material we submit.

Author: (The Hacker Information)
Date: 2023-09-19 07:32:00

Source link



Related articles

Alina A, Toronto
Alina A, Toronto
Alina A, an UofT graduate & Google Certified Cyber Security analyst, currently based in Toronto, Canada. She is passionate for Research and to write about Cyber-security related issues, trends and concerns in an emerging digital world.


Please enter your comment!
Please enter your name here