Skip to content

Commit

Permalink
Version 4.19
Browse files Browse the repository at this point in the history
  • Loading branch information
ufrisk committed Jan 16, 2025
1 parent 6770650 commit cbb0fd9
Show file tree
Hide file tree
Showing 49 changed files with 363 additions and 120 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
*.obj
*.so
*.zip
*.dylib
Binary file added files/pcileech.icns
Binary file not shown.
8 changes: 4 additions & 4 deletions includes/leechcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// - README: https://github.com/ufrisk/LeechCore
// - GUIDE: https://github.com/ufrisk/LeechCore/wiki
//
// (c) Ulf Frisk, 2020-2024
// (c) Ulf Frisk, 2020-2025
// Author: Ulf Frisk, [email protected]
//
// Header Version: 2.19.0
// Header Version: 2.20.0
//

#ifndef __LEECHCORE_H__
Expand All @@ -34,7 +34,7 @@ extern "C" {
typedef unsigned __int64 QWORD, *PQWORD;

#endif /* _WIN32 */
#ifdef LINUX
#if defined(LINUX) || defined(MACOS)

#include <inttypes.h>
#include <stdlib.h>
Expand Down Expand Up @@ -75,7 +75,7 @@ typedef const uint16_t *LPCWSTR;
#define _Printf_format_string_
#define _Success_(x)

#endif /* LINUX */
#endif /* LINUX || MACOS */



Expand Down
Binary file modified includes/lib64/leechcore.lib
Binary file not shown.
Binary file modified includes/lib64/vmm.lib
Binary file not shown.
12 changes: 6 additions & 6 deletions includes/vmmdll.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
// while Linux may only access UTF-8 versions. Some functionality may also
// be degraded or unavailable on Linux.
//
// (c) Ulf Frisk, 2018-2024
// (c) Ulf Frisk, 2018-2025
// Author: Ulf Frisk, [email protected]
//
// Header Version: 5.13
// Header Version: 5.14
//

#include "leechcore.h"
Expand All @@ -30,7 +30,7 @@ extern "C" {
typedef unsigned __int64 QWORD, *PQWORD;

#endif /* _WIN32 */
#ifdef LINUX
#if defined(LINUX) || defined(MACOS)

#include <inttypes.h>
#include <stdarg.h>
Expand Down Expand Up @@ -72,7 +72,7 @@ typedef const uint16_t *LPCWSTR;
#define _Printf_format_string_
#define _Success_(x)

#endif /* LINUX */
#endif /* LINUX || MACOS */

typedef struct tdVMM_HANDLE *VMM_HANDLE;
typedef struct tdVMMVM_HANDLE *VMMVM_HANDLE;
Expand Down Expand Up @@ -296,7 +296,7 @@ typedef struct tdVMMDLL_MAP_PFN *PVMMDLL_MAP_PFN;
//-----------------------------------------------------------------------------
// LINUX SPECIFIC DEFINES:
//-----------------------------------------------------------------------------
#ifdef LINUX
#if defined(LINUX) || defined(MACOS)

#define IMAGE_SIZEOF_SHORT_NAME 8

Expand Down Expand Up @@ -330,7 +330,7 @@ typedef struct _SERVICE_STATUS {
DWORD dwCheckPoint;
DWORD dwWaitHint;
} SERVICE_STATUS, *LPSERVICE_STATUS;
#endif /* LINUX */
#endif /* LINUX || MACOS */



Expand Down
35 changes: 35 additions & 0 deletions pcileech/Makefile.macos
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
CC=clang
CFLAGS += -I. -I../includes -D MACOS -D _GNU_SOURCE -D _FILE_OFFSET_BITS=64 -pthread
CFLAGS += -fPIE -fPIC -fstack-protector -D_FORTIFY_SOURCE=2 -O1
CFLAGS += -Wall -Wno-enum-compare -Wno-pointer-sign -Wno-multichar -Wno-unused-variable -Wno-unused-value
CFLAGS += -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
CFLAGS += -mmacosx-version-min=11.0
# DEBUG FLAGS BELOW
#CFLAGS += -O0
#CFLAGS += -fsanitize=address
# DEBUG FLAGS ABOVE
LDFLAGS += -ldl -L. ./leechcore.dylib ./vmm.dylib
LDFLAGS += -Wl,-rpath,@loader_path
LDFLAGS += -mmacosx-version-min=11.0
DEPS = pcileech.h
OBJ = oscompatibility.o charutil.o device.o pcileech.o executor.o extra.o help.o kmd.o memdump.o mempatch.o statistics.o umd.o util.o vfslist.o vfs.o vmmx.o ob/ob_cachemap.o ob/ob_core.o ob/ob_map.o ob/ob_set.o

%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)

pcileech: $(OBJ)
cp ../files/vmm.dylib . || cp ../../MemProcFS*/files/vmm.dylib . || true
cp ../files/leechcore.dylib . || cp ../../LeechCore*/files/leechcore.dylib . || true
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
mv pcileech ../files/ |true
mv vmm.dylib ../files/ |true
mv leechcore.dylib ../files/ |true
rm -f *.o || true
rm -f */*.o || true
rm -f *.dylib || true
true

clean:
rm -f *.o || true
rm -f */*.o || true
rm -f *.dylib || true
2 changes: 1 addition & 1 deletion pcileech/charutil.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// charutil.c : implementation of various character/string utility functions.
//
// (c) Ulf Frisk, 2021-2024
// (c) Ulf Frisk, 2021-2025
// Author: Ulf Frisk, [email protected]
//
#include "charutil.h"
Expand Down
2 changes: 1 addition & 1 deletion pcileech/charutil.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// charutil.h : definitions of various character/string utility functions.
//
// (c) Ulf Frisk, 2021-2024
// (c) Ulf Frisk, 2021-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __CHARUTIL_H__
Expand Down
2 changes: 1 addition & 1 deletion pcileech/device.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// device.c : implementation related to hardware devices.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#include <leechcore.h>
Expand Down
2 changes: 1 addition & 1 deletion pcileech/device.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// device.h : definitions related to the hardware devices.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __DEVICE_H__
Expand Down
6 changes: 3 additions & 3 deletions pcileech/executor.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// executor.c : implementation related 'code execution' and 'console redirect' functionality.
//
// (c) Ulf Frisk, 2016-2024
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#include "executor.h"
Expand Down Expand Up @@ -618,11 +618,11 @@ VOID ActionAgentForensic()
}

#endif /* _WIN32 */
#ifdef LINUX
#if defined(LINUX) || defined(MACOS)

VOID ActionAgentForensic()
{
printf("Command 'agent-elastic' is only supported on Windows.\n");
}

#endif /* LINUX */
#endif /* LINUX || MACOS */
2 changes: 1 addition & 1 deletion pcileech/executor.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// executor.h : definitions related to 'code execution' and 'console redirect' functionality.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __EXECUTOR_H__
Expand Down
6 changes: 3 additions & 3 deletions pcileech/extra.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// extra.c : implementation related various extra functionality such as exploits.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#include "extra.h"
Expand Down Expand Up @@ -62,9 +62,9 @@ BOOL Extra_MacFVRecover_Analyze(_In_ PBYTE pb512M)
#ifdef _WIN32
printf("MAC_FVRECOVER: PASSWORD CANDIDATE: %S\n", (LPWSTR)(pb + dwCandidate));
#endif /* _WIN32 */
#ifdef LINUX
#if defined(LINUX) || defined(MACOS)
printf("MAC_FVRECOVER: PASSWORD CANDIDATE (hex8): %llx\n", *(PQWORD)(pb + dwCandidate));
#endif /* LINUX */
#endif /* LINUX || MACOS */
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion pcileech/extra.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// extra.h : definitions related to various extra functionality such as exploits.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __EXTRA_H__
Expand Down
2 changes: 1 addition & 1 deletion pcileech/help.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// help.c : implementation related to displaying help texts.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#include "help.h"
Expand Down
2 changes: 1 addition & 1 deletion pcileech/help.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// help.h : definitions related to displaying help texts.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __HELP_H__
Expand Down
2 changes: 1 addition & 1 deletion pcileech/kmd.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// kmd.c : implementation related to operating systems kernel modules functionality.
//
// (c) Ulf Frisk, 2016-2024
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#include "kmd.h"
Expand Down
2 changes: 1 addition & 1 deletion pcileech/kmd.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// kmd.h : definitions related to operating systems kernel modules functionality.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __KMD_H__
Expand Down
2 changes: 1 addition & 1 deletion pcileech/memdump.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// memdump.c : implementation related to memory dumping functionality.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#include <leechcore.h>
Expand Down
2 changes: 1 addition & 1 deletion pcileech/memdump.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// memdump.h : definitions related to memory dumping functionality.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __MEMDUMP_H__
Expand Down
2 changes: 1 addition & 1 deletion pcileech/mempatch.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// mempatch.c : implementation related to operating systems unlock/patch functionality.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#include "mempatch.h"
Expand Down
2 changes: 1 addition & 1 deletion pcileech/mempatch.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// mempatch.h : definitions related to memory patch / operating system unlock functionality.
//
// (c) Ulf Frisk, 2016-2022
// (c) Ulf Frisk, 2016-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __MEMPATCH_H__
Expand Down
2 changes: 1 addition & 1 deletion pcileech/ob/ob.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ob.h : definitions related to the object manager and object manager collections.
//
// (c) Ulf Frisk, 2018-2023
// (c) Ulf Frisk, 2018-2025
// Author: Ulf Frisk, [email protected]
//
#ifndef __OB_H__
Expand Down
2 changes: 1 addition & 1 deletion pcileech/ob/ob_cachemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// The map (ObCacheMap) is thread safe.
// The ObCacheMap is an object manager object and must be DECREF'ed when required.
//
// (c) Ulf Frisk, 2020-2023
// (c) Ulf Frisk, 2020-2025
// Author: Ulf Frisk, [email protected]
//
#include "ob.h"
Expand Down
2 changes: 1 addition & 1 deletion pcileech/ob/ob_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// - such as decreasing reference count of sub-objects contained in the object
// that is to be deallocated.
//
// (c) Ulf Frisk, 2018-2023
// (c) Ulf Frisk, 2018-2025
// Author: Ulf Frisk, [email protected]
//
#include "ob.h"
Expand Down
2 changes: 1 addition & 1 deletion pcileech/ob/ob_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// of the set with ObMap_Get/ObMap_GetNext may fail.
// The ObMap is an object manager object and must be DECREF'ed when required.
//
// (c) Ulf Frisk, 2019-2023
// (c) Ulf Frisk, 2019-2025
// Author: Ulf Frisk, [email protected]
//
#include "ob.h"
Expand Down
2 changes: 1 addition & 1 deletion pcileech/ob/ob_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// iterations of the set with ObSet_Get/ObSet_GetNext may fail.
// The ObSet is an object manager object and must be DECREF'ed when required.
//
// (c) Ulf Frisk, 2019-2023
// (c) Ulf Frisk, 2019-2025
// Author: Ulf Frisk, [email protected]
//
#include "ob.h"
Expand Down
Loading

0 comments on commit cbb0fd9

Please sign in to comment.