Skip to content

Commit

Permalink
v 1.3.2
Browse files Browse the repository at this point in the history
Added Pavel Yosifovich "KObjExp" driver as provider 37
Added Pavel Yosifovich "KRegExp" driver as provider 38
Readme update
  • Loading branch information
hfiref0x committed Jun 10, 2023
1 parent 0a3e2f4 commit a407db2
Show file tree
Hide file tree
Showing 70 changed files with 1,178 additions and 248 deletions.
135 changes: 68 additions & 67 deletions KDU.sha256

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ You use it at your own risk. Some lazy AV may flag this tool as hacktool/malware
| 34 | MSI | winio | MSI Foundation Service | WINIO | Undefined | |
| 35 | HP | EtdSupport | ETDi Support Driver | Original | 18.0 and below | |
| 36 | Pavel Yosifovich | KExplore | Kernel Explorer | Original | Undefined | |
| 37 | Pavel Yosifovich | KObjExp | Kernel Object Explorer | Original | Undefined | |
| 38 | Pavel Yosifovich | KRegExp | Kernel Registry Explorer | Original | Undefined | |

###### *At commit time, data maybe inaccurate.

Expand Down
2 changes: 1 addition & 1 deletion Source/Hamakaze/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ extern "C" {
#include "shared/consts.h"
#include "shared/kdubase.h"
#include "sig.h"
#include "ipcsvc.h"
#include "sup.h"
#include "sym.h"
#include "compress.h"
Expand All @@ -87,7 +88,6 @@ extern "C" {
#include "ps.h"
#include "pagewalk.h"
#include "dsefix.h"
#include "ipcsvc.h"
#include "diag.h"
#include "tests.h"

Expand Down
87 changes: 4 additions & 83 deletions Source/Hamakaze/idrv/dbk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*
* TITLE: DBK.CPP
*
* VERSION: 1.31
* VERSION: 1.32
*
* DATE: 09 Apr 2023
* DATE: 10 Jun 2023
*
* Cheat Engine's DBK driver routines.
*
Expand All @@ -21,8 +21,6 @@
#include "idrv/dbk.h"
#include "idrv/ldrsc.h"

#define DBK_GET_HANDLE 0x1337

#define DBK_LDR_DLL L"u.dll"
#define DBK_KMU_EXE L"kernelmoduleunloader.exe"
#define DBK_KMU_SIG L"kernelmoduleunloader.exe.sig"
Expand Down Expand Up @@ -67,83 +65,6 @@ NTSTATUS CALLBACK DbkSetupCheatEngineObjectNames(
return ntStatus;
}

/*
* DbkpIpcOnException
*
* Purpose:
*
* ALPC receive exception callback.
*
*/
VOID CALLBACK DbkpIpcOnException(
_In_ ULONG ExceptionCode,
_In_opt_ PVOID UserContext
)
{
UNREFERENCED_PARAMETER(UserContext);

supPrintfEvent(kduEventError,
"[!] Exception 0x%lx thrown during IPC callback\r\n", ExceptionCode);
}

/*
* DbkpIpcCallback
*
* Purpose:
*
* ALPC receive message callback.
*
*/
VOID CALLBACK DbkpIpcCallback(
_In_ PCLIENT_ID ClientId,
_In_ PKDU_MSG Message,
_In_opt_ PVOID UserContext
)
{
KDU_CONTEXT* Context = (PKDU_CONTEXT)UserContext;

if (Context == NULL)
return;

__try {

if (Message->Function == DBK_GET_HANDLE &&
Message->Status == STATUS_SECRET_TOO_LONG &&
Message->ReturnedLength == sizeof(ULONG))
{
HANDLE hProcess = NULL, hNewHandle = NULL;
OBJECT_ATTRIBUTES obja;

InitializeObjectAttributes(&obja, NULL, 0, NULL, NULL);

if (NT_SUCCESS(NtOpenProcess(&hProcess,
PROCESS_DUP_HANDLE | PROCESS_TERMINATE,
&obja,
ClientId)))
{
if (NT_SUCCESS(NtDuplicateObject(
hProcess,
(HANDLE)Message->Data,
NtCurrentProcess(),
&hNewHandle,
0,
0,
DUPLICATE_SAME_ACCESS)))
{
Context->DeviceHandle = hNewHandle;
}

NtTerminateProcess(hProcess, STATUS_TOO_MANY_SECRETS);
NtClose(hProcess);
}

}
}
__except (EXCEPTION_EXECUTE_HANDLER) {
return;
}
}

/*
* DbkOpenCheatEngineDriver
*
Expand Down Expand Up @@ -218,8 +139,8 @@ BOOL DbkOpenCheatEngineDriver(
sizeof(g_KduLoaderShellcode),
&memIO))
{
ipcServer = IpcStartApiServer(DbkpIpcCallback,
DbkpIpcOnException,
ipcServer = IpcStartApiServer(supIpcDuplicateHandleCallback,
supIpcOnException,
NULL,
NULL,
(PVOID)Context);
Expand Down
40 changes: 5 additions & 35 deletions Source/Hamakaze/idrv/procexp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*
* TITLE: PROCEXP.CPP
*
* VERSION: 1.30
* VERSION: 1.32
*
* DATE: 20 Mar 2023
* DATE: 10 Jun 2023
*
* Process Explorer driver routines.
*
Expand Down Expand Up @@ -36,40 +36,10 @@ static KDU_VICTIM_PROVIDER g_ProcExpVictimSelf{
sizeof(g_ProcExpSig) // Victim dispatch bytes size
};

/*
* PexpMapMemory
*
* Purpose:
*
* Map physical memory.
*
*/
PVOID PexpMapMemory(
_In_ ULONG_PTR PhysicalAddress,
_In_ ULONG NumberOfBytes,
_In_ BOOL MapForWrite
)
{
return supMapPhysicalMemory(g_PexPhysicalMemorySection,
PhysicalAddress,
NumberOfBytes,
MapForWrite);
}
#define PexpMapMemory(PhysicalAddress, NumberOfBytes, MapForWrite) \
supMapPhysicalMemory(g_PexPhysicalMemorySection, PhysicalAddress, NumberOfBytes, MapForWrite)

/*
* PexpUnmapMemory
*
* Purpose:
*
* Unmap physical memory.
*
*/
VOID PexpUnmapMemory(
_In_ PVOID BaseAddress
)
{
supUnmapPhysicalMemory(BaseAddress);
}
#define PexpUnmapMemory(BaseAddress) supUnmapPhysicalMemory(BaseAddress)

/*
* PexpReadWritePhysicalMemory
Expand Down
Loading

0 comments on commit a407db2

Please sign in to comment.