November 5, 2026
TryHackMe Operating System Security: Walkthrough
A computer can be fully patched and still be vulnerable to poor password choices. Credentials left in the wrong place can create another…

By 5um1t0x
3 min read
A computer can be fully patched and still be vulnerable to poor password choices. Credentials left in the wrong place can create another route to sensitive information.
TryHackMe's Operating System Security room explores these problems through three tasks. It introduces the CIA triad, explains common security weaknesses, and finishes with a Linux exercise involving weak passwords and exposed credentials.
Task 1: Introduction to Operating System Security
An operating system manages the computer's hardware, applications, files, and user access. Protecting it also means protecting the information it stores and processes.
The room introduces the CIA triad, which describes three main goals of information security.
Confidentiality
Information should only be accessible to authorised people.
Someone reading another user's private documents without permission is a confidentiality problem.
Integrity
Information should remain accurate and protected against unauthorised changes.
For example, changing financial records or modifying system settings without permission affects integrity.
Availability
Systems and information should be accessible when authorised users need them.
A service outage or ransomware infection can affect availability by preventing access to important resources.
These goals overlap. A single security incident can expose information, modify it, and make a service unavailable.
Question and Answer
Which of the following is not an operating system?
Answer: Thunderbird
Thunderbird is an email application. It runs on an operating system rather than managing the computer's hardware and system resources itself.
Task 2: Common Examples of OS Security
This task focuses on three common problems: weak authentication, incorrect file permissions, and malicious programs.
Authentication and Weak Passwords
Authentication verifies identity. Common authentication factors include:
- Something you know: A password or PIN.
- Something you have: A security key or authenticator device.
- Something you are: A fingerprint or another biometric characteristic.
Passwords become less effective when they are predictable or reused. Common words, short number sequences, and keyboard patterns are easy to anticipate.
For everyday use, a password manager can generate and store long, unique passwords. Multifactor authentication adds another layer of protection where supported.
Weak File Permissions
File permissions determine who can read, modify, or execute a file.
Giving everyone access might seem convenient, but it can expose private information or allow unwanted changes.
The principle of least privilege means granting only the access necessary for someone's work. A person who only needs to read a document should not automatically receive permission to modify it.
Malicious Programs
Malware can affect confidentiality, integrity, and availability.
A Trojan may provide unauthorised access or steal information. Ransomware can encrypt files and prevent users from accessing them.
The damage depends partly on the permissions available to the malicious program. This is one reason to avoid using highly privileged accounts for routine work.
Question and Answer
Which of the following is a strong password, in your opinion?
Answer: S7!2a?3
This is the intended choice among the supplied options because it avoids the obvious patterns used by the alternatives.
It is still a short, publicly disclosed example not a password to reuse. In practice, choose a substantially longer, unique password.
Task 3: Practical Example of OS Security
The practical exercise shows how authentication mistakes and exposed credentials can undermine a Linux system.
This is a credential-handling problem, not a demonstration of an unpatched operating system vulnerability.
Set Up the Environment
Start the AttackBox and the room's Lab Machine. Wait until both are available, then open a terminal in the AttackBox.
Use the initial account and connection details provided by the room to access the lab environment.
Once connected, these read-only commands help you understand your starting point:
whoami
pwd
lswhoami
pwd
lswhoamiidentifies the account running your commands.pwddisplays the current directory.lslists visible files and directories.
The cat command can display the contents of the lab's text files.
Finding 1: A Predictable Account Password
The exercise introduces an account named johnny whose password appears in the room's common-password list.
The important lesson is that a password can technically satisfy a login requirement while providing very little practical protection.
What is the password for the user johnny?
Answer: abc123
A predictable password makes an account vulnerable to guessing. A long, unique password would remove this particular weakness.
Finding 2: A Password Left in Shell History
The next finding concerns Johnny's command history.
A password was accidentally entered directly at the shell prompt rather than into a password prompt. The shell therefore treated it as a command and recorded it.
That distinction matters: passwords entered normally at an SSH or account-switching password prompt are not ordinarily saved as shell commands.
What is the root password found in Johnny's command history?
Answer: happybirthday
Command histories can contain sensitive information when users place secrets directly in commands or accidentally paste them into a terminal.
If a credential is exposed this way, deleting the history entry alone is not enough. The credential should be changed, and the exposure reviewed.
Finding 3: The Root Account and Final Flag
The final result demonstrates why an exposed root credential is especially serious.
The root account has extensive administrative control over a Linux system. Its compromise can affect private files, system configuration, and service availability — all three parts of the CIA triad.
The lab's final file is located at /root/flag.txt.
What is the content of flag.txt in the /root directory?
Answer: THM{YouGotRoot}
This completes the practical exercise.
Final Thoughts
The weaknesses in this room are ordinary mistakes: a predictable password and a secret entered in the wrong place. Together, they show why credential handling deserves as much attention as software updates.
The defensive lessons are straightforward: use long, unique passwords, restrict privileges, avoid putting secrets into command lines, and rotate credentials when they are exposed. Operating system security depends on these everyday habits as well as technical controls.
Source: TryHackMe — Operating System Security.
Powered by Sukshield
Follow me on
LinkedIn: Sumit Battani | Twitter: https://twitter.com/5um1t0x TryHackMe: TryHackMe | 5um1t0x