[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GWMNQGYJ5DSKZXZVZ1CVZ3":3,"skill-same:01M6GWMNQGYJ5DSKZXZVZ1CVZ3":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6GWMNQGYJ5DSKZXZVZ1CVZ3","analyzing-linux-elf-malware",null,"Analyzes malicious Linux ELF (Executable and Linkable Format) binaries including botnets, cryptominers, ransomware, and rootkits targeting Linux servers, containers, and cloud infrastructure. Covers static analysis, dynamic tracing, and reverse engineering of x86_64 and ARM ELF samples. Activates for requests involving Linux malware analysis, ELF binary investigation, Linux server compromise assessment, or container malware analysis.","micsapp\u002Fmicstec-skills","micsapp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F82411001?v=4","01M6GWCFQ6D3PV8EHNY62NN5VW","01M6GWCFVE1PA5HG0DKC7AMFJ3",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"linux","analyzing","analyzing linux elf malware","ELF","malware","reverse-engineering","reverse","targeting","analysis","ransomware","server-malware","malicious","malware analysis","server","tracing","assessment","infrastructure","cybersecurity","static analysis","containers","2026-11-10 10:12:30",false,"---\nname: analyzing-linux-elf-malware\ndescription: >\n  Analyzes malicious Linux ELF (Executable and Linkable Format) binaries including botnets,\n  cryptominers, ransomware, and rootkits targeting Linux servers, containers, and cloud\n  infrastructure. Covers static analysis, dynamic tracing, and reverse engineering of\n  x86_64 and ARM ELF samples. Activates for requests involving Linux malware analysis,\n  ELF binary investigation, Linux server compromise assessment, or container malware analysis.\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags: [malware, Linux, ELF, reverse-engineering, server-malware]\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Analyzing Linux ELF Malware\n\n## When to Use\n\n- A Linux server or container has been compromised and suspicious ELF binaries are found\n- Analyzing Linux botnets (Mirai, Gafgyt, XorDDoS), cryptominers, or ransomware\n- Investigating malware targeting cloud infrastructure, Docker containers, or Kubernetes pods\n- Reverse engineering Linux rootkits and kernel modules\n- Analyzing cross-platform malware compiled for Linux x86_64, ARM, or MIPS architectures\n\n**Do not use** for Windows PE binary analysis; use PEStudio, Ghidra, or IDA for Windows malware.\n\n## Prerequisites\n\n- Ghidra or IDA with Linux ELF support for disassembly and decompilation\n- Linux analysis VM (Ubuntu 22.04 recommended) with development tools installed\n- strace, ltrace, and GDB for dynamic analysis and debugging\n- readelf, objdump, and nm from GNU binutils for static inspection\n- Radare2 for quick binary triage and scripted analysis\n- Docker for isolated container-based malware execution\n\n## Workflow\n\n### Step 1: Identify ELF Binary Properties\n\nExamine the ELF header and basic properties:\n\n```bash\n# File type identification\nfile suspect_binary\n\n# Detailed ELF header analysis\nreadelf -h suspect_binary\n\n# Section headers\nreadelf -S suspect_binary\n\n# Program headers (segments)\nreadelf -l suspect_binary\n\n# Symbol table (if not stripped)\nreadelf -s suspect_binary\nnm suspect_binary 2>\u002Fdev\u002Fnull\n\n# Dynamic linking information\nreadelf -d suspect_binary\nldd suspect_binary 2>\u002Fdev\u002Fnull  # Only on matching architecture!\n\n# Compute hashes\nmd5sum suspect_binary\nsha256sum suspect_binary\n\n# Check for packing\u002FUPX\nupx -t suspect_binary\n```\n\n```python\n# Python-based ELF analysis\nfrom elftools.elf.elffile import ELFFile\nimport hashlib\n\nwith open(\"suspect_binary\", \"rb\") as f:\n    data = f.read()\n    sha256 = hashlib.sha256(data).hexdigest()\n\nwith open(\"suspect_binary\", \"rb\") as f:\n    elf = ELFFile(f)\n\n    print(f\"SHA-256:      {sha256}\")\n    print(f\"Class:        {elf.elfclass}-bit\")\n    print(f\"Endian:       {elf.little_endian and 'Little' or 'Big'}\")\n    print(f\"Machine:      {elf.header.e_machine}\")\n    print(f\"Type:         {elf.header.e_type}\")\n    print(f\"Entry Point:  0x{elf.header.e_entry:X}\")\n\n    # Check if stripped\n    symtab = elf.get_section_by_name('.symtab')\n    print(f\"Stripped:     {'Yes' if symtab is None else 'No'}\")\n\n    # Section entropy analysis\n    import math\n    from collections import Counter\n    for section in elf.iter_sections():\n        data = section.data()\n        if len(data) > 0:\n            entropy = -sum((c\u002Flen(data)) * math.log2(c\u002Flen(data))\n                          for c in Counter(data).values() if c > 0)\n            if entropy > 7.0:\n                print(f\"  [!] High entropy section: {section.name} ({entropy:.2f})\")\n```\n\n### Step 2: Extract Strings and Indicators\n\nSearch for embedded IOCs and functionality clues:\n\n```bash\n# ASCII strings\nstrings suspect_binary > strings_output.txt\n\n# Search for network indicators\ngrep -iE \"(http|https|ftp):\u002F\u002F\" strings_output.txt\ngrep -iE \"([0-9]{1,3}\\.){3}[0-9]{1,3}\" strings_output.txt\ngrep -iE \"[a-zA-Z0-9.-]+\\.(com|net|org|io|ru|cn)\" strings_output.txt\n\n# Search for shell commands\ngrep -iE \"(bash|sh|wget|curl|chmod|\u002Ftmp\u002F|\u002Fdev\u002F)\" strings_output.txt\n\n# Search for crypto mining indicators\ngrep -iE \"(stratum|xmr|monero|pool\\.|mining)\" strings_output.txt\n\n# Search for SSH\u002Fcredential theft\ngrep -iE \"(ssh|authorized_keys|id_rsa|shadow|passwd)\" strings_output.txt\n\n# Search for persistence mechanisms\ngrep -iE \"(crontab|systemd|init\\.d|rc\\.local|ld\\.so\\.preload)\" strings_output.txt\n\n# FLOSS for obfuscated strings (if available)\nfloss suspect_binary\n```\n\n### Step 3: Analyze System Calls and Library Usage\n\nIdentify what system calls and libraries the malware uses:\n\n```bash\n# List imported functions (dynamically linked)\nreadelf -r suspect_binary | grep -E \"socket|connect|exec|fork|open|write|bind|listen\"\n\n# Trace system calls during execution (in isolated VM only)\nstrace -f -e trace=network,process,file -o strace_output.txt .\u002Fsuspect_binary\n\n# Trace library calls\nltrace -f -o ltrace_output.txt .\u002Fsuspect_binary\n\n# Key system calls to watch:\n# Network: socket, connect, bind, listen, accept, sendto, recvfrom\n# Process: fork, execve, clone, kill, ptrace\n# File:    open, read, write, unlink, rename, chmod\n# Persistence: inotify_add_watch (file monitoring)\n```\n\n### Step 4: Dynamic Analysis with GDB\n\nDebug the malware to observe runtime behavior:\n\n```bash\n# Start GDB with the binary\ngdb .\u002Fsuspect_binary\n\n# Set breakpoints on key functions\n(gdb) break main\n(gdb) break socket\n(gdb) break connect\n(gdb) break execve\n(gdb) break fork\n\n# Run and analyze\n(gdb) run\n(gdb) info registers    # View register state\n(gdb) x\u002F20s $rdi        # Examine string argument\n(gdb) bt                # Backtrace\n(gdb) continue\n\n# For stripped binaries, break on entry point\n(gdb) break *0x400580   # Entry point from readelf\n(gdb) run\n\n# Monitor network connections during execution\n# In another terminal:\nss -tlnp  # List listening sockets\nss -tnp   # List established connections\n```\n\n### Step 5: Reverse Engineer with Ghidra\n\nPerform deep code analysis on the ELF binary:\n\n```\nGhidra Analysis for Linux ELF:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n1. Import: File -> Import -> Select ELF binary\n   - Ghidra auto-detects ELF format and architecture\n   - Accept default analysis options\n\n2. Key analysis targets:\n   - main() function (or entry point if stripped)\n   - Socket creation and connection functions\n   - Command dispatch logic (switch\u002Fcase on received data)\n   - Encryption\u002Fencoding routines\n   - Persistence installation code\n   - Self-propagation\u002Fscanning functions\n\n3. For Mirai-like botnets, look for:\n   - Credential list for brute-forcing (telnet\u002FSSH)\n   - Attack module selection (UDP flood, SYN flood, ACK flood)\n   - Scanner module (port scanning for vulnerable devices)\n   - Killer module (killing competing botnets)\n\n4. For cryptominers, look for:\n   - Mining pool connection (stratum protocol)\n   - Wallet address strings\n   - CPU\u002FGPU utilization functions\n   - Process hiding techniques\n```\n\n### Step 6: Analyze Linux-Specific Persistence\n\nCheck for persistence mechanisms:\n\n```bash\n# Check for LD_PRELOAD rootkit\nstrings suspect_binary | grep \"ld.so.preload\"\n# Malware writing to \u002Fetc\u002Fld.so.preload can hook all dynamic library calls\n\n# Check for crontab persistence\nstrings suspect_binary | grep -i \"cron\"\n\n# Check for systemd service creation\nstrings suspect_binary | grep -iE \"systemd|\\.service|systemctl\"\n\n# Check for init script creation\nstrings suspect_binary | grep -iE \"init\\.d|rc\\.local|update-rc\"\n\n# Check for SSH key injection\nstrings suspect_binary | grep -i \"authorized_keys\"\n\n# Check for kernel module (rootkit) loading\nstrings suspect_binary | grep -iE \"insmod|modprobe|init_module\"\n\n# Check for process hiding\nstrings suspect_binary | grep -iE \"proc|readdir|getdents\"\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **ELF (Executable and Linkable Format)** | Standard binary format for Linux executables, shared libraries, and core dumps containing headers, sections, and segments |\n| **Stripped Binary** | ELF binary with debug symbols removed, making reverse engineering more difficult as function names are lost |\n| **LD_PRELOAD** | Linux environment variable specifying shared libraries to load before all others; abused by rootkits to intercept system library calls |\n| **strace** | Linux system call tracer that logs all system calls and signals made by a process, revealing file, network, and process operations |\n| **GOT\u002FPLT** | Global Offset Table and Procedure Linkage Table; ELF structures for dynamic linking that can be hijacked for function hooking |\n| **Statically Linked** | Binary compiled with all library code included; common in IoT malware to run on systems without matching shared libraries |\n| **Mirai** | Prolific Linux botnet targeting IoT devices via telnet brute-force; source code leaked, leading to many variants |\n\n## Tools & Systems\n\n- **Ghidra**: NSA reverse engineering tool with full ELF support for x86, x86_64, ARM, MIPS, and other Linux architectures\n- **Radare2**: Open-source reverse engineering framework with command-line interface for quick binary analysis and scripting\n- **strace**: Linux system call tracing tool for observing binary behavior including file, network, and process operations\n- **GDB**: GNU Debugger for setting breakpoints, examining memory, and stepping through Linux binary execution\n- **pyelftools**: Python library for parsing ELF files programmatically for automated analysis pipelines\n\n## Common Scenarios\n\n### Scenario: Analyzing a Cryptominer Found on a Compromised Linux Server\n\n**Context**: A cloud server shows 100% CPU usage. Investigation reveals an unknown binary running from \u002Ftmp with a suspicious name. The binary needs analysis to confirm it is a cryptominer and identify the attacker's wallet and pool.\n\n**Approach**:\n1. Copy the binary to an analysis VM and compute SHA-256 hash\n2. Run `file` and `readelf` to identify architecture and linking type\n3. Extract strings and search for mining pool addresses (stratum+tcp:\u002F\u002F) and wallet addresses\n4. Run with strace in a sandbox to observe network connections (mining pool connection)\n5. Import into Ghidra to identify the mining algorithm and configuration extraction\n6. Check for persistence mechanisms (crontab, systemd service, SSH keys)\n7. Document all IOCs including pool address, wallet, C2 for updates, and persistence artifacts\n\n**Pitfalls**:\n- Running `ldd` on malware outside a sandbox (ldd can execute code in the binary)\n- Not checking for ARM\u002FMIPS architecture before attempting x86_64 execution\n- Missing companion scripts (.sh files) that may handle persistence and cleanup\n- Ignoring the initial access vector (how the miner was deployed: SSH brute force, web exploit, container escape)\n\n## Output Format\n\n```\nLINUX ELF MALWARE ANALYSIS REPORT\n====================================\nFile:             \u002Ftmp\u002F.X11-unix\u002F.rsync\nSHA-256:          e3b0c44298fc1c149afbf4c8996fb924...\nType:             ELF 64-bit LSB executable, x86-64\nLinking:          Statically linked (all libraries embedded)\nStripped:         Yes\nSize:             2,847,232 bytes\nPacker:           UPX 3.96 (unpacked for analysis)\n\nCLASSIFICATION\nFamily:           XMRig Cryptominer (modified)\nVariant:          Custom build with C2 update mechanism\n\nFUNCTIONALITY\n[*] XMR (Monero) mining via RandomX algorithm\n[*] Stratum pool connection for work submission\n[*] C2 check-in for configuration updates\n[*] Process name masquerading (argv[0] = \"[kworker\u002F0:0]\")\n[*] Competitor process killing (kills other miners)\n[*] SSH key injection for re-access\n\nNETWORK INDICATORS\nMining Pool:      stratum+tcp:\u002F\u002Fpool.minexmr[.]com:4444\nC2 Server:        hxxp:\u002F\u002Fupdate.malicious[.]com\u002Fconfig\nWallet:           49jZ5Q3b...Monero_Wallet_Address...\n\nPERSISTENCE\n[1] Crontab entry: *\u002F5 * * * * \u002Ftmp\u002F.X11-unix\u002F.rsync\n[2] SSH key added to \u002Froot\u002F.ssh\u002Fauthorized_keys\n[3] Systemd service: \u002Fetc\u002Fsystemd\u002Fsystem\u002Frsync-daemon.service\n[4] Modified \u002Fetc\u002Fld.so.preload for process hiding\n\nPROCESS HIDING\nLD_PRELOAD:       \u002Fusr\u002Flib\u002F.libsystem.so\nHook:             readdir() to hide \u002Ftmp\u002F.X11-unix\u002F.rsync from ls\nHook:             fopen() to hide from \u002Fproc\u002F*\u002Fmaps reading\n```\n","# Analyzing Linux ELF Malware\n\n## When to Use\n\n- A Linux server or container has been compromised and suspicious ELF binaries are found\n- Analyzing Linux botnets (Mirai, Gafgyt, XorDDoS), cryptominers, or ransomware\n- Investigating malware targeting cloud infrastructure, Docker containers, or Kubernetes pods\n- Reverse engineering Linux rootkits and kernel modules\n- Analyzing cross-platform malware compiled for Linux x86_64, ARM, or MIPS architectures\n\n**Do not use** for Windows PE binary analysis; use PEStudio, Ghidra, or IDA for Windows malware.\n\n## Prerequisites\n\n- Ghidra or IDA with Linux ELF support for disassembly and decompilation\n- Linux analysis VM (Ubuntu 22.04 recommended) with development tools installed\n- strace, ltrace, and GDB for dynamic analysis and debugging\n- readelf, objdump, and nm from GNU binutils for static inspection\n- Radare2 for quick binary triage and scripted analysis\n- Docker for isolated container-based malware execution\n\n## Workflow\n\n### Step 1: Identify ELF Binary Properties\n\nExamine the ELF header and basic properties:\n\n```bash\n# File type identification\nfile suspect_binary\n\n# Detailed ELF header analysis\nreadelf -h suspect_binary\n\n# Section headers\nreadelf -S suspect_binary\n\n# Program headers (segments)\nreadelf -l suspect_binary\n\n# Symbol table (if not stripped)\nreadelf -s suspect_binary\nnm suspect_binary 2>\u002Fdev\u002Fnull\n\n# Dynamic linking information\nreadelf -d suspect_binary\nldd suspect_binary 2>\u002Fdev\u002Fnull  # Only on matching architecture!\n\n# Compute hashes\nmd5sum suspect_binary\nsha256sum suspect_binary\n\n# Check for packing\u002FUPX\nupx -t suspect_binary\n```\n\n```python\n# Python-based ELF analysis\nfrom elftools.elf.elffile import ELFFile\nimport hashlib\n\nwith open(\"suspect_binary\", \"rb\") as f:\n    data = f.read()\n    sha256 = hashlib.sha256(data).hexdigest()\n\nwith open(\"suspect_binary\", \"rb\") as f:\n    elf = ELFFile(f)\n\n    print(f\"SHA-256:      {sha256}\")\n    print(f\"Class:        {elf.elfclass}-bit\")\n    print(f\"Endian:       {elf.little_endian and 'Little' or 'Big'}\")\n    print(f\"Machine:      {elf.header.e_machine}\")\n    print(f\"Type:         {elf.header.e_type}\")\n    print(f\"Entry Point:  0x{elf.header.e_entry:X}\")\n\n    # Check if stripped\n    symtab = elf.get_section_by_name('.symtab')\n    print(f\"Stripped:     {'Yes' if symtab is None else 'No'}\")\n\n    # Section entropy analysis\n    import math\n    from collections import Counter\n    for section in elf.iter_sections():\n        data = section.data()\n        if len(data) > 0:\n            entropy = -sum((c\u002Flen(data)) * math.log2(c\u002Flen(data))\n                          for c in Counter(data).values() if c > 0)\n            if entropy > 7.0:\n                print(f\"  [!] High entropy section: {section.name} ({entropy:.2f})\")\n```\n\n### Step 2: Extract Strings and Indicators\n\nSearch for embedded IOCs and functionality clues:\n\n```bash\n# ASCII strings\nstrings suspect_binary > strings_output.txt\n\n# Search for network indicators\ngrep -iE \"(http|https|ftp):\u002F\u002F\" strings_output.txt\ngrep -iE \"([0-9]{1,3}\\.){3}[0-9]{1,3}\" strings_output.txt\ngrep -iE \"[a-zA-Z0-9.-]+\\.(com|net|org|io|ru|cn)\" strings_output.txt\n\n# Search for shell commands\ngrep -iE \"(bash|sh|wget|curl|chmod|\u002Ftmp\u002F|\u002Fdev\u002F)\" strings_output.txt\n\n# Search for crypto mining indicators\ngrep -iE \"(stratum|xmr|monero|pool\\.|mining)\" strings_output.txt\n\n# Search for SSH\u002Fcredential theft\ngrep -iE \"(ssh|authorized_keys|id_rsa|shadow|passwd)\" strings_output.txt\n\n# Search for persistence mechanisms\ngrep -iE \"(crontab|systemd|init\\.d|rc\\.local|ld\\.so\\.preload)\" strings_output.txt\n\n# FLOSS for obfuscated strings (if available)\nfloss suspect_binary\n```\n\n### Step 3: Analyze System Calls and Library Usage\n\nIdentify what system calls and libraries the malware uses:\n\n```bash\n# List imported functions (dynamically linked)\nreadelf -r suspect_binary | grep -E \"socket|connect|exec|fork|open|write|bind|listen\"\n\n# Trace system calls during execution (in isolated VM only)\nstrace -f -e trace=network,process,file -o strace_output.txt .\u002Fsuspect_binary\n\n# Trace library calls\nltrace -f -o ltrace_output.txt .\u002Fsuspect_binary\n\n# Key system calls to watch:\n# Network: socket, connect, bind, listen, accept, sendto, recvfrom\n# Process: fork, execve, clone, kill, ptrace\n# File:    open, read, write, unlink, rename, chmod\n# Persistence: inotify_add_watch (file monitoring)\n```\n\n### Step 4: Dynamic Analysis with GDB\n\nDebug the malware to observe runtime behavior:\n\n```bash\n# Start GDB with the binary\ngdb .\u002Fsuspect_binary\n\n# Set breakpoints on key functions\n(gdb) break main\n(gdb) break socket\n(gdb) break connect\n(gdb) break execve\n(gdb) break fork\n\n# Run and analyze\n(gdb) run\n(gdb) info registers    # View register state\n(gdb) x\u002F20s $rdi        # Examine string argument\n(gdb) bt                # Backtrace\n(gdb) continue\n\n# For stripped binaries, break on entry point\n(gdb) break *0x400580   # Entry point from readelf\n(gdb) run\n\n# Monitor network connections during execution\n# In another terminal:\nss -tlnp  # List listening sockets\nss -tnp   # List established connections\n```\n\n### Step 5: Reverse Engineer with Ghidra\n\nPerform deep code analysis on the ELF binary:\n\n```\nGhidra Analysis for Linux ELF:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n1. Import: File -> Import -> Select ELF binary\n   - Ghidra auto-detects ELF format and architecture\n   - Accept default analysis options\n\n2. Key analysis targets:\n   - main() function (or entry point if stripped)\n   - Socket creation and connection functions\n   - Command dispatch logic (switch\u002Fcase on received data)\n   - Encryption\u002Fencoding routines\n   - Persistence installation code\n   - Self-propagation\u002Fscanning functions\n\n3. For Mirai-like botnets, look for:\n   - Credential list for brute-forcing (telnet\u002FSSH)\n   - Attack module selection (UDP flood, SYN flood, ACK flood)\n   - Scanner module (port scanning for vulnerable devices)\n   - Killer module (killing competing botnets)\n\n4. For cryptominers, look for:\n   - Mining pool connection (stratum protocol)\n   - Wallet address strings\n   - CPU\u002FGPU utilization functions\n   - Process hiding techniques\n```\n\n### Step 6: Analyze Linux-Specific Persistence\n\nCheck for persistence mechanisms:\n\n```bash\n# Check for LD_PRELOAD rootkit\nstrings suspect_binary | grep \"ld.so.preload\"\n# Malware writing to \u002Fetc\u002Fld.so.preload can hook all dynamic library calls\n\n# Check for crontab persistence\nstrings suspect_binary | grep -i \"cron\"\n\n# Check for systemd service creation\nstrings suspect_binary | grep -iE \"systemd|\\.service|systemctl\"\n\n# Check for init script creation\nstrings suspect_binary | grep -iE \"init\\.d|rc\\.local|update-rc\"\n\n# Check for SSH key injection\nstrings suspect_binary | grep -i \"authorized_keys\"\n\n# Check for kernel module (rootkit) loading\nstrings suspect_binary | grep -iE \"insmod|modprobe|init_module\"\n\n# Check for process hiding\nstrings suspect_binary | grep -iE \"proc|readdir|getdents\"\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **ELF (Executable and Linkable Format)** | Standard binary format for Linux executables, shared libraries, and core dumps containing headers, sections, and segments |\n| **Stripped Binary** | ELF binary with debug symbols removed, making reverse engineering more difficult as function names are lost |\n| **LD_PRELOAD** | Linux environment variable specifying shared libraries to load before all others; abused by rootkits to intercept system library calls |\n| **strace** | Linux system call tracer that logs all system calls and signals made by a process, revealing file, network, and process operations |\n| **GOT\u002FPLT** | Global Offset Table and Procedure Linkage Table; ELF structures for dynamic linking that can be hijacked for function hooking |\n| **Statically Linked** | Binary compiled with all library code included; common in IoT malware to run on systems without matching shared libraries |\n| **Mirai** | Prolific Linux botnet targeting IoT devices via telnet brute-force; source code leaked, leading to many variants |\n\n## Tools & Systems\n\n- **Ghidra**: NSA reverse engineering tool with full ELF support for x86, x86_64, ARM, MIPS, and other Linux architectures\n- **Radare2**: Open-source reverse engineering framework with command-line interface for quick binary analysis and scripting\n- **strace**: Linux system call tracing tool for observing binary behavior including file, network, and process operations\n- **GDB**: GNU Debugger for setting breakpoints, examining memory, and stepping through Linux binary execution\n- **pyelftools**: Python library for parsing ELF files programmatically for automated analysis pipelines\n\n## Common Scenarios\n\n### Scenario: Analyzing a Cryptominer Found on a Compromised Linux Server\n\n**Context**: A cloud server shows 100% CPU usage. Investigation reveals an unknown binary running from \u002Ftmp with a suspicious name. The binary needs analysis to confirm it is a cryptominer and identify the attacker's wallet and pool.\n\n**Approach**:\n1. Copy the binary to an analysis VM and compute SHA-256 hash\n2. Run `file` and `readelf` to identify architecture and linking type\n3. Extract strings and search for mining pool addresses (stratum+tcp:\u002F\u002F) and wallet addresses\n4. Run with strace in a sandbox to observe network connections (mining pool connection)\n5. Import into Ghidra to identify the mining algorithm and configuration extraction\n6. Check for persistence mechanisms (crontab, systemd service, SSH keys)\n7. Document all IOCs including pool address, wallet, C2 for updates, and persistence artifacts\n\n**Pitfalls**:\n- Running `ldd` on malware outside a sandbox (ldd can execute code in the binary)\n- Not checking for ARM\u002FMIPS architecture before attempting x86_64 execution\n- Missing companion scripts (.sh files) that may handle persistence and cleanup\n- Ignoring the initial access vector (how the miner was deployed: SSH brute force, web exploit, container escape)\n\n## Output Format\n\n```\nLINUX ELF MALWARE ANALYSIS REPORT\n====================================\nFile:             \u002Ftmp\u002F.X11-unix\u002F.rsync\nSHA-256:          e3b0c44298fc1c149afbf4c8996fb924...\nType:             ELF 64-bit LSB executable, x86-64\nLinking:          Statically linked (all libraries embedded)\nStripped:         Yes\nSize:             2,847,232 bytes\nPacker:           UPX 3.96 (unpacked for analysis)\n\nCLASSIFICATION\nFamily:           XMRig Cryptominer (modified)\nVariant:          Custom build with C2 update mechanism\n\nFUNCTIONALITY\n[*] XMR (Monero) mining via RandomX algorithm\n[*] Stratum pool connection for work submission\n[*] C2 check-in for configuration updates\n[*] Process name masquerading (argv[0] = \"[kworker\u002F0:0]\")\n[*] Competitor process killing (kills other miners)\n[*] SSH key injection for re-access\n\nNETWORK INDICATORS\nMining Pool:      stratum+tcp:\u002F\u002Fpool.minexmr[.]com:4444\nC2 Server:        hxxp:\u002F\u002Fupdate.malicious[.]com\u002Fconfig\nWallet:           49jZ5Q3b...Monero_Wallet_Address...\n\nPERSISTENCE\n[1] Crontab entry: *\u002F5 * * * * \u002Ftmp\u002F.X11-unix\u002F.rsync\n[2] SSH key added to \u002Froot\u002F.ssh\u002Fauthorized_keys\n[3] Systemd service: \u002Fetc\u002Fsystemd\u002Fsystem\u002Frsync-daemon.service\n[4] Modified \u002Fetc\u002Fld.so.preload for process hiding\n\nPROCESS HIDING\nLD_PRELOAD:       \u002Fusr\u002Flib\u002F.libsystem.so\nHook:             readdir() to hide \u002Ftmp\u002F.X11-unix\u002F.rsync from ls\nHook:             fopen() to hide from \u002Fproc\u002F*\u002Fmaps reading\n```\n",{"name":5,"tags":43,"author":45,"domain":35,"license":14,"version":46,"subdomain":47,"description":48},[22,44,21,23,28],"Linux","mahipal","1.0.0","malware-analysis","Analyzes malicious Linux ELF (Executable and Linkable Format) binaries including botnets, cryptominers, ransomware, and rootkits targeting Linux servers, containers, and cloud infrastructure. Covers static analysis, dynamic tracing, and reverse engineering of x86_64 and ARM ELF samples. Activates for requests involving Linux malware analysis, ELF binary investigation, Linux server compromise assessment, or container malware analysis.\n","master","3f5d983eb4ef375b749adcd6b07ec03bd82ae8a8","_universal\u002Fcybersecurity-skills\u002Fskills\u002Fanalyzing-linux-elf-malware",0,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills","https:\u002F\u002Fgithub.com\u002Fmicsapp","2026-03-20 11:24:18",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add micsapp\u002Fmicstec-skills --skill analyzing-linux-elf-malware",{"tool":62,"command":63},"bunx","bunx skills add micsapp\u002Fmicstec-skills --skill analyzing-linux-elf-malware",{"tool":65,"command":66},"pnpm","pnpm dlx skills add micsapp\u002Fmicstec-skills --skill analyzing-linux-elf-malware","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002FSKILL.md",true,[70,75,81],{"path":71,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002FLICENSE",{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fapi-reference.md","REFERENCE","参考文档",3126,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002Freferences\u002Fapi-reference.md",{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"scripts\u002Fagent.py","SCRIPT","脚本",8794,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002Fscripts\u002Fagent.py",[88,116,137,157,175,200],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":92,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":38},"01M6HBTJ02FXBFG9NYEHHYAP52","azure-apim-architecture","Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.","MIT","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fazure-apim-architecture\u002FSKILL.md",[],[96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],"architecture","azure","azure apim architecture","component","authentication","gateway","topology","Optimization","network","api","team","environment","multi-environment","workspaces","instances","selection","strategies","azure api management","mode","for",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":92,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":38},"01M6HBT7J4H082JEEA670B3EQ9","apiops-deployment","Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep\u002FTerraform), CI\u002FCD pipelines (GitHub Actions\u002FAzure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapiops-deployment\u002FSKILL.md",[],[123,124,125,126,97,34,127,128,129,130,131,132,105,106,112,133,134,113,135,136],"deployment","apiops deployment","workflows","azure devops","code","infrastructure as code","actions","ci","github actions","github-actions","as","guides","CI\u002FCD","implementing",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":92,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":38},"01M6HBT2HEA23THNE9E00GYQBE","apim-policy-authoring","Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request\u002Fresponse processing logic.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapim-policy-authoring\u002FSKILL.md",[],[144,145,146,147,97,100,105,106,148,149,150,151,152,153,154,113,155,156,136,115],"policy","authoring","apim policy authoring","security","access","use","ready","api security","Access Control","error","processing","cors configuration","production-ready",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":92,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":38},"01M6HBSY65SB29J9WE9KYD0K6T","api-security-review","Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapi-security-review\u002FSKILL.md",[],[164,147,165,105,151,166,97,123,167,168,169,170,106,171,113,172,173,174,114,115],"review","security review","api security review","benchmark","verification","owasp","owasp-api","alignment","azure security","reviews","top",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":92,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":38},"01M6HBSRW4PDFE6K4F8JYPZQ05","jira-cli","Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fjira-cli\u002FSKILL.md",[],[182,183,184,125,185,186,187,188,105,189,190,191,192,193,194,195,196,197,198,199],"cli","jira","jira cli","init","tasks","create","issues","common","work","command","edit","list","view","project","project work","token","line","sprints",{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":92,"licenseFileUrl":6,"sourceHtmlUrl":204,"categories":205,"keywords":206,"publishedAt":38},"01M6HBSNS3JHMW603G47TWE31H","calculator","Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fcalculator\u002FSKILL.md",[],[202,207,208,209,210,211,212,149,213,214],"npm","js","calculate","node","math","user","compute","errors"]