Mirai identifies vulnerable IoT devices using a table of more than 60 common factory default usernames and passwords and logs into them to infect them with the Mirai malware
Vulnerability Explanation: It is possible to access the machine using ssh using the default credential of the raspberry pi. Raspberry Pi OS through 5.10 has the raspberry default password for the pi account. If not changed, attackers can gain administrator privileges.
Vulnerability Fix: Always change the default password of the user and the root with any new installation.
Privilege Escalation Vulnerability: No need for Priv Esc
Vulnerability Fix: The developer should have conformed to the principle of least privilege and the concept of separation of privileges.
Severity: Critical
An initial nmap scan revealed the lighttpd 1.4.35 running on port 80 and ssh on port 22.
# Nmap 7.92 scan initiated Mon Jan 24 05:37:52 2022 as: nmap -sC -sV -v -oN nmap/initial 10.10.10.48Nmapscanreportfor10.10.10.48Hostisup (0.13s latency).Notshown:997closedtcpports (reset)PORTSTATESERVICEVERSION22/tcpopensshOpenSSH6.7p1Debian5+deb8u3 (protocol 2.0)|ssh-hostkey:|1024aa:ef:5c:e0:8e:86:97:82:47:ff:4a:e5:40:18:90:c5 (DSA)|2048e8:c1:9d:c5:43:ab:fe:61:23:3b:d7:e4:af:9b:74:18 (RSA)|256b6:a0:78:38:d0:c8:10:94:8b:44:b2:ea:a0:17:42:2b (ECDSA)|_2564d:68:40:f7:20:c4:e5:52:80:7a:44:38:b8:a2:a7:52 (ED25519)53/tcpopendomaindnsmasq2.76|dns-nsid:|_bind.version:dnsmasq-2.7680/tcpopenhttplighttpd1.4.35|http-methods:|_SupportedMethods:OPTIONSGETHEADPOST|_http-title:Sitedoesn't have a title (text/html; charset=UTF-8).|_http-server-header: lighttpd/1.4.35Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernelRead data files from: /usr/bin/../share/nmapService detection performed. Please report any incorrect results at https://nmap.org/submit/ .# Nmap done at Mon Jan 24 05:38:16 2022 -- 1 IP address (1 host up) scanned in 23.34 seconds
Using the default of raspberry pi, the default password and username of ssh are pi:raspberry
To gain an initial foothold on the box we exploited two vulnerabilities.
Use of default credentials. The user used the default password that is shipped with the application. Since default credentials are publicly available and can be easily obtained, the user should have instead used a sufficiently long password that is difficult to crack.
Always separate the privileges from the normal user and the administrators’ users.