Security concerns with "http-01" and "tls-sni-01"

Thanks. /ping @jsha

How does it work with http-01 where you need the token to be provided?

@My1 the idea to get an file and throw it to the server is not bad but than this file should prove 2 points:

  1. That the creator of the file has knowledge of the private account key.
  2. That the creator of the file must have the knowledge domain was asked.
    Currently the file you throw to the server can be created server side without any relation to the domain and without knowledge of the private key.

@kelunik and here come the problem you can create an bot that drop an file ".well-known.php"
a) This file is normaly hidden on unix
b) This file only need the thumbprint of the attackers public key but no knowledge about the private key.

So it is not an replay attack here someone can request cert for an domain that was never related to LE-CA
and does not need to have an communication between the acme-client and the server or deploy the private accountKey to the server.

If you need to place the content SHA256_with_RSA(token|’.’|domain|’.’|date , accountPrivateKey)
Under /.well-known/acme-challenge/TOKEN than it is as My1 said you only need to place this content on the server,
but this content prove that you know the domain it is used for, you know the privateAccount key and it is only valid for one day.

For an attacker this means he need direct communication with the server or need to left the privateAccountKey on the server.

the file is not well-known.php but in the directory .well-known/acme-challenge you have to drop a specific file with a specific text (that always changes by the way) so you get it in the LE client, probably by the server and then the server checks for that token or whatever file.

That sounds to me like you're saying step 1 is "get code execution on the server"? Why not install a reverse shell php file, then?

@riking For http-01 you are correct. But deploying an http file to an server is much more easy than to get reverse shell running. Get the file to the server if for example via phpMyAdmin vulnerable possible by simply let someone open an prepared link. While reverse proxy could be blocked by layer 5 firewall and load balancer or if the server is behind an CDN.