[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74N3GYC9AFAA5WK3J4VSAV5":3,"skill-same:01M74N3GYC9AFAA5WK3J4VSAV5":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},"01M74N3GYC9AFAA5WK3J4VSAV5","analyzing-persistence-mechanisms-in-linux",null,"Detect and analyze Linux persistence mechanisms including crontab entries, systemd service units, LD_PRELOAD hijacking, bashrc modifications, and authorized_keys backdoors using auditd and file integrity monitoring","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-persistence-mechanisms-in-linux\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-persistence-mechanisms-in-linux\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: analyzing-persistence-mechanisms-in-linux\ndescription: Detect and analyze Linux persistence mechanisms including crontab entries, systemd service units, LD_PRELOAD hijacking, bashrc modifications, and authorized_keys backdoors using auditd and file integrity monitoring\ndomain: cybersecurity\nsubdomain: threat-hunting\ntags: [linux-persistence, crontab, systemd, ld-preload, auditd, threat-hunting, incident-response]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Analyzing Persistence Mechanisms in Linux\n\n## Overview\n\nAdversaries establish persistence on Linux systems through crontab jobs, systemd service\u002Ftimer units, LD_PRELOAD library injection, shell profile modifications (.bashrc, .profile), SSH authorized_keys backdoors, and init script manipulation. This skill scans for all known persistence vectors, checks file timestamps and integrity, and correlates findings with auditd logs to build a timeline of persistence installation.\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing persistence mechanisms in linux\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Root or sudo access on target Linux system (or forensic image)\n- auditd configured with file watch rules on persistence paths\n- Python 3.8+ with standard library (os, subprocess, json)\n- Optional: OSSEC\u002FWazuh agent for file integrity monitoring alerts\n\n## Steps\n\n1. **Scan Crontab Entries** — Enumerate all user crontabs, \u002Fetc\u002Fcron.d\u002F, \u002Fetc\u002Fcron.daily\u002F, and anacron jobs for suspicious commands\n2. **Audit Systemd Units** — Check \u002Fetc\u002Fsystemd\u002Fsystem\u002F and ~\u002F.config\u002Fsystemd\u002Fuser\u002F for non-package-managed service and timer units\n3. **Detect LD_PRELOAD Hijacking** — Check \u002Fetc\u002Fld.so.preload and LD_PRELOAD environment variable for injected shared libraries\n4. **Inspect Shell Profiles** — Scan .bashrc, .bash_profile, .profile, \u002Fetc\u002Fprofile.d\u002F for injected commands or reverse shells\n5. **Check SSH Authorized Keys** — Audit all authorized_keys files for unauthorized public keys with command restrictions\n6. **Correlate Auditd Logs** — Search auditd logs for file modification events on persistence paths to build an installation timeline\n7. **Generate Persistence Report** — Produce a risk-scored report of all discovered persistence mechanisms\n\n## Expected Output\n\n- JSON report of all persistence mechanisms found with risk scores\n- Timeline of persistence installation from auditd correlation\n- MITRE ATT&CK technique mapping (T1053, T1543, T1574, T1546)\n- Remediation commands for each detected persistence mechanism\n","# Analyzing Persistence Mechanisms in Linux\n\n## Overview\n\nAdversaries establish persistence on Linux systems through crontab jobs, systemd service\u002Ftimer units, LD_PRELOAD library injection, shell profile modifications (.bashrc, .profile), SSH authorized_keys backdoors, and init script manipulation. This skill scans for all known persistence vectors, checks file timestamps and integrity, and correlates findings with auditd logs to build a timeline of persistence installation.\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing persistence mechanisms in linux\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Root or sudo access on target Linux system (or forensic image)\n- auditd configured with file watch rules on persistence paths\n- Python 3.8+ with standard library (os, subprocess, json)\n- Optional: OSSEC\u002FWazuh agent for file integrity monitoring alerts\n\n## Steps\n\n1. **Scan Crontab Entries** — Enumerate all user crontabs, \u002Fetc\u002Fcron.d\u002F, \u002Fetc\u002Fcron.daily\u002F, and anacron jobs for suspicious commands\n2. **Audit Systemd Units** — Check \u002Fetc\u002Fsystemd\u002Fsystem\u002F and ~\u002F.config\u002Fsystemd\u002Fuser\u002F for non-package-managed service and timer units\n3. **Detect LD_PRELOAD Hijacking** — Check \u002Fetc\u002Fld.so.preload and LD_PRELOAD environment variable for injected shared libraries\n4. **Inspect Shell Profiles** — Scan .bashrc, .bash_profile, .profile, \u002Fetc\u002Fprofile.d\u002F for injected commands or reverse shells\n5. **Check SSH Authorized Keys** — Audit all authorized_keys files for unauthorized public keys with command restrictions\n6. **Correlate Auditd Logs** — Search auditd logs for file modification events on persistence paths to build an installation timeline\n7. **Generate Persistence Report** — Produce a risk-scored report of all discovered persistence mechanisms\n\n## Expected Output\n\n- JSON report of all persistence mechanisms found with risk scores\n- Timeline of persistence installation from auditd correlation\n- MITRE ATT&CK technique mapping (T1053, T1543, T1574, T1546)\n- Remediation commands for each detected persistence mechanism\n",{"name":5,"tags":25,"author":33,"domain":34,"license":15,"version":35,"subdomain":31,"description":7},[26,27,28,29,30,31,32],"linux-persistence","crontab","systemd","ld-preload","auditd","threat-hunting","incident-response","mahipal","cybersecurity","1.0","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-persistence-mechanisms-in-linux",{"tool":48,"command":49},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill analyzing-persistence-mechanisms-in-linux",{"tool":51,"command":52},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill analyzing-persistence-mechanisms-in-linux","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-persistence-mechanisms-in-linux\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","参考文档",2763,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-persistence-mechanisms-in-linux\u002Freferences\u002Fapi-reference.md",{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"scripts\u002Fagent.py","SCRIPT","脚本",10488,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fanalyzing-persistence-mechanisms-in-linux\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",[],[]]