2FA improvement

floh

Active Member
Jul 19, 2018
62
5
28
Hello community - hello proxox-team!

I'm currently playing around with the two factor implementation of Proxmox (also in the latest version as of today: 6.2-9).
In my opinion 2fa is a must-have if there is a possibility that someone you don't know could be able to access the web-gui.
As an it-security student I am somewhat familiar with some basic exploits and ways to "work around" authentications.


The way Proxmox VE has implemented 2fa login is (not code-checked, just my thought as a gui-user):

1) User inputs username and password
2) PVE checks if correct
2.1) Response type1: PW incorrect; go back to bullet point 1)
2.2) Response type2: pw correct... go to to bullet point 3)
3) User inputs 2fa
4) PVE checks if correct

This way the user gets instant the response if the password is correct and with that one could brute force the password.
When an attacker has successfully brute-forced the password, he can brute force the 2fa-code.
A typical OTP code consists of a sequence of one out of a million possible numbers. This means theoretically an attacker must brute-force 500.000 codes in 30 seconds to gain access. (Which is realistic - and even if not, he can try it again in the next 30sec time-slot)

I would highly recommend to refactor the implementation of the 2fa login. (Please do it - I would love to use it)
One possible way could be:
1. User inputs username and password
2. PVE sends a prompt "Input 2fa-code: _____"
3. User inputs 2fa-code
4. PVE sends "Sorry, authentication failed" (without any detailed info if the user exists, the password is incorrect or the 2fa-code is incorrect)


Just my two cents - Please consider this as feedback and not as a complaint.

Best wishes
Flo
 
would you mind filing an issue over at https://bugzilla.proxmox.com ? it looks like a valid improvement, but it probably breaks backwards compatibility so it would need some preparation. also note that failed logins are delayed by 3s, so brute-forcing is a bit slower than normally..
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!