I discovered mitmproxy and would like to use it to simulate a replay attack.
The application uses MTProto on top of TCP, and I would like to replay entire MTProto messages.
My idea:
- Route traffic from client to server over a proxy
- Sniff all TCP packets
- Replay single TCP packets
The last part is the difficult part. The forged TCP packet must
- increase the sequence number,
- recompute the checksum
in order to get accepted.
I tried to use mitmproxy for this, but I only found out how to copy the entire flow, but not single packets.
Is it possible to achieve my goal with mitmproxy? If so, how to forge a single packet? Otherwise: Are there better tools for this attack?