-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (47 loc) · 1.5 KB
/
Copy pathMakefile
File metadata and controls
56 lines (47 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.PHONY: setup build-ebpf build clean load-offense load-defense test test-vm
# Build all eBPF programs
build-ebpf:
cargo xtask build-ebpf --release
# Build everything
build: build-ebpf
cargo build --release --package offense --package defense
# Clean all build artifacts
clean:
cargo clean
# Load the rootkit (requires root)
load-offense:
@echo "Loading Shadow rootkit..."
sudo ./target/release/offense $(ARGS)
# Load the defense guardian (requires root)
load-defense:
@echo "Loading Aegis guardian..."
sudo ./target/release/defense $(ARGS)
# Run the full test sequence
test:
@echo "=== Aegis-Shadow Test Sequence ==="
@echo "Step 1: Creating target process..."
sleep 9999 &
@echo "Step 2: Loading rootkit..."
sudo ./target/release/offense hide-pid --pid $$(pgrep -f "sleep 9999")
@echo "Step 3: Verifying process is hidden..."
ps aux | grep -c "sleep 9999"
@echo "Step 4: Running defense audit..."
sudo ./target/release/defense audit
@echo "Step 5: Cleanup..."
sudo ./target/release/offense cleanup
kill $$(pgrep -f "sleep 9999") 2>/dev/null || true
@echo "=== Test complete ==="
# Run VM runtime tests (requires root + eBPF support)
test-vm:
@echo "Running VM runtime tests (requires root + eBPF support)..."
sudo ./tests/vm-harness.sh $(ARGS)
# Environment verification
verify-env:
bash verify-env.sh
# Setup: install all dependencies
setup:
rustup toolchain install nightly
rustup default nightly
cargo install bpf-linker
cargo install cargo-generate
sudo apt install -y bpftool libelf-dev clang llvm