Bug 51194 - USS still uses md5 to hash initial password for root
USS still uses md5 to hash initial password for root
Status: CLOSED DUPLICATE of bug 51195
Product: UCS
Classification: Unclassified
Component: System setup
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks: 51195
  Show dependency treegraph
 
Reported: 2020-04-30 12:43 CEST by Philipp Hahn
Modified: 2021-05-25 16:01 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Security Issue
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score: 5.7 (CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2020-04-30 12:43:25 CEST
# grep -n md5 /usr/lib/univention-system-setup/scripts/10_basis/18root_password
65:usermod -p "$(mkpasswd -H md5 "$root_password")" root

# grep root /etc/shadow
root:$1$UA2XFeyu$1KmEIwd9u0BOFR/A8AvcY.:18018:0:99999:7:::
      ^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
      | \_salt_/ \_____encrypted______/
      +- 1=MD5
         2a=Blowfish
         5=SHA-256
         6=SHA-512
from <man:crypt(3)>

# ls -l /etc/shadow
-rw-r----- 1 root shadow 1328 Nov 19 16:28 /etc/shadow

IFF I can get read access to that file I can get the md5 hash, crack it and would try it for uid=Administrator, which gives me full access to LDAP (and all other hosts of the domain).

NIST banned SHA-1 in 2015 and MD5 is even older.
Comment 2 Felix Botner univentionstaff 2020-06-02 11:18:02 CEST
fixed in 4.4-4, is there already a 5.0 fork?

Otherwise the 4.4 fix should be enough.

*** This bug has been marked as a duplicate of bug 51195 ***
Comment 3 Erik Damrose univentionstaff 2020-06-02 11:23:38 CEST
(In reply to Felix Botner from comment #2)
> fixed in 4.4-4, is there already a 5.0 fork?

We do not need to port changes to future releases at the moment, yet.
Comment 4 Florian Best univentionstaff 2021-05-25 16:01:59 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".