|
|
|
|
|
by kazinator
3762 days ago
|
|
I would gravitate toward using a Unix domain socket, like what saslauthd uses. I use saslauthd in a web server I wrote. I have the user ID and password from the browser over HTTPS, open a socket to /var/run/saslauthd/mux, and send them as plain strings, then check the reply. The problem with loopback is that the only thing which prevents the program from sending the data to a rogue socket is the IP address and port number. If I have some program binary which authenticates plain text passwords over an IP socket, I can probably find the "struct sockaddr_in" image of that address and change it to something else with a hex editor, to have that communication go to another machine. I'm not saying that this is the exact exploit; that would be a strawman: rather that there is potentially a very small code or configuration difference between a secure program that sends plain text over an IP socket, and a misbehaving one.) Of course, the path in a unix socket could also be tampered with; at least it won't go off box, though. The rogue piece listening to for the connection has to be planted on the same machine. |
|
Also, code signing would prevent anyone from modifying the binaries to change the IP address.