Cyber security

Callstack Spoofing + Indirect Syscalls POC – Unmasking Evasion Techniques In A Proof Of Concept (POC) Scenario

This project consists of a simple C++ self-Injecting dropper focused on EDR evasion POC. To implement it, I have combined the use of Windows Thread Pooling to hide the call stack and the use of indirect syscalls to avoid hooking in the NTDLL.

As can be seen in the images, from the Cordyceps code, it performs a jump to ntdll to utilize one of the syscall instructions. This should be considered a malicious action; however, upon executing the return in ntdll, we return to the code of tpWorker, which is located within ntdll. Thus, from the perspective of the antivirus (AV), ntdll would appear to be making a call to another part of ntdll, which is not considered malicious.

Future Upgrades:

  • Implement a mechanism to automatically search for the syscall number.
  • In-memory payload decryption.

To compile:

nasm -f win64 ./syscalls.asm -o ./syscalls.obj
g++ -o cordyceps.exe main.cpp syscalls.obj
Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

Install Tomcat 9 on Ubuntu 18.04: Systemd Service Setup Guide

Apache Tomcat is an open-source Java application server that implements the Java Servlet, JavaServer Pages, and…

8 hours ago

Change Timezone on Ubuntu 18.04: Command Line and GUI Methods

Setting the correct timezone on your Ubuntu machine is more important than it sounds. Your…

8 hours ago

Install PrestaShop on Ubuntu 18.04 with Nginx and MySQL

PrestaShop is a free, open-source e-commerce platform built with PHP and MySQL. It comes with a…

8 hours ago

Set Up SSH Keys on Ubuntu 18.04: Passwordless Login Guide

SSH keys give you a more secure and convenient way to connect to remote servers. Instead…

8 hours ago

Install FFmpeg on Ubuntu 18.04: apt, Snap, and Usage Examples

FFmpeg is a free, open-source command-line tool for working with multimedia files. It can convert video…

8 hours ago

Set Up Nginx Server Blocks on Ubuntu 18.04: Host Multiple Sites

Nginx server blocks let you run more than one website on a single server. Each block…

1 day ago