• Stars
    star
    119
  • Rank 288,883 (Top 6 %)
  • Language
    C++
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Elevation of privilege detector based on HyperPlatform

EopMon

Introduction

EopMon is a hypervisor-based elevation of privilege (EoP) detector. It can spots a process with a stolen system token and terminate it by utilizing hypervisor's ability to monitor process context-swiching.

While EopMon is tested against multiple EoP exploits carried out by in the wild malware (*1), it is rather meant to be an educational tool to demonstrate a potential use case of a hypervisor for security research and not aimed for comprehensive exploit prevention.

EopMon is implemented on the top of HyperPlatform. See a project page for more details of HyperPlatform:

*1: Tested samples

  • 2183be234b52ea2c5102fbc966de40476eef77c7, Necurs (CVE-2015-0057)
  • 4fe035b4359242f62248f44e65fda580d89459af, Gozi (CVE-2015-2387)

Installation and Uninstallation

Clone full source code from Github with a below command and compile it on Visual Studio.

$ git clone --recursive https://github.com/tandasat/EopMon.git

On the x64 platform, you have to enable test signing to install the driver. To do that, open the command prompt with the administrator privilege and type the following command, and then restart the system to activate the change:

>bcdedit /set testsigning on

To install and uninstall the driver, use the 'sc' command. For installation:

>sc create EopMon type= kernel binPath= C:\Users\user\Desktop\EopMon.sys
>sc start EopMon

For uninstallation:

>sc stop EopMon
>sc delete EopMon
>bcdedit /deletevalue testsigning

Note that the system must support the Intel VT-x and EPT technology to successfully install the driver.

To install the driver on a virtual machine on VMware Workstation, see an "Using VMware Workstation" section in the HyperPlatform User Document.

Output

All logs are printed out to DbgView and saved in C:\Windows\EopMon.log.

Source Navigation

All code specific to EopMon is in eopmon.cpp.

When the EopMon is loaded, EopmonInitializaion() enumerates all processes and remembers system process tokens first. Then, once processors are virtualized, EopmonCheckCurrentProcessToken() gets called when CR3 is being updated and checks if the current process has any of the system tokens but not its original owner process. If so, EopMon schedules EopmonpTerminateProcessWorkerRoutine() to terminate the process and it child processes as soon as possible.

Caveats

EopMon is meant to be an educational tool and not robust, production quality software which is able to handle various edge cases. For example, EopMon is unable to detect direct shellcode execution in user address space through replacing a function pointer in the kernel, or _TOKEN::_SEP_TOKEN_PRIVILEGES manipulation[1] enabling privileges without copying a token itself. For this reason, researchers are encouraged to use this project only as a reference to examine and develop ideas of using a hypervisor.

Supported Platforms

  • x86 and x64 Windows 7, 8.1 and 10
  • The system must support the Intel VT-x and EPT technology

License

This software is released under the MIT License, see LICENSE.

More Repositories

1

HyperPlatform

Intel VT-x based hypervisor aiming to provide a thin VM-exit filtering platform on Windows.
C++
1,438
star
2

DdiMon

Monitoring and controlling kernel API calls with stealth hook using EPT
C++
1,086
star
3

Hypervisor-101-in-Rust

The materials of "Hypervisor 101 in Rust", a one-day long course, to quickly learn hardware-assisted virtualization technology and its application for high-performance fuzzing on Intel/AMD processors.
Rust
942
star
4

MiniVisorPkg

The research UEFI hypervisor that supports booting an operating system.
C
478
star
5

SimpleSvmHook

SimpleSvmHook is a research purpose hypervisor for Windows on AMD processors.
C++
313
star
6

PgResarch

PatchGuard Research
C++
282
star
7

SimpleSvm

A minimalistic educational hypervisor for Windows on AMD processors.
C++
262
star
8

ExploitCapcom

This is a standalone exploit for a vulnerable feature in Capcom.sys
C++
258
star
9

MemoryMon

Detecting execution of kernel memory where is not backed by any image file
C++
239
star
10

DotNetHooking

Sample use cases of the .NET native code hooking technique
C#
202
star
11

scripts_for_RE

Python scripts for reverse engineering.
Python
173
star
12

GuardMon

Hypervisor based tool for monitoring system register accesses.
C++
141
star
13

UefiVarMonitor

The runtime DXE driver monitoring access to the UEFI variables by hooking the runtime service table.
C
132
star
14

SmmExploit

The report and the exploit of CVE-2021-26943, the kernel-to-SMM local privilege escalation vulnerability in ASUS UX360CA BIOS version 303.
122
star
15

Sushi

a Japanese food keeps you sane
C++
115
star
16

findpg

Windbg extension to find PatchGuard pages
C++
113
star
17

UEFI-BIOS-Security

Security Camp 2021 & GCC 2022
107
star
18

hvext

The Windbg extension that implements commands helpful to study Hyper-V on Intel processors.
JavaScript
105
star
19

WinIoCtlDecoder

IDA Plugin which decodes Windows Device I/O control code into DeviceType, FunctionCode, AccessType and MethodType.
Python
102
star
20

HelloSmm

This is an instruction to run your own SMM code.
C
95
star
21

DebugLogger

A software driver that lets you log kernel-mode debug output into a file on Windows.
C++
95
star
22

WPBT-Builder

The simple UEFI application to create a Windows Platform Binary Table (WPBT) from the UEFI shell.
C
91
star
23

FU_Hypervisor

A hypervisor hiding user-mode memory using EPT
C
90
star
24

CVE-2023-36427

Report and exploit of CVE-2023-36427
C++
89
star
25

kraft_dinner

Tool to dump UEFI runtime drivers implementing runtime services for Windows
C
85
star
26

HelloAmdHvPkg

HelloAmdHvPkg is a type-1 research hypervisor for AMD processors.
C
83
star
27

Hello-VT-rp

A simple hypervisor demonstrating the use of the Intel VT-rp (redirect protection) technology.
Rust
80
star
28

RemoteWriteMonitor

A tool to help malware analysts tell that the sample is injecting code into other process.
C++
73
star
29

Scavenger

A minifilter driver preserves all modified and deleted files.
C
71
star
30

meow

nyā
C++
70
star
31

HelloIommuPkg

The sample DXE runtime driver demonstrating how to program DMA remapping.
C
57
star
32

DumpVTable

Generates a Python script to give public interface names in an ActiveX file to an IDB file.
C++
45
star
33

DrvLoader

A command line tool to load and unload a device driver.
C++
42
star
34

CVE-2022-25949

A years-old exploit of a local EoP vulnerability in Kingsoft Antivirus KWatch Driver version 2009.3.17.77.
C++
35
star
35

cs_driver

A sample project for using Capstone from a driver in Visual Studio 2015
C
34
star
36

CVE-2014-0816

CVE-2014-0816
C++
24
star
37

CVE-2024-21305

Report and exploit of CVE-2024-21305.
C++
24
star
38

hyperplatform_log_parser

User-mode program parsing logs created by HyperPlatform
C++
18
star
39

tandasat.github.io

HTML
17
star
40

ProjectLoadTimeMonitor

The Visual Studio extension that measures load time of each project when a solution file is opened.
C#
16
star
41

CheckSDL

A tool evaluates security configurations of a given PE based on SDL without source code
C++
12
star
42

ListWorkItems

Lists work items being queued currently.
C++
12
star
43

DeviceOpener

A command line tool to check if a specified device is accessible.
C++
10
star
44

windbg_init

Windbg Init Script
9
star
45

win32_debugout

Shows debug strings on DebubView from an attached process by win32_remote.exe.
C++
8
star
46

ping_vmm

A user-mode program knocking at HyperPlatform's "backdoor"
C++
7
star
47

List-UEFI-Configuration-Tables

List UEFI Configuration Tables
Rust
7
star
48

ScopedResource

Scoped Resource - Generic RAII Wrapper for the Standard Library by Peter Sommerlad and Andrew L. Sandoval
C++
6
star
49

SecRuntimeSample

A sample usege of SecRuntime.dll on Windows Phone
C++
4
star
50

blog

Ruby
4
star
51

CopyFiles

Copy files onto the IsolatedStorage so that you can download them using IsoStoreSpy.
C#
3
star
52

mylight

Using LED of Samsung Galaxy Ace S5830
Java
2
star
53

tandasat

2
star
54

shared

Manages files that are shared with multiple boxes.
Vim Script
1
star