首页/安全/取证与溯源速查/时间戳篡改识别(Linux)
Linux 取证135 条

时间戳篡改识别(Linux)

touch 可以修改 atime 与 mtime,但 ctime 由内核对 inode 变更自动更新,用户无法回拨;mtime 明显早于 ctime 的异常组合是篡改信号。

取证与溯源速查安全更新于 2026-10-12
可改atime、mtime(touch、setfile 等)
难改ctime、crtime(需改动文件系统结构)

对比

对比
stat -c '%n mtime=%y ctime=%z' /usr/bin/* | awk '$0 ~ /mtime=.*ctime=/' | head
find /usr/local/bin -xdev -type f -newerct '2026-01-01' -printf '%p %TY-%Tm-%Td\n' | head
mtime 早于 ctime 且差距明显时,要结合 bash 历史、auditd 与部署记录共同判断。

易错点

  • 正常安装、复制与恢复备份也会造成 mtime 与 ctime 不一致,需排除常见来源
  • 仅凭时间戳异常不能下结论,要与其他证据交叉

数据来源与参考

  • man 1 touch(GNU coreutils)
  • ext4 inode 时间戳说明
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌