beep allows the user to control the pc-speaker with precision, allowing different sounds to indicate different events. While it can be run quite happily on the command line, it’s intended place of residence is within shell/perl scripts, notifying the user when something interesting occurs. Of course, it has no notion of what’s interesting, but it’s real good at that notifying part.
Recently, the command-line tool “Beep” in Debian and Ubuntu was revealed to have multiple security vulnerabilities. The most serious flaw was CVE-2018-0492. This is an escalation of privilege (EoP) vulnerability that allows an attacker to escalate the privilege to a “ROOT” under certain conditions so that it can fully access the entire computer system and detect the presence of sensitive files.
According to Richard Kettlewell, Terraraq’s security researcher, the vulnerability affects all versions of beep/1.3-4. The successful exploitation of the vulnerability allows the attacker to open arbitrary files with ROOT permission and write operations bypassing the file permissions, and detect the presence of files on the computer, even those owned by ROOT users who are considered secret and inaccessible.
Another security team has also set up a website (holeybeep.ninja) to gather all the information about this vulnerability. According to the website’s description, data from Debian shows that 1.86% of all Debian users have Beep installed. If calculated from the total population of the world, it is estimated that there will be approximately 130 million affected users.
If you are a Debian user, you can verify that the system is vulnerable to this beep flaw by running the following command line:
curl https://holeybeep.ninja/am_i_vulnerable.sh | sudo bash
The Holey Beep website also provides a patch, but Kettlewell noticed that it actually introduced a potentially more serious vulnerability that could be exploited to execute arbitrary code on the patched system.
In addition, Beep is also affected by other security vulnerabilities, including integer overflow (IOV) vulnerabilities and a bug that can reveal system file information. Therefore, Kettlewell recommends that system administrators should remove the Beep program from the distribution because PC speakers are no longer present in most modern systems.