Questions tagged [packet-injection]
53 questions
1
vote
0 answers
modify tcp packet payload with Windivert but than connection finished
i am working on an project and i need to edit a tcp packet data. I use Windivert for this, I can find my packet and edit also i dont vhange packet length just replace some walues with random values(i try this with socket rediretion and edit it will…

kerrro
- 11
- 1
1
vote
1 answer
Send packet with scapy
I'm trying to send a simple ICMP packet from HOST B to HOST A
This is my configuration:
HOST A
10.0.1.10 with gateway set to 10.0.1.24
Router
NIC 1 10.0.1.24
NIC 2 192.168.100.1
HOST B
192.168.100.3
A: 10.0.1.10 <---> 10.0.1.24 |NIC-1 Router…

Kuze
- 41
- 1
- 6
1
vote
2 answers
WinDivert - Modify packet data/payload contents
I've seen examples and sample code of WinDivert being used to modify properties of packets like their destination addresses, for example.
But I've tried searching really hard and can't find any documentation or samples of modifying the actual…

Pacnet
- 41
- 1
- 6
1
vote
2 answers
Sending packet using libpcap speed limitation
I wrote a program that captures Ethernet packets from some NIC (i.e eth0) at high speed (about 1Gbps) and forward traffic using pcap_sendpacket() to another NIC (i.e eth1).
While the forwarder Ethernet interface is not connected to another computer…

salman
- 1,966
- 3
- 15
- 18
1
vote
1 answer
Send raw Ethernet frame with custom data after EtherType using nping
I am using nping to send raw a Ethernet frame. I want to send a frame with custom data starting after the EtherType. However, nping puts the custom data in the middle of the packet. For example, here's my command:
nping --dest-mac …

user2233706
- 6,148
- 5
- 44
- 86
1
vote
2 answers
Is it possible to write a packet, read by libpcap, with libnet? in c?
I'm trying to get libpcap to read a pcap file, get the user to select a packet and write that packet using libnet, in c.
I got the reading from file part done. Libpcap puts that packet into a const unsigned char. I have worked with libnet before,…

Gibberfish
- 13
- 4
1
vote
4 answers
Inject a packet to terminate a TCP connection
I have to write a program that sniffs network packets (part1-the simple part).
And I have to update the program (part2) so that it will be able to terminate connections.
The specific requirements are:
Construct raw packets by specifying data link…

scatman
- 14,109
- 22
- 70
- 93
1
vote
1 answer
SharpPcap - Drop packet or alter outgoing packet
Is it possible to either drop a packet or alter a response using SharpPcap? I've been looking online and I've seen older posts that make it seem like it is not possible to drop a packet. I can't tell if it is possible to alter one though.
If not,…

Yecats
- 1,715
- 5
- 26
- 40
1
vote
1 answer
Simulate HTTP get request in hping
I need to simulate HTTP request in hping.
Can anyone please suggest how this can be done?
Just specifying port as 80 will suffice?

SKT
- 174
- 2
- 17
1
vote
1 answer
How to analyze/craft packets before they are sent/received?
I've been wondering how IPSec works from a developer s point of view, 'cuz I would like to be able to write my own custom "agent" to intercept and analyze packets before they are received by the OS mostly on Linux, and also do an injection at the…

Mirak
- 19
- 1
1
vote
1 answer
Controlling packet injection contents at the byte level with Python and Scapy
Is it possible to designate a packet to send with scapy and python, at the byte level?
For instance, instead of building out an 802.11 packet using functionality like scapy.Dot11Elt(), et cetera, before sending, you just…

DHandle
- 402
- 2
- 9
1
vote
2 answers
error getting interface index using SIOCGIFINDEX
Hi i am trying to do packet injection using raw sockets, i have a problem in getting the interface index using SIOCGIFINDEX command of the ioctl. I am using ubuntu 12.04 as my OS. Please help the code is:
int BindRawSocketToInterface(char *device,…

DrYJ
- 93
- 3
- 6
1
vote
2 answers
Libnet11 build IPv6 packet manually
I am trying to use Libnet11 function:
int libnet_write_raw_ipv6 (libnet_t *l, u_int8_t *packet, u_int32_t size)
to inject IPv6 packet on network layer.
I had created IPv6 packet and captured it
with Wireshark. Wireshark reported:
malformed…

user1793850
- 11
- 2
1
vote
1 answer
Python Scapy Introduce a TCP option
I am trying to build a packet with a TCP option called user timeout. Does scapy support this? Adding options like MSS seems pretty straightforward.
Here is the RFC for the option: https://www.rfc-editor.org/rfc/rfc5482#section-2
Any pointers?

user1295872
- 461
- 1
- 6
- 16
1
vote
1 answer
Libnet vs Raw Sockets for packet injection
I need the opinion/advice of more experienced network programmers about some stuff regarding to packets injection on GNU/Linux systems. I'm working on a open source C++ library for packet injection and sniffing. The library is libcrafter. On the…

LarryPel
- 286
- 3
- 9