工控ctf

本文详细介绍了如何通过对网络流量数据包的分析,尤其是Modbus和MMS协议的数据,来寻找黑客入侵的痕迹。在案例中,通过分析TCP流和关键字搜索,发现了可能的flag隐藏在base64编码的图片中。此外,还探讨了工业网络中的异常检测,强调了对PRES、TCP、COTP和MMS协议流量的深入理解和追踪的重要性。通过对流量数据的解析,成功找到了异常点并解密了隐藏信息,揭示了黑客的邮箱地址。
摘要由CSDN通过智能技术生成

黑客的大意

下载后得到mail,在文件后面jpg
打开图片是一个这样的图片,
在这里插入图片描述这里我们根据题目的意思:
黑客在入侵后不小心留下了这样一个文件,请分析文件进行溯源,找到黑客的邮箱。flag格式为flag{邮箱账号}
这里的主要关键词是对文件进行溯源,以及flag格式为邮箱账号
然后我们看文件有什么特征,然后发现下面有一句英文
我们去搜索一下,这里说一下,我们一般搜索都可以去github看一下,有没有这个项目。
这里直接搜。
在这里插入图片描述这里随便打开一个网页,我打开的是第二个.
这里翻一下看到一个邮箱,然后我们试试,这里的格式是flag{}
发现这个就是flag。

在这里插入图片描述

Modbus协议分析

题目:黑客通过外网进入一家工厂的控制网络,之后对工控网络中的操作员站系统进行了攻击,最终通过工控协议破坏了正常的业务。我们得到了操作员站在攻击前后的网络流量数据包,我们需要分析流量中的蛛丝马迹,找到FLAG。
题目附件连接:https://pan.baidu.com/s/1jGu7-1EKc29HTQc-pCJZlw (提取码:8kqx)

工业协议分析1

题目:工业网络中存在异常,尝试通过分析PCAP流量包,分析出流量数据中的异常点,并拿到FLAG。
题目附件连接:https://pan.baidu.com/s/17jkHLBqcjxP0o9FpGIfObA (提取码:95ds)
解题步骤:
打开流量包,发现存在PRES、TCP、COTP、MMS协议的流量,其中选择一个数据包,追踪TCP流发现存在关键字flag.txt,如图所示:
在这里插入图片描述这里对多个数据包进行tcp追踪流
在这里插入图片描述发现好像都有flag.txt,所以我们分析所有包都有的话,那么肯定不是这个的.
2、然而通过多次分析与flag.txt相对应的流量包中,没有发现flag.txt的内容,于是换一个思路,对流量包进行关键字(jpg、png、zip、rar、flag)搜索,查看是否存在其他的文件。在linux系统中使用grep指令,可以对文件进行指定关键字搜索。linux中grep命令用法,我们使用指令进行关键字搜索

grep "flag" -a test.pcap

在这里插入图片描述

grep ".zip" -a test.pcap

在这里插入图片描述

grep ".jpg" -a test.pcap

在这里插入图片描述
这里zip和jpg都没有东西

grep ".png" -a test.pcap

但是这里搜索png的时候出来了一些字符组合,这里在png后面有提示base64加密
在这里插入图片描述这里解密发现肯存在一张图片,因为开头有NG两个字,所以我们把
在这里插入图片描述

# coding = utf -8
import os , base64
img_str= 'iVBORw0KGgoAAAANSUhEUgAAAdAAAABiCAYAAADgKILKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABzXSURBVHhe7Z2Js11Fncfn75maqZmaqZkaS0elXAp1GHRUhGFAQHYQFQRFBWQRiBoBWQyyKaBsxo0tCAgkQHayQEL2jSxAyEoSIAHOvM/JPTPn9fv1Od19+9z3bvh+qr5FkXe77z33ntO/7l//fr/+m0IIIYQQ0ciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAnIgAohhBAJyIAKIYQQCciACiGEEAl0ZkDff78oNm/ZV8xfuK2Y8fxrxex5W4vlK3cVe/Ye6L1CCCGEGF6yGtC33n63uOPuNcW/fHJG8bcffsarf/3UjNLAVtz/h/Xm6/h3IYQQYiKSzYBufePt4thT55qG0NXxp8/ttTqIDGj/vP3Oe+VKf/L1y4qTzppffOq/ni/+6bDpxY+ve7n3irHw/VrKzdsjE6tFL24v7p26rrhs0pLy8x3+pZnFhz/zbDnZ+th/PFd86auzi3MuWFhcc+Py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ot35sROWiWAhuuOZGf1EBGVAhxKGIz4CyFcbKdBCRxDKgiVAyjvM4if4NgVzDh6Zt9KbbpJwpWocC6Rxv5tbHlQEVQhyKuAaUoMrrp6zoK5MiFhnQROp5n6TO3Dd1fbFw8fbS506VIIozE8zDgbwYzqYi8iT0p6w+LZh1UU2J/las2lVs2jKxz+UUQogUKMlIURxSFHe/OT7ZBzKgCZDXGVK4IVS56moKIYQYHDKgCVDJxDKEKaLgghBCiOFDBjQBcossYxgj/PXzXlCKiRBCDCsyoIlwQjvlrz50uH04s0/Hnjq3DEAa5MHNQggh8iMD2icH3n2/WLlqd1kE/tY7VxdXTV5a1nw9/6JF5X8paECR96dnvDruxcuFEELkQwZUCCGESEAGVAghhEhABlQIIYRIQAZUCCGESEAGVAghhEhABlQIIYRIQAZUCCGESEAGVAghhEhABlQIIYRIQAZUCCGESEAGVAghhEhABlQIIYRIQAZUCCGESEAGVAghhIimKP4XBcAIzFfvoBoAAAAASUVORK5CYII='

img_data = base64.b64decode(img_str)
# 这里b64decode的意思是把base64编码转换成ascii码。

with open('1.png', 'wb') as f:        
# wb+:以二进制格式打开一个文件用于读写。如果该文件已存在则将其覆盖。如果该文件不存在,创建新文件。
    f.write(img_data)                 
# 这里这里write的意思是写入的意思。
print('successful')

这里出来了flag
在这里插入图片描述

MMS

提示:工业网络中存在的异常,尝试通过分析PACP流量包,分析出流量数据中的异常 点,并拿到FLAG,flag形式为 flag{}。

在这里插入图片描述这里先分析一下mms协议
在这里插入图片描述然后我们一定要相信一个原则,事出反常必有妖。
分析mms的包发现,这两个包的内容有点不太⼀样,后⾯似乎是16进制字符串
在这里插入图片描述不过⼜存在i和j这种不属于16进制字符串的字符,想到i和j是连在⼀起的,第⼀位66转成字符
⼜是f,⽽6c的话转陈字符是l,于是将i替换成c,j替换成d,脚本转⼀下

# coding = utf-8

s = "666c5250356d4249616732557968356d"

flag =" "

for i in range(0, len(s), 2):
    # 表示从0开始,长度为s的字符串,步长为二。

    flag += chr(int(s[i:i+2], 16))
    # 这里chr的意思是把里面的内容转换成字符串
    # s[i:i+2]这个表示在是里面取是里面长度为2的内容,因为一开始i为0
    # 后面的16表示为16进制。


print(flag)
# flRP5mBIag2Uyh5m
# flag{RP5mBI2Uyh5m}

有待更新。。。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值