如何修改数据包报头(IP包头,TCP报头)主机前向他们发送到网络 [英] how to modify packet header(IP header, TCP Header) before the host send them into the network

查看:1842
本文介绍了如何修改数据包报头(IP包头,TCP报头)主机前向他们发送到网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要修改数据包报头中的主机之前(IP包头,TCP报头)将其发送到网络中。

I want to modify packet header(IP header, TCP Header) before the host send them into the network.

例如,如果我用firefox浏览,那么我想拦截所有从Firefox的数据包,修改IP / TCP报头,然后将它们发送到网络中。

For example, if I'm using firefox for browsing, then I want to intercept all the packets from firefox and modify the IP/TCP header and then send them into the network.

所以基本上,有两个要求:
从Firefox(而不是其他程序)1拦截所有数据包。如果这是不可能的,是有可能从特定端口或IP /端口对

so basically, there are two requirements: 1 intercept all the packets from firefox(but not other programs). if this is not possible, is it possible to intercept the packets from a specific port or ip/port pair

2修改IP / TCP报头,然后将其注入到网络

2 modify the IP/TCP header and then inject them into the network

是有办法,API来实现这一目标?
怎么样的libpcap?
是否有类似的源$ C ​​$ C段?
我与Linux下C的工作

are there ways, APIs to achieve this? how about libpcap? are there similar source code snippets? I'm working with linux c

谢谢!

推荐答案

剃刀鲸是深层数据包注入一个开源的API。
您可以在源头:

Razorback is an open source API for deep packet injection. You can find the source at:

http://sourceforge.net/projects/razorbacktm/files/Razorback/

您也可以要求他们为源$ C ​​$ C对他们提出的系统。

You can also request them for the source code for their proposed system.

http://www.icir.org/vern/papers/pktd- pam03.pdf

这篇关于如何修改数据包报头(IP包头,TCP报头)主机前向他们发送到网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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