D
David Fifield
bamsoftware.com · Personal blog · on HN since 2015
David Fifield, a researcher on Internet censorship circumvention, writes about domain fronting, DNS tunneling, and zip bombs.
What HN saysHN links it for the domain fronting paper and the better zip bomb; commenters use it to discuss blocking-resistant communication.
37HN people shared it
25linked it in comments
17stories submitted
1.1Kstory points
10 months agolast shared
2015people per year2026
Most-shared posts
- 1Blocking-resistant communication through domain fronting17 people · 8 points · first shared 2016 · discussion on HN
- 2A better zip bomb10 people · 671 points · first shared 2019 · 131 comments on HN
- 3Biggest image in the smallest space5 people · 360 points · first shared 2015 · 103 comments on HN
- 4Dnstt is a DNS tunnel that can use DNS over HTTPS (DoH) and DNS over TLS (DoT)2 people · 8 points · first shared 2020 · 1 comments on HN
- 5Threat modeling and circumvention of Internet censorship2 people · 1 points · first shared 2018 · discussion on HN
- 6Turbo Tunnel, a good way to design censorship circumvention protocols1 people · 4 points · first shared 2020 · discussion on HN
- 7Survey of techniques to encode data in DNS messages1 people · 3 points · first shared 2020 · discussion on HN
- 8Bam Software1 people · 1 points · first shared 2021 · discussion on HN
What HN people wrote when they linked it
pmarreck · 2023-09-06
"Compression bombs that use the zip format must cope with the fact that DEFLATE, the compression algorithm most commonly supported by zip parsers, cannot achieve a compression ratio greater than 1032. For this reason, zip bombs typically rely on recursive decompression, nesting zip files within zip files to get an extra factor of 1032 with each layer. But the trick only works on implementations that unzip recursively, and most do not."
https://www.bamsoftware.com/hacks/zipbomb/
zaroth · 2018-05-01
Interesting. Reading their developer guide [1] pg 293 - CloudFront servers have all the private keys anyway, so it hardly matters—from a security perspective—which key is used to establish the TLS connection to the CloudFront endpoint. The connection between CloudFront and Signal’s own severs would be encrypted with Signal’s key.
I also found this paper on domain fronting to be a very good read - Blocking-resistant communication through domain fronting [2]
[1] - https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cf_…
[2] - https://www.bamsoftware.com/papers/fronting/
aorth · 2017-09-25
I would say WhatsApp could use domain fronting like Signal, but that technique requires the adversarial government or ISP to decide that blocking Google.com—or whatever large, important domain is doing the fronting—is worth the cost to block WhatsApp. But China definitely doesn't care about blocking Google!
https://www.bamsoftware.com/papers/fronting/
ergot · 2016-12-23
Here's a detailed overview of so called 'domain fronting' https://www.bamsoftware.com/papers/fronting/
Some VPNs use a module called obfsproxy which uses the fronting technique. One VPN service I recall using it is called Tunnelbear. You can read more about this feature here: https://help.tunnelbear.com/customer/en/portal/articles/2435665-ghostb…
This is not an endorsement of Tunnelbear, I just thought it would be noteworthy mentioning that VPN services offer this now to thwart censorship.
repolfx · 2018-07-16
Google did not give any engineering reasons at the time. That's misleading. Here's what they said:
"Domain fronting has never been a supported feature at Google, but until recently it worked because of a quirk of our software stack," a Google spokesperson explained in a statement emailed to The Register. "We're constantly evolving our network, and as part of a planned software update, domain fronting no longer works. We don't have any plans to offer it as a feature."
This might superficially sound like domain fronting stopped working accidentally, as part of other changes, but notice how carefully it's phrased. They made an update. It stopped working. Nothing in this phrasing would be false if they made a business decision to kill it and did so.
I find this explanation extremely likely for several reasons:
1. It happened just when fronting was being adopted by Signal, a high profile app that would have caught attention.
2. All the other big players made the same change, again, prompted by specific events related to anti-censorship.
https://www.bamsoftware.com/papers/fronting/
GreatFire speculated that the attacks were precipitated by the publication of an article in the Wall Street Journal that described in detail domain fronting and other “collateral freedom” techniques. The interview associated with the article also caused CloudFlare to begin matching SNI and Host header, in an apparent attempt to thwart domain fronting.
This explanation turned out to be correct.…
masklinn · 2025-07-22
A few years ago David Fitfield invented a technique which provides a million-to-one non-recursive expansion, by overlapping the file streams: https://www.bamsoftware.com/hacks/zipbomb/
tga_d · 2025-04-30
There was an incident a little while back where some Tor Project anti-censorship infrastructure was run on the same site as a blog post about zip bombs.[0] One of the zip files got crawled by Google, and added to their list of malicious domains, which broke some pretty important parts of Tor's Snowflake tool. Took a couple weeks to get it sorted out.[1]
[0] https://www.bamsoftware.com/hacks/zipbomb/ [1] https://www.bamsoftware.com/hacks/zipbomb/#safebrowsing
BonoboIO · 2024-01-10
Also interesting: Biggest image in the smallest space
https://www.bamsoftware.com/hacks/deflate.html
jaclaz · 2023-05-20
Some context if needed:
https://en.wikipedia.org/wiki/Zip_bomb
https://www.bamsoftware.com/hacks/zipbomb/
vivegi · 2023-04-24
I wonder what happens when sites start using techniques like Zip/Compression bombs to defend against impolite mass downloaders. Particularly, in this case of downloading images without honoring robots.txt, a PNG/JPEG/ZIP bomb [1] might be a countermeasure in this arms race.
[1]: https://www.bamsoftware.com/hacks/deflate.html
e1g · 2022-12-12
It's called a "zip bomb" (popularized by Silicon Valley [1]), and there is a good guide (and pre-generated 42kB .zip file to blow up most web clients) at https://www.bamsoftware.com/hacks/zipbomb/
[1] https://www.youtube.com/watch?v=jnDk8BcqoR0
jsjohnst · 2022-02-25
> If RAR encounters a file ten times, it will compress once and store it and nine pointers.
A bunch of compression formats do that. Even zip files can, which leads to interesting tricks like:
https://www.bamsoftware.com/hacks/zipbomb/
dividuum · 2021-04-03
What happens with 42.zip and other zip bombs? https://www.bamsoftware.com/hacks/zipbomb/
_wldu · 2020-05-08
I've often wondered if zip bombs are sometimes used in email attacks. I imagine they could take down some virus/attachment scanners if the devs have not anticipated them.
https://www.bamsoftware.com/hacks/zipbomb/
schoen · 2018-07-06
The Chinese government has had a lot of success blocking Tor (and VPNs) most recently. You may know that all of the normal relays are publicly listed in the Tor directory, making them trivial to block by IP address. That will then require Tor users to do extra work to find bridges or configure pluggable transports for censorship circumvention, which most users may not be motivated enough to do. Censors can also try to fingerprint and block some of the circumvention methods.
In sum, Tor is not trivially or resoundingly winning the censorship arms race, even though it has some good work on censorship circumvention that's often effective in particular countries.
Some good background on this is in
https://www.bamsoftware.com/papers/thesis/
equalunique · 2018-04-18
Basics of domain fronting & how it relates to Signal: https://www.wired.com/2016/12/encryption-app-signal-fights-censorship-…
In-depth explanation of Domain Fronting: https://www.bamsoftware.com/papers/fronting/
lgierth · 2017-12-08
Sure -- but libp2p's network transports underneath are pluggable. There's already Websockets (/ws, think domain fronting! [1]) and Tor (/onion) transports, so there's various options for evading censorship (I personally consider bandwidth throttling a form of censorship).
[1] Domain fronting lets you use a well-established web frontend for your web service. E.g. we could host /ws nodes in Google Cloud, and to the ISP the TLS handshake looks like it's for google.com, while inside the connection there's e.g. a `Host: libp2p.googlecloud.com` header. More info: https://www.bamsoftware.com/papers/fronting/
But then again, net neutrality is a political issue! You don't solve it for good with technology.
Tepix · 2017-12-06
I had a closer look at this technique after reading the article.
The cool thing about this hack is that even in the TLS Server Name Indication (SNI) extension, the front domain name shows up, and only the (encrypted) HTTP Host header shows the true covert destination.
The paper "Blocking-resistant communication through domain fronting" (https://www.bamsoftware.com/papers/fronting/) is very interesting.
One thing that I'm left wondering is if the front domain owners will be at risk being blocked if domain fronting is being done with their domain.
If so they may ask the CDN companies to block this routing behaviour.
koolba · 2017-08-28
You can perform a denial of service attack on a naive server with a maliciously crafted PNG. Just send a zip bomb and see what happens when it decompressed it. The naive approach will crash the server when it tries to malloc successively larger buffers.
https://www.bamsoftware.com/hacks/deflate.html
geofft · 2017-05-09
It's possible to design DPI-resistant protocols; see e.g. domain fronting (Fifield et al. 2015, https://www.bamsoftware.com/papers/fronting/), which uses HTTPS connections to popular CDNs where all unencrypted data (target IP address + SNI header) look just like normal connections. Tor supports this (https://trac.torproject.org/projects/tor/wiki/doc/meek).
I don't know how to make this work with IPFS' P2P approach: a request for www.google.com with a destination IP of some residential Turkey customer looks awfully suspicious. I suppose it's workable if App Engine has a colo inside Turkey.
discreditable · 2017-02-28
Basic filtering can be done via passively inspecting SNI headers and terminating connections to verboten hosts. However, that's not enough for some orgs, and some software works around it: https://www.bamsoftware.com/papers/fronting/
chrisballinger · 2016-12-23
This is exactly what the meek [1] pluggable transport does. It was developed by David Fifield, of the original authors of the domain fronting paper [2].
1. https://trac.torproject.org/projects/tor/wiki/doc/meek
2. https://www.bamsoftware.com/papers/fronting/
NoGravitas · 2016-12-22
I found the linked article on [domain fronting][0] to be very interesting.
[0]: https://www.bamsoftware.com/papers/fronting/
twic · 2018-03-12
> your client will automatically, in plain text, transmit the full DNS name of whatever server it wants to talk to
AIUI, it's slightly better than this, because you only actually need to send the name of some domain that the server can serve, not necessarily the one you actually want to talk to. If the domain is on Cloudfront, App Engine, Heroku, etc, that means you can choose one of a billion innocuous sites to use for SNI, before connecting to the one you actually want.
This is called 'domain fronting':
https://www.bamsoftware.com/papers/fronting/
I can't quite work out the trust algebra of this, though. You don't have any cryptographic guarantee that you're connecting to the right site. But you can be sure that you're connecting to whichever server hosts the site whose name you're taking in vain. But if that server was able to serve your site all along, because it had its private key, did you ever really have any guarantee?
Probably won't help for wikipedia, though, as they're not behind a CDN.
arkadiyt · 2018-04-08
There's domain fronting [1] and http/2 certificate frames [2] - they are conceptually similar.
[1]: https://www.bamsoftware.com/papers/fronting/
[2]: https://tools.ietf.org/html/draft-bishop-httpbis-http2-additional-cert…