Skip to content

Commit

Permalink
Version 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ufrisk committed Jan 7, 2020
1 parent a2a1214 commit 0c1aa94
Show file tree
Hide file tree
Showing 54 changed files with 207 additions and 107 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ v1.3
* [RawUDP](https://github.com/ufrisk/LeechCore/wiki/Device_RawUDP) device ([NeTV2 FPGA](https://github.com/ufrisk/pcileech-fpga) over UDP).
* ELF Core Dump support (VirtualBox VBoxManage debugvm dumpvmcore).

Latest
* Bug fixes.
[v1.6](https://github.com/ufrisk/LeechCore/releases/tag/v1.6)
* Code Signing.
* FPGA: Support for writing to custom shadow configuration space.
* FPGA: Examples: PCIe Configuration Space & Dynamic Reconfiguration Port Interface.
13 changes: 9 additions & 4 deletions files/leechcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@
// EXISTINGREMOTE
//
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
// Header Version: 1.5
// Header Version: 1.6
//
#ifndef __LEECHCORE_H__
#define __LEECHCORE_H__
Expand Down Expand Up @@ -484,8 +484,13 @@ DLLEXPORT BOOL LeechCore_SetOption(_In_ ULONG64 fOption, _In_ ULONG64 qwValue);
#define LEECHCORE_COMMANDDATA_FPGA_WRITE_TLP 0x00000101 // R
#define LEECHCORE_COMMANDDATA_FPGA_LISTEN_TLP 0x00000102 // R
#define LEECHCORE_COMMANDDATA_FPGA_PCIECFGSPACE 0x00000103 // R
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE 0x00000104 // RW
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG 0x00000105 // RW
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE 0x00000104 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG 0x00000105 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGDRP 0x00000106 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG_MARKWR 0x00000107 // W - write with mask [bytes: 0-1: data, 2-3: mask] [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE_MARKWR 0x00000108 // W - write with mask [bytes: 0-1: data, 2-3: mask] [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_PCIECFGSPACE_WR 0x00000109 // W
#define LEECHCORE_COMMANDDATA_FPGA_CFGREG_DEBUGPRINT 0x0000010a //
#define LEECHCORE_COMMANDDATA_FILE_DUMPHEADER_GET 0x00000201 // R
#define LEECHCORE_COMMANDDATA_STATISTICS_GET 0x80000100 // R

Expand Down
Binary file modified files/leechcore.lib
Binary file not shown.
13 changes: 9 additions & 4 deletions files/x86/leechcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@
// EXISTINGREMOTE
//
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
// Header Version: 1.5
// Header Version: 1.6
//
#ifndef __LEECHCORE_H__
#define __LEECHCORE_H__
Expand Down Expand Up @@ -484,8 +484,13 @@ DLLEXPORT BOOL LeechCore_SetOption(_In_ ULONG64 fOption, _In_ ULONG64 qwValue);
#define LEECHCORE_COMMANDDATA_FPGA_WRITE_TLP 0x00000101 // R
#define LEECHCORE_COMMANDDATA_FPGA_LISTEN_TLP 0x00000102 // R
#define LEECHCORE_COMMANDDATA_FPGA_PCIECFGSPACE 0x00000103 // R
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE 0x00000104 // RW
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG 0x00000105 // RW
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE 0x00000104 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG 0x00000105 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGDRP 0x00000106 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG_MARKWR 0x00000107 // W - write with mask [bytes: 0-1: data, 2-3: mask] [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE_MARKWR 0x00000108 // W - write with mask [bytes: 0-1: data, 2-3: mask] [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_PCIECFGSPACE_WR 0x00000109 // W
#define LEECHCORE_COMMANDDATA_FPGA_CFGREG_DEBUGPRINT 0x0000010a //
#define LEECHCORE_COMMANDDATA_FILE_DUMPHEADER_GET 0x00000201 // R
#define LEECHCORE_COMMANDDATA_STATISTICS_GET 0x80000100 // R

Expand Down
Binary file modified files/x86/leechcore.lib
Binary file not shown.
2 changes: 1 addition & 1 deletion leechagent/leechagent.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// leechagent.c : Implementation the LeechAgent service related functionality.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#include "leechagent.h"
Expand Down
2 changes: 1 addition & 1 deletion leechagent/leechagent.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// leechagent.h : definitions related to the leech agent.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#ifndef __LEECHAGENT_H__
Expand Down
2 changes: 1 addition & 1 deletion leechagent/leechagent_proc.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Child processes are spawned and controlled by the main
// LeechAgent process.
//
// (c) Ulf Frisk, 2019
// (c) Ulf Frisk, 2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#ifndef __LEECHAGENT_PROC_H__
Expand Down
6 changes: 4 additions & 2 deletions leechagent/leechagent_procchild.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Child processes host execution environments such as the
// Python environment which allows for execution of scripts.
//
// (c) Ulf Frisk, 2019
// (c) Ulf Frisk, 2020
// Author: Ulf Frisk, pcileech@frizk.net
//
// In general, this child process is meant to be a temporary host process to
Expand Down Expand Up @@ -141,8 +141,10 @@ VOID LeechAgent_ProcChild_Close_ForceTerminateThread(PVOID pv)
*/
VOID LeechAgent_ProcChild_Close()
{
HANDLE hThread;
ctxProcChild.fStateRunning = FALSE;
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)LeechAgent_ProcChild_Close_ForceTerminateThread, NULL, 0, NULL);
hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)LeechAgent_ProcChild_Close_ForceTerminateThread, NULL, 0, NULL);
if(hThread) { CloseHandle(hThread); }
if(ctxProcChild.pfnLeechCorePyC_EmbClose) {
ctxProcChild.pfnLeechCorePyC_EmbClose();
}
Expand Down
2 changes: 1 addition & 1 deletion leechagent/leechagent_procparent.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Python environment which allows for execution of scripts.
// The Parent process controls the child processes.
//
// (c) Ulf Frisk, 2019
// (c) Ulf Frisk, 2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#include "leechagent_proc.h"
Expand Down
2 changes: 1 addition & 1 deletion leechagent/leechagent_rpc.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// leechsvc_rpc.c : implementation of RPC related functionality.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#include "leechagent.h"
Expand Down
2 changes: 1 addition & 1 deletion leechagent/leechagent_rpc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// leechagent_rpc.h : definitions of RPC related functionality.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#ifndef __LEECHAGENT_RPC_H__
Expand Down
13 changes: 9 additions & 4 deletions leechagent/leechcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@
// EXISTINGREMOTE
//
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
// Header Version: 1.5
// Header Version: 1.6
//
#ifndef __LEECHCORE_H__
#define __LEECHCORE_H__
Expand Down Expand Up @@ -484,8 +484,13 @@ DLLEXPORT BOOL LeechCore_SetOption(_In_ ULONG64 fOption, _In_ ULONG64 qwValue);
#define LEECHCORE_COMMANDDATA_FPGA_WRITE_TLP 0x00000101 // R
#define LEECHCORE_COMMANDDATA_FPGA_LISTEN_TLP 0x00000102 // R
#define LEECHCORE_COMMANDDATA_FPGA_PCIECFGSPACE 0x00000103 // R
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE 0x00000104 // RW
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG 0x00000105 // RW
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE 0x00000104 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG 0x00000105 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGDRP 0x00000106 // RW - [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGCFG_MARKWR 0x00000107 // W - write with mask [bytes: 0-1: data, 2-3: mask] [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_CFGREGPCIE_MARKWR 0x00000108 // W - write with mask [bytes: 0-1: data, 2-3: mask] [high-part fOption = address]
#define LEECHCORE_COMMANDDATA_FPGA_PCIECFGSPACE_WR 0x00000109 // W
#define LEECHCORE_COMMANDDATA_FPGA_CFGREG_DEBUGPRINT 0x0000010a //
#define LEECHCORE_COMMANDDATA_FILE_DUMPHEADER_GET 0x00000201 // R
#define LEECHCORE_COMMANDDATA_STATISTICS_GET 0x80000100 // R

Expand Down
2 changes: 1 addition & 1 deletion leechagent/leechrpc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// leechrpcclient.h : definitions related to the leech rpc service.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#ifndef __LEECHRPC_H__
Expand Down
2 changes: 1 addition & 1 deletion leechagent/leechrpcserver.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// leechrpc.c : implementation of RPC server-side functionality.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#include "leechagent.h"
Expand Down
2 changes: 1 addition & 1 deletion leechagent/leechrpcshared.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// leechrpcshared.c : implementation of the remote procedure call (RPC) shared functionality (client/server).
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion leechagent/util.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// util.h : implementations of various utility functions.
//
// (c) Ulf Frisk, 2019
// (c) Ulf Frisk, 2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#include "util.h"
Expand Down
2 changes: 1 addition & 1 deletion leechagent/util.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// util.h : definitions of various utility functions.
//
// (c) Ulf Frisk, 2019
// (c) Ulf Frisk, 2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#ifndef __UTIL_H__
Expand Down
8 changes: 4 additions & 4 deletions leechagent/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define STRINGIZE(s) STRINGIZE2(s)

#define VERSION_MAJOR 1
#define VERSION_MINOR 5
#define VERSION_REVISION 1
#define VERSION_BUILD 3
#define VERSION_MINOR 6
#define VERSION_REVISION 0
#define VERSION_BUILD 4

#define VER_FILE_DESCRIPTION_STR "LeechAgent Memory Acquisition Service"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD
Expand All @@ -19,4 +19,4 @@
#define VER_PRODUCT_VERSION_STR VER_FILE_VERSION_STR
#define VER_ORIGINAL_FILENAME_STR VER_PRODUCTNAME_STR ".exe"
#define VER_INTERNAL_NAME_STR VER_ORIGINAL_FILENAME_STR
#define VER_COPYRIGHT_STR "Copyright (c) Ulf Frisk 2018-2019"
#define VER_COPYRIGHT_STR "Copyright (c) Ulf Frisk 2018-2020"
2 changes: 1 addition & 1 deletion leechcore/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OBJ = fpga_libusb.o oscompatibility.o leechcore.o util.o memmap.o device_file.o
$(CC) -c -o $@ $< $(CFLAGS)

leechcore: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) -o leechcore.so
$(CC) -o $@ $^ $(CFLAGS) -o leechcore.so $(LDFLAGS)
rm *.o
mv leechcore.so ../files/ |true

Expand Down
2 changes: 1 addition & 1 deletion leechcore/device.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// device.h : internal header file containing device-common defines.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#ifndef __DEVICE_H__
Expand Down
2 changes: 1 addition & 1 deletion leechcore/device_file.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// device_file.c : implementation related to file backed memory acquisition device.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#include "device.h"
Expand Down
2 changes: 1 addition & 1 deletion leechcore/device_file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// device_file.h : definitions related to file backed memory acquisition device.
//
// (c) Ulf Frisk, 2018-2019
// (c) Ulf Frisk, 2018-2020
// Author: Ulf Frisk, pcileech@frizk.net
//
#ifndef __DEVICE_FILE_H__
Expand Down
Loading

0 comments on commit 0c1aa94

Please sign in to comment.