Skip to content

MiroKaku/Musa.Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

152 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status Downloads LICENSE Visual Studio Windows Platform

Overview

Warning

Musa.Core is in beta.

Musa.Core is a derivative of the low-level API implementation from Musa.Runtime (formerly ucxxrt). It reimplements Kernel32, Advapi32, and other Win32 APIs on top of ntoskrnl in kernel mode.

Architecture

graph TD
    A[Kernel Driver] --> B[MusaCoreStartup]
    B --> C[Musa.Core StaticLibrary]
    C --> D[Musa.CoreLite]
    D --> E[Musa.Veil]
    E --> F[ntoskrnl.exe]
    C --> G[Kernel32 Thunks]
    C --> H[Advapi32 Thunks]
    C --> I[Ntdll Thunks]
    G --> F
    H --> F
    I --> F
Loading

Quick Start

NuGet Install

<ItemGroup>
  <PackageReference Include="Musa.Core">
    <Version>1.1.1</Version>
  </PackageReference>
</ItemGroup>

The NuGet package depends on Musa.CoreLite. You can directly include <Veil.h> to access underlying APIs.

DriverEntry Example

NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
    NTSTATUS Status = MusaCoreStartup(DriverObject, RegistryPath, FALSE);
    if (!NT_SUCCESS(Status)) return Status;

    // Kernel32/Advapi32 APIs now available
    WCHAR Dir[MAX_PATH];
    DWORD Len = GetCurrentDirectoryW(MAX_PATH, Dir);

    return Status;
}

Build Requirements

Dependency Minimum Version
Visual Studio 2022 17.10+
Windows Driver Kit (WDK) Matching SDK build
Mile.Project.Configurations 1.0.1917

Building from Source

.\BuildAllTargets.cmd

Build artifacts are output to the Publish/ directory.

Implemented Modules

Module Status
Zw Routines ✅ All available
Rtl Series API ✅ Partial
KernelBase API ✅ Partial
Kernel32 Thunks (Phase 1-6) ✅ Implemented
Advapi32 API 🚧 In Progress

Key Features

  • Kernel-mode only — exclusively supports KernelMode toolset projects; enforced at consumer build time
  • NuGet integration — auto-configures header and library paths, injects /INTEGRITYCHECK linker flag
  • Debug loggingMusaLOG macro outputs DbgPrintEx in Debug builds, no-op in Release

Documentation

License

MIT License

References

About

Use ntdll/ntoskrnl to implement Kernel32, Advapi32 and other APIs. It includes user-mode and kernel-mode.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors