analyzing-persistence-mechanisms-in-linux

analyzing-persistence-mechanisms-in-linux is a skill for Claude Code from killvxk/cybersecurity-skills-zh. It costs 58 tokens per session (662 once invoked), scanned B, original, Apache-2.0.

A guide to finding ways attackers can make Linux programs or accounts start again automatically after a restart or login. It examines scheduled tasks, system services, shell startup files, injected libraries, and SSH keys.

In plain words
What is it for?
Use it to inspect crontab jobs, systemd services, LD_PRELOAD settings, shell configuration files, and SSH authorized keys, then create a report with findings and remediation commands.
Why use it?
It brings several Linux persistence checks into one investigation and links file changes with audit logs. This helps build a timeline of when suspicious changes were made.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cybersecurity-skills-zh plugin — 58 skills shipped together

Good fit Use it to inspect crontab jobs, systemd services, LD_PRELOAD settings, shell configuration files, and SSH authorized keys, then create a report with findings and remediation commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/killvxk/cybersecurity-skills-zh/analyzing-persistence-mechanisms-in-linux
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add killvxk/cybersecurity-skills-zh --skill analyzing-persistence-mechanisms-in-linux
Clone the repo
git clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zh

Made for: Claude Code.

Or install cybersecurity-skills-zh, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyzing-persistence-mechanisms-in-linux

README.md
[![agentmods](https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-persistence-mechanisms-in-linux/github.svg)](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-persistence-mechanisms-in-linux)
Your own site
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-persistence-mechanisms-in-linux"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-persistence-mechanisms-in-linux/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyzing-persistence-mechanisms-in-linux

Your own site · 80×15
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-persistence-mechanisms-in-linux"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-persistence-mechanisms-in-linux.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 662 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.00662
Opus 5 $0.00029 $0.00331
Sonnet 5 $0.00012 $0.00132
Haiku 4.5 $0.00006 $0.00066

Measured 12d ago against content hash b97b2eb34a2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

analyzing-persistence-mechanisms-in-linux scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- 目标 Linux 系统(或取证镜像)的 root 或 sudo 访问权限
skills/analyzing-persistence-mechanisms-in-linux/SKILL.md · 41 lines

What it actually says

分析 Linux 持久化机制

概述

攻击者通过 crontab 任务、systemd 服务/计时器单元、LD_PRELOAD 库注入、Shell 配置文件修改(.bashrc、.profile)、SSH authorized_keys 后门以及 init 脚本操控等方式在 Linux 系统上建立持久化(Persistence)。本技能扫描所有已知持久化向量,检查文件时间戳和完整性,并将发现结果与 auditd 日志关联,以构建持久化安装的时间线。

前置条件

  • 目标 Linux 系统(或取证镜像)的 root 或 sudo 访问权限
  • auditd 已配置针对持久化路径的文件监控规则
  • Python 3.8+ 及标准库(os、subprocess、json)
  • 可选:OSSEC/Wazuh 代理用于文件完整性监控告警

步骤

  1. 扫描 Crontab 条目 — 枚举所有用户 crontab、/etc/cron.d/、/etc/cron.daily/ 和 anacron 任务中的可疑命令
  2. 审计 Systemd 单元 — 检查 /etc/systemd/system/ 和 ~/.config/systemd/user/ 中非包管理器托管的服务和计时器单元
  3. 检测 LD_PRELOAD 劫持 — 检查 /etc/ld.so.preload 和 LD_PRELOAD 环境变量中注入的共享库
  4. 检查 Shell 配置文件 — 扫描 .bashrc、.bash_profile、.profile、/etc/profile.d/ 中注入的命令或反向 Shell
  5. 检查 SSH Authorized Keys — 审计所有 authorized_keys 文件中的未授权公钥及命令限制
  6. 关联 Auditd 日志 — 搜索 auditd 日志中持久化路径的文件修改事件,构建安装时间线
  7. 生成持久化报告 — 生成包含所有发现的持久化机制及风险评分的报告

预期输出

  • 包含所有持久化机制及风险评分的 JSON 报告
  • 基于 auditd 关联的持久化安装时间线
  • MITRE ATT&CK 技术映射(T1053、T1543、T1574、T1546)
  • 每个检测到的持久化机制的修复命令
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 41 lines · 58 tokens per session scan B b97b2eb34a2b

Subscribe to this mod's changes

analyzing-persistence-mechanisms-in-linux is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (45 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 58 tokens to every session and 662 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyzing-persistence-mechanisms-in-linux

Scan Linux systems for persistence mechanisms including crontab/systemd entries, LDPRELOAD injection, shell profile modifications (.bashrc, .profile), and SSH authorizedkeys backdoors, then correlate findings with auditd logs into an installation timeline. Use during incident response or threat hunting to detect or…

mukul975/Anthropic-Cybersecurity-Skills · 82 tokens

analyzing-persistence-mechanisms-in-linux

Detect and analyze Linux persistence mechanisms including crontab entries, systemd service units, LDPRELOAD hijacking, bashrc modifications, and authorizedkeys backdoors using auditd and file integrity monitoring.

26zl/cybersec-toolkit · 50 tokens

analyzing-persistence-mechanisms-in-linux

Detect and analyze Linux persistence mechanisms including crontab entries, systemd service units, LDPRELOAD hijacking, bashrc modifications, and authorizedkeys backdoors using auditd and file integrity monitoring.

adriannoes/awesome-agentic-ai · 50 tokens

analyzing-persistence-mechanisms-in-linux

Scan Linux systems for persistence mechanisms including crontab/systemd entries, LDPRELOAD injection, shell profile modifications (.bashrc, .profile), and SSH authorizedkeys backdoors, then correlate findings with auditd logs into an installation timeline. Use during incident response or threat hunting to detect or…

Youngmaidainon/Agent-Level-Up · 82 tokens

analyzing-persistence-mechanisms-in-linux

Detect and analyze Linux persistence mechanisms including crontab entries, systemd service units, LDPRELOAD hijacking, bashrc modifications, and authorizedkeys backdoors using auditd and file integrity monitoring.

pinkpixel-dev/skills-collection-1 · 50 tokens

analyzing-persistence-mechanisms-in-linux

Detect and analyze Linux persistence mechanisms including crontab entries, systemd service units, LDPRELOAD hijacking, bashrc modifications, and authorizedkeys backdoors using auditd and file integrity monitoring.

marysatasselshaped667/skills-collection-1 · 50 tokens