Home

Awesome

<img align="right" width="28%" src="media/ntoseye.png">

ntoseye license

Windows kernel debugger for Linux hosts running Windows under KVM/QEMU.

Features

Supported Windows

ntoseye currently only supports Windows 10 and 11 guests.

Disclaimer

ntoseye will ask you if you wish to download symbols (defaults to exports if user declines). It will only download symbols from Microsoft's official symbol server. All files which will be read/written to will be located in $XDG_CONFIG_HOME/ntoseye.

Getting started

Dependencies

NameVersion
CMake3.5+
GCC14+
GDBLatest
libreadlineLatest
ZydisLatest
LLVM15+
Lua5.3+
sol2Latest
curlLatest

Building

git clone https://github.com/dmaivel/ntoseye.git
cd ntoseye
mkdir build
cd build
cmake ..
cmake --build . --config Release

Usage

ntoseye takes in no arguments to launch. It is recommended that you run the following command before running ntoseye or a VM:

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope 

Note that you may need to run ntoseye with sudo aswell.

VM configuration

Although it is not required, many features depend on gdbstub being enabled.

QEMU

Append -s -S to qemu command.

virt-manager

Add the following to the XML configuration:

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
  ...
  <qemu:commandline>
    <qemu:arg value="-s"/>
    <qemu:arg value="-S"/>
  </qemu:commandline>
</domain>

Keybinds

Key(s)Description
<kbd>tab</kbd>Tab completion. Either lists all available commands or attempts to complete the currently typed out command.
<kbd>ctrl+C</kbd>Attempt a breakpoint. Will terminate the debugger if in the middle of a download or hang.

Commands

CommandDescription
!pte [VirtualAddress/Symbol]Display the page table entries of a given virtual address.
!process 0 0Display a list of the current active processes.
.process [/p /r] OR [AddressOfEPROCESS]Set the current process context.
breakBreakpoint.
db [VirtualAddress/Symbol] [EndAddress/L<Count>]Display bytes at address.
gContinue from breakpoint.
lmList current modules.
n [10 OR 16]Set radix. 16 by default.
qQuit.
r OR r [Register names]Display registers.
reload_luaReload lua scripts.
u [VirtualAddress/Symbol] [EndAddress/L<Count>]Display disassembly at address.
uf [VirtualAddress/Symbol] [EndAddress/L<Count>]Alias for u command.
x [Module!Function]Display symbols matching the string. Accepts wildcard.
~ OR ~ [ProcessorNumber]Display current processor number or set current processor.
:[CallbackName] <Args>Call to Lua callback.

Lua API

For scripts to be visible to ntoseye, they need to be stored in $XDG_CONFIG_HOME/ntoseye/scripts/. This folder is create automatically when you run ntoseye for the first time.

There are a few example lua scripts provided in ./examples. Documentation is not available yet.

Credits

Functionality regarding initialization of guest information was written with the help of the following sources: