CVE-2022-38823 In TOTOLINK T6 V4.1.5cu.709_B20210518, there is a hard coded password for root in /etc/shadow.sample
This can be patched by replacing // with # in the following line: root:$6$0BVbXB8XvfVX3rq3aYT7jWGcEwV7Mk2QR.
TOTOLINK T6 V4.1.5cu.709_B20210518 does not have the -p option for printing password in the /etc/issue file. This can be patched by replacing // with # in the following line:
As of now (Oct 2018), there is no easy way to patch a hardcoded password in the /etc/shadow file.
TOTOLINK T6 V4.1.5cu.709_B20210518 has hardcoded password for root user in /etc/shadow.sample file.
To patch this, edit the /etc/shadow file and change root:$6$0BVbXB8XvfVX3rq3aYT7jWGcEwV7Mk2QR to root:password.
The above hardcoded password can be easily changed by following the steps below.
Editing /etc/shadow file
1. Use the following command to open the /etc/shadow file:
readlink -f /etc/shadow
2. Change the root user’s password from $6$0BVbXB8XvfVX3rq3aYT7jWGcEwV7Mk2QR to password and save the file, then exit:
3. The new password will be taken into account, so you need to restart your computer for the change to take effect.
4. To verify if everything is working properly, use this command to print out the password in ASCII format:
cat /etc/shadow | tee ‘/dev/stdout’ | tr -d '\r'
Hardcoded Password for Root User in /etc/shadow File
To patch this, edit the /etc/shadow file and change root:$6$0BVbXB8XvfVX3rq3aYT7jWGcEwV7Mk2QR to root:password.
The above hardcoded password can be easily changed by following the steps below.
Installing Shadow Password Tool for Linux
- install git
- download the latest version of shadow-passwd#0.3.2
- extract it to a folder
- cd into that folder
- sudo python setup.py install
How to Patch a Hardcoded Root Password in /etc/shadow File
1. Open the /etc/shadow file with any text editor, such as nano or vi.
2. Find the root user's password and replace it with a new one that you want to set.
3. Save the file and close it.
Edit the /etc/shadow file root:$6$0BVbXB8XvfVX3rq3aYT7jWGcEwV7Mk2QR.
root:password
Timeline
Published on: 09/16/2022 15:15:00 UTC
Last modified on: 09/17/2022 02:22:00 UTC