Skip to content

Commit 78b519f

Browse files
committed
Driver: fixed DarthTon#298
1 parent eddc939 commit 78b519f

File tree

5 files changed

+26
-106
lines changed

5 files changed

+26
-106
lines changed

src/BlackBoneDrv/NativeStructs.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,32 @@ typedef union _EXHANDLE
133133

134134
#pragma warning(disable : 4214 4201)
135135

136+
#pragma pack(push, 1)
137+
typedef struct _POOL_HEADER // Size=16
138+
{
139+
union
140+
{
141+
struct
142+
{
143+
unsigned long PreviousSize : 8; // Size=4 Offset=0 BitOffset=0 BitCount=8
144+
unsigned long PoolIndex : 8; // Size=4 Offset=0 BitOffset=8 BitCount=8
145+
unsigned long BlockSize : 8; // Size=4 Offset=0 BitOffset=16 BitCount=8
146+
unsigned long PoolType : 8; // Size=4 Offset=0 BitOffset=24 BitCount=8
147+
};
148+
unsigned long Ulong1; // Size=4 Offset=0
149+
};
150+
unsigned long PoolTag; // Size=4 Offset=4
151+
union
152+
{
153+
struct _EPROCESS * ProcessBilled; // Size=8 Offset=8
154+
struct
155+
{
156+
unsigned short AllocatorBackTraceIndex; // Size=2 Offset=8
157+
unsigned short PoolTagHash; // Size=2 Offset=10
158+
};
159+
};
160+
} POOL_HEADER, *PPOOL_HEADER;
161+
#pragma pack(pop)
136162

137163
typedef struct _HANDLE_TABLE_ENTRY // Size=16
138164
{

src/BlackBoneDrv/NativeStructs10.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -136,34 +136,6 @@ typedef struct _MMVAD // Size=128
136136
union ___unnamed2048 u4; // Size=8 Offset=120
137137
struct _FILE_OBJECT * FileObject; // Size=8 Offset=128
138138
} MMVAD, *PMMVAD;
139-
140-
typedef struct _POOL_HEADER // Size=16
141-
{
142-
union
143-
{
144-
struct
145-
{
146-
unsigned short PreviousSize : 8; // Size=2 Offset=0 BitOffset=0 BitCount=8
147-
unsigned short PoolIndex : 8; // Size=2 Offset=0 BitOffset=8 BitCount=8
148-
};
149-
unsigned long Ulong1; // Size=4 Offset=0
150-
};
151-
struct
152-
{
153-
unsigned short BlockSize : 8; // Size=2 Offset=2 BitOffset=0 BitCount=8
154-
unsigned short PoolType : 8; // Size=2 Offset=2 BitOffset=8 BitCount=8
155-
};
156-
unsigned long PoolTag; // Size=4 Offset=4
157-
union
158-
{
159-
struct _EPROCESS * ProcessBilled; // Size=8 Offset=8
160-
struct
161-
{
162-
unsigned short AllocatorBackTraceIndex; // Size=2 Offset=8
163-
unsigned short PoolTagHash; // Size=2 Offset=10
164-
};
165-
};
166-
} POOL_HEADER, *PPOOL_HEADER;
167139
#pragma pack(pop)
168140

169141
typedef struct _HANDLE_TABLE

src/BlackBoneDrv/NativeStructs7.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -153,31 +153,6 @@ typedef struct _MMVAD_LONG // Size=144
153153
union ___unnamed1320 u4; // Size=8 Offset=136
154154
} MMVAD_LONG, *PMMVAD_LONG;
155155

156-
typedef struct _POOL_HEADER // Size=16
157-
{
158-
union
159-
{
160-
struct
161-
{
162-
unsigned long PreviousSize: 8; // Size=4 Offset=0 BitOffset=0 BitCount=8
163-
unsigned long PoolIndex: 8; // Size=4 Offset=0 BitOffset=8 BitCount=8
164-
unsigned long BlockSize: 8; // Size=4 Offset=0 BitOffset=16 BitCount=8
165-
unsigned long PoolType: 8; // Size=4 Offset=0 BitOffset=24 BitCount=8
166-
};
167-
unsigned long Ulong1; // Size=4 Offset=0
168-
};
169-
unsigned long PoolTag; // Size=4 Offset=4
170-
union
171-
{
172-
struct _EPROCESS * ProcessBilled; // Size=8 Offset=8
173-
struct
174-
{
175-
unsigned short AllocatorBackTraceIndex; // Size=2 Offset=8
176-
unsigned short PoolTagHash; // Size=2 Offset=10
177-
};
178-
};
179-
} POOL_HEADER, *PPOOL_HEADER;
180-
181156
typedef struct _HANDLE_TABLE
182157
{
183158
ULONG_PTR TableCode;

src/BlackBoneDrv/NativeStructs8.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -136,31 +136,6 @@ typedef struct _MMVAD // Size=128
136136
union ___unnamed1885 u4; // Size=8 Offset=120
137137
} MMVAD, *PMMVAD;
138138

139-
typedef struct _POOL_HEADER // Size=16
140-
{
141-
union
142-
{
143-
struct
144-
{
145-
unsigned long PreviousSize: 8; // Size=4 Offset=0 BitOffset=0 BitCount=8
146-
unsigned long PoolIndex: 8; // Size=4 Offset=0 BitOffset=8 BitCount=8
147-
unsigned long BlockSize: 8; // Size=4 Offset=0 BitOffset=16 BitCount=8
148-
unsigned long PoolType: 8; // Size=4 Offset=0 BitOffset=24 BitCount=8
149-
};
150-
unsigned long Ulong1; // Size=4 Offset=0
151-
};
152-
unsigned long PoolTag; // Size=4 Offset=4
153-
union
154-
{
155-
struct _EPROCESS * ProcessBilled; // Size=8 Offset=8
156-
struct
157-
{
158-
unsigned short AllocatorBackTraceIndex; // Size=2 Offset=8
159-
unsigned short PoolTagHash; // Size=2 Offset=10
160-
};
161-
};
162-
} POOL_HEADER, *PPOOL_HEADER;
163-
164139
typedef struct _HANDLE_TABLE
165140
{
166141
ULONG NextHandleNeedingPool;

src/BlackBoneDrv/NativeStructs81.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -132,34 +132,6 @@ typedef struct _MMVAD // Size=128
132132
struct _EPROCESS * VadsProcess; // Size=8 Offset=112
133133
union ___unnamed1957 u4; // Size=8 Offset=120
134134
} MMVAD, *PMMVAD;
135-
136-
typedef struct _POOL_HEADER // Size=16
137-
{
138-
union
139-
{
140-
struct
141-
{
142-
unsigned short PreviousSize : 8; // Size=2 Offset=0 BitOffset=0 BitCount=8
143-
unsigned short PoolIndex : 8; // Size=2 Offset=0 BitOffset=8 BitCount=8
144-
};
145-
unsigned long Ulong1; // Size=4 Offset=0
146-
};
147-
struct
148-
{
149-
unsigned short BlockSize : 8; // Size=2 Offset=2 BitOffset=0 BitCount=8
150-
unsigned short PoolType : 8; // Size=2 Offset=2 BitOffset=8 BitCount=8
151-
};
152-
unsigned long PoolTag; // Size=4 Offset=4
153-
union
154-
{
155-
struct _EPROCESS * ProcessBilled; // Size=8 Offset=8
156-
struct
157-
{
158-
unsigned short AllocatorBackTraceIndex; // Size=2 Offset=8
159-
unsigned short PoolTagHash; // Size=2 Offset=10
160-
};
161-
};
162-
} POOL_HEADER, *PPOOL_HEADER;
163135
#pragma pack(pop)
164136

165137
typedef struct _HANDLE_TABLE

0 commit comments

Comments
 (0)