Skip to content

Commit e59f720

Browse files
authored
Merge pull request DarthTon#117 from PlatinumDigitalGroup/master
Fix DarthTon#114
2 parents b8c5a16 + 99fff67 commit e59f720

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/BlackBoneDrv/Loader.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,10 @@ NTSTATUS BBMapWorker( IN PVOID pArg )
787787
RtlInsertInvertedFunctionTable((PUCHAR)GetKernelBase( NULL ) + 0x1ED450, imageSection, pNTHeader->OptionalHeader.SizeOfImage );
788788
}*/
789789

790+
// Initialize kernel security cookie
791+
if (NT_SUCCESS( status ))
792+
BBCreateCookie( imageSection );
793+
790794
// Call entry point
791795
if (NT_SUCCESS( status ) && pNTHeader->OptionalHeader.AddressOfEntryPoint)
792796
{

src/BlackBoneDrv/Utils.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ NTSTATUS BBFileExists( IN PUNICODE_STRING path );
6161
/// <returns>Status code</returns>
6262
NTSTATUS BBSearchPattern( IN PCUCHAR pattern, IN UCHAR wildcard, IN ULONG_PTR len, IN const VOID* base, IN ULONG_PTR size, OUT PVOID* ppFound );
6363

64+
/// <summary>
65+
/// Setup image security cookie
66+
/// </summary>
67+
/// <param name="imageBase">Image base</param>
68+
/// <returns>Status code</returns>
69+
NTSTATUS BBCreateCookie( IN PVOID imageBase );
70+
6471
//
6572
// Machine code generation routines
6673
//

0 commit comments

Comments
 (0)