News for hackers. Stuff that matters.
Re:How does a TCP Reset Attack work? by 29athrowaway on Tuesday April 28, 2020 @04:03AM (#23004709)
There's no authentication in IP datagrams. When you receive an IP datagram, your network stack just trusts it.

Therefore anyone can craft an IP datagram with a source address and send it. That affects higher layer protocols like TCP.

Solution? Use a secure alternative to IP, like IPsec or Wireguard.

Re:How does a TCP Reset Attack work? by MaxBarraclough on Tuesday April 28, 2020 @05:34AM (#23005253)
Why not just use TLS?
Re:How does a TCP Reset Attack work? by vngzs on Tuesday April 28, 2020 @09:24AM (#23006694)
You can read the SNI without decrypting[0]. You can see it in the ClientHello when I connect to news.ycombinator.com:

    Internet Protocol Version 4, Src: xxx.xxx.xxx.xxx, Dst: 209.216.230.240
    Transmission Control Protocol, Src Port: 64962, Dst Port: 443, Seq: 1, Ack: 1, Len: 517
    Transport Layer Security
        TLSv1.2 Record Layer: Handshake Protocol: Client Hello
            Content Type: Handshake (22)
            Version: TLS 1.0 (0x0301)
            Length: 512
            Handshake Protocol: Client Hello
                Handshake Type: Client Hello (1)
                Length: 508
                Version: TLS 1.2 (0x0303)
                Extension: server_name (len=25)
                    Type: server_name (0)
                    Length: 25
                    Server Name Indication extension
                        Server Name list length: 23
                        Server Name Type: host_name (0)
                        Server Name length: 20
                        Server Name: news.ycombinator.com
                Extension: padding (len=172)
The server name is right there, in the packets, even for TLS! Since the Great Firewall sits between you and the website, it can know the sequence number and send an RST as soon as the connection is initiated.

For a less destructive use of this packet introspection, I've been using Istio to inspect ClientHello SNIs to control egress traffic from Kubernetes[1]. The SNI extension is useful, but it can leak some metadata to adversaries.

[0]: https://en.wikipedia.org/wiki/Server_Name_Indication

[1]: https://istio.io/docs/tasks/traffic-management/egress/egress...

Re:How does a TCP Reset Attack work? by MaxBarraclough on Tuesday April 28, 2020 @11:38AM (#23008050)
But that's SNI's fault specifically. For comparison, SSH doesn't do that (to my knowledge at least), but the attacker can still see the destination IP, and might well be able to map that back to the domain.

I agree though that ideally a bad guy intercepting your traffic should not be able to tell where it is headed.

Re:How does a TCP Reset Attack work? by bogomipz on Tuesday April 28, 2020 @09:47AM (#23006897)
Did you use Tshark for outputting this TLS handshake? I ask because it's so nicely formatted and legible.
Re:How does a TCP Reset Attack work? by vngzs on Tuesday April 28, 2020 @09:52AM (#23006938)
Wireshark -> [select the field you want] -> Right Click -> Copy -> All Visible Items
Re:How does a TCP Reset Attack work? by paddez on Tuesday April 28, 2020 @06:20AM (#23005503)
TLS is an Application layer protocol, so it's encapsulated within a TCP connection.

TCP connections themselves are encapsulated within IP - so if you can masquerade an IP packet, the inner TLS segment won't protect against decisions at that level.

Re:How does a TCP Reset Attack work? by paraboul on Tuesday April 28, 2020 @06:20AM (#23005502)
Because TLS doesn't operate at TCP level. It encrypts the payload carried by it.

TCP (and IP) headers (source/dst IP, port, flags, etc..) remain unencrypted.

On the other hand, IPsec operates at IP level (which can be tunneled over a clear IP/TCP layer)