在ctfhub的刷题记录

[流量分析]TJ协议

什么鬼wp,赚金币来的吧

右键追踪TCP流,就可以找到那个串

https://blog.csdn.net/bcbobo21cn/article/details/91349077

追踪TCP流应该是把所有同一TCP流组合在一起,红色是源到目的地,蓝色反之 follow tcp stream

[流量分析]AndroidDisplayBridge

参考 https://xuanxuanblingbling.github.io/ctf/android/2020/07/07/h264/

wireshark打开,通过5555端口知道是Android网络调试默认端口

任意一条5555端口,右键->解码为,当前条目更改为ADB

在ADB协议流量开始发送了一条write命令

STA2!/data/local/tmp/scrcpy-server.jar

搜索以下发现是一个开源项目https://github.com/Genymobile/scrcpy

了解一下相关知识发现这个软件是H.264编码

https://blog.csdn.net/yuanchunsi/article/details/73194569

文件头为00 00 00 01 67 42

使用pyshark导出

import pyshark
import base64
captures = pyshark.FileCapture('attachment.pcapng')
payload = b""
for capture in captures:
    if hasattr(capture.tcp,"payload") :
        if capture.ip.src == '192.168.1.103':
            payload += base64.b16decode(bytes(capture.tcp.payload.replace(":","").upper(),encoding='utf-8'))
            # print(payload)

f = open("out.h264","wb")
ind=payload.find(b'\x00\x00\x00\x01\x67\x42')
f.write(payload[ind:])

看视频即可

SCTF{better_access_with_scrcpy}