Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I tried to send a udp packet with fake source Ip(no evil, i am not a attacker;),but i was failed. I seems that the router of the datacenter censor the packets and drop it; who can taught me how to make it?


sort by: page size:

Cool, I used to do this by spoofing udp packets from 3.3.3.3 from the client to the servers public up, but was unreliable due to anti spoofing filter. This way is better

How do you verify the source address of the packet is legit?

> hide behind linux proxy and set up packet dropping (can be done with nftables) random packets.

I used a similar method to simulate running our software on a government network when I worked in defense.

Timeouts and packets dropping all over the place. Government work sucks.


Or you can craft packets all day long with any source address you like and dump them onto the network.

Use a decent router that allows packet sniffing. There are various low cost options. I use Mikrotik for example.

Huh? You simply capture the packets and crack offline.

You can't drop the original traffic using the library. You could capture it, modify it and send it though. That + some iptables rules to drop the original traffic would be sufficient I guess.

How do you guys trace the real packet sender of a packet with a spoofed IP address?

You could probably via ebtables as they inspect ethernet frames directly. That can be used for example to not allow VMs on host to spoof mac addresses.

But easiest way is just don't allow app to run with permission to access raw socket. That's it.

The problem is really that there is no way to get UDP interface that also gives you mac address of the packet so raw sockets are only way to do it.

Similarly there is no interface to send ICMP packets other than raw sockets.


thanks. I was imagining using wireshark and just getting garble

Well I did post the source port, which reduces the effort by a factor of tens of thousands... also, the up-thread did say "with a single fake RST or FIN packet"... which is why I mentioned window guessing...

Also, crap, I'm an idiot. Let me do that non-natted ;)

tcp 0 0 216.240.155.220:4007 60.225.131.226:43972 ESTABLISHED 18694/nc


I think it would be more clever to use an actual valid TCP connection and hide the data in the fragment sizes, timing, push flags, and other various legal flags and options available. This doesn't let you mask your source, but it allows two way communication.

For an even cooler trick, check out pwnat, also from Samy: https://samy.pl/pwnat/

Server sends constant icmp pings with fixed payload to unreachable dead Internet IP. Client sends icmp time exceeded message to server containing original fixed ping subpayload, which the server NAT lets through because the payloads match as related traffic. Server then learns client IP and usual chownat udp hole punching tricks apply.


Neat!

Although, I'd have done it differently. using some packet capture tools, fake replies with the various different IP addresses. That way you don't even have to run a physical router that bounces it back and forth.


You can send spoofed packets from nearly every host.

However hosts like Ecatel are known to specifically allow their customers to send spoofed packets at full speed 24/7.

I think most hosts will notice heavy bandwidth usage, investigate, and then terminate your account. This is why people buy servers at Ecatel even if it is more expensive.


> Could even go a lower level and use something like the TCP packets metadata as the encoding. Send data in the form of TTL variations across packets.

Even better: put it in the ICMP echo request; then you can also spoof the sending address if you wish.

Or encode it in a DNS request/response.


You can do this with a linux router and 'tc'

https://www.pico.net/kb/how-can-i-simulate-delayed-and-dropp...

(just a short example)


Thanks!

Can you clarify, does that works on the forwarded packets? I assume it should, given the vuln in the scrubbing function, but it would help if that would be stated clearly.


You can't tell that incoming UDP is spoofed. The only filtering you can reliably do is outgoing.
next

Legal | privacy