In this tutorial, I will show you how to secure administrator rights on Windows PCs using a live boot CD. We will simulate two scenarios:
We will do this by manipulating the SAM Security_Accounts_Manager using a live Linux system.
On a Windows system, the users users
and sysadmin
are created. User
has no administrator rights, is password-protected and activated. sysadmin
on the other hand, is a member of the local administrators, also password-protected but deactivated.
In principle, you can use any live distribution. I have decided in favour of Lubuntu:
After the download you have to port the image file to a bootable USB stick or DVD. To ensure that the boot process runs smoothly, you should adjust the following settings in the bios:
Now start Lubuntu and configure the following:
Now we can install chntpw
using:
sudo apt install chntpw
We are looking for the Windows partition.
sudo sfdisk -l
In our example, we find them on /dev/sda3
. We will mount this in the next step.
We need a mount point for the partition and create it in our $HOME directory.
mkdir ~/win
We then mount the partition.
sudo mount /dev/sda3 ~/win
Now we navigate to the SAM directory.
cd ~/win/Windows/System32/config
Now it's time to start the tool we just installed.
sudo chntpw -i SAM
chntpw
appears as shown above. We select item 1 and see an overview of the users.
We now want to create the user sysadmin
user and reset the password.
In the next dialogue we see an overview of the user and can now edit it.
We have managed the first user. We acknowledge with q
and select the next user user
user.
And now we set the following options:
We return to the main dialogue and end the program with q
. We confirm the subsequent enquiry as to whether we want to write to the SAM.
Lubuntu can now be closed and the computer shut down.
To start the computer now, the following things must be set in the BIOS:
After a restart, logging in without a password is possible for the users user
and sysadmin
users. Both accounts are members of administrators
and therefore have full authorisations.
A look at the PowerShell shows us that our changes were successful.
The following measures can be taken to prevent this type of manipulation: