Beginner Linux for Ethical Hackers - Users and Privileges

The Cyber Mentor · Beginner ·🔐 Cybersecurity ·7y ago

Key Takeaways

This video covers common user and privilege commands in Kali Linux, including adduser, su, sudo, and chmod commands, for beginner ethical hackers.

Full Transcript

ok so now we're going to cover users and privileges so in the last video we touched a little bit on privileges with our LS l a and we touched a little bit on users by changing the password of our root account so now we'll cover a few more commands regarding those so if we look again at LS la you could see all this crazy jumbled wordage over here right so it actually means something so we look at the first line here if we see a dash like this a hyphen that means it's a file if we see a D that means it's actually a directory and then you see our W and X so our W and X actually means read/write/execute it's the permission settings that this particular group has now there are three groups here there's the first second and then your third right here right so your first group right here is the owner of the file so it looks like the owner of the file has full read/write execution right and then the next set of three here is actually the permissions for the members of the group that owned the file so this is a group ownership as opposed to actual ownership here so for the people that are in the group that has access to this file they can only read and execute they can't write to it now for the last one this is just all their users so any common user here can actually just read and execute they can't write the document so that comes into play especially when we get into penetration testing because with penetration testing we're looking to have full access right so we're always going to be looking for that folder that has full read/write typically if we look at temp that's our temp folder a lot of times you see the temp folder has full read/write execute so when we're doing penetration testing we're trying to upload some sort of exploit we might actually upload it into the temp folder because that's where we can exit get those those files however we could also be looking for other full read/write/execute files where we need to modify them and give us root access to a system so it's all about insecure configurations and we're going to cover that more once we get into the actual penetration testing part of the course so for the linux essentials part of the course all we need to worry about is these file permissions another important feature of that is if we were to create a script our scripts not going to be able to run until it has full access so how do we change access here so let's make a file I'm just going to make we'll just echo another text document right so we'll just say hello and actually I type that in backwards so hello and we'll call it hello text so if we LS here by default we only have read write and then read access for everybody else meaning if we wanted to read it we could say cat which we're going to get into later cat hello Tex it just says hello so what can we do here well we can use something called change mode in changing mode is ch mo d and we have a couple options here so we can do a plus right and we could say well we want read write execute or we just want execute but another way I like doing it is you have a number feature so the one you really need to know is all sevens sevens gives you full read/write access across the board so if we say chmod 777 hello dot txt now we LS la and you notice that hello dot Tex turns green that means it is full rewrite and here you go we've got the dash here saying it's a file and we got read write execute across the board so this is how we change file permissions you don't need to necessarily know about the other numbers in terms of penetration testing it becomes more in terms of configuration and security management of files if you were to get down that path so to stay on the easiest path just remember seven seven seven or plus X will work as well so changing the mode is is critical and we're going to cover it time and time again throughout the course once we get a little bit deeper so a couple more things we need to talk about say we wanted to add a new user well there's a feature called add user so we say add user and one or two names is allowed so we need to add user say John ok so it made something for John let's give him a password give them a password again and we'll just hit enter for the defaults it's all correct okay so we now have a user named John and we can confirm that we can actually cat the Etsy password file here and you see down at the very bottom we have this user John so this Etsy password file you're going to become very familiar with because it shows you all the users now this will there's a lot of times where you're doing penetration testing you're gonna have access to this Etsy passer file because it doesn't provide the password anymore it used to a long time ago passwords are now in the shadow file so you actually have a little bit of access and information disclosure here at the hands of poor configuration so you see that I've created a user John well that gives us a little bit infor information say there's SSH on a machine or something else we can use that username of John to try to break into the machine so we'll cover that again later but if we wanted to see what the Etsy shadow file looks like now we come in here and you've got these these jumbled stuff here right so it's just a hashing format so what we're doing is we can actually use a tool like hash cat to break this down and crack these passwords now a password a password will be very easy but just know that if you have access to the etsy shadow file you have a good chance of cracking a password depending on your capabilities and depending on the strength of the password that'll allow you access to a machine so something to think about there okay so now we have our user John let's go ahead and switch to him so we can use something called su which stands for switch user and we'll say switch user John okay so it automatically gave us John here let's see if we could switch back to root okay we can't just switch back to root because we need roots password right so we can type in password and that works but if we didn't know the password then we'd be stuck on John we are able to access John because we were already root so this comes into play in terms of users let's go back to John here now if your user you have to be able to do certain things you need permission to do certain things I should say right so root has full access and permission to do everything but John we just created John John doesn't have any sort of access so if we wanted to if we wanted to change the password say we want to change the password for for rude I can't modify the password information because I don't have that kind of access now there is something called a pseudo which would provide John that access if we gave it to him so it's called a pseudo verse file and basically anybody in that sudoers file can change permissions given if they are a pseudo user right so we would type in sudo password root and it's going to ask for the password for John but you're gonna notice hey John's not in the pseudo or is file John can't do this so John has base permissions right and we're gonna counter that a lot of times in penetration testing where if we get in we'll get something called lower privilege and we'll get an account like John and we're gonna try to escalate in the root but we just can't do it you know the chances of doing a doing that and having a John in a su doors file is just not high it's possible but it's not likely so for now just know that if you want a user other than root to have access to file permissions you need to have them in the su doors file that becomes useful too and penetration testing because you can look at the sewers file if you have access to see what users have sudo privileges okay so that is it for this lesson in the next lesson we're going to be covering Network commands and moving on gradually towards scripting so let's go ahead and get there and I will see when we get over there [Music] [Music] you

Original Description

In this video, we will cover common user and privilege commands in Kali Linux, to include the adduser, su, sudo, and chmod commands. Timestamps: 0:06 - Introduction 0:25 - User privilege overview 3:33 - chmod 4:55 - adduser 5:25 - /etc/passwd review 6:19 - /etc/shadow review 7:00 - su 8:15 - sudo ❓Info❓ ___________________________________________ Need a Pentest?: https://tcm-sec.com Learn to Hack: https://academy.tcm-sec.com 🔹The Cyber Mentor Merch🔹 ___________________________________________ https://teespring.com/stores/the-cyber-mentor 📱Social Media📱 ___________________________________________ Website: https://thecybermentor.com Twitter: https://twitter.com/thecybermentor Twitch: https://www.twitch.tv/thecybermentor Discord: https://tcm-sec.com/discord LinkedIn: https://www.linkedin.com/in/heathadams 💸Donate💸 ___________________________________________ Like the channel? Please consider supporting me on Patreon: https://www.patreon.com/thecybermentor Support the stream (one-time): https://streamlabs.com/thecybermentor Hacker Books: Penetration Testing: A Hands-On Introduction to Hacking: https://amzn.to/31GN7iX The Hacker Playbook 3: https://amzn.to/34XkIY2 Hacking: The Art of Exploitation: https://amzn.to/2VchDyL The Web Application Hacker's Handbook: https://amzn.to/30Fj21S Real-World Bug Hunting: A Field Guide to Web Hacking: https://amzn.to/2V9srOe Social Engineering: The Science of Human Hacking: https://amzn.to/31HAmVx Linux Basics for Hackers: https://amzn.to/34WvcXP Python Crash Course, 2nd Edition: https://amzn.to/30gINu0 Violent Python: https://amzn.to/2QoGoJn Black Hat Python: https://amzn.to/2V9GpQk My Build: lg 32gk850g-b 32" Gaming Monitor:https://amzn.to/30C0qzV darkFlash Phantom Black ATX Mid-Tower Case: https://amzn.to/30d1UW1 EVGA 2080TI: https://amzn.to/30d2lj7 MSI Z390 MotherBoard: https://amzn.to/30eu5TL Intel 9700K: https://amzn.to/2M7hM2p G.SKILL 32GB DDR4 RAM: https://amzn.to/2M638Zb Razer Nommo Chroma Speakers: https://amzn.t
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from The Cyber Mentor · The Cyber Mentor · 16 of 60

1 Buffer Overflows Made Easy - Part 1: Introduction
Buffer Overflows Made Easy - Part 1: Introduction
The Cyber Mentor
2 Buffer Overflows Made Easy - Part 2: Spiking
Buffer Overflows Made Easy - Part 2: Spiking
The Cyber Mentor
3 Buffer Overflows Made Easy - Part 3: Fuzzing
Buffer Overflows Made Easy - Part 3: Fuzzing
The Cyber Mentor
4 Buffer Overflows Made Easy - Part 4: Finding the Offset
Buffer Overflows Made Easy - Part 4: Finding the Offset
The Cyber Mentor
5 Buffer Overflows Made Easy - Part 5: Overwriting the EIP
Buffer Overflows Made Easy - Part 5: Overwriting the EIP
The Cyber Mentor
6 Buffer Overflows Made Easy - Part 6: Finding Bad Characters
Buffer Overflows Made Easy - Part 6: Finding Bad Characters
The Cyber Mentor
7 Buffer Overflows Made Easy - Part 7: Finding the Right Module
Buffer Overflows Made Easy - Part 7: Finding the Right Module
The Cyber Mentor
8 Buffer Overflows Made Easy - Part 8: Generating Shellcode and Gaining Shells
Buffer Overflows Made Easy - Part 8: Generating Shellcode and Gaining Shells
The Cyber Mentor
9 HackTheBox - Sunday Walkthrough (Re-Up)
HackTheBox - Sunday Walkthrough (Re-Up)
The Cyber Mentor
10 Networking for Ethical Hackers - TCP, UDP, and the Three-Way Handshake (Re-Up)
Networking for Ethical Hackers - TCP, UDP, and the Three-Way Handshake (Re-Up)
The Cyber Mentor
11 Networking for Ethical Hackers - Network Subnetting (Re-Up)
Networking for Ethical Hackers - Network Subnetting (Re-Up)
The Cyber Mentor
12 Networking for Ethical Hackers - Network Subnetting Part 2: The Challenge (Re-Up)
Networking for Ethical Hackers - Network Subnetting Part 2: The Challenge (Re-Up)
The Cyber Mentor
13 Networking for Ethical Hackers - Building A Basic Network with Cisco Packet Tracer (Re-Up)
Networking for Ethical Hackers - Building A Basic Network with Cisco Packet Tracer (Re-Up)
The Cyber Mentor
14 HackTheBox - Fighter Walkthrough (Re-Up)
HackTheBox - Fighter Walkthrough (Re-Up)
The Cyber Mentor
15 Beginner Linux for Ethical Hackers - Navigating the File System
Beginner Linux for Ethical Hackers - Navigating the File System
The Cyber Mentor
Beginner Linux for Ethical Hackers - Users and Privileges
Beginner Linux for Ethical Hackers - Users and Privileges
The Cyber Mentor
17 Beginner Linux for Ethical Hackers - Common Network Commands
Beginner Linux for Ethical Hackers - Common Network Commands
The Cyber Mentor
18 Beginner Linux for Ethical Hackers - Viewing, Creating, and Editing Files
Beginner Linux for Ethical Hackers - Viewing, Creating, and Editing Files
The Cyber Mentor
19 Beginner Linux for Ethical Hackers - Controlling Kali Services
Beginner Linux for Ethical Hackers - Controlling Kali Services
The Cyber Mentor
20 Beginner Linux for Ethical Hackers - Scripting with Bash
Beginner Linux for Ethical Hackers - Scripting with Bash
The Cyber Mentor
21 Beginner Linux for Ethical Hackers - Installing and Updating Tools
Beginner Linux for Ethical Hackers - Installing and Updating Tools
The Cyber Mentor
22 Cracking Linux Password Hashes with Hashcat
Cracking Linux Password Hashes with Hashcat
The Cyber Mentor
23 Reminder: Twitch Hacking Live Stream Tonight! 2/26/19 at 8PM EST
Reminder: Twitch Hacking Live Stream Tonight! 2/26/19 at 8PM EST
The Cyber Mentor
24 Hacking Live Stream: Episode 1 - Kioptrix Level 1, HackTheBox Jerry, and Career Q&A / AMA
Hacking Live Stream: Episode 1 - Kioptrix Level 1, HackTheBox Jerry, and Career Q&A / AMA
The Cyber Mentor
25 Hacking Live Stream: Episode 2 - HackTheBox Active, Vulnserver Buffer Overflow, and Career Q&A / AMA
Hacking Live Stream: Episode 2 - HackTheBox Active, Vulnserver Buffer Overflow, and Career Q&A / AMA
The Cyber Mentor
26 Hacking Live Stream: Episode 3 - Hack The Box Blue, Devel, and Career Q&A / AMA
Hacking Live Stream: Episode 3 - Hack The Box Blue, Devel, and Career Q&A / AMA
The Cyber Mentor
27 New Zero to Hero Pentest Course, New Website, and 2K Subs?!
New Zero to Hero Pentest Course, New Website, and 2K Subs?!
The Cyber Mentor
28 Zero to Hero Pentesting: Episode 1 - Course Introduction, Notekeeping, Introductory Linux, and AMA
Zero to Hero Pentesting: Episode 1 - Course Introduction, Notekeeping, Introductory Linux, and AMA
The Cyber Mentor
29 Zero to Hero Pentesting: Episode 2 - Python 101
Zero to Hero Pentesting: Episode 2 - Python 101
The Cyber Mentor
30 Zero to Hero Pentesting: Episode 3 - Python 102, Building a Terrible Port Scanner, and a Giveaway
Zero to Hero Pentesting: Episode 3 - Python 102, Building a Terrible Port Scanner, and a Giveaway
The Cyber Mentor
31 Zero to Hero Pentesting: Episode 4 - Five Phases of Hacking + Passive OSINT
Zero to Hero Pentesting: Episode 4 - Five Phases of Hacking + Passive OSINT
The Cyber Mentor
32 Zero to Hero Pentesting: Episode 5 - Scanning Tools (Nmap, Nessus, BurpSuite, etc.) & Tactics
Zero to Hero Pentesting: Episode 5 - Scanning Tools (Nmap, Nessus, BurpSuite, etc.) & Tactics
The Cyber Mentor
33 Zero to Hero Pentesting: Episode 6 - Enumeration (Kioptrix & Hack The Box)
Zero to Hero Pentesting: Episode 6 - Enumeration (Kioptrix & Hack The Box)
The Cyber Mentor
34 Zero to Hero Pentesting: Episode 7 - Exploitation, Shells, and Some Credential Stuffing
Zero to Hero Pentesting: Episode 7 - Exploitation, Shells, and Some Credential Stuffing
The Cyber Mentor
35 Installing Windows Server 2016 on VMWare in 5 Minutes
Installing Windows Server 2016 on VMWare in 5 Minutes
The Cyber Mentor
36 Zero to Hero: Week 8 - Building an AD Lab, LLMNR Poisoning, and NTLMv2 Cracking with Hashcat
Zero to Hero: Week 8 - Building an AD Lab, LLMNR Poisoning, and NTLMv2 Cracking with Hashcat
The Cyber Mentor
37 A Day in the Life of an Ethical Hacker / Penetration Tester
A Day in the Life of an Ethical Hacker / Penetration Tester
The Cyber Mentor
38 Active Directory Exploitation - LLMNR/NBT-NS Poisoning
Active Directory Exploitation - LLMNR/NBT-NS Poisoning
The Cyber Mentor
39 Zero to Hero: Week 9 - NTLM Relay, Token Impersonation, Pass the Hash, PsExec, and more
Zero to Hero: Week 9 - NTLM Relay, Token Impersonation, Pass the Hash, PsExec, and more
The Cyber Mentor
40 Zero to Hero: Episode 10 - MS17-010/EternalBlue, GPP/cPasswords, and Kerberoasting
Zero to Hero: Episode 10 - MS17-010/EternalBlue, GPP/cPasswords, and Kerberoasting
The Cyber Mentor
41 Writing a Pentest Report
Writing a Pentest Report
The Cyber Mentor
42 Zero to Hero: Week 11 - File Transfers, Pivoting, and Reporting Writing
Zero to Hero: Week 11 - File Transfers, Pivoting, and Reporting Writing
The Cyber Mentor
43 The Complete Linux for Ethical Hackers Course for 2019
The Complete Linux for Ethical Hackers Course for 2019
The Cyber Mentor
44 Full Ethical Hacking Course - Beginner Network Penetration Testing (2019)
Full Ethical Hacking Course - Beginner Network Penetration Testing (2019)
The Cyber Mentor
45 Popping a Shell with SMB Relay and Empire
Popping a Shell with SMB Relay and Empire
The Cyber Mentor
46 Pentesting for n00bs: Episode 1 - Legacy (hackthebox)
Pentesting for n00bs: Episode 1 - Legacy (hackthebox)
The Cyber Mentor
47 Pentesting for n00bs: Episode 2 - Lame
Pentesting for n00bs: Episode 2 - Lame
The Cyber Mentor
48 Pentesting for n00bs: Episode 3 - Blue
Pentesting for n00bs: Episode 3 - Blue
The Cyber Mentor
49 Web App Testing: Episode 1 - Enumeration
Web App Testing: Episode 1 - Enumeration
The Cyber Mentor
50 Pentesting for n00bs: Episode 4 - Devel
Pentesting for n00bs: Episode 4 - Devel
The Cyber Mentor
51 Pentesting for n00bs: Episode 5 - Jerry
Pentesting for n00bs: Episode 5 - Jerry
The Cyber Mentor
52 Web App Testing: Episode 2 - Enumeration, XSS, and UI Bypassing
Web App Testing: Episode 2 - Enumeration, XSS, and UI Bypassing
The Cyber Mentor
53 Pentesting for n00bs: Episode 6 - Nibbles
Pentesting for n00bs: Episode 6 - Nibbles
The Cyber Mentor
54 Web App Testing: Episode 3 - XSS, SQL Injection, and Broken Access Control
Web App Testing: Episode 3 - XSS, SQL Injection, and Broken Access Control
The Cyber Mentor
55 How NOT to Approach a Cybersecurity Mentor
How NOT to Approach a Cybersecurity Mentor
The Cyber Mentor
56 Web App Testing: Episode 4 - XXE, Input Validation, Broken Access Control, and More XSS
Web App Testing: Episode 4 - XXE, Input Validation, Broken Access Control, and More XSS
The Cyber Mentor
57 Pentesting for n00bs: Episode 7 - Optimum (hackthebox)
Pentesting for n00bs: Episode 7 - Optimum (hackthebox)
The Cyber Mentor
58 Pentesting for n00bs: Episode 8 - Bashed (hackthebox)
Pentesting for n00bs: Episode 8 - Bashed (hackthebox)
The Cyber Mentor
59 Pentesting for n00bs: Episode 9 - Grandpa
Pentesting for n00bs: Episode 9 - Grandpa
The Cyber Mentor
60 Top 5 Internal Pentesting Methods
Top 5 Internal Pentesting Methods
The Cyber Mentor

This video teaches beginner ethical hackers how to manage users and configure privileges in Kali Linux using common commands like adduser, su, sudo, and chmod. It covers the basics of user management and security in Linux.

Key Takeaways
  1. Create a new user using the adduser command
  2. Understand the difference between su and sudo commands
  3. Configure user privileges using the chmod command
  4. Review the /etc/passwd and /etc/shadow files
  5. Use the su command to switch to a different user
  6. Use the sudo command to run commands with elevated privileges
💡 Understanding user management and privileges is crucial for ethical hackers to perform their tasks effectively and securely.

Related AI Lessons

Chapters (8)

0:06 Introduction
0:25 User privilege overview
3:33 chmod
4:55 adduser
5:25 /etc/passwd review
6:19 /etc/shadow review
7:00 su
8:15 sudo
Up next
You Think Your Card Declined by Mistake? It Might Be a 2026 Scam
Tolulope Michael
Watch →