[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B4QQHSHA6EDF94F3QZ2KYX":3,"skill-same:01M7B4QQHSHA6EDF94F3QZ2KYX":102},{"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":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":66,"commitSha":67,"skillDirectory":68,"forksCount":13,"repositoryHtmlUrl":69,"repositoryHomepageUrl":6,"ownerHtmlUrl":70,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":71,"install":72,"resources":85},"01M7B4QQHSHA6EDF94F3QZ2KYX","analyzing-linux-elf-malware",null,"Analyze malicious Linux ELF binaries — botnets, cryptominers, ransomware, and rootkits targeting Linux servers, containers, and cloud infrastructure — through static analysis, dynamic tracing, and reverse engineering of x86_64 and ARM samples. Use when investigating Linux malware, triaging a suspicious ELF binary, assessing a compromised Linux server, or analyzing container-targeted malware.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: analyzing-linux-elf-malware\ndescription: 'Analyze malicious Linux ELF binaries — botnets, cryptominers, ransomware,\n  and rootkits targeting Linux servers, containers, and cloud infrastructure — through\n  static analysis, dynamic tracing, and reverse engineering of x86_64 and ARM samples.\n  Use when investigating Linux malware, triaging a suspicious ELF binary, assessing\n  a compromised Linux server, or analyzing container-targeted malware.\n\n  '\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags:\n- malware\n- Linux\n- ELF\n- reverse-engineering\n- server-malware\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.AE-02\n- RS.AN-03\n- ID.RA-01\n- DE.CM-01\nmitre_attack:\n- T1027\n- T1059.004\n- T1620\n- T1574.006\nmitre_f3:\n  version: '1.1'\n  tactics:\n  - positioning\n  - monetization\n  - reconnaissance\n  techniques:\n  - id: T1219\n    name: Remote Access Tools\n    tactic: positioning\n    source: attack\n  - id: T1555\n    name: Credentials from Password Stores\n    tactic: reconnaissance\n    source: attack\n  - id: F1018\n    name: Convert to Cryptocurrency\n    tactic: monetization\n    source: f3\n  - id: F1047\n    name: Transfer of funds\n    tactic: monetization\n    source: f3\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":24,"author":30,"domain":31,"license":14,"version":32,"mitre_f3":33,"nist_csf":54,"subdomain":59,"description":60,"mitre_attack":61},[25,26,27,28,29],"malware","Linux","ELF","reverse-engineering","server-malware","mahipal","cybersecurity","1.0.0",{"tactics":34,"version":38,"techniques":39},[35,36,37],"positioning","monetization","reconnaissance","1.1",[40,44,47,51],{"id":41,"name":42,"source":43,"tactic":35},"T1219","Remote Access Tools","attack",{"id":45,"name":46,"source":43,"tactic":37},"T1555","Credentials from Password Stores",{"id":48,"name":49,"source":50,"tactic":36},"F1018","Convert to Cryptocurrency","f3",{"id":52,"name":53,"source":50,"tactic":36},"F1047","Transfer of funds",[55,56,57,58],"DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01","malware-analysis","Analyze malicious Linux ELF binaries — botnets, cryptominers, ransomware, and rootkits targeting Linux servers, containers, and cloud infrastructure — through static analysis, dynamic tracing, and reverse engineering of x86_64 and ARM samples. Use when investigating Linux malware, triaging a suspicious ELF binary, assessing a compromised Linux server, or analyzing container-targeted malware.\n",[62,63,64,65],"T1027","T1059.004","T1620","T1574.006","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-linux-elf-malware","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill analyzing-linux-elf-malware",{"tool":78,"command":79},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill analyzing-linux-elf-malware",{"tool":81,"command":82},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill analyzing-linux-elf-malware","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002FSKILL.md",true,[86,90,96],{"path":87,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":91,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fapi-reference.md","REFERENCE","参考文档",3126,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002Freferences\u002Fapi-reference.md",{"path":97,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":100,"sourceHtmlUrl":101},"scripts\u002Fagent.py","SCRIPT","脚本",8794,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fanalyzing-linux-elf-malware\u002Fscripts\u002Fagent.py",[103,111,118,125,132,139],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":107,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]