Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to call the Windows Native API functions from the user mode?

I want to call some Native API function from the user mode with C++. I was wondering if it is possible to circumvent the Windows API interface completely and call directly the Native API functions from the user mode.

If possible then any code examples will be really helpful.

like image 290
whatisinaname Avatar asked Apr 01 '11 08:04

whatisinaname


People also ask

What is a Native API call?

The Native API is a lower-level interface for interacting with Windows that is rarely used by nonmalicious programs but is popular among malware writers. Calling functions in the Native API bypasses the normal Windows API.

What is the Native API why is it used?

Native Function APIs are JavaScript wrappers for Objective C and Android native APIs. They are generated from the source APIs, which means that they can be updated and released quickly when the target API changes. This gives you the flexibility to update your apps quickly.

What is Native API DLL?

The Native API is also used by subroutines such as those in kernel32. dll that implement the Windows API, the API based on which most of the Windows components are created. Most of the Native API calls are implemented in ntoskrnl.exe and are exposed to user mode by ntdll. dll.


1 Answers

Yes it is possible, as all functions are exposed ntdll.dll. However you would need to write your own header file for those API functions you want to use. There is no official documentation on the NT API and it is not really meant to be used directly. But it is possible.

Here is a starting point.

like image 136
Anders Abel Avatar answered Oct 21 '22 04:10

Anders Abel