Description
From Dillo and other browsers that don't support JS, we are starting to see some websites requesting JS to pass the Anubis test. I suppose they have very strict settings, as others work fine for now. However, I predict that in the near future, bots will adapt to mimic those browsers, leaving all those sites out for us. So I think that it would be convenient to have a better solution by then.
I would like to suggest doing a dynamic proof of work in the TLS protocol itself during the handshake procedure, so it is transparent for any client and works for browsers without JS. This way, we can avoid running a full blown VM to implement JavaScript just to access a mostly text document, and tools like curl or RSS readers can also work while the server is protected against massive bot campaigns.
The Tor network introduced a PoW in the past that may be suited to address this problem:
- https://blog.torproject.org/introducing-proof-of-work-defense-for-onion-services/
- https://spec.torproject.org/hspow-spec/v1-equix.html
- https://github.com/tevador/equix/blob/master/devlog.md
I'm not particularly versed in cryptoanalysis, but it seems to solve the same problem while preserving the anonnimity of clients. The idea is to serve puzzles with variable difficulty to the clients when the server is under stress. Puzzles solved with higher effort from the client, cause that request to be placed higher in the priority queue, so it is taken care earlier. Slower clients can still access the service, but they have to wait longer. When there is no stress, no puzzle is needed, so there is no need to waste CPU energy.
The PoW is designed to be hard to implement for GPUs and to allow changes in the future to prevent any ASIC investment to be profitable.
Failing TLS, the second best choice may be the HTTP protocol itself, but at that point you already had to go though the whole TLS handshake so you have less capability to protect yourself from bots.
I'm aware of other techniques like Privacy Pass, but I have several concerns about privacy, as they assume the different parties won't collude to try to track the users. I believe a dynamic PoW is a better option for now.
It would be probably a good idea to also involve other TLS library projects, but I just wanted to comment this here first to get some preliminary feedback.