-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Advisory ID: SYSS-2018-011 Product: PORTIER Affected Version(s): 4.4.4.2, 4.4.4.6 Tested Version(s): 4.4.4.2, 4.4.4.6 Vulnerability Type: Cryptographic Issues (CWE-310) Risk Level: HIGH Solution Status: Open Manufacturer Notification: 2018-06-13 Solution Date: - Public Disclosure: 2019-01-11 CVE Reference: CVE-2019-5723 Author of Advisory: Christian Pappas, SySS GmbH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Overview: portier vision is a rich client application for managing door keys allocated to certain persons or group of persons. The manufacturer describes the product as follows (see [1]): "portier® vision * manages locking systems and access rights in a modern and efficient manner * stores all the details for every single key * provides you lightning fast with all the information you need in a format you choose portier ®vision easy - secure - fast, our idea of software." Passwords are stored encrypted rather than as a hash value and the used Vigenère algorithm is badly outdated. Moreover, the keyword is static and quite too short. Due to this, the passwords stored by the application can be easily decrypted. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Vulnerability Details: Both user passwords in the database and the password for the database itself in the 'portiervision.ini' configuration file are stored reversible encrypted. The enforced password policy requires at least 1 up to 15 character long passwords. The passwords are encrypted by a Vigenère cipher, which is a series of interwoven Caesar ciphers based on the characters of the keyword. In this particular application, the keyword is static and 15 bytes long. Static means, in this special case, hard coded. Once an attacker has access to the encrypted passwords, he or she can easily decrypt these and, thereby, escalate his or her privileges. As decrypting the user passwords the privilege escalation is obviously limited to the application. But because the same keyword is reused for encrypting the database password, attackers might go beyond this point and try out these credentials to take over control of other systems in the corporate network. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Proof-of-Concept (PoC): To break the encryption and derive the keyword, the following list of pairs of plain-text and encrypted passwords is analyzed: #n plain-text password encrypted password 1 A d 2 AA dI 3 AAA dIo 4 AAAA dIo: 5 AAAAAAAA dIo:iO95 6 AAAAAAAAAAAAAAA dIo:iO95>O1+qtm 7 BBBBBBBBBBBBBBB eJp;jP:6?P2,run 8 CCCCCCCCCCCCCCC fKq