Skip to content

Commit

Permalink
[x64dbg] SDK and testing bundle are updated to snapshot on snapshot_2…
Browse files Browse the repository at this point in the history
…016-09-18_01-22
  • Loading branch information
a1ext committed Sep 20, 2016
1 parent bcf716b commit f394139
Show file tree
Hide file tree
Showing 175 changed files with 16,940 additions and 1,719 deletions.
2 changes: 1 addition & 1 deletion common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 1
#define VERSION_REVISION 0
#define VERSION_BUILD 8
#define VERSION_BUILD 9


#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD
Expand Down
2 changes: 1 addition & 1 deletion deploy/labeless/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0.8
1.1.0.9
304 changes: 301 additions & 3 deletions deploy/labeless/backend/x64dbg/x64dbgapi.py

Large diffs are not rendered by default.

304 changes: 301 additions & 3 deletions deploy/labeless/backend/x64dbg/x64dbgapi64.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ extern "C"
{
#endif

__declspec(dllexport) bool DevicePathToPathW(const wchar_t* szDevicePath, wchar_t* szPath, size_t nSize);
__declspec(dllexport) bool DevicePathToPathA(const char* szDevicePath, char* szPath, size_t nSize);
__declspec(dllexport) bool DevicePathFromFileHandleW(HANDLE hFile, wchar_t* szDevicePath, size_t nSize);
__declspec(dllexport) bool DevicePathFromFileHandleA(HANDLE hFile, char* szDevicePath, size_t nSize);
__declspec(dllexport) bool PathFromFileHandleW(HANDLE hFile, wchar_t* szPath, size_t nSize);
__declspec(dllexport) bool PathFromFileHandleA(HANDLE hFile, char* szPath, size_t nSize);
__declspec(dllexport) bool DevicePathToPathW(const wchar_t* szDevicePath, wchar_t* szPath, size_t nSizeInChars);
__declspec(dllexport) bool DevicePathToPathA(const char* szDevicePath, char* szPath, size_t nSizeInChars);
__declspec(dllexport) bool DevicePathFromFileHandleW(HANDLE hFile, wchar_t* szDevicePath, size_t nSizeInChars);
__declspec(dllexport) bool DevicePathFromFileHandleA(HANDLE hFile, char* szDevicePath, size_t nSizeInChars);
__declspec(dllexport) bool PathFromFileHandleW(HANDLE hFile, wchar_t* szPath, size_t nSizeInChars);
__declspec(dllexport) bool PathFromFileHandleA(HANDLE hFile, char* szPath, size_t nSizeInChars);

#ifdef __cplusplus
}
Expand Down
3 changes: 2 additions & 1 deletion labeless_x64dbg/pluginsdk/TitanEngine/TitanEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
#define UE_NUMBEROFRVAANDSIZES 22
#define UE_BASEOFCODE 23
#define UE_BASEOFDATA 24
#define UE_DLLCHARACTERISTICS 25
//leaving some enum space here for future additions
#define UE_SECTIONNAME 40
#define UE_SECTIONVIRTUALOFFSET 41
Expand Down Expand Up @@ -781,7 +782,7 @@ __declspec(dllexport) bool TITCALL RelocaterWipeRelocationTableW(const wchar_t*
__declspec(dllexport) ULONG_PTR TITCALL ResourcerLoadFileForResourceUse(const char* szFileName);
__declspec(dllexport) ULONG_PTR TITCALL ResourcerLoadFileForResourceUseW(const wchar_t* szFileName);
__declspec(dllexport) bool TITCALL ResourcerFreeLoadedFile(LPVOID LoadedFileBase);
__declspec(dllexport) bool TITCALL ResourcerExtractResourceFromFileEx(ULONG_PTR FileMapVA, const char* szResourceType, const char* szResourceName, const char* szExtractedFileName);
__declspec(dllexport) bool TITCALL ResourcerExtractResourceFromFileEx(HMODULE hFile, const char* szResourceType, const char* szResourceName, const char* szExtractedFileName);
__declspec(dllexport) bool TITCALL ResourcerExtractResourceFromFile(const char* szFileName, const char* szResourceType, const char* szResourceName, const char* szExtractedFileName);
__declspec(dllexport) bool TITCALL ResourcerExtractResourceFromFileW(const wchar_t* szFileName, char* szResourceType, const char* szResourceName, const char* szExtractedFileName);
__declspec(dllexport) bool TITCALL ResourcerFindResource(const char* szFileName, const char* szResourceType, DWORD ResourceType, const char* szResourceName, DWORD ResourceName, DWORD ResourceLanguage, PULONG_PTR pResourceData, LPDWORD pResourceSize);
Expand Down
40 changes: 29 additions & 11 deletions labeless_x64dbg/pluginsdk/_dbgfunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ typedef struct
{
DWORD dwProcessId;
char szExeFile[MAX_PATH];
char szExeArgs[MAX_COMMAND_LINE_SIZE];
} DBGPROCESSINFO;

enum TRACERECORDBYTETYPE
typedef enum
{
InstructionBody = 0,
InstructionHeading = 1,
Expand All @@ -63,15 +64,15 @@ enum TRACERECORDBYTETYPE
DataMMX,
DataMixed, //the byte is accessed in multiple ways
InstructionDataMixed //the byte is both executed and written
};
} TRACERECORDBYTETYPE;

enum TRACERECORDTYPE
typedef enum
{
TraceRecordNone,
TraceRecordBitExec,
TraceRecordByteWithExecTypeAndCounter,
TraceRecordWordWithExecTypeAndCounter
};
} TRACERECORDTYPE;

typedef struct
{
Expand All @@ -80,6 +81,7 @@ typedef struct
unsigned int GrantedAccess;
} HANDLEINFO;

// The longest ip address is 1234:6789:1234:6789:1234:6789:123.567.901.345 (46 bytes)
#define TCP_ADDR_SIZE 50

typedef struct
Expand Down Expand Up @@ -125,20 +127,28 @@ typedef bool (*GETCMDLINE)(char* cmdline, size_t* cbsize);
typedef bool (*SETCMDLINE)(const char* cmdline);
typedef duint(*FILEOFFSETTOVA)(const char* modname, duint offset);
typedef duint(*VATOFILEOFFSET)(duint va);
typedef duint(*GETADDRFROMLINE)(const char* szSourceFile, int line);
typedef duint(*GETADDRFROMLINE)(const char* szSourceFile, int line, duint* displacement);
typedef bool (*GETSOURCEFROMADDR)(duint addr, char* szSourceFile, int* line);
typedef bool (*VALFROMSTRING)(const char* string, duint* value);
typedef bool (*PATCHGETEX)(duint addr, DBGPATCHINFO* info);
typedef bool(*GETBRIDGEBP)(BPXTYPE type, duint addr, BRIDGEBP* bp);
typedef bool(*STRINGFORMATINLINE)(const char* format, size_t resultSize, char* result);
typedef void(*GETMNEMONICBRIEF)(const char* mnem, size_t resultSize, char* result);
typedef bool (*GETBRIDGEBP)(BPXTYPE type, duint addr, BRIDGEBP* bp);
typedef bool (*STRINGFORMATINLINE)(const char* format, size_t resultSize, char* result);
typedef void (*GETMNEMONICBRIEF)(const char* mnem, size_t resultSize, char* result);
typedef unsigned int (*GETTRACERECORDHITCOUNT)(duint address);
typedef TRACERECORDBYTETYPE(*GETTRACERECORDBYTETYPE)(duint address);
typedef bool (*SETTRACERECORDTYPE)(duint pageAddress, TRACERECORDTYPE type);
typedef TRACERECORDTYPE(*GETTRACERECORDTYPE)(duint pageAddress);
typedef bool(*ENUMHANDLES)(ListOf(HANDLEINFO) handles);
typedef bool(*GETHANDLENAME)(duint handle, char* name, size_t nameSize, char* typeName, size_t typeNameSize);
typedef bool(*ENUMTCPCONNECTIONS)(ListOf(TCPCONNECTIONINFO) connections);
typedef bool (*ENUMHANDLES)(ListOf(HANDLEINFO) handles);
typedef bool (*GETHANDLENAME)(duint handle, char* name, size_t nameSize, char* typeName, size_t typeNameSize);
typedef bool (*ENUMTCPCONNECTIONS)(ListOf(TCPCONNECTIONINFO) connections);
typedef duint(*GETDBGEVENTS)();
typedef int (*MODGETPARTY)(duint base);
typedef void (*MODSETPARTY)(duint base, int party);
typedef bool(*WATCHISWATCHDOGTRIGGERED)(unsigned int id);
typedef bool(*MEMISCODEPAGE)(duint addr, bool refresh);
typedef bool(*ANIMATECOMMAND)(const char* command);
typedef void(*DBGSETDEBUGGEEINITSCRIPT)(const char* fileName);
typedef const char* (*DBGGETDEBUGGEEINITSCRIPT)();

typedef struct DBGFUNCTIONS_
{
Expand Down Expand Up @@ -189,6 +199,14 @@ typedef struct DBGFUNCTIONS_
ENUMHANDLES EnumHandles;
GETHANDLENAME GetHandleName;
ENUMTCPCONNECTIONS EnumTcpConnections;
GETDBGEVENTS GetDbgEvents;
MODGETPARTY ModGetParty;
MODSETPARTY ModSetParty;
WATCHISWATCHDOGTRIGGERED WatchIsWatchdogTriggered;
MEMISCODEPAGE MemIsCodePage;
ANIMATECOMMAND AnimateCommand;
DBGSETDEBUGGEEINITSCRIPT DbgSetDebuggeeInitScript;
DBGGETDEBUGGEEINITSCRIPT DbgGetDebuggeeInitScript;
} DBGFUNCTIONS;

#ifdef BUILD_DBG
Expand Down
1 change: 1 addition & 0 deletions labeless_x64dbg/pluginsdk/_plugin_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "bridgemain.h"
#include "_dbgfunctions.h"
#include "jansson/jansson.h"

#endif // BUILD_DBG

Expand Down
18 changes: 16 additions & 2 deletions labeless_x64dbg/pluginsdk/_plugins.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
//defines
#define PLUG_SDKVERSION 1

#define PLUG_DB_LOADSAVE_DATA 1
#define PLUG_DB_LOADSAVE_ALL 2

//structures
typedef struct
{
Expand Down Expand Up @@ -167,6 +170,12 @@ typedef struct
bool retval;
} PLUG_CB_WINEVENTGLOBAL;

typedef struct
{
json_t* root;
int loadSaveType;
} PLUG_CB_LOADSAVEDB;

//enums
typedef enum
{
Expand All @@ -190,13 +199,16 @@ typedef enum
CB_DEBUGEVENT, //PLUG_CB_DEBUGEVENT (called on any debug event)
CB_MENUENTRY, //PLUG_CB_MENUENTRY
CB_WINEVENT, //PLUG_CB_WINEVENT
CB_WINEVENTGLOBAL //PLUG_CB_WINEVENTGLOBAL
CB_WINEVENTGLOBAL, //PLUG_CB_WINEVENTGLOBAL
CB_LOADDB, //PLUG_CB_LOADSAVEDB
CB_SAVEDB //PLUG_CB_LOADSAVEDB
} CBTYPE;

//typedefs
typedef void (*CBPLUGIN)(CBTYPE cbType, void* callbackInfo);
typedef bool (*CBPLUGINCOMMAND)(int, char**);
typedef bool (*CBPLUGINCOMMAND)(int argc, char** argv);
typedef void (*CBPLUGINSCRIPT)();
typedef duint(*CBPLUGINEXPRFUNCTION)(int argc, duint* argv, void* userdata);

//exports
#ifdef __cplusplus
Expand All @@ -220,6 +232,8 @@ PLUG_IMPEXP void _plugin_menuseticon(int hMenu, const ICONDATA* icon);
PLUG_IMPEXP void _plugin_menuentryseticon(int pluginHandle, int hEntry, const ICONDATA* icon);
PLUG_IMPEXP void _plugin_startscript(CBPLUGINSCRIPT cbScript);
PLUG_IMPEXP bool _plugin_waituntilpaused();
PLUG_IMPEXP bool _plugin_registerexprfunction(int pluginHandle, const char* name, int argc, CBPLUGINEXPRFUNCTION cbFunction, void* userdata);
PLUG_IMPEXP bool _plugin_unregisterexprfunction(int pluginHandle, const char* name);

#ifdef __cplusplus
}
Expand Down
31 changes: 31 additions & 0 deletions labeless_x64dbg/pluginsdk/_scriptapi_argument.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef _SCRIPTAPI_ARGUMENT_H
#define _SCRIPTAPI_ARGUMENT_H

#include "_scriptapi.h"

namespace Script
{
namespace Argument
{
struct ArgumentInfo
{
char mod[MAX_MODULE_SIZE];
duint rvaStart;
duint rvaEnd;
bool manual;
duint instructioncount;
};

SCRIPT_EXPORT bool Add(duint start, duint end, bool manual, duint instructionCount = 0);
SCRIPT_EXPORT bool Add(const ArgumentInfo* info);
SCRIPT_EXPORT bool Get(duint addr, duint* start = nullptr, duint* end = nullptr, duint* instructionCount = nullptr);
SCRIPT_EXPORT bool GetInfo(duint addr, ArgumentInfo* info);
SCRIPT_EXPORT bool Overlaps(duint start, duint end);
SCRIPT_EXPORT bool Delete(duint address);
SCRIPT_EXPORT void DeleteRange(duint start, duint end, bool deleteManual = false);
SCRIPT_EXPORT void Clear();
SCRIPT_EXPORT bool GetList(ListOf(ArgumentInfo) list); //caller has the responsibility to free the list
}; //Argument
}; //Script

#endif //_SCRIPTAPI_ARGUMENT_H
1 change: 1 addition & 0 deletions labeless_x64dbg/pluginsdk/_scriptapi_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace Script
SCRIPT_EXPORT void StepOut();
SCRIPT_EXPORT bool SetBreakpoint(duint address);
SCRIPT_EXPORT bool DeleteBreakpoint(duint address);
SCRIPT_EXPORT bool DisableBreakpoint(duint address);
SCRIPT_EXPORT bool SetHardwareBreakpoint(duint address, HardwareType type = HardwareExecute);
SCRIPT_EXPORT bool DeleteHardwareBreakpoint(duint address);
}; //Debug
Expand Down
Loading

0 comments on commit f394139

Please sign in to comment.