If you found a security vulnerability, you deserve all the credit. Please feel free to have a good ROFLMAO over my broken design. I deserve all the blame and I have all the responsibility for fixing the problem.
I'd like to ask you to fully disclose the details of your valuable findings via GitHub Security Advisory Report a Vulnerability tab or report it privately via [security@bues.ch] to me.
If you found a severe security vulnerability, a private disclosue is preferred. This is to protect our users from 0-Day exploits. I will always publish vulnerabilities to the public after finding a proper fix.
The public network facing daemon letmeind
, the firmware update daemon letmeinfwd
and the client application letmein
support the security hardening technique seccomp.
Seccomp basically disables all Operating System Calls (syscalls) that are not required by the application.
By default seccomp is disabled.
To enabled it, edit /opt/letmein/etc/letmeind.conf
and /opt/letmein/etc/letmein.conf
and set the seccomp option:
[GENERAL]
seccomp = kill
Setting the seccomp
option to kill
will fully enable seccomp.
If letmein executes a syscall that has not explicitly been allowed by the hard-coded allow-list, the Linux kernel will immediately kill the process.
That way attacker injected code cannot execute arbitrary syscalls that are not on the allow-list.
Alternatively, you can configure the seccomp
option to log
.
This will not give you any bug-exploit protection, but it will print a kernel log error message, if a syscall is called that is not on the letmein allow-list.
This is useful for debugging.
Note that depending on your Linux Distribution you might be getting false seccomp kills, because the allow-list doesn't include a required syscall. In this case, please open a Github Issue on letmein.
Seccomp is currently only supported on the x86_64
and aarch64
CPU architectures.
The seccomp feature of letmein has been tested with Debian Linux Stable and Unstable.
The program has carefully been designed to be secure, to the best of my knowledge.
However, nobody is infallible.
I am interested to hear your opinion.
If you found a security vulnerability, see the vulnerability reporting process for how to proceed.
There are a couple of known weaknesses that exist in letmein. In this paragraph we discuss why these weaknesses exist.
These weaknesses are not addressed by the design of letmein to make the design simpler. It is a tradeoff between a simple design and a weakness that doesn't practically impact security.
It is believed that these weaknesses do not make letmein insecure in practical use. The simple design is supposed to reduce the attack surface and as such improve security.
weakness: The user identifiers and resource identifiers from the configurations are transmitted in plain text over the network.
weakness: The first Knock
packet is not protected against a replay attack.
Knock
packet can successfully be replayed by an attacker.
But that doesn't mean much.
The attacker will still not be able to successfully solve the Challenge
.
The authentication of the Knock
is only in place, because it's easy to implement in the given design and it stops port knocks that don't have a key at all early.weakness: After a successful knock sequence from legitimate user an MiM attacker can use the knocked-open port, if she is able to use the same sender-IP-address as the legitimate user.
weakness: If you knock a port open from behind a NAT or cgNAT, then the port will be opened for the whole NATed network, because from the outside the NATed network has only one IP address. Everybody from within the NATed network will be able to access the knocked-open port.
weakness: If you use letmein to protect UDP ports, IP address spoofing can give some access for attackers after legitimate authentication of a user. With UDP IP address spoofing an attacker might be able to impersonate a legitimate user session after successful knocking.
weakness: The authentication key is a shared secret that is stored in plain text on the server and on the client.
weakness: All users that can successfully authenticate to letmein can start to attack the protected service.
weakness: The wire protocol does not have mechanisms for future changes and updates.