On Sun, Feb 22, 2009 at 2:34 PM, Oliver Zheng
<[email protected]> wrote:
> I am trying to inject a packet to a live TCP stream. It is connected
> to the localhost and some other host. The packet i'm trying to inject
> is to spoof the other host. Is this possible.

In my experience, sending packets on eth0 causes the packet to bypass
the TCP/IP stack and be sent out sight unseen.  Hence, you won't be
able to inject packets into a TCP stream with the target of the local
host.

Sending packets via loopback might work- I've never tried that to be
honest.  I'm not really sure if you can inject standard ethernet
frames or you need to convert to Linux's cooked SLL header format.
You might try setting the destination MAC to that of eth0 and see if
the kernel will route it for you.

> On 2/22/09, Tyler Littlefield <[email protected]> wrote:
>> you are able to send packets to eth0, set the ip address to 127.0.0.1
>> Hope that's what your asking.
>> ----- Original Message -----
>> From: "Oliver Zheng" <[email protected]>
>> To: <[email protected]>
>> Sent: Sunday, February 22, 2009 3:04 PM
>> Subject: [tcpdump-workers] Sending a packet to localhost?
>>
>>
>>> Hi,
>>>
>>> Is it possible to send a packet to localhost and have the application
>>> receive it? On Linux, there is (at least) lo and eth0. I tried sending
>>> a TCP packet to both lo and eth0, however, it seems like the Linux
>>> TCP/IP stack and application do not receive the packet. The exact same
>>> packet works on Windows (with WinPcap). Is this not possible?
>>>
>>> Thanks,
>>> Oliver
>


-- 
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little
temporary Safety,
deserve neither Liberty nor Safety.
    -- Benjamin Franklin
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.

Reply via email to