[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74MZKRW14SZYG10FEZWM95D":3,"skill-same:01M74MZKRW14SZYG10FEZWM95D":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":36,"commitSha":37,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":38,"repositoryHomepageUrl":6,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":6,"updatedAt":41,"install":42,"resources":55},"01M74MZKRW14SZYG10FEZWM95D","analyzing-linux-system-artifacts",null,"Examine Linux system artifacts including auth logs, cron jobs, shell history, and system configuration to uncover evidence of compromise or unauthorized activity.","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-linux-system-artifacts\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-linux-system-artifacts\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: analyzing-linux-system-artifacts\ndescription: Examine Linux system artifacts including auth logs, cron jobs, shell history, and system configuration to uncover evidence of compromise or unauthorized activity.\ndomain: cybersecurity\nsubdomain: digital-forensics\ntags: [forensics, linux-forensics, system-artifacts, log-analysis, persistence-detection, incident-investigation]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Analyzing Linux System Artifacts\n\n## When to Use\n- When investigating a compromised Linux server or workstation\n- For identifying persistence mechanisms (cron, systemd, SSH keys)\n- When tracing user activity through shell history and authentication logs\n- During incident response to determine the scope of a Linux-based breach\n- For detecting rootkits, backdoors, and unauthorized modifications\n\n## Prerequisites\n- Forensic image or live access to the Linux system (read-only)\n- Understanding of Linux file system hierarchy (FHS)\n- Knowledge of common Linux logging locations (\u002Fvar\u002Flog\u002F)\n- Tools: chkrootkit, rkhunter, AIDE, auditd logs\n- Familiarity with systemd, cron, and PAM configurations\n- Root access for complete artifact collection\n\n## Workflow\n\n### Step 1: Mount and Collect System Artifacts\n\n```bash\n# Mount forensic image read-only\nmount -o ro,loop,offset=$((2048*512)) \u002Fcases\u002Fcase-2024-001\u002Fimages\u002Flinux_evidence.dd \u002Fmnt\u002Fevidence\n\n# Create collection directories\nmkdir -p \u002Fcases\u002Fcase-2024-001\u002Flinux\u002F{logs,config,users,persistence,network}\n\n# Collect authentication logs\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fauth.log* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fsecure* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fsyslog* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fkern.log* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Faudit\u002Faudit.log* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fwtmp \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fbtmp \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Flastlog \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Ffaillog \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\n\n# Collect user artifacts\nfor user_dir in \u002Fmnt\u002Fevidence\u002Fhome\u002F*\u002F; do\n    username=$(basename \"$user_dir\")\n    mkdir -p \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\n    cp \"$user_dir\"\u002F.bash_history \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.zsh_history \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp -r \"$user_dir\"\u002F.ssh\u002F \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.bashrc \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.profile \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.viminfo \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.wget-hsts \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.python_history \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\ndone\n\n# Collect root user artifacts\ncp \u002Fmnt\u002Fevidence\u002Froot\u002F.bash_history \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002Froot\u002F 2>\u002Fdev\u002Fnull\ncp -r \u002Fmnt\u002Fevidence\u002Froot\u002F.ssh\u002F \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002Froot\u002F 2>\u002Fdev\u002Fnull\n\n# Collect system configuration\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fpasswd \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fshadow \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fgroup \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fsudoers \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp -r \u002Fmnt\u002Fevidence\u002Fetc\u002Fsudoers.d\u002F \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fhosts \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fresolv.conf \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp -r \u002Fmnt\u002Fevidence\u002Fetc\u002Fssh\u002F \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\n```\n\n### Step 2: Analyze User Accounts and Authentication\n\n```bash\n# Analyze user accounts for anomalies\npython3 \u003C\u003C 'PYEOF'\nprint(\"=== USER ACCOUNT ANALYSIS ===\\n\")\n\n# Parse \u002Fetc\u002Fpasswd\nwith open('\u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002Fpasswd') as f:\n    for line in f:\n        parts = line.strip().split(':')\n        if len(parts) >= 7:\n            username, _, uid, gid, comment, home, shell = parts[0], parts[1], int(parts[2]), int(parts[3]), parts[4], parts[5], parts[6]\n\n            # Flag accounts with UID 0 (root equivalent)\n            if uid == 0 and username != 'root':\n                print(f\"  ALERT: UID 0 account: {username} (shell: {shell})\")\n\n            # Flag accounts with login shells that shouldn't have them\n            if shell not in ('\u002Fbin\u002Ffalse', '\u002Fusr\u002Fsbin\u002Fnologin', '\u002Fbin\u002Fsync') and uid >= 1000:\n                print(f\"  User: {username} (UID:{uid}, Shell:{shell}, Home:{home})\")\n\n            # Flag system accounts with login shells\n            if uid \u003C 1000 and uid > 0 and shell in ('\u002Fbin\u002Fbash', '\u002Fbin\u002Fsh', '\u002Fbin\u002Fzsh'):\n                print(f\"  WARNING: System account with shell: {username} (UID:{uid}, Shell:{shell})\")\n\n# Parse \u002Fetc\u002Fshadow for account status\nprint(\"\\n=== PASSWORD STATUS ===\")\nwith open('\u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002Fshadow') as f:\n    for line in f:\n        parts = line.strip().split(':')\n        if len(parts) >= 3:\n            username = parts[0]\n            pwd_hash = parts[1]\n            last_change = parts[2]\n\n            if pwd_hash and pwd_hash not in ('*', '!', '!!', ''):\n                hash_type = 'Unknown'\n                if pwd_hash.startswith('$6$'): hash_type = 'SHA-512'\n                elif pwd_hash.startswith('$5$'): hash_type = 'SHA-256'\n                elif pwd_hash.startswith('$y$'): hash_type = 'yescrypt'\n                elif pwd_hash.startswith('$1$'): hash_type = 'MD5 (WEAK)'\n                print(f\"  {username}: {hash_type} hash, last changed: day {last_change}\")\nPYEOF\n\n# Analyze login history\nlast -f \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002Fwtmp > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Flogin_history.txt\nlastb -f \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002Fbtmp > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Ffailed_logins.txt 2>\u002Fdev\u002Fnull\n```\n\n### Step 3: Examine Persistence Mechanisms\n\n```bash\n# Check cron jobs for all users\necho \"=== CRON JOBS ===\" > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n\n# System cron\nfor cronfile in \u002Fmnt\u002Fevidence\u002Fetc\u002Fcrontab \u002Fmnt\u002Fevidence\u002Fetc\u002Fcron.d\u002F*; do\n    echo \"--- $cronfile ---\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n    cat \"$cronfile\" 2>\u002Fdev\u002Fnull >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n    echo \"\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\ndone\n\n# User cron tabs\nfor cronfile in \u002Fmnt\u002Fevidence\u002Fvar\u002Fspool\u002Fcron\u002Fcrontabs\u002F*; do\n    echo \"--- User crontab: $(basename $cronfile) ---\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n    cat \"$cronfile\" 2>\u002Fdev\u002Fnull >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n    echo \"\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\ndone\n\n# Check systemd services for persistence\necho \"=== SYSTEMD SERVICES ===\" > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\nfind \u002Fmnt\u002Fevidence\u002Fetc\u002Fsystemd\u002Fsystem\u002F -name \"*.service\" -newer \u002Fmnt\u002Fevidence\u002Fetc\u002Fos-release \\\n   >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\n\nfor svc in \u002Fmnt\u002Fevidence\u002Fetc\u002Fsystemd\u002Fsystem\u002F*.service; do\n    echo \"--- $(basename $svc) ---\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\n    cat \"$svc\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\n    echo \"\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\ndone\n\n# Check authorized SSH keys (backdoor detection)\necho \"=== SSH AUTHORIZED KEYS ===\" > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fssh_keys.txt\nfind \u002Fmnt\u002Fevidence\u002Fhome\u002F \u002Fmnt\u002Fevidence\u002Froot\u002F -name \"authorized_keys\" -exec sh -c \\\n   'echo \"--- {} ---\"; cat {}; echo \"\"' \\; >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fssh_keys.txt\n\n# Check rc.local and init scripts\ncat \u002Fmnt\u002Fevidence\u002Fetc\u002Frc.local 2>\u002Fdev\u002Fnull > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Frc_local.txt\n\n# Check \u002Fetc\u002Fprofile.d\u002F for login-triggered scripts\nls -la \u002Fmnt\u002Fevidence\u002Fetc\u002Fprofile.d\u002F > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fprofile_scripts.txt\n\n# Check for LD_PRELOAD hijacking\ngrep -r \"LD_PRELOAD\" \u002Fmnt\u002Fevidence\u002Fetc\u002F 2>\u002Fdev\u002Fnull > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fld_preload.txt\ncat \u002Fmnt\u002Fevidence\u002Fetc\u002Fld.so.preload 2>\u002Fdev\u002Fnull >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fld_preload.txt\n```\n\n### Step 4: Analyze Shell History and Command Execution\n\n```bash\n# Analyze bash history for each user\npython3 \u003C\u003C 'PYEOF'\nimport os, glob\n\nprint(\"=== SHELL HISTORY ANALYSIS ===\\n\")\n\nsuspicious_commands = [\n    'wget', 'curl', 'nc ', 'ncat', 'netcat', 'python -c', 'python3 -c',\n    'perl -e', 'base64', 'chmod 777', 'chmod +s', '\u002Fdev\u002Ftcp', '\u002Fdev\u002Fudp',\n    'nmap', 'masscan', 'hydra', 'john', 'hashcat', 'passwd', 'useradd',\n    'iptables -F', 'ufw disable', 'history -c', 'rm -rf \u002F', 'dd if=',\n    'crontab', 'at ', 'systemctl enable', 'ssh-keygen', 'scp ', 'rsync',\n    'tar czf', 'zip -r', 'openssl enc', 'gpg --encrypt', 'shred',\n    'chattr', 'setfacl', 'awk', '\u002Ftmp\u002F', '\u002Fdev\u002Fshm\u002F'\n]\n\nfor hist_file in glob.glob('\u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F*\u002F.bash_history'):\n    username = hist_file.split('\u002F')[-2]\n    print(f\"User: {username}\")\n\n    with open(hist_file, 'r', errors='ignore') as f:\n        lines = f.readlines()\n\n    print(f\"  Total commands: {len(lines)}\")\n    flagged = []\n    for i, line in enumerate(lines):\n        line = line.strip()\n        for cmd in suspicious_commands:\n            if cmd in line.lower():\n                flagged.append((i+1, line))\n                break\n\n    if flagged:\n        print(f\"  Suspicious commands: {len(flagged)}\")\n        for lineno, cmd in flagged:\n            print(f\"    Line {lineno}: {cmd[:120]}\")\n    print()\nPYEOF\n```\n\n### Step 5: Check for Rootkits and Modified Binaries\n\n```bash\n# Check for known rootkit indicators\n# Compare system binary hashes against known-good\nfind \u002Fmnt\u002Fevidence\u002Fusr\u002Fbin\u002F \u002Fmnt\u002Fevidence\u002Fusr\u002Fsbin\u002F \u002Fmnt\u002Fevidence\u002Fbin\u002F \u002Fmnt\u002Fevidence\u002Fsbin\u002F \\\n   -type f -executable -exec sha256sum {} \\; > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fbinary_hashes.txt\n\n# Check for SUID\u002FSGID binaries (potential privilege escalation)\nfind \u002Fmnt\u002Fevidence\u002F -perm -4000 -type f 2>\u002Fdev\u002Fnull > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fsuid_files.txt\nfind \u002Fmnt\u002Fevidence\u002F -perm -2000 -type f 2>\u002Fdev\u002Fnull > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fsgid_files.txt\n\n# Check for suspicious files in \u002Ftmp and \u002Fdev\u002Fshm\nfind \u002Fmnt\u002Fevidence\u002Ftmp\u002F \u002Fmnt\u002Fevidence\u002Fdev\u002Fshm\u002F -type f 2>\u002Fdev\u002Fnull \\\n   -exec file {} \\; > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Ftmp_files.txt\n\n# Check for hidden files and directories\nfind \u002Fmnt\u002Fevidence\u002F -name \".*\" -not -path \"*\u002F\\.\" -type f 2>\u002Fdev\u002Fnull | \\\n   head -100 > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fhidden_files.txt\n\n# Check kernel modules\nls -la \u002Fmnt\u002Fevidence\u002Flib\u002Fmodules\u002F$(ls \u002Fmnt\u002Fevidence\u002Flib\u002Fmodules\u002F | head -1)\u002Fextra\u002F 2>\u002Fdev\u002Fnull \\\n   > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fextra_modules.txt\n\n# Check for modified PAM configuration (authentication backdoors)\ndiff \u002Fmnt\u002Fevidence\u002Fetc\u002Fpam.d\u002F \u002Fcases\u002Fbaseline\u002Fpam.d\u002F 2>\u002Fdev\u002Fnull \\\n   > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fpam_changes.txt\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| \u002Fvar\u002Flog\u002Fauth.log | Primary authentication log on Debian\u002FUbuntu systems |\n| \u002Fvar\u002Flog\u002Fsecure | Primary authentication log on RHEL\u002FCentOS systems |\n| wtmp\u002Fbtmp | Binary logs recording successful and failed login sessions |\n| .bash_history | User command history file (can be cleared by attackers) |\n| crontab | Scheduled task system commonly used for persistence |\n| authorized_keys | SSH public keys granting passwordless access to an account |\n| SUID bit | File permission allowing execution as the file owner (privilege escalation vector) |\n| LD_PRELOAD | Environment variable that loads a shared library before all others (hooking technique) |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| chkrootkit | Rootkit detection scanner for Linux systems |\n| rkhunter | Rootkit Hunter - checks for rootkits, backdoors, and local exploits |\n| AIDE | Advanced Intrusion Detection Environment - file integrity monitor |\n| auditd | Linux audit framework for system call and file access monitoring |\n| last\u002Flastb | Parse wtmp\u002Fbtmp for login and failed login history |\n| Plaso\u002Flog2timeline | Super-timeline creation including Linux artifacts |\n| osquery | SQL-based system querying for live forensic investigation |\n| Velociraptor | Endpoint agent with Linux artifact collection capabilities |\n\n## Common Scenarios\n\n**Scenario 1: SSH Brute Force Followed by Compromise**\nAnalyze auth.log for failed SSH attempts followed by success, identify the attacking IP, check .bash_history for post-compromise commands, examine authorized_keys for added backdoor keys, check crontab for persistence, review network connections.\n\n**Scenario 2: Web Server Compromise via Application Vulnerability**\nExamine web server access and error logs for exploitation attempts, check \u002Ftmp and \u002Fdev\u002Fshm for webshells, analyze the web server user's activity (www-data), check for privilege escalation via SUID binaries or kernel exploits, review outbound connections.\n\n**Scenario 3: Insider Threat on Database Server**\nAnalyze the suspect user's bash_history for database dump commands, check for large tar\u002Fzip files in home directory or \u002Ftmp, examine scp\u002Frsync commands for data transfer, review cron jobs for automated exfiltration, check USB device logs.\n\n**Scenario 4: Crypto-Miner on Cloud Instance**\nCheck for high-CPU processes in \u002Fproc (live) or systemd service files, examine crontab entries for miner restart scripts, check \u002Ftmp for mining binaries, analyze network connections for mining pool communications, review authorized_keys for attacker access.\n\n## Output Format\n\n```\nLinux Forensics Summary:\n  System: webserver01 (Ubuntu 22.04 LTS)\n  Hostname: webserver01.corp.local\n  Kernel: 5.15.0-91-generic\n\n  User Accounts:\n    Total: 25 (3 with UID 0 - 1 ANOMALOUS)\n    Interactive shells: 8 users\n    Recently created: admin2 (created 2024-01-15)\n\n  Authentication Events:\n    Successful SSH logins: 456\n    Failed SSH attempts: 12,345 (from 23 unique IPs)\n    Sudo executions: 89\n\n  Persistence Mechanisms Found:\n    Cron jobs: 3 suspicious (reverse shell, miner restart)\n    Systemd services: 1 unknown (update-checker.service)\n    SSH keys: 2 unauthorized keys in root authorized_keys\n    rc.local: Modified with download cradle\n\n  Suspicious Activity:\n    - bash_history contains wget to pastebin URL\n    - SUID binary \u002Ftmp\u002F.hidden\u002Fescalate found\n    - \u002Fdev\u002Fshm\u002F contains compiled ELF binary\n    - LD_PRELOAD in \u002Fetc\u002Fld.so.preload pointing to \u002Flib\u002F.hidden.so\n\n  Report: \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002F\n```\n","# Analyzing Linux System Artifacts\n\n## When to Use\n- When investigating a compromised Linux server or workstation\n- For identifying persistence mechanisms (cron, systemd, SSH keys)\n- When tracing user activity through shell history and authentication logs\n- During incident response to determine the scope of a Linux-based breach\n- For detecting rootkits, backdoors, and unauthorized modifications\n\n## Prerequisites\n- Forensic image or live access to the Linux system (read-only)\n- Understanding of Linux file system hierarchy (FHS)\n- Knowledge of common Linux logging locations (\u002Fvar\u002Flog\u002F)\n- Tools: chkrootkit, rkhunter, AIDE, auditd logs\n- Familiarity with systemd, cron, and PAM configurations\n- Root access for complete artifact collection\n\n## Workflow\n\n### Step 1: Mount and Collect System Artifacts\n\n```bash\n# Mount forensic image read-only\nmount -o ro,loop,offset=$((2048*512)) \u002Fcases\u002Fcase-2024-001\u002Fimages\u002Flinux_evidence.dd \u002Fmnt\u002Fevidence\n\n# Create collection directories\nmkdir -p \u002Fcases\u002Fcase-2024-001\u002Flinux\u002F{logs,config,users,persistence,network}\n\n# Collect authentication logs\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fauth.log* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fsecure* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fsyslog* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fkern.log* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Faudit\u002Faudit.log* \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fwtmp \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Fbtmp \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Flastlog \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\ncp \u002Fmnt\u002Fevidence\u002Fvar\u002Flog\u002Ffaillog \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002F\n\n# Collect user artifacts\nfor user_dir in \u002Fmnt\u002Fevidence\u002Fhome\u002F*\u002F; do\n    username=$(basename \"$user_dir\")\n    mkdir -p \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\n    cp \"$user_dir\"\u002F.bash_history \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.zsh_history \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp -r \"$user_dir\"\u002F.ssh\u002F \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.bashrc \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.profile \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.viminfo \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.wget-hsts \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\n    cp \"$user_dir\"\u002F.python_history \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F$username\u002F 2>\u002Fdev\u002Fnull\ndone\n\n# Collect root user artifacts\ncp \u002Fmnt\u002Fevidence\u002Froot\u002F.bash_history \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002Froot\u002F 2>\u002Fdev\u002Fnull\ncp -r \u002Fmnt\u002Fevidence\u002Froot\u002F.ssh\u002F \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002Froot\u002F 2>\u002Fdev\u002Fnull\n\n# Collect system configuration\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fpasswd \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fshadow \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fgroup \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fsudoers \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp -r \u002Fmnt\u002Fevidence\u002Fetc\u002Fsudoers.d\u002F \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fhosts \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp \u002Fmnt\u002Fevidence\u002Fetc\u002Fresolv.conf \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\ncp -r \u002Fmnt\u002Fevidence\u002Fetc\u002Fssh\u002F \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002F\n```\n\n### Step 2: Analyze User Accounts and Authentication\n\n```bash\n# Analyze user accounts for anomalies\npython3 \u003C\u003C 'PYEOF'\nprint(\"=== USER ACCOUNT ANALYSIS ===\\n\")\n\n# Parse \u002Fetc\u002Fpasswd\nwith open('\u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002Fpasswd') as f:\n    for line in f:\n        parts = line.strip().split(':')\n        if len(parts) >= 7:\n            username, _, uid, gid, comment, home, shell = parts[0], parts[1], int(parts[2]), int(parts[3]), parts[4], parts[5], parts[6]\n\n            # Flag accounts with UID 0 (root equivalent)\n            if uid == 0 and username != 'root':\n                print(f\"  ALERT: UID 0 account: {username} (shell: {shell})\")\n\n            # Flag accounts with login shells that shouldn't have them\n            if shell not in ('\u002Fbin\u002Ffalse', '\u002Fusr\u002Fsbin\u002Fnologin', '\u002Fbin\u002Fsync') and uid >= 1000:\n                print(f\"  User: {username} (UID:{uid}, Shell:{shell}, Home:{home})\")\n\n            # Flag system accounts with login shells\n            if uid \u003C 1000 and uid > 0 and shell in ('\u002Fbin\u002Fbash', '\u002Fbin\u002Fsh', '\u002Fbin\u002Fzsh'):\n                print(f\"  WARNING: System account with shell: {username} (UID:{uid}, Shell:{shell})\")\n\n# Parse \u002Fetc\u002Fshadow for account status\nprint(\"\\n=== PASSWORD STATUS ===\")\nwith open('\u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fconfig\u002Fshadow') as f:\n    for line in f:\n        parts = line.strip().split(':')\n        if len(parts) >= 3:\n            username = parts[0]\n            pwd_hash = parts[1]\n            last_change = parts[2]\n\n            if pwd_hash and pwd_hash not in ('*', '!', '!!', ''):\n                hash_type = 'Unknown'\n                if pwd_hash.startswith('$6$'): hash_type = 'SHA-512'\n                elif pwd_hash.startswith('$5$'): hash_type = 'SHA-256'\n                elif pwd_hash.startswith('$y$'): hash_type = 'yescrypt'\n                elif pwd_hash.startswith('$1$'): hash_type = 'MD5 (WEAK)'\n                print(f\"  {username}: {hash_type} hash, last changed: day {last_change}\")\nPYEOF\n\n# Analyze login history\nlast -f \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002Fwtmp > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Flogin_history.txt\nlastb -f \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Flogs\u002Fbtmp > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Ffailed_logins.txt 2>\u002Fdev\u002Fnull\n```\n\n### Step 3: Examine Persistence Mechanisms\n\n```bash\n# Check cron jobs for all users\necho \"=== CRON JOBS ===\" > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n\n# System cron\nfor cronfile in \u002Fmnt\u002Fevidence\u002Fetc\u002Fcrontab \u002Fmnt\u002Fevidence\u002Fetc\u002Fcron.d\u002F*; do\n    echo \"--- $cronfile ---\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n    cat \"$cronfile\" 2>\u002Fdev\u002Fnull >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n    echo \"\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\ndone\n\n# User cron tabs\nfor cronfile in \u002Fmnt\u002Fevidence\u002Fvar\u002Fspool\u002Fcron\u002Fcrontabs\u002F*; do\n    echo \"--- User crontab: $(basename $cronfile) ---\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n    cat \"$cronfile\" 2>\u002Fdev\u002Fnull >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\n    echo \"\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fcron_analysis.txt\ndone\n\n# Check systemd services for persistence\necho \"=== SYSTEMD SERVICES ===\" > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\nfind \u002Fmnt\u002Fevidence\u002Fetc\u002Fsystemd\u002Fsystem\u002F -name \"*.service\" -newer \u002Fmnt\u002Fevidence\u002Fetc\u002Fos-release \\\n   >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\n\nfor svc in \u002Fmnt\u002Fevidence\u002Fetc\u002Fsystemd\u002Fsystem\u002F*.service; do\n    echo \"--- $(basename $svc) ---\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\n    cat \"$svc\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\n    echo \"\" >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fsystemd_analysis.txt\ndone\n\n# Check authorized SSH keys (backdoor detection)\necho \"=== SSH AUTHORIZED KEYS ===\" > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fssh_keys.txt\nfind \u002Fmnt\u002Fevidence\u002Fhome\u002F \u002Fmnt\u002Fevidence\u002Froot\u002F -name \"authorized_keys\" -exec sh -c \\\n   'echo \"--- {} ---\"; cat {}; echo \"\"' \\; >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fssh_keys.txt\n\n# Check rc.local and init scripts\ncat \u002Fmnt\u002Fevidence\u002Fetc\u002Frc.local 2>\u002Fdev\u002Fnull > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Frc_local.txt\n\n# Check \u002Fetc\u002Fprofile.d\u002F for login-triggered scripts\nls -la \u002Fmnt\u002Fevidence\u002Fetc\u002Fprofile.d\u002F > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fprofile_scripts.txt\n\n# Check for LD_PRELOAD hijacking\ngrep -r \"LD_PRELOAD\" \u002Fmnt\u002Fevidence\u002Fetc\u002F 2>\u002Fdev\u002Fnull > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fld_preload.txt\ncat \u002Fmnt\u002Fevidence\u002Fetc\u002Fld.so.preload 2>\u002Fdev\u002Fnull >> \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fpersistence\u002Fld_preload.txt\n```\n\n### Step 4: Analyze Shell History and Command Execution\n\n```bash\n# Analyze bash history for each user\npython3 \u003C\u003C 'PYEOF'\nimport os, glob\n\nprint(\"=== SHELL HISTORY ANALYSIS ===\\n\")\n\nsuspicious_commands = [\n    'wget', 'curl', 'nc ', 'ncat', 'netcat', 'python -c', 'python3 -c',\n    'perl -e', 'base64', 'chmod 777', 'chmod +s', '\u002Fdev\u002Ftcp', '\u002Fdev\u002Fudp',\n    'nmap', 'masscan', 'hydra', 'john', 'hashcat', 'passwd', 'useradd',\n    'iptables -F', 'ufw disable', 'history -c', 'rm -rf \u002F', 'dd if=',\n    'crontab', 'at ', 'systemctl enable', 'ssh-keygen', 'scp ', 'rsync',\n    'tar czf', 'zip -r', 'openssl enc', 'gpg --encrypt', 'shred',\n    'chattr', 'setfacl', 'awk', '\u002Ftmp\u002F', '\u002Fdev\u002Fshm\u002F'\n]\n\nfor hist_file in glob.glob('\u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fusers\u002F*\u002F.bash_history'):\n    username = hist_file.split('\u002F')[-2]\n    print(f\"User: {username}\")\n\n    with open(hist_file, 'r', errors='ignore') as f:\n        lines = f.readlines()\n\n    print(f\"  Total commands: {len(lines)}\")\n    flagged = []\n    for i, line in enumerate(lines):\n        line = line.strip()\n        for cmd in suspicious_commands:\n            if cmd in line.lower():\n                flagged.append((i+1, line))\n                break\n\n    if flagged:\n        print(f\"  Suspicious commands: {len(flagged)}\")\n        for lineno, cmd in flagged:\n            print(f\"    Line {lineno}: {cmd[:120]}\")\n    print()\nPYEOF\n```\n\n### Step 5: Check for Rootkits and Modified Binaries\n\n```bash\n# Check for known rootkit indicators\n# Compare system binary hashes against known-good\nfind \u002Fmnt\u002Fevidence\u002Fusr\u002Fbin\u002F \u002Fmnt\u002Fevidence\u002Fusr\u002Fsbin\u002F \u002Fmnt\u002Fevidence\u002Fbin\u002F \u002Fmnt\u002Fevidence\u002Fsbin\u002F \\\n   -type f -executable -exec sha256sum {} \\; > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fbinary_hashes.txt\n\n# Check for SUID\u002FSGID binaries (potential privilege escalation)\nfind \u002Fmnt\u002Fevidence\u002F -perm -4000 -type f 2>\u002Fdev\u002Fnull > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fsuid_files.txt\nfind \u002Fmnt\u002Fevidence\u002F -perm -2000 -type f 2>\u002Fdev\u002Fnull > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fsgid_files.txt\n\n# Check for suspicious files in \u002Ftmp and \u002Fdev\u002Fshm\nfind \u002Fmnt\u002Fevidence\u002Ftmp\u002F \u002Fmnt\u002Fevidence\u002Fdev\u002Fshm\u002F -type f 2>\u002Fdev\u002Fnull \\\n   -exec file {} \\; > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Ftmp_files.txt\n\n# Check for hidden files and directories\nfind \u002Fmnt\u002Fevidence\u002F -name \".*\" -not -path \"*\u002F\\.\" -type f 2>\u002Fdev\u002Fnull | \\\n   head -100 > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fhidden_files.txt\n\n# Check kernel modules\nls -la \u002Fmnt\u002Fevidence\u002Flib\u002Fmodules\u002F$(ls \u002Fmnt\u002Fevidence\u002Flib\u002Fmodules\u002F | head -1)\u002Fextra\u002F 2>\u002Fdev\u002Fnull \\\n   > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fextra_modules.txt\n\n# Check for modified PAM configuration (authentication backdoors)\ndiff \u002Fmnt\u002Fevidence\u002Fetc\u002Fpam.d\u002F \u002Fcases\u002Fbaseline\u002Fpam.d\u002F 2>\u002Fdev\u002Fnull \\\n   > \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002Fpam_changes.txt\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| \u002Fvar\u002Flog\u002Fauth.log | Primary authentication log on Debian\u002FUbuntu systems |\n| \u002Fvar\u002Flog\u002Fsecure | Primary authentication log on RHEL\u002FCentOS systems |\n| wtmp\u002Fbtmp | Binary logs recording successful and failed login sessions |\n| .bash_history | User command history file (can be cleared by attackers) |\n| crontab | Scheduled task system commonly used for persistence |\n| authorized_keys | SSH public keys granting passwordless access to an account |\n| SUID bit | File permission allowing execution as the file owner (privilege escalation vector) |\n| LD_PRELOAD | Environment variable that loads a shared library before all others (hooking technique) |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| chkrootkit | Rootkit detection scanner for Linux systems |\n| rkhunter | Rootkit Hunter - checks for rootkits, backdoors, and local exploits |\n| AIDE | Advanced Intrusion Detection Environment - file integrity monitor |\n| auditd | Linux audit framework for system call and file access monitoring |\n| last\u002Flastb | Parse wtmp\u002Fbtmp for login and failed login history |\n| Plaso\u002Flog2timeline | Super-timeline creation including Linux artifacts |\n| osquery | SQL-based system querying for live forensic investigation |\n| Velociraptor | Endpoint agent with Linux artifact collection capabilities |\n\n## Common Scenarios\n\n**Scenario 1: SSH Brute Force Followed by Compromise**\nAnalyze auth.log for failed SSH attempts followed by success, identify the attacking IP, check .bash_history for post-compromise commands, examine authorized_keys for added backdoor keys, check crontab for persistence, review network connections.\n\n**Scenario 2: Web Server Compromise via Application Vulnerability**\nExamine web server access and error logs for exploitation attempts, check \u002Ftmp and \u002Fdev\u002Fshm for webshells, analyze the web server user's activity (www-data), check for privilege escalation via SUID binaries or kernel exploits, review outbound connections.\n\n**Scenario 3: Insider Threat on Database Server**\nAnalyze the suspect user's bash_history for database dump commands, check for large tar\u002Fzip files in home directory or \u002Ftmp, examine scp\u002Frsync commands for data transfer, review cron jobs for automated exfiltration, check USB device logs.\n\n**Scenario 4: Crypto-Miner on Cloud Instance**\nCheck for high-CPU processes in \u002Fproc (live) or systemd service files, examine crontab entries for miner restart scripts, check \u002Ftmp for mining binaries, analyze network connections for mining pool communications, review authorized_keys for attacker access.\n\n## Output Format\n\n```\nLinux Forensics Summary:\n  System: webserver01 (Ubuntu 22.04 LTS)\n  Hostname: webserver01.corp.local\n  Kernel: 5.15.0-91-generic\n\n  User Accounts:\n    Total: 25 (3 with UID 0 - 1 ANOMALOUS)\n    Interactive shells: 8 users\n    Recently created: admin2 (created 2024-01-15)\n\n  Authentication Events:\n    Successful SSH logins: 456\n    Failed SSH attempts: 12,345 (from 23 unique IPs)\n    Sudo executions: 89\n\n  Persistence Mechanisms Found:\n    Cron jobs: 3 suspicious (reverse shell, miner restart)\n    Systemd services: 1 unknown (update-checker.service)\n    SSH keys: 2 unauthorized keys in root authorized_keys\n    rc.local: Modified with download cradle\n\n  Suspicious Activity:\n    - bash_history contains wget to pastebin URL\n    - SUID binary \u002Ftmp\u002F.hidden\u002Fescalate found\n    - \u002Fdev\u002Fshm\u002F contains compiled ELF binary\n    - LD_PRELOAD in \u002Fetc\u002Fld.so.preload pointing to \u002Flib\u002F.hidden.so\n\n  Report: \u002Fcases\u002Fcase-2024-001\u002Flinux\u002Fanalysis\u002F\n```\n",{"name":5,"tags":25,"author":32,"domain":33,"license":15,"version":34,"subdomain":35,"description":7},[26,27,28,29,30,31],"forensics","linux-forensics","system-artifacts","log-analysis","persistence-detection","incident-investigation","mahipal","cybersecurity","1.0","digital-forensics","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill analyzing-linux-system-artifacts",{"tool":48,"command":49},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill analyzing-linux-system-artifacts",{"tool":51,"command":52},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill analyzing-linux-system-artifacts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-linux-system-artifacts\u002FSKILL.md",true,[56,60,66],{"path":57,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fapi-reference.md","REFERENCE","参考文档",3491,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-linux-system-artifacts\u002Freferences\u002Fapi-reference.md",{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"scripts\u002Fagent.py","SCRIPT","脚本",9952,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-linux-system-artifacts\u002Fscripts\u002Fagent.py",[73,82,89,96,103,110],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":81},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":81},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":81},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":81},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":77,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":81},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]