-
Notifications
You must be signed in to change notification settings - Fork 708
Direct Syscall in Windows Meterpreter #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…for majority of metsrv imports
ViewUnmap = 2 | ||
} SECTION_INHERIT; | ||
|
||
#ifndef _METERPRETER_COMMON_WINAPI_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed, we are declaring it up there.
#ifndef POOL_PARTY_H | ||
#define POOL_PARTY_H | ||
typedef struct IUnknown IUnknown; | ||
#include <winsock2.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not required by pool-party, but since we need this to be included before "common.h" to avoid cyclic-inclusion, i need to include it on top here otherwise the compiler complains because winsock2.h
needs to be included first... compilers 😥
typedef struct __OBJECT_ATTRIBUTES | ||
{ | ||
ULONG Length; | ||
HANDLE RootDirectory; | ||
_PUNICODE_STRING ObjectName; | ||
ULONG Attributes; | ||
PVOID SecurityDescriptor; | ||
PVOID SecurityQualityOfService; | ||
} _OBJECT_ATTRIBUTES, * _POBJECT_ATTRIBUTES; | ||
|
||
typedef struct __CLIENT_ID | ||
{ | ||
PVOID UniqueProcess; | ||
PVOID UniqueThread; | ||
} _CLIENT_ID, * _PCLIENT_ID; | ||
typedef DWORD (WINAPI * NTOPENTHREAD)( PHANDLE, ACCESS_MASK, _POBJECT_ATTRIBUTES, _PCLIENT_ID ); // ntdll!NtOpenThread | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I move this from thread.h
because it was creating issue while moving around all the common_metapi.h
stuff.
This is an initial work to have direct syscall working in metsrv.
TODO:
Zw
Functions onmet_api
Migration with Direct Syscall