当前位置:网站首页>网络安全应急响应-终端检测与响应技术
网络安全应急响应-终端检测与响应技术
2022-07-13 17:41:00 【Bnessy】
网络安全应急响应专题文章:
1. 网络安全应急响应-日志分析技术
2. 网络安全应急响应-流量分析技术
3. 网络安全应急响应-恶意代码分析技术
4. 网络安全应急响应-终端检测与响应技术
5. 网络安全应急响应-电子数据取证技术
6. 网络安全应急响应-常用工具
7. 网络安全应急响应-基础技能
一 、Linux终端检测
1. 排查网络连接及进程
使用"netstat -antp",分析可疑的端口、IP、PID及程序进程。
针对服务器,可能有大量的本机80、8080、442、1433、3306、1521、22等端口连接远程IP的随机端口。或者本机随机端口连接远程IP地址的80端口,可能在进行Web访问。重点排查本机的随机端口连接互联网IP的非正常端口。
使用"ps aux | grep 进程名称或ID",可查看进程信息。
排查隐藏进程,可以使用如下命令:ps -ef | awk '{print}' | sort -n | uniq >1ls /proc | sort -n | uniq >2diff 1 2
2. 排查可疑用户
Linux下的“/etc/passwd”和“/etc/shadow”文件记录着用户信息。

格式:“用户名:密码:用户ID:组ID:用户说明:家目录:登录之后shell”

格式:“用户名:加密密码:密码最后一次修改日期:两次密码的修改时间间隔:密码有效期:密码修改到期的警告天数:密码过期之后的宽限天数:账号失效时间:保留”
查看UID为0的账号:“awk -F: '$3==0{print $1}' /etc/passwd”
查看能够登陆的账号:“cat /etc/passwd | grep -E "/bin/bash$"”
查看其他账号是否存在sudo权限:“cat /etc/sudoers | grep -v "^#\|^$" | grep "ALL=(ALL)"”
3. 排查历史命令
使用“history”或者“cat /root/.bash_history”查看历史命令,默认记录1000个。
在“/etc/profile”中添加命令“export HISTTIMEFORMAT="%F %T "”,保存后执行命令“source /etc/profile”可为history设置时间戳。
4. 排查可疑文件
- 敏感目录文件
查看敏感目录,如“/tmp”目录下的文件,注意隐藏文件,以及以“..”为名的文件,使用“ls -alt /tmp”查看。
可以使用“stat”命令查看文件创建修改时间、访问时间等。
- 查找新增文件
查找24小时内被修改的所有文件:“find ./ -mtime 0 -name "*"”
查看72小时内新增的文件:“find / -ctime -2”
根据确定时间反推变更的文件:“ls -al /tmp | grep "Feb 27"”
- 特殊权限文件
查找777权限的文件:“find / * -perm 4777”
5. 排查开机启动项
开启启动项文件:“/etc/rc.local”和“/etc/rc.d/rc[0-6].d”
| 运行级别 | 含义 |
|---|---|
| 0 | 关机 |
| 1 | 单用户模式 |
| 2 | 不完全的命令行模式,不含NFS服务 |
| 3 | 完全的命令行模式 |
| 4 | 系统保留 |
| 5 | 图形模式 |
| 6 | 重启动 |
K开头的脚本文件,代表运行级别加载时需要关闭;S开头的脚本文件,代表加载时自启动。
6. 排查定时任务
“crontab”命令可以创建计划任务;“anacron”实现异步定时任务调度。使用“crontab -l”查看计划任务。
重点关注目录:
- “
/var/spool/cron/*” - “
/etc/crontab” - “
/etc/cron.d/*” - “
/etc/cron.daily/*” - “
/etc/cron.hourly/*” - “
/etc/cron.monthly/*” - “
/etc/cron.weekly/*” - “
/etc/anacrontab” - “
/var/spool/anacron/*”
7. 排查服务自启动
服务自启动有三种方法:开启启动项“/etc/re.d/rc.local”、命令“ntsysv”和命令“chkconfig”。
使用命令“chkconfig --list”查看服务自启动状态。
二 、Windows终端检测
1. 排查网络连接及进程
- 使用“
netstat -ano”查看当前网络连接。
- 使用“
netstat”定位到PID后,使用“tasklist”命令定位程序。使用“tasklist /svc | findstr 5848”
2. 排查可疑用户
- 可在“计算机管理”→“本地用户和组”中查看。

- 使用“
net user”查看,但是这样不会显示隐藏用户。
3. 排查可疑文件
如果用户账号是使用“net”或用户管理程序进行删除的,那么系统中仍会残留该用户的目录,目录中的一些文件会记录用户的某些特定行为。
4. 排查开机启动项
排查开机启动项有三种方法:
利用火绒等安全软件查看启动项、开机时间管理等。

“
运行”→“msconfig”
“
运行”→“regedit”,主要注意三个注册表项:
“计算机\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run”
“计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run”
“计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce”
5. 排查计划任务
- “
开始”→“Windows 管理工具”→“任务计划程序”
6. 排查服务自启动
- “
运行”→“services.msc“
边栏推荐
- 【黄啊码】fastadmin接入微信支付和支付宝支付
- Free CDN jsdelivr acceleration website
- JS scope and scope chain
- [Huang ah code] PHP cooperates with xlwriter to realize infinite header level excel export
- ES5中数组对象有哪些方法和ES6新增了哪些方法
- [Huang ah code] teacher, I want to choose software development related majors after the college entrance examination. Which direction do you think is good? How to fill in the college entrance examinat
- Svelte official introductory tutorial (4) -- template logic
- js解析引擎执行js代码的步骤
- Memo, usememo, usecallback summary
- 【黄啊码】PHP配合微信公众号生成推广二维码
猜你喜欢

【黄啊码】为什么我建议您选择go,而不选择php?
![[Huang ah code] teacher, I want to choose software development related majors after the college entrance examination. Which direction do you think is good? How to fill in the college entrance examinat](/img/e4/7cf5b7f896c1be5d349d660462b017.png)
[Huang ah code] teacher, I want to choose software development related majors after the college entrance examination. Which direction do you think is good? How to fill in the college entrance examinat

Windows system disk slimming (Development)

ES6--symbol( )与Map( )
![[BJDCTF2020]Cookie is so stable](/img/d8/fb9fc2496ee8b23ec6fd6195051030.png)
[BJDCTF2020]Cookie is so stable

内存取证-Volatility安装使用以及一些CTF比赛题目

ES6--类(class)

BUUCTF 面具下的flag

Understanding service governance in distributed development

ES6--数组
随机推荐
C语言:有关字符串函数的一些自我实现
Memo, usememo, usecallback summary
Svelte 官方入门教程(5)—— 事件
FTP 上传文件脚本说明
[Huang ah code] you must learn these little knowledge points of MySQL for beginners
[Huang ah code] getting started with MySQL - 2. Using data definition language (DDL) to operate the database
ES6内置对象的新方法新特性
[Huang ah code] getting started with MySQL - 1. SQL execution process
ES6新增的箭头函数
ThreadLocal造成的内存泄漏
【黄啊码】PHP配合微信公众号生成推广二维码
js 数字序号 转 字母序号
: class modify style
JS的时间对象
oracle 学习
正则表达式
创建/删除 表空间/用户
Network security emergency response - electronic data forensics technology
Svelte official introductory tutorial (4) -- template logic
Use ramda parsing yarnrc/. Example of npmrc configuration file