如何在TCP会话期间实施伪造源代码? [英] How implement source faking during TCP session?

查看:140
本文介绍了如何在TCP会话期间实施伪造源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个想法是两个不同的机器(在两个不同的NAT之后)连接到公共服务器.

The idea is that two different machines (behind two different NATs) connect to public-server.

然后他们尝试与此类公共服务器建立TCP连接... 这样,在传输数据流期间就可能发生魔术! 在此会话期间,更改整个tcp/ip堆栈上的源和目标地址.

And they try to create TCP connection with such public server... Then possible the magic can happens during proxing data stream! Change source and dest address on whole tcp/ip stack during this session.

目标-将第三部分作为代理排除在进一步的沟通之外...

The goal - to exclude this third part as a proxy from further communication...

推荐答案

首先,您需要一台服务器,Peer会将数据发送到该服务器,或者让它知道该服务器需要向其发送同步确认.

First you need a server to which Peer will send a data or something for letting it know that the server needs to send an syn-ack to it.

然后,第一个对等体A将一个数据包发送到具有较低TTL值的对等体B的地址,这样它就被丢弃在中间,并且不会到达B的NAT.它将继续发送此数据包,直到服务器收到包含B的源地址(源伪造)的syn-ack的数据包为止.并且A将与服务器进行握手,但是A会认为他正在与B进行握手.

Then first Peer A send a packet to Peer B's address with low TTL value so that it is dropped in the middle and doesn't reach to B's NAT. It will keep sending this packet until a packet form the server reaches it with syn-ack containing source address of B's (source faking). And A will do the handshaking with the server but A will think he is doing the handshaking with B.

B确实发生了相同的事情.B将与服务器进行握手,但会认为与A进行了握手.在握手完成之后,两端的数据传输都以P2P连接的形式在A和B之间开始.

Exactly same thing happens with B. B will handshake with server but will think it is done with A. After the handshaking is complete on both end data transfer begins with between A and B as P2P connection.

这是源伪造,因为服务器与两个对等方假装其中一个对等方握手.这就是两个对等NAT彼此打开的方式.

This is source faking as server is handshaking with both peers pretending one of the peers. This is how both peers NAT is opened to each other.

这篇关于如何在TCP会话期间实施伪造源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆