# BestEdrOfTheMarket | Little AV/EDR Bypassing Lab For Training And Learning Purposes

**URL:** <https://onehack.st/t/bestedrofthemarket-little-av-edr-bypassing-lab-for-training-and-learning-purposes/270866>\
**Category:** Tools & Scripts\
**Tags:** learning, hacking\
**Created:** [January 3, 2024, 10:50pm UTC](https://onehack.st/t/bestedrofthemarket-little-av-edr-bypassing-lab-for-training-and-learning-purposes/270866 "2024-01-03T22:50:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlueHacker](https://onehack.st/user_avatar/onehack.st/bluehacker/32/174721_2.png) [@BlueHacker](https://onehack.st/u/BlueHacker)\
**Post date:** [January 3, 2024, 10:50pm UTC](https://onehack.st/t/bestedrofthemarket-little-av-edr-bypassing-lab-for-training-and-learning-purposes/270866/1 "2024-01-03T22:50:30Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/e/2/e28913e3d00f0d1f18a05e3b9a872f10f7b6167a.png)

# [Best EDR Of The Market (BEOTM) 🐲](https://xacone.github.io/BestEdrOfTheMarket.html)

_Little AV/EDR Evasion Lab for training & learning purposes._ (🏗 under construction..)​

```auto
 __________  ________  _____  _____ _
| __)___  ___| |_ |____ | _ \| _ \ / _ \ / _| |_ _| | _____
| _ \ / _ \/ __|__ | | _| | | | | |_) | | | | | |_ | | | '_ \ / _ \
| |_) | __/\__ \ |_ | | ___| |_| | _ < | |_| | _| | | | | | |__ /
| ____/_\___ || ___/\__ | | _____|____ /|_| \_\ \ ___/|_| |_| |_| |_|\___ |
| \/ | ___ ___ | | _____ | |_
| |\/| |/ _` | ' __| |/ / _ \__ |
| | | | (_| | | | < __/ |_ Yazidou - github.com/Xacone
|_| |_|\ __,_|_| |_|\_\___ |\__|

```

BestEDROfTheMarket is a naive user-mode EDR (Endpoint Detection and Response) project, designed to serve as a testing ground for understanding and bypassing EDR’s user-mode detection methods that are frequently used by these security solutions.  
These techniques are mainly based on a dynamic analysis of the target process state (memory, API calls, etc.),

[Feel free to check this short article I wrote that describe the interception and analysis methods implemented by the EDR.](https://xacone.github.io/BestEdrOfTheMarket.html)

## Defensive Techniques ⚔​

- [Multi-Levels API Hooking](https://github.com/Xacone/BestEdrOfTheMarket#)

- [SSN Hooking/Crushing](https://github.com/Xacone/BestEdrOfTheMarket#)

- [IAT Hooking](https://github.com/Xacone/BestEdrOfTheMarket#)

- [Shellcode Injection Detection](https://github.com/Xacone/BestEdrOfTheMarket#)

- [Reflective Module Loading Detection](https://github.com/Xacone/BestEdrOfTheMarket#)

- [Call Stack Monitoring](https://github.com/Xacone/BestEdrOfTheMarket#)

_In progress_:

- [Heap Monitoring](https://github.com/Xacone/BestEdrOfTheMarket#)

- [ROP Mitigation](https://github.com/Xacone/BestEdrOfTheMarket#)

- [AMSI Patching Mitigation](https://github.com/Xacone/BestEdrOfTheMarket#)

- [ETW Patching Mitigation](https://github.com/Xacone/BestEdrOfTheMarket#)

[![](https://github.com/Xacone/BestEdrOfTheMarket/raw/main/Assets/beotmgif1.gif)](https://github.com/Xacone/BestEdrOfTheMarket/blob/main/Assets/beotmgif1.gif)

## Usage 📜

```auto
        Usage: BestEdrOfTheMarket.exe [args]

                 /help Shows this help message and quit
                 /v Verbosity                 
                 /iat IAT hooking
                 /stack Threads call stack monitoring
                 /nt Inline Nt-level hooking
                 /k32 Inline Kernel32/Kernelbase hooking
                 /ssn SSN crushing

```

```auto
BestEdrOfTheMarket.exe /stack /v /k32
BestEdrOfTheMarket.exe /stack /nt
BestEdrOfTheMarket.exe /iat

```

## Structure & Config files ⚙

```auto
📁 BestEdrOfTheMarket/
    📄 BestEdrOfTheMarket.exe
    📁 DLLs/
        📄 Kernel32.dll
        📄 ntdll.dll
        📄 iat.dll
    📝 TrigerringFunctions.json
    📝 YaroRules.json
    📄 jsoncpp.dll

```

**YaroRules.json:** Contains a json array filled with the patterns you would like to be identified while monitoring threads call stacks.

{ “Patterns”: [“d2 65 48 8b 52 60 48 8b 52 18 48 8b 52 20 48 8b 72 50 48”, “49 be 77 73 32 5f 33 32 00 00”, “…”] }

**TrigerringFunctions.json:** Describes the functions that are already hooked or/and to hook:

_ **ℹ Note on call stack monitoring** _ _: Some NT routines are more appropriate and less exposed to false positives, for instance, it is strongly recommended to monitor the `NtCreateFile` when targeting an encrypted shellcode loader, but you should avoid it when targeting a reflective loader in favor of `NtCreateUserProcess`, which is better suited._

{ “DLLBasedHooking”: { “NTDLL.dll”: [“NtAllocateVirtualMemory”, “…”], “KERNELBASE.dll”: [“VirtualAlloc” “…”], “KERNEL32.dll”: [“VirtualAlloc” “…”] }, “StackBasedHooking”: { “Functions”: [“NtCreateUserProcess”, “…”] }, “SSNCrushingRoutines”: { “Functions”: [“NtCreateSection” “…”] }, “IATHooking”: { “Functions”: [“VirtualAlloc”, “…”] } }

- **DLLBasedHooking** : Not modifiable 🚫​​, changing its values will have absolutely no effect at all. Information purposes only.
- **StackBasedHooking** : Modifiable ✅, the functions you specify here will be monitored and their call will trigger an analysis of the calling thread’s call stack.
- **SSNCrushingRoutines** : Modifiable ✅, the NT-level routines you will specify here will be attributed a corrupted SSN, Be careful of specifying NT-Level routines ONLY !
- **IATHooking** : Modifiable ✅, the functions you specify here will be hooked at IAT level

If you don’t compile your own DLLs, take a look at the functions already hooked into the DLLs provided [in sources](https://github.com/Xacone/BestEdrOfTheMarket/blob/main/DLLs).

## [Releases](https://github.com/Xacone/BestEdrOfTheMarket/releases/tag/Beta) 📦

## [Project Setup 🛠​](https://github.com/Xacone/BestEdrOfTheMarket/blob/main/Docs/Setup.md)

## Disclaimer ⚠​

- Don’t link the EDR to programs that are too CPU-intensive/thread-creating, as some detection techniques such as call stack analysis constantly monitor the stack state of each thread and this can quickly increase the load on the EDR, it’s more relevant (that’s also the point) that you link the tool to your own artifacts and keep in mind that a good evasive artifact tries to be as discrete as possible.

## GitHub:

> **[GitHub - Xacone/BestEdrOfTheMarket: EDR Lab for Experimentation Purposes](https://github.com/Xacone/BestEdrOfTheMarket)**
>
> EDR Lab for Experimentation Purposes
