企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
[TOC] ## 敏感目录 Windows ~~~ temp(tmp)相关目录 浏览器的历史记录,下载文件和cookie信息 查看用户Recent文件 C:\Users\Administrator\Recent、C:\Users\用户名\Recent,或者通过“运行”-> 输入“ recent ” 预读取文件夹查看 Prefetch文件夹的位置为 “%SystemRoot%\Prefetch\”,可以在”运行“对话框中输入prefetch 或者 %SystemRoot%\Prefetch\,或者打开:C:\WINDOWS\prefetch ~~~ Linux ~~~ /tmp 目录 命令目录 /usr/bin、/usr/sbin等 ~/.ssh /etc/ssh ~~~ ## 时间点 对文件的创建时间、修改时间、访问时间进行排查 对于人工入侵的应急响应事件,有时攻击者会为了掩饰入侵行为,对文档的相应时间进行修改,以规避一些排查策略,比如攻击者可能通过”菜刀“这类工具修改时间,因此,**如果文件的相关时间存在明显逻辑问题,就需要重点排查**,很可能是恶意文件(比如创建时间为2021,修改时间为2018) Windows ~~~ 显示对 2021/11/27 后的创建的txt文件进行搜索 forfiles /m \*.txt /d +2021/11/27 /s /p c:\\ /c "cmd /c echo @path @fdate @ftime" 2>null 显示 2021//11/1 之后pptx名字包含”网络“的文件 forfiles /m \*网络\*.pptx /p f:\\ /d +2021/11/1 /s /c "cmd /c echo @path @fdate @ftime" 2>null 显示 2021//11/27 后所有访问过的文件 forfiles /m \*.\* /p f:\\ /d +2021/11/27 /s /c "cmd /c echo @path @fdate @ftime" 2>null ~~~ Linux ~~~ 查找块设备、目录、字符设备、管道、符号链接、普通文件 find -type b/d/c/p/l/f 按文件更改时间来查找文件,-n指 n天以内,+n指 n天前 find -mtime -n +n 按文件访问时间来查找 find -atime -n +n 按照文件创建时间来查找 find -ctime -n +n 查找一天内新增的txt文件 find / -ctime 0 -name ".*txt" 查找3天内新增的txt文件 find / -ctime -3 -name “*.txt" 查看目录按照时间排序 ls -alt | head -n 10 对文件的创建时间、修改时间、访问时间进行排查 stat 文件名 ~~~ ## webshell Windows ~~~ D盾 HwsKill webshellKill ~~~ Linux ~~~ 特殊权限文件查找 find /tmp -perm 777 查找/var/www下所有php文件 find /var/www/ -name "*.php" 正则查找带有POST变量的 find /var/www/ -name "*.php" | xargs egrep"assert|eval|base64_decode|shell_exec|passthru|\(\$\_\POST\[ 对系统命令进行排查 ls -alht /bin/ 工具 chkrootkit rkhunter 排查SUID程序 find / -type f -perm -04000 -ls -uid 0 2>/dev/null ~~~