Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/build.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build Doxygen Docs

on:
push:
branches: [main]
paths:
- 'src/**'
- 'docs/**'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'docs/**'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Doxygen
run: sudo apt-get update && sudo apt-get install -y doxygen graphviz

- name: Build docs
working-directory: docs
run: doxygen Doxyfile

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/Documentation

deploy:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ CMakePresets.json
!CMakeLists.txt
!external/*
external/LIEF*
output.yarc
output.yarc
speech_*
.claude/*
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ elseif(DOXYGEN_FOUND AND NOT BUILD_DOC)
endif(DOXYGEN_FOUND AND BUILD_DOC)


#add_subdirectory(src/service)
#add_subdirectory(src/libraries)
#add_subdirectory(src/extensibility)
#add_subdirectory(src/container)
add_subdirectory(src/service)
add_subdirectory(src/libraries)
add_subdirectory(src/extensibility)
add_subdirectory(src/container)
add_subdirectory(src/dll)
#add_subdirectory(src/linter)
#add_subdirectory(src/scanner)
#add_subdirectory(src/testing)
add_subdirectory(src/linter)
add_subdirectory(src/scanner)
add_subdirectory(src/testing)

if(BUILD_DRIVER)
add_subdirectory(src/driver)
Expand Down
30 changes: 5 additions & 25 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,21 @@
"version": 3,
"configurePresets": [
{
"name": "debug",
"displayName": "Debug",
"description": "Debug build using vcpkg",
"name": "default",
"displayName": "Default",
"description": "Default build using vcpkg (use --config Debug/Release at build time)",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows-static",
"CMAKE_PREFIX_PATH": "vcpkg_installed/x64-windows-static",
"Protobuf_PROTOC_EXECUTABLE": "vcpkg_installed/x64-windows-static/tools/protobuf/protoc.exe",
"gRPC_DIR": "vcpkg_installed/x64-windows-static/share/grpc",
"nlohmann_json_DIR": "vcpkg_installed/x64-windows-static/share/nlohmann_json",
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDebug",
"x86_BUILD_TOOLS_PATH": "C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x86/",
"x64_BUILD_TOOLS_PATH": "C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x64"
}
},
{
"name": "release",
"displayName": "Release",
"description": "Release build using vcpkg",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows-static",
"CMAKE_PREFIX_PATH": "vcpkg_installed/x64-windows-static",
"Protobuf_PROTOC_EXECUTABLE": "vcpkg_installed/x64-windows-static/tools/protobuf/protoc.exe",
"Protobuf_PROTOC_EXECUTABLE": "${sourceDir}/build/${presetName}/vcpkg_installed/x64-windows-static/tools/protobuf/protoc.exe",
"gRPC_DIR": "vcpkg_installed/x64-windows-static/share/grpc",
"nlohmann_json_DIR": "vcpkg_installed/x64-windows-static/share/nlohmann_json",
"x86_BUILD_TOOLS_PATH": "C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x86/",
"x64_BUILD_TOOLS_PATH": "C:/Program Files (x86)/Windows Kits/10/bin/10.0.26100.0/x64"
}
}
]
}
}
76 changes: 59 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,33 +134,75 @@ yr.exe compile <PATH_TO_YARA_RULES_FOLDER> -o rules.pkg

## Development Setup

Required tools:
- [Vcpkg](https://vcpkg.io/en/)
- [LIEF Project](https://github.com/lief-project/LIEF)
- Visual Studio with Windows Driver Kit
- Test signing enabled
- Virtual Machine configured for Windows Kernel Debugging using Windbg
### Prerequisites

- [Visual Studio 2022](https://visualstudio.microsoft.com/) with C++ desktop development workload
- [vcpkg](https://vcpkg.io/en/) (included with Visual Studio or standalone)
- [Windows Driver Kit (WDK)](https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk) (for kernel driver builds)
- Test signing enabled (for driver development)
- Virtual Machine configured for Windows Kernel Debugging using WinDbg

Set the `VCPKG_ROOT` environment variable to your vcpkg installation:
```powershell
# If installed with Visual Studio
$env:VCPKG_ROOT = "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\vcpkg"

# Or set it permanently
[System.Environment]::SetEnvironmentVariable("VCPKG_ROOT", "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\vcpkg", "User")
```

For kernel development environment setup, see:
- [Ap3x/Windows-Kernel-Development-Infrastructure](https://github.com/Ap3x/Windows-Kernel-Development-Infrastructure)
- [Microsoft WDK Installation Guide](https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk)

### Building with CMake

The project uses a single CMake preset with the Visual Studio multi-config generator. You configure once and choose Debug/Release at build time.

#### Configure
```powershell
cmake --preset default
```

#### Build
```powershell
# Debug build (with debug symbols for your code)
cmake --build build/default --config Debug

# Release build (optimized)
cmake --build build/default --config Release
```

#### Build the Kernel Driver
```powershell
cmake --preset default -DBUILD_DRIVER=ON
cmake --build build/default --config Debug --target PanoptesDriver
```

#### Run Tests
```powershell
cd bin/tests/Debug
./PanoptesAMSITest.exe
./PanoptesPETest.exe
./PanoptesYaraTest.exe
./PanoptesLinterTest.exe
```

### CMake Build Options

The following CMake options are available during configuration:
The following options can be passed during configuration with `-D`:

- `BUILD_DOC` (OFF by default): Build Doxygen documentation
- `BUILD_WIX_INSTALLER` (OFF by default): Build the Wix MSI installer package
- `BUILD_DRIVER` (OFF by default): Build the kernel driver package
- `BUILD_GRPC` (OFF by default): Generate gRPC code from protobuf definitions
| Option | Default | Description |
|--------|---------|-------------|
| `BUILD_DRIVER` | OFF | Build the kernel driver package (requires WDK) |
| `BUILD_GRPC` | ON | Generate gRPC code from protobuf definitions |
| `BUILD_DOC` | OFF | Build Doxygen documentation |
| `BUILD_WIX_INSTALLER` | OFF | Build the Wix MSI installer package |

Example CMake configuration:
Example with multiple options:
```powershell
mkdir build
cd build
cmake --preset debug -DBUILD_DOC=ON -DBUILD_DRIVER=ON -DBUILD_WIX_INSTALLER=ON ..
cd debug
msbuild /p:Configuration=Debug Panoptes.sln
cmake --preset default -DBUILD_DRIVER=ON -DBUILD_DOC=ON
cmake --build build/default --config Release
```

## Screenshots of Panoptes Features
Expand Down
4 changes: 2 additions & 2 deletions src/container/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ if(BUILD_GRPC)
protobuf_generate(
TARGET ${PROJECT_NAME}
IMPORT_DIRS ${PROTO_FILE_DIR}
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_OUT_DIR "${PROTO_BINARY_DIR}"
)

protobuf_generate(
TARGET ${PROJECT_NAME}
LANGUAGE grpc
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc
PLUGIN "protoc-gen-grpc=\$<TARGET_FILE:gRPC::grpc_cpp_plugin>"
IMPORT_DIRS ${PROTO_FILE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/dll/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.0)
cmake_minimum_required(VERSION 3.15)
project(PanoptesDLL
VERSION 1.0
DESCRIPTION "Panoptes DLL Project"
Expand Down
4 changes: 2 additions & 2 deletions src/extensibility/PanoptesAMSI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ if(BUILD_GRPC)
protobuf_generate(
TARGET ${PROJECT_NAME}
IMPORT_DIRS ${PROTO_FILE_DIR}
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_OUT_DIR "${PROTO_BINARY_DIR}"
)

protobuf_generate(
TARGET ${PROJECT_NAME}
LANGUAGE grpc
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc
PLUGIN "protoc-gen-grpc=\$<TARGET_FILE:gRPC::grpc_cpp_plugin>"
IMPORT_DIRS ${PROTO_FILE_DIR}
Expand Down
4 changes: 2 additions & 2 deletions src/extensibility/PanoptesAMSI/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ if(BUILD_GRPC)
protobuf_generate(
TARGET ${PROJECT_NAME}
IMPORT_DIRS ${PROTO_FILE_DIR}
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_OUT_DIR "${PROTO_BINARY_DIR}"
)

protobuf_generate(
TARGET ${PROJECT_NAME}
LANGUAGE grpc
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc
PLUGIN "protoc-gen-grpc=\$<TARGET_FILE:gRPC::grpc_cpp_plugin>"
IMPORT_DIRS ${PROTO_FILE_DIR}
Expand Down
6 changes: 3 additions & 3 deletions src/extensibility/PanoptesPE/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.0)
cmake_minimum_required(VERSION 3.15)
project(PanoptesPE)

# Set C++ standard
Expand Down Expand Up @@ -95,14 +95,14 @@ if(BUILD_GRPC)
protobuf_generate(
TARGET ${PROJECT_NAME}
IMPORT_DIRS ${PROTO_FILE_DIR}
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_OUT_DIR "${PROTO_BINARY_DIR}"
)

protobuf_generate(
TARGET ${PROJECT_NAME}
LANGUAGE grpc
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc
PLUGIN "protoc-gen-grpc=\$<TARGET_FILE:gRPC::grpc_cpp_plugin>"
IMPORT_DIRS ${PROTO_FILE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/extensibility/PanoptesPE/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.0)
cmake_minimum_required(VERSION 3.15)
project(Test_PanoptesPE)

# Set C++ standard
Expand Down
4 changes: 2 additions & 2 deletions src/extensibility/PanoptesYara/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ if(BUILD_GRPC)
protobuf_generate(
TARGET ${PROJECT_NAME}
IMPORT_DIRS ${PROTO_FILE_DIR}
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_OUT_DIR "${PROTO_BINARY_DIR}"
)

protobuf_generate(
TARGET ${PROJECT_NAME}
LANGUAGE grpc
PROTOC_EXE "${CMAKE_BINARY_DIR}/${Protobuf_PROTOC_EXECUTABLE}"
PROTOC_EXE "${Protobuf_PROTOC_EXECUTABLE}"
GENERATE_EXTENSIONS .grpc.pb.h .grpc.pb.cc
PLUGIN "protoc-gen-grpc=\$<TARGET_FILE:gRPC::grpc_cpp_plugin>"
IMPORT_DIRS ${PROTO_FILE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/extensibility/PanoptesYara/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.0)
cmake_minimum_required(VERSION 3.15)
project(Test_PanoptesYara)

set(CMAKE_CXX_STANDARD 17)
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.0)
cmake_minimum_required(VERSION 3.15)
project(PanoptesLibraries CXX)

add_subdirectory(ResourceCore)
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Configuration/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 4.0)
cmake_minimum_required(VERSION 3.15)
project(Configuration CXX)

# Set static runtime for MSVC - MUST BE SET BEFORE ANY TARGETS
Expand Down
Loading