
Download the Ubuntu server ISO and install VirtualBox to create a cross-platform VM for Ubuntu server setup and privilege escalation practice across Windows, Linux, or Mac.
install network tools:
sudo apt install net-tools
Demonstrates privilege escalation by editing /etc/passwd to replace the root password with a hash and then logging in as root. Highlights how insecure permissions and password storage enable root access.
Shows how to escalate privileges by editing the password file to create a new user with Miguel's UID, GID, and password, enabling login as Miguel or root.
Also, you want to delete all the encrypted passwords in / etc / passwd and the users created with root access
Engage in a hands-on challenge to perform Linux privilege escalation by adjusting file permissions with sudo chmod, exploring group and password file access to escalate privileges.
Explain how a group file defines Linux user groups and its format, and how adding a username to the group list enables privilege escalation, including the sudo group.
find / -type f -perm 0777 2>/tmp/null
In cryptography, a salt is random data that is used as an additional input to a one-way function that hashes data, a password or passphrase. Salts are used to safeguard passwords in storage
sudo apt-get install -y hashcat
curl https://samsclass.info/123/proj10/500_passwords.txt > 500_passwords.txt
Exploits suid nano and vim to escalate privileges by editing the /etc/passwd password hash with openssl and setting a root password, demonstrating misconfigured suid editors and root access.
This lecture shows how to locate suid files with the find command, inspect permissions, and identify a root-owned nano binary as a potential privilege escalation path.
Explore privilege escalation with setuid cp to gain root access, including verifying permissions and attempting to replace the password file to create a new root user.
more command is used to view the text files in the command prompt, displaying one screen at a time in case the file is large (For example log files).
Demonstrate privilege escalation using vim to edit sudoers and gain passwordless root access. Open shells from vim, and via ssh to obtain root privileges.
On Linux systems, less is a command that displays file contents or command output one page at a time in your terminal. less is most useful for viewing the content of large files or the results of commands that produce many lines of output.
Awk is a scripting language used for manipulating data and generating reports.The awk command programming language requires no compiling, and allows the user to use variables, numeric functions, string functions, and logical operators.
Stream EDitor (Sed), one of the most prominent text-processing utilities on GNU/Linux. Similar to many other GNU/Linux utilities, it is stream-oriented and uses simple programming language. It is capable of solving complex text processing tasks with few lines of code. This easy, yet powerful utility makes GNU/Linux more interesting.
sudo sed -i 's/root:x:/root:$1$l2MrJFqr$8sMN9lsMvK6Vqt9qsDQoV1:/g' /etc/passwd
Demonstrates crontab privilege escalation through a misconfigured chrome tab, exposing writable root cron tasks and permissive file permissions to modify /etc/passwd and gain root access.
linpeas scripts streamline Linux privilege escalation by scanning for sensitive files, hashes, and misconfigurations on Debian, CentOS, FreeBSD, and OpenBSD.
Download Lin Security Here:
https://in.security/lin-security-practise-your-linux-privilege-escalation-foo/
Explore Linux privilege escalation by using sudo, inspecting /etc/shadow and /etc/passwd for hashes, cracking them with John the Ripper and rockyou.txt to become root.
Demonstrates root squashing by mounting a shared NFS home, creating a Peter user with the same uid and gid, and SSH access via authorized keys for privilege escalation.
Download Machine here:
https://in.security/lin-security-practise-your-linux-privilege-escalation-foo/
https://www.sans.org/reading-room/whitepapers/linux/attack-defend-linux-privilege-escalation-techniques-2016-37562
In this course, I will teach how to do Privilege Escalate from a Linux OS. We will go over around 30 privilege escalation we can perform from a Linux OS. This training will help you achieve your OSCP, how to prevent Privilege Escalation, and how to perform them, too. Privilege escalation happens when a malicious user exploits a bug, design flaw, or configuration error in an application or operating system to gain elevated access to resources that should normally be unavailable to that user. The attacker can then use the newly gained privileges to steal confidential data, run administrative commands or deploy malware.