aboutsummaryrefslogtreecommitdiff
path: root/src/proone-test_proto.c
AgeCommit message (Collapse)Author
2021-08-31MIT LicenseDavid Timber
2021-08-16Protocol change: change hostinfo uptime ...David Timber
* Change hostinfo parent_uptime and child_uptime to uint32_t (138 years is a long time)
2021-08-09Protocol and build system change ...David Timber
* Use autoheader * Add --enable-minmem * Add OS code. Bin archive and protocol changed accordingly * Add instance flags in hostinfo frame. Bitfield util added for this * Add org_id in hostinfo for lineage record * SQL schema change: store integer value of hostinfo arch and os * Remove config.c * prne_index_nybin() now sets errno * Instance ids are now preserved for lineage record * Proone: remove arguments after init * Fix bug in prne_htbt_ser_bin_meta(): alloc_len is not checked
2021-08-06htbt and protocol overhaul ...David Timber
* htbt overhaul * Abandon async slv io. slv io is now synchronous * htbt_do_cmd() * w/ detach flag: set up closed pipes for stdio * Create new pg for child and kill the pg on error * Do waitpid() w/ timeout * Wait for child spawn w/ timeout * Always reap child * Add fork cb for clean up code(to unmask signals, deinit libs) * Protocol overhaul * Use stdio frames to transfer binary data for PRNE_HTBT_OP_UP_BIN and PRNE_HTBT_OP_RUN_BIN op * bin_meta bin_size -> alloc_len. This is an optional field now * Fix protocol * detach flag of cmd_head not being (de)serialised * cmd_head (d)ser funcs not setting actual correctly * Proone: call setsid() on daemonisation * Fix compilation error caused by missing <errno.h>
2021-07-22Impl PRNE_HTBT_OP_RCB ...David Timber
* Parameterize prne_start_bin_rcb() args * Change value of PRNE_ARCH_NONE to 0 to use it over the wire (problem arises deserialising) * tostr() and fstr() functions set errno to EINVAL * Run bne without binary archive to support same-arch infection
2021-07-21Impl proone-htbtclient upbin, bug fixes ...David Timber
* Add prne_start_bin_rcb_compat() * PRNE_HTBT_OP_NY_BIN -> PRNE_HTBT_OP_UP_BIN. "nybin" is now the name of the file format * htbt * Fix broken hover redirection (HTBT_LMK_HOVER removed) * HTBT_MAIN_REQ_Q_SIZE * Impl PRNE_HTBT_OP_NOOP response * Fix PRNE_HTBT_OP_SOLICIT is always sent with id 1 * proone * Fix bugs caused by not scrubbing the shared global memory * Fix exec() fail when upbin request with args * Removed do_recombination() as it's not efficient. Now the authoritive end has to do the recombination * PRNE_HTBT_OP_RCB, PRNE_HTBT_STATUS_SUB reserved for future impl
2021-07-14Impl proone-htbtclient, htbt bugfixes ...David Timber
* htbt * Fix stdout-stderr round-robin sending algo in htbt_relay_child() * Fix logic error and crash bug in htbt_slv_srv_bin() * Impl proone-htbtclient runcmd command * Change signature of prne_htbt_set_cmd()
2021-07-12Impl proone-htbtclient, fix htbt ...David Timber
* Fix bug where htbt slv ctx loops when the connection stays on. This bug has not been found earlier because the test connections shutdown write channel * Fix bug where errno is not properly set when htbt_main_do_connect() fails * Add test for protocol enums * proone-htbtclient: impl hover command
2020-09-28The 80 column rule ...David Timber
* Remove prne_rnd_anum_str()
2020-09-07* Impl: proone-packDavid Timber
* Impl: host_cred (base64)
2020-09-04* Revision htbt_host_cred formatDavid Timber
* Rewrite proto_test accordingly
2020-08-29* _POSIX_C_SOURCE=199506LDavid Timber
* Add proone-htbthost * Add prne_iobuf, use it in resolv, htbt * memzero() -> prne_memzero() now as a function * Add prne_mbedtls_pth_handle() * Protocol changes * Remove prne_unint_*() * Add src/proone_conf.skel
2020-08-21Protocol change ...David Timber
* Add series of macros for protocol: prne_getmsbN() and prne_recmb_msgN() * Bugfix: prne_nstreq() * Protocol changes * prne_htbt_host_info.rerun_cnt -> prne_htbt_host_info.crash_cnt * prne_htbt_host_info.host_cred_len: range 0 - 255 * prne_htbt_host_info.host_cred is now base64 string * prne_htbt_bin_meta.args_len: 16bit to 12bit * Rest reserved bits * And PRNE_HTBT_ARG_MEM_MAX is set to 4095
2020-08-20Progress ...David Timber
* 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
2020-08-10Changes for xcomp ...David Timber
* Add 'pthsem' dependency * Remove m68k, spc arch * Add proone-stress, proone-arch-test
2020-03-03htbt protocol prototype ...David Timber
* 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