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

后端 未结 3 456
抹茶落季
抹茶落季 2020-12-10 09:29

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

For example, if I\'m using firefox for browsing, then I want to int

3条回答
  •  孤城傲影
    2020-12-10 10:02

    To modify the packets, it is better as simple as injecting the packet which is modified into your network. C has a library libnet which does every thing related to packet injection. Python has scapy to inject the packets .

    Now you can do quite interesting things , with libent and scapy , instead of modifying your packet ip/tcp headers , perform arp spoofing and then inject falsify packets and redirect them to the victim.

    Libpcap is used for capturing packets but not for modifying packets . So you can build your own sniffer using libpcap , but to inject/modify packets you need to use libnet .

    To make life simpler , there are tools like burp suite etc..where you can modify the http headers only before forwarding it .

提交回复
热议问题