Giter Club home page Giter Club logo

nt_wrapper's Introduction

nt_wrapper version badge

A header only wrapper library around native windows system APIs.

WARNING: the API of version 2 is still unstable

Highlights of currently implemented features

System information:

Object manipulation:

  • Process -> ntw::ob::process
  • Thread -> ntw::ob::thread
  • File -> ntw::ob::file
  • Token -> ntw::ob::token
  • Registry -> ntw::ob::registry And more

Design goals

  • No exceptions - if a function can fail it will return a status code.
  • No overhead - every single abstraction is costless and is as fast as it can be.
  • Ease of developer use - it is a much more consistent and pleasant to work with compared to win32.

Why?

The main reason to choose this library over existing windows constructs are:

  • Speed - even with lazy_importer your code is likely to be faster compared to win32 API.
  • Ease of use - the language of choice is c++ and allows you to use modern alternatives to old C.
  • Obfuscation - it is a lot harder to reverse engineer an application which uses obfuscated imports or direct syscalls.

Installing dependencies using vcpkg

> git clone https://github.com/microsoft/vcpkg
> cd vcpkg
> ./bootstrap-vcpkg.sh
> ./vcpkg install phnt

nt_wrapper's People

Contributors

aleks-s avatar justasmasiulis avatar n1cator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nt_wrapper's Issues

Create wrappers for various basic types

List of things to wrap:

  • OBJECT_ATTRIBUTES - ntw::obj::attributes, ntw::obj::attribute_options
  • ACCESS_MASK - ntw::access_builder, ntw::obj::process_access
  • NTSTATUS - ntw::status, ntw::facility, ntw::severity
  • UNICODE_STRING
  • SECURITY_DESCRIPTOR

name_info should get merged into object

Currently OBJECT_NAME_INFORMATION structure has a single UNICODE_STRING member. It would probably be the best to move the query for this straight into the basic_object structure and create a wrapper type around unicode_string that owns a resource.

Get rid of LI_NT calls

every API import call should be replaced with NTW_SYSCALL instead of LI_NT.

The objective of this is to get rid of lazy_importer dependency

Add an nt_status type

Currently functions return NT_STATUS (integer). The goal is to change this into some class type which would have member functions, overloaded operator bool.

Another possible addition to such type would be functional apis that execute given function based on the status value

Wrap all object API

List of things that should get into the object class

  • NtDuplicateObject (no ability to select source process)
  • NtMakeTemporaryObject
  • NtMakePermanentObject
  • NtSignalAndWaitForSingleObject
  • NtWaitForSingleObject
  • NtClose

Will probably get turned into a free function:

  • NtWaitForMultipleObjects

Will probably be in a separate SECURITY_DESCRIPTOR wrapper class

  • NtSetSecurityObject
  • NtQuerySecurityObject

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.