The interface is localized. Skill descriptions and documents are machine-translated by AI into your language; code, commands, paths and technical terms stay in the original, and the author's document governs.
Explore skills
Productivity · SKILL.md

analyzing-linux-system-artifacts

analyzing-linux-system-artifacts

检查 Linux 系统痕迹,包括身份验证日志、定时任务、Shell 历史和系统配置,以发现入侵或未授权活动的证据。

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill documentation

GitHub

name: analyzing-linux-system-artifacts description: 检查 Linux 系统痕迹,包括身份验证日志、定时任务、Shell 历史和系统配置,以发现入侵或未授权活动的证据。 domain: cybersecurity subdomain: digital-forensics tags: [forensics, linux-forensics, system-artifacts, log-analysis, persistence-detection, incident-investigation] version: "1.0" author: mahipal license: Apache-2.0

分析 Linux 系统痕迹

适用场景

  • 调查受损的 Linux 服务器或工作站时
  • 识别持久化(Persistence)机制(cron、systemd、SSH 密钥)时
  • 通过 Shell 历史和身份验证日志追踪用户活动时
  • 事件响应(Incident Response)期间确定 Linux 系统漏洞的影响范围时
  • 检测 Rootkit、后门和未授权修改时

前置条件

  • 取证镜像或对 Linux 系统的实时只读访问权限
  • 了解 Linux 文件系统层次结构(FHS)
  • 了解常见 Linux 日志位置(/var/log/)
  • 工具:chkrootkit、rkhunter、AIDE、auditd 日志
  • 熟悉 systemd、cron 和 PAM 配置
  • 完整痕迹收集需要 root 访问权限

工作流程

(参见源文档中的命令)

核心概念

概念定义
/var/log/auth.logDebian/Ubuntu 系统上的主要身份验证日志
/var/log/secureRHEL/CentOS 系统上的主要身份验证日志
wtmp/btmp记录成功和失败登录会话的二进制日志
.bash_history用户命令历史文件(攻击者可能清除)
crontab通常用于持久化的计划任务系统
authorized_keys授予账户无密码访问权限的 SSH 公钥
SUID 位允许以文件所有者身份执行的文件权限(权限提升向量)
LD_PRELOAD在所有其他库之前加载共享库的环境变量(钩挂技术)

工具与系统

工具用途
chkrootkitLinux 系统 Rootkit 检测扫描器
rkhunterRootkit Hunter - 检查 Rootkit、后门和本地漏洞利用
AIDE高级入侵检测环境 - 文件完整性监控器
auditd用于系统调用和文件访问监控的 Linux 审计框架
last/lastb解析 wtmp/btmp 获取登录和失败登录历史
Plaso/log2timeline包含 Linux 痕迹的超级时间线创建工具
osquery基于 SQL 的系统查询工具,用于实时取证调查
Velociraptor具有 Linux 痕迹收集能力的终端代理
Saved skills