FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
KernelExploitDriver/KernelExploitDriver/PoolOverflow.c at master · ethobis/KernelExploitDriver · GitHub
ethobis
KernelExploitDriver
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
KernelExploitDriver
/
KernelExploitDriver
/
PoolOverflow.c
Copy path
More file actions
More file actions
Latest commit
History
History
History
54 lines (45 loc) · 1.06 KB
Breadcrumbs
KernelExploitDriver
/
KernelExploitDriver
/
PoolOverflow.c
Copy path
File metadata and controls
54 lines (45 loc) · 1.06 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include
"PoolOverflow.h"
NTSTATUS
PoolOverflowHandler
(
_In_
PIRP
pIrp
,
_In_
PIO_STACK_LOCATION
pStackLocation
)
{
NTSTATUS
status
=
STATUS_SUCCESS
;
PVOID
pvUserBuffer
=
NULL
;
PVOID
pvKernelBuffer
=
NULL
;
ULONG
ulInputBufferLength
=
0
;
UNREFERENCED_PARAMETER
(
pIrp
);
ulInputBufferLength
=
pStackLocation
->
Parameters
.
DeviceIoControl
.
InputBufferLength
;
pvUserBuffer
=
(
PVOID
)
pStackLocation
->
Parameters
.
DeviceIoControl
.
Type3InputBuffer
;
if
(
NULL
==
pvUserBuffer
)
{
goto
_RET
;
}
__try
{
pvKernelBuffer
=
ExAllocatePoolWithTag
(
NonPagedPool
,
POOL_SIZE
,
'pofh'
);
if
(
NULL
==
pvKernelBuffer
)
{
goto
_RET
;
}
ProbeForRead
((
PVOID
)
pvUserBuffer
,
POOL_SIZE
, (
ULONG
)__alignof(
UCHAR
));
//RtlCopyMemory((PVOID)pvKernelBuffer, (PVOID)pvUserBuffer, POOL_SIZE);
RtlCopyMemory
((
PVOID
)
pvKernelBuffer
, (
PVOID
)
pvUserBuffer
,
ulInputBufferLength
);
if
(
NULL
!=
pvKernelBuffer
)
{
ExFreePoolWithTag
(
pvKernelBuffer
,
'pofh'
);
pvKernelBuffer
=
NULL
;
}
}
__except (
EXCEPTION_EXECUTE_HANDLER
)
{
status
=
GetExceptionCode
();
}
_RET
:
return
status
;
}
Back
|
FazBrowse Home
|
New Git URL