Some tests for payloads on the remote end

This commit is contained in:
2019-12-09 15:40:03 -05:00
parent 9e53560614
commit e9d5ec0243
4 changed files with 19 additions and 2 deletions

View File

@@ -2,6 +2,6 @@ set(CMAKE_C_STANDARD 99)
set(CMAKE_C_FLAGS -g) set(CMAKE_C_FLAGS -g)
include_directories(include) include_directories(include)
add_executable(checkm8_remote main.c src/libusb_helpers.c src/commands.c src/exploit.c) add_executable(checkm8_remote main.c src/libusb_helpers.c src/commands.c src/exploit.c src/payload.c)
target_link_libraries(checkm8_remote checkm8_libusb pthread udev) target_link_libraries(checkm8_remote checkm8_libusb pthread udev)

View File

@@ -0,0 +1,4 @@
#ifndef IPWNDFU_REWRITE_C_PAYLOAD_H
#define IPWNDFU_REWRITE_C_PAYLOAD_H
#endif //IPWNDFU_REWRITE_C_PAYLOAD_H

View File

@@ -2,7 +2,6 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include "checkm8.h"
#include "libusb_helpers.h" #include "libusb_helpers.h"
int complete_stage(int stage_function(struct libusb_device_bundle *bundle)) int complete_stage(int stage_function(struct libusb_device_bundle *bundle))

View File

@@ -0,0 +1,14 @@
#include "../include/payload.h"
#include <elf.h>
#include <stdio.h>
void read_elf_header(const char *filename)
{
Elf64_Ehdr header;
FILE *file = fopen(filename, "rb");
if(file)
{
fread(&header, 1, sizeof(header), file);
}
}