Native Executables (Windows)

From ConShell

Jump to: navigation, search

A Native Executable is an application that runs during Windows startup on NT based operating systems before the Win32 subsystem starts up. Its gets it name from the fact that it runs in the "Native" subsystem like device drivers. Unfortunately, these days the term Native Executable gives the connotation of an executable that is written in machine language as opposed to Java bytecode or .NET bytecode. This makes it hard to get information on Native Executables by googling.

Contents

Examples of Native Executables

How to develop Native Executables

Native Executables can be developed via the Microsoft Windows Driver Development kit. The process was originally undocumented but thankfullt Mark Russinovich explained how to build native application in a SysInternals Article.

Debugging Native Executables

Like Device Drivers, Native Executables you can send messages via DbgPrint() system calls. These messages can be seen by a kernel debugger and are equivalent to the Win32 API call OutputDebugString(). However, since a Native Executable executes at startup, you cannot start an interactive debugger.

Two tools that can capture these messages are Mark Russinovich's DebugView and Alter's DbgPrintLog. Both have startup options to load their kernel drivers at boot time, and store the messages in a buffer where they can be accessed by the application when the Win32 subsystem starts up.

Running a Natice executable

TODO: Finish this session

The registry key is HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager. The value is BootExecute. IT is a multi string value. One line per executable.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox


check web page