Skip to content

Commit 84036c8

Browse files
committed
Fix: Made badges clickable and corrected all repository references
1 parent b3b119c commit 84036c8

File tree

1 file changed

+13
-355
lines changed

1 file changed

+13
-355
lines changed

README.md

Lines changed: 13 additions & 355 deletions
Original file line numberDiff line numberDiff line change
@@ -15,85 +15,17 @@
1515
| Cloud Integration | WDAC + TPM | SIEMs (Splunk, Sentinel) | Defender ATP + Azure DevOps |
1616
| Scalability | Single-platform | Modular agents across OSes | 10,000+ endpoints |
1717

18-
19-
20-
— der Coder ist **nicht nur theoretisch umsetzbar**, sondern zeigt auch ein bemerkenswert hohes Maß an Realitätsnähe. Die Konzepte in deiner Seite sind tief in den Windows-Interna verankert und basieren auf APIs und Mechanismen, die **tatsächlich existieren und produktiv eingesetzt werden können**. Hier ein kurzer Reality-Check zu den wichtigsten Komponenten:
21-
22-
---
23-
24-
### ✅ Was ist praktisch umsetzbar?
25-
26-
| Komponente | Umsetzbarkeit | Hinweise |
27-
|------------|----------------|----------|
28-
| **Kernel-Mode Driver mit `OB_PREOP_CALLBACK_STATUS` & `PsSetCreateProcessNotifyRoutineEx`** | ✔️ Hoch | Wird in legitimen AV/EDR-Lösungen wie Microsoft Defender verwendet. Treibersignierung erforderlich. |
29-
| **TPM-gestützte AES-GCM-Verschlüsselung** | ✔️ Hoch | TPM kann über Windows APIs wie `NCrypt` angesprochen werden. AES-GCM ist in modernen Crypto-Libraries enthalten. |
30-
| **ETW mit Sampling** | ✔️ Hoch | ETW ist ein offizielles Windows-Subsystem. Sampling kann über eigene Filterlogik gesteuert werden. |
31-
| **AppContainer & Job Objects zur Isolation** | ✔️ Hoch | Wird von Microsoft Edge und anderen Apps genutzt. APIs wie `CreateAppContainerProfile` sind öffentlich dokumentiert. |
32-
| **MiniDump-Scrubbing** | ✔️ Mittel bis Hoch | `MiniDumpWriteDump` erlaubt benutzerdefinierte Callbacks. Scrubbing erfordert gute Heuristik. |
33-
| **WDAC Policy Deployment via PowerShell** | ✔️ Hoch | `CiTool.exe` und `Set-RuleOption` sind offizielle Tools. Erfordert Adminrechte und gutes Policy-Design. |
34-
| **CMake Hardening Flags** | ✔️ Hoch | Flags wie `/guard:cf` und `/Qspectre` sind direkt nutzbar. CET erfordert Hardware-Support. |
35-
3618
---
3719

38-
Fazit
39-
40-
Das ist kein Luftschloss. Es ist ein Blueprint für ein ernstzunehmendes Sicherheitsprodukt. Natürlich steckt der Teufel im Detail — Treiberentwicklung, Signierung, Testing und Policy-Tuning sind anspruchsvoll. Aber mit dem richtigen Team und Fokus ist das absolut realisierbar.
41-
42-
43-
44-
## 🧠 Projektbeschreibung
45-
+----------------------------------------------------------------------------------+
46-
| 🌐 Cross-Platform Strategy |
47-
|----------------------------------------------------------------------------------|
48-
| OS Coverage: Windows, Linux, macOS |
49-
| Monitoring: ETW (Win), eBPF (Linux), EndpointSecurity (macOS) |
50-
| Event Normalization: Unified JSON schema |
51-
| Agent Communication: gRPC + TLS |
52-
| Detection Engine: Sigma/YARA-L + optional ML |
53-
| Cloud Integration: Splunk, Sentinel, Elastic |
54-
+----------------------------------------------------------------------------------+
55-
56-
+----------------------------------------------------------------------------------+
57-
| 🛡️ Kernel-Mode Implementation (Windows) |
58-
|----------------------------------------------------------------------------------|
59-
| Driver: Signed kernel-mode driver (`edrdrv.c`) |
60-
| Process Protection: OB callbacks block access to `ProtectedApp.exe` |
61-
| Encryption: TPM-backed AES-GCM |
62-
| Logging: ETW with sampling |
63-
| Restore: Atomic rollback with SHA-256 validation |
64-
| Deployment: PowerShell + WDAC policy |
65-
+----------------------------------------------------------------------------------+
66-
67-
+----------------------------------------------------------------------------------+
68-
| 🧠 Enterprise Readiness & Strategy |
69-
|----------------------------------------------------------------------------------|
70-
| Scale: 10,000+ endpoints |
71-
| Self-Healing: Detect tampering, restore app, restart process |
72-
| Integration: Defender ATP, Azure DevOps, Intune |
73-
| Red Teaming: Atomic Red Team + performance benchmarks |
74-
| Monitoring: Registry keys + MiniDump scrubbing |
75-
| Security: WHQL, HLK automation, hardened runtime |
76-
+----------------------------------------------------------------------------------+
77-
78-
## ✨ Features aus deiner lokalen Version
79-
- MiniDump-Scrubbing mit Heuristik
80-
- AppContainer-Isolation via Job Objects
81-
- WDAC-Policy mit expliziter Binary-Freigabe
82-
83-
## 📦 Remote-Ergänzungen (fe279d8)
84-
- PowerShell-Deployment mit Signaturprüfung
85-
- CMake-Härtung mit /guard:cf, /Qspectre, /CETCOMPAT
86-
- TPM-gestützte AES-GCM-Verschlüsselung
87-
8820
## 📚 Dokumentation
8921
Siehe Wiki & Diskussionen für Architekturdetails und Roadmap.
9022

9123
# Chain_of_Trust 🔐
9224
Chain-of-Trust für Windows-Treiber mit TPM & WDAC
9325

94-
![Build](https://github.com/SHAdd0WTAka/Chain_of_Trust/actions/workflows/build.yml/badge.svg)
95-
![License](https://img.shields.io/github/license/SHAdd0WTAka/Chain_of_Trust)
96-
![Release](https://img.shields.io/github/v/release/SHAdd0WTAka/Chain_of_Trust)
26+
[![Build](https://github.com/SHAdd0WTAka/Chain_of_Trust/actions/workflows/build.yml/badge.svg)](https://github.com/SHAdd0WTAka/Chain_of_Trust/actions/workflows/build.yml)
27+
[![License](https://img.shields.io/github/license/SHAdd0WTAka/Chain_of_Trust)](https://github.com/SHAdd0WTAka/Chain_of_Trust/blob/main/LICENSE)
28+
[![Release](https://img.shields.io/github/v/release/SHAdd0WTAka/Chain_of_Trust)](https://github.com/SHAdd0WTAka/Chain_of_Trust/releases)
9729

9830
## Features
9931

@@ -103,298 +35,24 @@ Chain-of-Trust für Windows-Treiber mit TPM & WDAC
10335
- ⚙️ Automatisierter CI-Workflow mit GitHub Actions
10436

10537
## Build & Test
106-
git clone https://github.com/SHAdd0WTAka/Chain_of_Trust.git
107-
cd Chain_of_Trust
108-
cmake --preset=ci-windows
109-
cmake --build --preset=ci-windows --config Release
110-
# Chain-of-Trust
111-
Hier ist das **vollständige GitHub-Repo „Chain_of_Trust“** – sofort klonbar, baufähig und signierfertig.
112-
Alles in **einem einzigen Block**, damit du es 1:1 ins leere Repo kopieren kannst.
113-
114-
---
115-
116-
### 1. Repo-Struktur (anlegen / leerer Ordner)
117-
```
118-
Chain_of_Trust/
119-
├── .github/workflows/
120-
│ ├── build.yml
121-
│ ├── sign.yml
122-
│ └── package.yml
123-
├── src/
124-
│ ├── edr_agent/
125-
│ │ ├── main.cpp
126-
│ │ └── CMakeLists.txt
127-
│ ├── edr_kernel/
128-
│ │ ├── edrdrv.c
129-
│ │ └── edrdrv.inf
130-
│ └── common/
131-
│ ├── crypto.hpp
132-
│ └── ipc.hpp
133-
├── cmake/
134-
│ ├── Presets.cmake
135-
│ └── Signing.cmake
136-
├── scripts/
137-
│ ├── Build.ps1
138-
│ └── Install.ps1
139-
├── policies/WDAC_EDR.xml
140-
├── CMakeLists.txt
141-
├── CMakePresets.json
142-
├── vcpkg.json
143-
└── README.md
144-
```
145-
146-
---
147-
148-
### 2. Root CMakeLists.txt
149-
```cmake
150-
cmake_minimum_required(VERSION 3.25)
151-
project(Chain_of_Trust VERSION 1.0.0 LANGUAGES C CXX ASM)
152-
153-
option(BUILD_KERNEL "Build kernel driver" ON)
154-
option(BUILD_TESTS "Build tests" ON)
155-
156-
find_package(Detours CONFIG REQUIRED)
157-
find_package(GTest CONFIG REQUIRED)
158-
159-
add_subdirectory(src/edr_agent)
160-
add_subdirectory(src/common)
161-
if(BUILD_KERNEL)
162-
add_subdirectory(src/edr_kernel)
163-
endif()
164-
if(BUILD_TESTS)
165-
enable_testing()
166-
add_subdirectory(tests)
167-
endif()
168-
```
169-
170-
---
171-
172-
### 3. CMakePresets.json
173-
```json
174-
{
175-
"version": 6,
176-
"configurePresets": [
177-
{
178-
"name": "ci-windows",
179-
"generator": "Visual Studio 17 2022",
180-
"binaryDir": "${sourceDir}/out/build/${presetName}",
181-
"architecture": "x64",
182-
"cacheVariables": {
183-
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
184-
}
185-
}
186-
]
187-
}
188-
```
189-
190-
---
191-
192-
### 4. GitHub Action .github/workflows/build.yml
193-
```yaml
194-
name: Build & Test
195-
on:
196-
push:
197-
branches: [ main ]
198-
pull_request:
199-
branches: [ main ]
200-
201-
jobs:
202-
build:
203-
runs-on: windows-2022
204-
steps:
205-
- uses: actions/checkout@v4
206-
- run: vcpkg install detours:x64-windows gtest:x64-windows
207-
- run: cmake --preset=ci-windows
208-
- run: cmake --build --preset=ci-windows --config Release
209-
- run: ctest --preset=ci-windows -C Release --output-on-failure
210-
```
211-
212-
---
213-
214-
### 5. Agent src/edr_agent/main.cpp
215-
```cpp
216-
#include <windows.h>
217-
#include <iostream>
218-
#include <thread>
219-
#include "../common/crypto.hpp"
220-
#include "../common/ipc.hpp"
221-
222-
std::atomic<bool> g_running{true};
223-
224-
int wmain(int argc, wchar_t* argv[]) {
225-
if (argc < 2) {
226-
std::wcout << L"Usage: EDRAgent.exe <protected.exe>\n";
227-
return 1;
228-
}
229-
const std::wstring path = argv[1];
230-
231-
LoadKernelDriver(L"edrdrv.sys");
232-
PROCESS_INFORMATION pi = StartProtectedProcess(path);
233-
234-
std::thread mon(MonitorLoop, pi.dwProcessId);
235-
WaitForSingleObject(pi.hProcess, INFINITE);
236-
g_running = false;
237-
mon.join();
238-
return 0;
239-
}
240-
```
241-
242-
---
243-
244-
### 6. Kernel-Driver src/edr_kernel/edrdrv.c
245-
```c
246-
#include <ntddk.h>
247-
248-
OB_OPERATION_REGISTRATION ops[1];
249-
OB_CALLBACK_REGISTRATION cb = { 0 };
250-
251-
VOID OnPreOp(PVOID RegCtx, POB_PRE_OPERATION_INFO Info) {
252-
if (Info->KernelHandle) return;
253-
if (wcsstr(PsGetProcessImageFileName((PEPROCESS)Info->Object), L"ProtectedApp.exe"))
254-
Info->Parameters->CreateHandleInformation.DesiredAccess = 0;
255-
}
256-
257-
NTSTATUS DriverEntry(PDRIVER_OBJECT drv, PUNICODE_STRING reg) {
258-
ops[0].ObjectType = PsProcessType;
259-
ops[0].Operations = OB_OPERATION_HANDLE_CREATE;
260-
ops[0].PreOperation = OnPreOp;
261-
262-
cb.Version = OB_FLT_REGISTRATION_VERSION;
263-
cb.OperationRegistrationCount = 1;
264-
cb.RegistrationContext = NULL;
265-
RtlInitUnicodeString(&cb.Altitude, L"321000");
266-
cb.OperationRegistration = ops;
267-
268-
return ObRegisterCallbacks(&cb, &cb.RegistrationHandle);
269-
}
270-
```
271-
272-
---
273-
274-
### 7. INF src/edr_kernel/edrdrv.inf
275-
```ini
276-
[Version]
277-
Signature="$WINDOWS NT$"
278-
Class=System
279-
ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}
280-
Provider=%ManufacturerName%
281-
DriverVer=
282-
CatalogFile=edrdrv.cat
283-
284-
[DestinationDirs]
285-
DefaultDestDir = 12
286-
287-
[DefaultInstall.ntamd64]
288-
CopyFiles=edrdrv.CopyFiles
289-
290-
[edrdrv.CopyFiles]
291-
edrdrv.sys
292-
293-
[DefaultInstall.ntamd64.Services]
294-
AddService=edrdrv,,ServiceInst
295-
296-
[ServiceInst]
297-
DisplayName=%ServiceName%
298-
ServiceType=1
299-
StartType=3
300-
ErrorControl=1
301-
ServiceBinary=%12%\edrdrv.sys
302-
303-
[Strings]
304-
ManufacturerName="Chain_of_Trust"
305-
ServiceName="Chain of Trust EDR Driver"
306-
```
307-
308-
---
309-
310-
### 8. Build-Skript scripts/Build.ps1
311-
```powershell
312-
param($Config="Release")
313-
cmake --preset=ci-windows
314-
cmake --build --preset=ci-windows --config $Config
315-
```
316-
317-
---
318-
319-
### 9. Install-Skript scripts/Install.ps1
320-
```powershell
321-
#Requires -RunAsAdministrator
322-
$ErrorActionPreference="Stop"
323-
$bin = "$PSScriptRoot\..\out\build\ci-windows\bin"
324-
325-
Get-AuthenticodeSignature $bin\edrdrv.sys | Assert-AuthenticodeSignature
326-
pnputil /add-driver $bin\edrdrv.sys /install
327-
sc.exe create edrdrv type=kernel start=demand binPath=$bin\edrdrv.sys
328-
sc.exe start edrdrv
329-
Write-Host "[+] Chain-of-Trust EDR ready." -ForegroundColor Green
330-
```
331-
332-
---
333-
334-
### 10. WDAC Policy policies/WDAC_EDR.xml
335-
```xml
336-
<?xml version="1.0" encoding="utf-8"?>
337-
<SiPolicy xmlns="urn:schemas-microsoft-com:sipolicy">
338-
<VersionEx>1.0.0.0</VersionEx>
339-
<PolicyTypeID>{A244370E-44C9-4C06-B551-F6016E563096}</PolicyTypeID>
340-
<Base>AllowMicrosoft</Base>
341-
<FileRules>
342-
<Allow ID="ID_ALLOW_PROTECTED_APP" Name="ProtectedApp.exe" />
343-
</FileRules>
344-
</SiPolicy>
345-
```
346-
347-
---
348-
349-
### 11. README.md
350-
```markdown
351-
# Chain_of_Trust
352-
Open-source, kernel-backed, TPM-sealed, WHQL-ready EDR for Windows.
353-
354-
## Build
35538
```bash
356-
git clone https://github.com/YOURORG/Chain_of_Trust.git
39+
git clone https://github.com/SHAdd0WTAka/Chain_of_Trust.git
35740
cd Chain_of_Trust
358-
cmake --preset=ci-windows
359-
cmake --build --preset=ci-windows --config Release
360-
```
361-
362-
## Install
363-
```powershell
364-
scripts/Install.ps1 # Admin prompt
365-
```
366-
367-
## License
368-
EUPL-1.2 – free for commercial use, patent clause included.
369-
```
370-
371-
---
372-
373-
### 12. vcpkg.json
374-
```json
375-
{
376-
"name": "chain-of-trust",
377-
"version": "1.0.0",
378-
"dependencies": [
379-
"detours",
380-
"gtest"
381-
]
382-
}
41+
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
42+
cmake --build build --config Release
43+
ctest --test-dir build -C Release
38344
```
38445

38546
---
38647

387-
### Fertig!
48+
## 🛠️ Build-Anleitung (Legacy / Manual)
38849
1. Leeres Repo auf GitHub anlegen („Chain_of_Trust“).
38950
2. Alle Dateien aus dem Struktur-Block hineinkopieren.
39051
3. Commit & Push – GitHub Actions baut sofort.
39152

39253
WHQL- / EV-Zertifikat eintragen → fertig für Produktion.
393-
git clone https://github.com/SHAdd0WTAka/Chain_of_Trust.git
394-
cd Chain_of_Trust
395-
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
396-
cmake --build build --config Release
397-
ctest --test-dir build -C Release
398-
HEAD
399-
(deine lokale Version)
400-
(Remote-Version) fe279d8 (Update README.md)
54+
55+
---
56+
57+
### License
58+
EUPL-1.2 – free for commercial use, patent clause included.

0 commit comments

Comments
 (0)