Connect with us
CCW 2024

Cyber Security

Cyber Security Speed Signs Partnership with ConnectWise to Expand into the Middle East

Published

on

Cyber Security Speed, a leading global provider of advanced cybersecurity solutions, has announced its strategic expansion in the Middle East region and the establishment of pivotal partnerships with key players in the Gulf. This expansion is driven by the company’s commitment to fortifying businesses against evolving cyber threats and delivering cutting-edge OT/ICS Security capabilities.

As part of its global growth strategy, Cyber Security Speed is excited to establish a strong presence in the Middle East. The region’s rapidly evolving digital landscape presents both opportunities and challenges, making it imperative for businesses to adopt robust cybersecurity measures. Cyber Security Speed’s expansion in the Middle East marks a significant step in its mission to safeguard enterprises and critical infrastructures from sophisticated cyber-attacks.

Cyber Security Speed is proud to announce a strategic partnership with ConnectWise, a renowned provider of software solutions for technology service providers. This partnership will empower businesses in the Gulf to leverage the seamless integration of Cyber Security Speed’s state-of-the-art cybersecurity suite with ConnectWise’s platform. Through this integration, technology service providers can now offer enhanced security services to their clients, delivering a holistic cybersecurity approach with proactive threat prevention and real-time incident response capabilities.

Carlos Becerra, CEO of Cyber Security Speed, remarked oan the partnership, “Our collaboration with ConnectWise reinforces our dedication to providing comprehensive cybersecurity solutions to businesses in the Gulf. Together, we can elevate the region’s cyber resilience and foster a secure digital environment for enterprises and end-users alike.”

With the increasing reliance on interconnected operational technology (OT) and industrial control systems (ICS), the vulnerability to cyber threats has amplified in critical sectors. Cyber Security Speed’s cutting-edge OT/ICS Security capabilities offer businesses advanced defence mechanisms, ensuring the continuous operation and protection of vital infrastructure against potential cyber intrusions.

Cyber Security Speed’s portfolio boasts APT Detection and Response capabilities, providing proactive identification and neutralization of advanced cyber threats. Complemented by a robust Incident Response team and a 24/7 Security Operations Center (SOC), the company ensures swift and efficient incident management, enabling businesses to promptly mitigate security breaches and prevent extensive damages.

Building on its proven track record, Cyber Security Speed has cultivated strategic partnerships with both private sector entities and government institutions in the Gulf. These partnerships aim to create synergies between industry experts and cybersecurity specialists to address the unique challenges faced by the region’s businesses.

“Our collaborations with prominent private sector organizations and esteemed government bodies in the Gulf have played a pivotal role in strengthening our presence in the region. The shared vision of a secure digital landscape unites us in our pursuit of fortifying critical infrastructures and securing businesses from cyber adversaries,” stated Carlos Becerra.

Cyber Security

HijackLoader Expands Techniques to Improve Defense Evasion

Published

on

Written by Donato Onofri, Senior Red Team Engineer at CrowdStrike; and Emanuele Calvelli, Threat Research Engineer at CrowdStrike

CrowdStrike researchers have identified a HijackLoader (aka IDAT Loader) sample that employs sophisticated evasion techniques to enhance the complexity of the threat. HijackLoader, an increasingly popular tool among adversaries for deploying additional payloads and tooling, continues to evolve as its developers experiment and enhance its capabilities.

In their analysis of a recent HijackLoader sample, CrowdStrike researchers discovered new techniques designed to increase the defence evasion capabilities of the loader. The malware developer used a standard process hollowing technique coupled with an additional trigger that was activated by the parent process writing to a pipe. This new approach has the potential to make defence evasion stealthier.

The second technique variation involved an uncommon combination of process doppelgänging and process hollowing techniques. This variation increases the complexity of analysis and the defence evasion capabilities of HijackLoader. Researchers also observed additional unhooking techniques used to hide malicious activity.

This blog focuses on the various evasion techniques employed by HijackLoader at multiple stages of the malware.

HijackLoader Analysis

Infection Chain Overview

The HijackLoader sample CrowdStrike analyzed implements complex multi-stage behaviour in which the first-stage executable (streaming_client.exe) deobfuscates an embedded configuration partially used for dynamic API resolution (using PEB_LDR_DATA structure without another API usage) to harden against static analysis.
Afterwards, the malware uses WinHTTP APIs to check if the system has an active internet connection by connecting to https[:]//nginx[.]org.

If the initial connectivity check succeeds, then execution continues, and it connects to a remote address to download the second-stage configuration blob. If the first URL indicated below fails, the malware iterates through the following list:

  • https[:]//gcdnb[.]pbrd[.]co/images/62DGoPumeB5P.png?o=1
  • https[:]//i[.]imgur[.]com/gyMFSuy.png;
  • https[:]//bitbucket[.]org/bugga-oma1/sispa/downloads/574327927.png

Upon successfully retrieving the second-stage configuration, the malware iterates over the downloaded buffer, checking for the initial bytes of a PNG header. It then proceeds to search for the magic value  C6 A5 79 EA, which precedes the XOR key (32 B3 21 A5 in this sample) used to decrypt the rest of the configuration blob.

Following XOR decryption, the configuration undergoes decompression using the RtlDecompressBuffer API with COMPRESSION_FORMAT_LZNT1. After decompressing the configuration, the malware loads a legitimate Windows DLL specified in the configuration blob (in this sample, C:\Windows\SysWOW64\mshtml.dll).

The second-stage, position-independent shellcode retrieved from the configuration blob is written to the .text section of the newly loaded DLL before being executed. The HijackLoader second-stage, position-independent shellcode then performs some evasion activities (further detailed below) to bypass user mode hooks using Heaven’s Gate and injects subsequent shellcode into cmd.exe.The injection of the third-stage shellcode is accomplished via a variation of process hollowing that results in an injected hollowed mshtml.dll into the newly spawned cmd.exe child process.

The third-stage shellcode implements a user mode hook bypass before injecting the final payload (a Cobalt Strike beacon for this sample) into the child process logagent.exe. The injection mechanism used by the third-stage shellcode leverages the following techniques:

  • Process Doppelgänging Primitives: This technique is used to hollow a Transacted Section(dll) in the remote process to contain the final payload.
  • Process/DLL Hollowing: This technique is used to inject the fourth-stage shellcode that is responsible for performing evasion before passing execution to the final payload within the transacted section from the previous step.

The figure below, details the attack path exhibited by this HijackLoader variant.

Main Evasion Techniques Used by HijackLoader and Shellcode

The primary evasion techniques employed by the HijackLoader include hook bypass methods such as Heaven’s Gate and unhooking by remapping system DLLs monitored by security products. Additionally, the malware implements variations of process hollowing and an injection technique that leverages transacted hollowing, which combines the transacted section and process doppelgänging techniques with DLL hollowing.

Like other variants of HijackLoader, this sample implements a user mode hook bypass using Heaven’s Gate (when run in SysWOW64) — this is similar to existing (x64_Syscall function) implementations. This implementation of Heaven’s Gate is a powerful technique that leads to evading user mode hooks placed in SysWOW64 ntdll.dll by directly calling the syscall instruction in the x64 version of ntdll.

Each call to Heaven’s Gate uses the following as arguments:

  • The syscall number
  • The number of parameters of the syscall
  • The parameters (according to the syscall)

This variation of the shellcode incorporates an additional hook bypass mechanism to elude any user mode hooks that security products may have placed in the x64 ntdll. These hooks are typically used for monitoring both the x32 and x64 ntdll. During this stage, the malware remaps the .text section of x64 ntdll by using Heaven’s Gate to call NtWriteVirtualMemory and NtProtectVirtualMemory to replace the in-memory mapped ntdll with the .text from a fresh ntdll read from the file C:\windows\system32\ntdll.dll. This unhooking technique is also used on the process hosting the final Cobalt Strike payload (logagent.exe) in a final attempt to evade detection.

Process Hollowing Variation

To inject the subsequent shellcode into the child process cmd.exe, the malware utilizes common process hollowing techniques. This involves mapping the legitimate Windows DLL mshtml.dll into the target process and then replacing its .text section with shellcode. An additional step necessary to trigger the execution of the remote shellcode is detailed in a later section.

To set up the hollowing, the sample creates two pipes that are used to redirect the Standard Input and the Standard Output of the child process (specified in the aforementioned configuration blob, C:\windows\syswow64\cmd.exe) by placing the pipes’ handles in a STARTUPINFOW structure spawned with CreateProcessW API.

One key distinction between this implementation and the typical “standard” process hollowing can be observed here: In standard process hollowing, the child process is usually created in a suspended state. In this case, the child is not explicitly created in a suspended state, making it appear less suspicious. Since the child process is waiting for an input from the pipe created previously, its execution is hanging on receiving data from it. Essentially, we can call this an interactive process hollowing variation.

As a result, the newly spawned cmd.exe will read input from the STDIN pipe, effectively waiting for new commands. At this point, its EIP (Extended Instruction Pointer) is directed toward the return from the NtReadFile syscall. The following section details the steps taken by the second-stage shellcode to set up the child process cmd.exe ultimately used to perform the subsequent injections used to execute the final payload.

The parent process streaming_client.exe initiates an NtDelayExecution to sleep, waiting for cmd.exe to finish loading. Afterwards, it reads the legitimate Windows DLL mshtml.dll from the file system and proceeds to load this library into cmd.exe as a shared section. This is accomplished using the Heaven’s Gate technique for:

  • Creating a shared section object using  NtCreateSection
  • Mapping that section in the remote exe using NtMapViewOfSection

It then replaces the .text section of the mshtml DLL with malicious shellcode by using:

  • Heaven’s Gate to call  NtProtectVirtualMemory on exe to set RWX permissions on the .text section of the previously mapped section mshtml.dll
  • Heaven’s Gate to call NtWriteVirtualMemoryon the DLL’s .text section to stomp the module and write the third-stage shellcode

Finally, to trigger the execution of the remote-injected shellcode, the malware uses:

  • Heaven’s Gate to suspend (NtSuspendThread) the remote main thread
  • A new CONTEXT (by using NtGetContextThread and NtSetContextThread) to modify the EIP to point to the previously written shellcode
  • Heaven’s Gate to resume (NtResumeThread) the remote main thread of exe

However, because cmd.exe is waiting for user input from the STDINPUT pipe, the injected shellcode in the new process isn’t executed upon the resumption of the thread. The loader must take an additional step:

  • The parent process exe needs to write (WriteFile) \r\n string to the STDINPUT pipe created previously to send an input to cmd.exe after calling NtResumeThread. This effectively resumes execution of the primary thread at the shellcode’s entry point in the child process cmd.exe.

Interactive Process Hollowing Variation: Tradecraft Analysis

We have successfully replicated the threadless process hollowing technique to understand how the pipes trigger it. Once the shellcode has been written as described, it needs to be activated. This activation is based on the concept that when a program makes a syscall, the thread waits for the kernel to return a value.

In essence, the interactive process hollowing technique involves the following steps:

  • CreateProcess: This step involves spawning the exe process to inject the malicious code by redirecting STDIN and STDOUT to pipes. Notably, this process isn’t suspended, making it appear less suspicious. Waiting to read input from the pipe, the NtReadFile syscall sets its main thread’s state to Waiting and _KWAIT_REASON to Executive, signifying that it’s awaiting the execution of kernel code operations and their return.
  • WriteProcessMemory: This is where the shellcode is written into the exe child process.
  • SetThreadContext: In this phase, the parent sets the conditions to redirect the execution flow of the exe child process to the previously written shellcode’s address by modifying the EIP/RIP in the remote thread CONTEXT.
  • WriteFile: Here, data is written to the STDIN pipe, sending an input to the exe process. This action resumes the execution of the child process from the NtReadFile operation, thus triggering the execution of the shellcode. Before returning to user space, the kernel reads and restores the values saved in the _KTRAP_FRAME structure (containing the EIP/RIP register value) to resume from where the syscall was called. By modifying the CONTEXT in the previous step, the loader hijacks the resuming of the execution toward the shellcode address without the need to suspend and resume the thread, which this technique usually requires.

Transacted Hollowing² (Transacted Section/Doppelgänger + Hollowing)

The malware writes the final payload in the child process logagent.exe spawned by the third-stage shellcode in cmd.exe by creating a transacted section to be mapped in the remote process. Subsequently, the malware injects a fourth-stage shellcode into logagent.exe by loading and hollowing another instance of mshtml.dll into the target process. The injected fourth-stage shellcode performs the aforementioned hook bypass technique before executing the final payload previously allocated by the transacted section.

Transacted Section Hollowing

Similarly to process doppelgänging, the goal of a transacted section is to create a stealthy malicious section inside a remote process by overwriting the memory of the legitimate process with a transaction. In this sample, the third-stage shellcode executed inside cmd.exe places a malicious transacted section used to host the final payload in the target child process logagent.exe. The shellcode uses the following:

  • NtCreateTransactionto create a transaction
  • RtlSetCurrentTransaction and CreateFileW with a dummy file name to replace the documented  CreateFileTransactedW
  • Heaven’s Gate to call NtWriteFilein a loop, writing the final shellcode to the file in 1,024-byte chunks
  • Creation of a section backed by that file (Heaven’s Gate call NtCreateSection)
  • A rollback of the previously created section by using Heaven’s Gate to call  NtRollbackTransaction

Existing similar implementations have publicly been observed in this project that implements transaction hollowing.

Once the transacted section has been created, the shellcode generates a function stub at runtime to hide from static analysis. This stub contains a call to theCreateProcessW API to spawn a suspended child process logagent.exe (c50bffbef786eb689358c63fc0585792d174c5e281499f12035afa1ce2ce19c8) that was previously dropped by cmd.exe  under the %TEMP% folder.

After the target process has been created, the sample uses Heaven’s Gate to:

  • Read its PEBby calling NtReadVirtualMemory to retrieve its base address (0x400000)
  • Unmap the exe image in the logagent.exe process by using  NtUnMapViewofSection
  • Hollow the previously created transacted section inside the remote process by remapping the section at the same base address (0x400000) with NtMapViewofSection

Process Hollowing

After the third-stage shellcode within cmd.exe injects the final Cobalt Strike payload inside the transacted section of the logagent.exe process, it continues by process hollowing the target process to write the fourth shellcode stage ultimately used to execute the final payload (loaded in the transacted section) in the remote process. The third-stage shellcode maps the legitimate Windows DLL C:\Windows\SysWOW64\mshtml.dll in the target process before replacing its .text with the fourth-stage shellcode and executing it via NtResumeThread.

This additional fourth-stage shellcode written to logagent.exe performs similar evasion activities to the third-stage shellcode executed in cmd.exe (as indicated in the hook bypass section) before passing execution to the final payload.

Indicators of Compromise (IOCs)

File SHA256
streaming_client.exe 6f345b9fda1ceb9fe4cf58b33337bb9f820550ba08ae07c782c2e142f7323748

MITRE ATT&CK Framework

The following table maps reported HijackLoader tactics, techniques and procedures (TTPs) to the MITRE ATT&CK framework.

ID Technique Description
T1204.002 User Execution: Malicious File The sample is a backdoored version of streaming_client.exe, with the Entry Point redirected to a malicious stub.
T1027.007 Obfuscated Files or Information: Dynamic API Resolution HijackLoader and its stages hide some of the important imports from the IAT by dynamically retrieving kernel32 and ntdll API addresses. It does this by parsing PEB->PEB_LDR_DATA  and retrieving the function addresses.
T1016.001 System Network Configuration Discovery: Internet Connection Discovery This variant of HijackLoader connects to a remote server to check if the machine is connected to the internet by using the  WinHttp API (WinHttpOpenRequest and WinHttpSendRequest).
T1140 Deobfuscate/Decode Files or Information HijackLoader utilizes XOR mechanisms to decrypt the downloaded stage.
T1140 Deobfuscate/Decode Files or Information HijackLoader utilizes RtlDecompressBuffer to LZ decompress the downloaded stage.
T1027 Obfuscated Files or Information HijackLoader drops XOR encrypted files to the %APPDATA% subfolders to store the downloaded stages.
T1620 Reflective Code Loading

 

HijackLoader reflectively loads the downloaded shellcode in the running process by loading and stomping the mshtml.dll module using the LoadLibraryW and VirtualProtect APIs.
T1106 Native API

 

HijackLoader uses direct syscalls and the following APIs to perform bypasses and injections: WriteFileW, ReadFile, CreateFileW, LoadLibraryW, GetProcAddress, NtDelayExecution, RtlDecompressBuffer, CreateProcessW, GetModuleHandleW, CopyFileW, VirtualProtect, NtProtectVirtualMemory, NtWriteVirtualMemory, NtResumeThread, NtSuspendThread, NtGetContextThread, NtSetContextThread, NtCreateTransaction, RtlSetCurrentTransaction, NtRollbackTransaction, NtCreateSection, NtMapViewOfSection, NtUnMapViewOfSection, NtWriteFile, NtReadFile, NtCreateFile and CreatePipe.
T1562.001 Impair Defenses: Disable or Modify Tools HijackLoader and its stages use Heaven’s Gate and remap x64 ntdll to bypass user-space hooks.
T1055.012 Process Injection: Process Hollowing HijackLoader and its stages implement a process hollowing technique variation to inject in cmd.exe and logagent.exe.
T1055.013 Process Injection: Process Doppelgänging The HijackLoader shellcode implements a process doppelgänging technique variation (transacted section hollowing) to load the final stage in logagent.exe.
Continue Reading

Cyber Security

CyberKnight Elevates Cyber Resilience with Zero Trust Security at Gartner SRM 2024

Published

on

CyberKnight has announced its participation as a Premier Sponsor at the Gartner Security and Risk Management Summit in Dubai on February 12-13. The company’s participation underscores its commitment to advancing cybersecurity practices and fostering awareness around the critical paradigm of Zero Trust. During the Summit, CyberKnight will emphasize the significance of adopting a comprehensive Zero Trust Security approach in tackling cybersecurity challenges faced by IT security leaders.

At the Gartner Security and Risk Management Summit, CyberKnight will be joined by:

  • Checkmarx: Industry’s Most Comprehensive AppSec Platform
  • Xage: Identity-Based ZTNA for Critical Infrastructure
  • Group-IB: Fraud Detection, ASM, DRP, Threat Intelligence & DFIR

“Our Theme for this year’s participation at Gartner SRM is “Elevating Cyber Resilience with Zero Trust Security”. In the face of escalating cyber threats, our Zero Trust Security approach stands as a beacon, guiding organizations toward a robust cybersecurity posture. Our Zero Trust Security methodology is more than a framework; it’s a transformative journey towards resilience: we believe in empowering businesses with the knowledge and tools needed to proactively defend against the ever-evolving threat landscape,” commented Avinash Advani, the Founder and CEO at CyberKnight.

“As a trusted advisor to enterprise and government organizations across the region, CyberKnight remains committed to contributing to the growth of regional cybersecurity capacity and resilience. Sponsoring Gartner SRM, one of the most reputable IT Security events in the Middle East covering key topics that matter most to security leaders, is not just an opportunity to showcase our innovations but also a commitment to collaborative efforts aimed at building a more secure digital ecosystem in the Middle East,” added Olesya Pavlova, CMO at CyberKnight.

Continue Reading

Cyber Security

The Evolution of Zero Trust

Published

on

Written by Dave Russell, Vice President, Enterprise Strategy at Veeam

Around 18 months ago, I was writing about the “endless journey” to Zero Trust. I used the word “endless” because Zero Trust is a mindset rather than a product or a destination – it’s a target to aim towards. Like many things in cyber, it’s a matter of constant evolution. You have to adapt to survive and thrive in your environment. Even the idea of Zero Trust has had to evolve with the times.

Changing with the times
A cat and mouse game, an arms race – call it what you want – security has always been about adapting and evolving to stay ahead of threats. Bad actors constantly experiment and move the needle to get ahead of their targets. This is exactly what has driven so much innovation across the industry since the first-ever cyber-attack took place. The security tools considered the benchmark, when I started my career 35 years ago, would be a paper shield against a modern cyber gang. It’s not just the tools that have had to evolve, but also the mindset – how we think about security and use the tools at our disposal has had to change.

Zero Trust is a prime example of this. Once, security was just around the perimeter, it was a moat around the castle, but once you were in, you were in. As more and more enterprises worldwide have adopted Zero Trust as a best practice, this has shifted. Security measures now need to be inside and outside – doors are locked, proof of identity is required, and people aren’t allowed access to parts of the castle if they don’t need to be there.

But the thing about evolution is that it never really stops.

Introducing Zero Trust Data Resilience
Even the most broadly used zero-trust models have a few fatal flaws in the modern environment. Namely, they lack any kind of guidance in pivotal areas like data backup and recovery. This gap is significant as recent attacks often attempt to target backup repositories. For example, according to the Veeam Ransomware Trends 2023 Report, ransomware attacks targeted backup repositories in at least 93% of attacks in 2022.

Data backup and recovery systems are critical parts of enterprise IT and must be considered as part of the security picture. They have read access to everything, they can write data into the production environment and contain full copies of the business’s mission-critical data. Simply put, following modern Zero Trust principles to the letter makes you fairly water-tight when it comes to ‘traditional’ security, but leaves a huge gap in the armour regarding backup and recovery.

But this is where we are. Zero Trust has become too limited in scope as threats have evolved, which is why the concept of ‘Zero Trust Data Resilience’ has been born. An evolution of Zero Trust, which essentially broadens the scope to ensure backup and recovery follow the same principles.

Bringing backup and recovery into the fold
The core concepts are the same. The principle of least privilege and assume breach mentality are still key. For example, backup management systems must be isolated on the network so that no unauthenticated users can access it. Likewise, the backup storage system itself must be isolated. Immutability is also key. Having backup data that cannot be changed or tampered with means if repositories are reached by attacks like ransomware, they cannot be affected by its malware.

Assuming a breach also means businesses shouldn’t implicitly ‘trust’ their backups after an attack. Having processes to properly validate the backup or ‘clean’ it before attempting system recovery is vital to ensure you aren’t simply restoring a still-compromised environment. The final layer of distrust is to have multiple copies of your backups – fail-safes in case one (or more) are compromised. The best practice is to have three copies of your backup, two stored on different media types, one stored onsite, and one kept offline. With these layers of resilience, you can start to consider your backup as Zero Trust.

Taking the first steps
With Zero Trust Data Resilience, just like Zero Trust, it’s a journey. You can’t implement it all at once. Instead, follow a maturity model where you gradually implement new practices and refine and evolve these over time. For example, if you don’t currently validate your backup data, start doing so manually and over time implement technology to automate and schedule routine validation processes.

The other key thing you need is buy-in – everyone in the organization must be on the journey together. Senior leadership is key to implementing any broad changes across an organisation, but so is educating across the business on new processes and their need. Finally, for Zero Trust Data Resilience especially, the security and wider IT operations teams must be aligned. Backup often falls under the responsibility of the latter, but as this becomes more and more crucial for security posture, the two need to work together to prevent security siloes or gaps.

The journey to Zero Trust is endless. So much so that the exact destination evolves. My advice to businesses is that while Rome wasn’t built in a day, it is better to start taking steps today, no matter how small, instead of postponing and being left behind.

Continue Reading
Advertisement CCW 2024

Follow Us

Trending

Copyright © 2021 Security Review Magazine. Rysha Media LLC. All Rights Reserved.