Smashing the state machine: the true potential of web race conditions
https://portswigger.net/research/smashing-the-state-machine [portswigger.net]
2023-08-10 16:24
tags:
concurrency
exploit
networking
security
web
HTTP request processing isn’t atomic - any endpoint might be sending an application through invisible sub-states. This means that with race conditions, everything is multi-step. The single-packet attack solves network jitter, making it as though every attack is on a local system. This exposes vulnerabilities that were previously near-impossible to detect or exploit.
source: L
The day my ping took countermeasures
https://blog.cloudflare.com/the-day-my-ping-took-countermeasures/ [blog.cloudflare.com]
2023-07-12 00:08
tags:
development
investigation
linux
networking
swtools
While this doesn’t happen too often, a computer clock can be freely adjusted either forward or backward. However, it’s pretty rare for a regular network utility, like ping, to try to manage a situation like this. It’s even less common to call it “taking countermeasures”. I would totally expect ping to just print a nonsensical time value and move on without hesitation.
Ping developers clearly put some thought into that. I wondered how far they went. Did they handle clock changes in both directions? Are the bad measurements excluded from the final statistics? How do they test the software?
source: L
See this page fetch itself, byte by byte, over TLS
https://subtls.pages.dev/ [subtls.pages.dev]
2023-05-11 21:08
tags:
interactive
networking
security
visualization
This page performs a live, annotated https: request for its own source. It’s inspired by The Illustrated TLS 1.3 Connection and Julia Evans’ toy TLS 1.3.
source: L
whoarethey: Determine Who Can Log In to an SSH Server
https://www.agwa.name/blog/post/whoarethey [www.agwa.name]
2023-01-11 04:12
tags:
networking
opsec
security
As a proof of concept, I’ve created whoarethey, a small Go program that takes the hostname:port of an SSH server, an SSH username, and a list of GitHub usernames, and prints out the GitHub username which is authorized to connect to the server.
source: HN
A Tale Of A Trailing Dot
https://daniel.haxx.se/blog/2022/05/12/a-tale-of-a-trailing-dot/ [daniel.haxx.se]
2022-05-14 00:41
tags:
networking
security
standard
text
turtles
web
Trailing dots on host names in URLs is the gift that keeps on giving. Let me take you through a dwindling story of how the dot is handled differently in different places through the stack of an Internet client. The evil trailing dot.
source: L
How I'm Using SNI Proxying and IPv6 to Share Port 443 Between Webapps
https://www.agwa.name/blog/post/using_sni_proxying_and_ipv6_to_share_port_443 [www.agwa.name]
2022-04-16 05:33
tags:
admin
networking
I’ve written about SNI proxying before, but in a nutshell: a proxy server can use the first message in a TLS connection (the Client Hello message, which is unencrypted and contains the server name (SNI) that the client wants to connect to) to decide where to route the connection.
source: L
Harder Drive: Hard drives we didn't want or need
http://tom7.org/harder/ [tom7.org]
2022-04-13 04:29
tags:
hardware
networking
random
retro
solder
storage
video
The perils of the “real” client IP
https://adam-p.ca/blog/2022/03/x-forwarded-for/ [adam-p.ca]
2022-03-05 22:36
tags:
cloud
networking
security
turtles
web
The state of getting the “real client IP” using X-Forwarded-For and other HTTP headers is terrible. It’s done incorrectly, inconsistently, and the result is used inappropriately. This leads to security vulnerabilities in a variety of projects, and will certainly lead to more in the future.
source: HN
The 5-hour CDN
https://fly.io/blog/the-5-hour-content-delivery-network/ [fly.io]
2021-03-22 02:51
tags:
cloud
networking
web
The term “CDN” (“content delivery network“) conjures Google-scale companies managing huge racks of hardware, wrangling hundreds of gigabits per second. But CDNs are just web applications. That’s not how we tend to think of them, but that’s all they are. You can build a functional CDN on an 8-year-old laptop while you’re sitting at a coffee shop. I’m going to talk about what you might come up with if you spend the next five hours building a CDN.
It’s useful to define exactly what a CDN does. A CDN hoovers up files from a central repository (called an origin) and stores copies close to users. Back in the dark ages, the origin was a CDN’s FTP server. These days, origins are just web apps and the CDN functions as a proxy server. So that’s what we’re building: a distributed caching proxy.
SSH and User-mode IP WireGuard
https://fly.io/blog/ssh-and-user-mode-ip-wireguard/ [fly.io]
2021-03-12 03:23
tags:
admin
cloud
development
go
library
networking
For a couple hundred lines of code (not counting the entire user-mode Linux you’ll be pulling in from gVisor, HEY! Dependencies! What are you gonna do!) you can bring up a new, cryptographically authenticated network, any time you want to, in practically any program.
There really are some fun libraries out there if you want to build something crazy.
source: HN
Uncovering a 24-year-old bug in the Linux Kernel
https://engineering.skroutz.gr/blog/uncovering-a-24-year-old-bug-in-the-linux-kernel/ [engineering.skroutz.gr]
2021-02-15 18:16
tags:
bugfix
c
linux
networking
programming
When one side’s receive buffer (Recv-Q) fills up (in this case because the rsync process is doing disk I/O at a speed slower than the network’s), it will send out a zero window advertisement, which will put that direction of the connection on hold. When buffer space eventually frees up, the kernel will send an unsolicited window update with a non-zero window size, and the data transfer continues. To be safe, just in case this unsolicited window update is lost, the other end will regularly poll the connection state using the so-called Zero Window Probes (the persist mode we are seeing here).
Apparently, the bug was in the bulk receiver fast-path, a code path that skips most of the expensive, strict TCP processing to optimize for the common case of bulk data reception. This is a significant optimization, outlined 28 years ago² by Van Jacobson in his “TCP receive in 30 instructions” email. Apparently the Linux implementation did not update snd_wl1 while in the receiver fast path. If a connection uses the fast path for too long, snd_wl1 will fall so far behind that ack_seq will wrap around with respect to it. And if this happens while the receive window is zero, there is no way to re-open the window, as demonstrated above. What’s more, this bug had been present in Linux since v2.1.8, dating back to 1996!
source: trivium
KEMTLS: Post-quantum TLS without signatures
https://blog.cloudflare.com/kemtls-post-quantum-tls-without-signatures/ [blog.cloudflare.com]
2021-01-16 02:37
tags:
beta
crypto
networking
quantum
security
web
KEMTLS, therefore, achieves the same goals as TLS 1.3 (authentication, confidentiality and integrity) in the face of quantum computers. But there’s one small difference compared to the TLS 1.3 handshake. KEMTLS allows the client to send encrypted application data in the second client-to-server TLS message flow when client authentication is not required, and in the third client-to-server TLS message flow when mutual authentication is required. Note that with TLS 1.3, the server is able to send encrypted and authenticated application data in its first response message (although, in most uses of TLS 1.3, this feature is not actually used). With KEMTLS, when client authentication is not required, the client is able to send its first encrypted application data after the same number of handshake round trips as in TLS 1.3.
Intuitively, the handshake signature in TLS 1.3 proves possession of the private key corresponding to the public key certified in the TLS 1.3 server certificate. For these signature schemes, this is the straightforward way to prove possession; another way to prove possession is through key exchanges. By carefully considering the key derivation sequence, a server can decrypt any messages sent by the client only if it holds the private key corresponding to the certified public key. Therefore, implicit authentication is fulfilled. It is worth noting that KEMTLS still relies on signatures by certificate authorities to authenticate the long-term KEM keys.
How NAT traversal works
https://tailscale.com/blog/how-nat-traversal-works/ [tailscale.com]
2021-01-11 23:30
tags:
article
networking
We covered a lot of ground in our post about How Tailscale Works. However, we glossed over how we can get through NATs (Network Address Translators) and connect your devices directly to each other, no matter what’s standing between them. Let’s talk about that now!
Very detailed.
node.example.com Is An IP Address
https://tuckersiemens.com/posts/node-example-com-is-an-ip-address/ [tuckersiemens.com]
2020-12-30 02:19
tags:
bugfix
networking
programming
python
type-system
This takes a bit to get to the punchline, but man, good old duck typing for the win.
It turns out that, under certain conditions, the ipaddress module can create IPv6 addresses from raw bytes. My assumption is that it offers this behavior as a convenient way to parse IP addresses from data fresh off the wire.
Does node.example.com meet those certain conditions? You bet it does. Because we’re using Python 2 it’s just bytes and it happens to be 16 characters long.
source: L
NAT Slipstreaming
https://samy.pl/slipstream/ [samy.pl]
2020-11-01 19:51
tags:
browser
exploit
networking
security
turtles
web
NAT Slipstreaming allows an attacker to remotely access any TCP/UDP service bound to a victim machine, bypassing the victim’s NAT/firewall (arbitrary firewall pinhole control), just by the victim visiting a website.
This is neat, although you have to dig in a bit to learn it requires the NAT gateway to do some fancy SIP proxying.
source: L
Implementing traceroute in Go
https://blog.kalbhor.xyz/post/implementing-traceroute-in-go/ [blog.kalbhor.xyz]
2020-08-24 17:45
tags:
go
networking
programming
This tool is very useful to inspect network paths and solve problems. But aside from that, this tool is extremely interesting and its actual implementation is pretty simple.
source: L
Under the Hood of a Simple DNS Server
https://blog.aos.sh/2020/08/23/under-the-hood-of-a-simple-dns-server/ [blog.aos.sh]
2020-08-24 17:37
tags:
networking
programming
For this post, I will talk mostly about the details of implementing a DNS server that follows the original two RFCs that laid out the spec: 1034 and 1035.
source: L
Chromium’s impact on root DNS traffic
https://blog.apnic.net/2020/08/21/chromiums-impact-on-root-dns-traffic/ [blog.apnic.net]
2020-08-21 17:06
tags:
browser
investigation
networking
The root server system is, out of necessity, designed to handle very large amounts of traffic. As we have shown here, under normal operating conditions, half of the traffic originates with a single library function, on a single browser platform, whose sole purpose is to detect DNS interception. Such interception is certainly the exception rather than the norm. In almost any other scenario, this traffic would be indistinguishable from a distributed denial of service (DDoS) attack.
source: HN
Certificate Transparency: a bird's-eye view
https://emilymstark.com/2020/07/20/certificate-transparency-a-birds-eye-view.html [emilymstark.com]
2020-08-05 01:13
tags:
browser
networking
security
web
Certificate Transparency (CT) is a still-evolving technology for detecting incorrectly issued certificates on the web. It’s cool and interesting, but complicated. I’ve given talks about CT, I’ve worked on Chrome’s CT implementation, and I’m actively involved in tackling ongoing deployment challenges – even so, I still sometimes lose track of how the pieces fit together. I find it easy to forget how the system defends against particular attacks, or what the purpose of some particular mechanism is.
source: green
A Massive Leak
https://thedailywtf.com/articles/a-massive-leak [thedailywtf.com]
2020-08-05 01:04
tags:
bugfix
corner
csharp
garbage-collection
networking
“Memory leaks are impossible in a garbage collected language!” is one of my favorite lies. It feels true, but it isn’t. Sure, it’s much harder to make them, and they’re usually much easier to track down, but you can still create a memory leak. Most times, it’s when you create objects, dump them into a data structure, and never empty that data structure. Usually, it’s just a matter of finding out what object references are still being held. Usually.
A few months ago, I discovered a new variation on that theme. I was working on a C# application that was leaking memory faster than bad waterway engineering in the Imperial Valley.