Posts

File Descriptors and Redirections - I'm flying further.

Image
  This chapter of the training somehow oddly corresponds to the results of tasks from the previous chapter. It discusses functions that I've already had to use to solve those tasks. Admittedly, it touches on a few interesting concepts worth acquainting oneself with. And they will certainly come in handy when starting to write scripts in BASH. Okay - what will surprise me today? 1.  How many files exist on the system that have the ".log" file extension?  This task is very simple to execute - it's just a precise repetition of what I learned while completing tasks from the previous chapter.  find / -type f -name *.log 2>/dev/null | wc -l Since most of you probably have no doubts about what commands of this syntax deal with, I'm posting a detailed description of how they operate. This command performs the following tasks: 1. `find / -type f -name *.log`: This part of the command starts at the root directory ("/") and searches for files (`-type f`)

Find Files and Directories - new tasks - it's getting more interesting!

Image
  The previous tasks didn't really require me to search for very complex knowledge. However, I see that the difficulty level is increasing from task to task. Is it a good thing? Of course. However, it should be noted that each task is well described on internet forums such as Reddit or HTB. Nevertheless, this should be a last resort. After all, one must engage their gray matter and get into battle. Task one : What is the name of the config file that has been created after 2020-03-03 and is smaller than 28k but larger than 25k? I think we need to break it all down into smaller parts, and then go through it step by step. I'm searching for an object of type file. -type f I'm specifying the query by narrowing down the sought-after files to the type .conf. -iname *.conf ( I'm using -iname instead of -name, as -iname doesn't consider letter case. It will show results regardless of whether the name is written in uppercase or lowercase. This essentially expands the

Working with Files and Directories - second part of today's tasks.

Image
  What tasks will I encounter this time? I see exactly two. 1. What is the name of the last modified file in the "/var/backups" directory?  In this case, I probably should change the directory to the correct one. And here the 'cd' command will come in handy - so off I go. When sorting files by creation time using the command 'ls -l -t', it should arrange the files precisely according to date from newest to oldest. However, what do I see - I don't know why this command sorted the files by creation time and the first file is 'dpkg.status.0', which is not the correct answer to this question. Instead, the next file is 'apt.extended.states.0'. Interesting, maybe someday I'll find out why this is the case - or one of you will guide me to the correct answer. 2. What is the inode number of the "shadow.bak" file in the "/var/backups" directory?  This should be easy now - after all, I was already looking for this numbe

Navigation and Efficient Linux Shell Mastery.

Image
  Efficient navigation is crucial for working in systems; employing various commands and tools optimizes directory and file management while experimenting aids in mastering Linux operations, enhancing shell proficiency. We now know the topic of today's tasks in the training I'm currently going through. It's time to fire up the machines. Alright, the first task. Let's see what awaits me now. 1. What is the name of the hidden "history" file in the htb-user's home directory?   As we can see, my first step will be to check if I'm in the right directory. I can do this using the 'pwd' command. Alright, I'm where I should be. Now, I need to find out where this 'history' file is hiding and what it's actually called. Normally, I'd check the contents of the directory by typing 'ls,' but okay - that command will only show me non-hidden files. And I need that one hidden file. Will 'ls -all' do the trick? Well, let

Today is the time for the first serious tasks in my Linux course.

Image
  At first, I had to perform two actions - start the virtual machine and then click on the link "Target: Click here to spawn the target system!" - and I could already access the terminal in the basic HTB virtual machine and log in via SSH using the provided and visible IP address in the task - it's important to remember to enter the username and password correctly here - I typed the password into a notepad on the virtual machine - and then I only used copy/paste.  So it's time to solve these few puzzles for today. 1. "Find out the machine hardware name and submit it as the answer." Command:  uname -m Result: x86_64 2. What is the path to htb-student's home directory?  Command: pwd Result: /home/htb-student 3.  What is the path to the htb-student's mail?    Since our home directory is htb-student, the directory for my mail is located at /var/mail/.... and here htb-student. 4.  Which shell is specified for the htb-student user?  Command: echo $

Introduction to Academy - module completed - what's the next step?

Image
  The entire course should last approximately 6 hours. This is a Tier 0 level course, so the cost to start this course is 10 cubes. And that's exactly how many cubes I received after completing the previous block - so quite a nice surprise - a free Linux course :D What does Hack The Box say about this course?  " Module Summary Linux is an indispensable tool and system in the field of cybersecurity. Many servers run on Linux and offer a wide range of possibilities for offensive security practitioners, network defenders, and systems administrators. This module covers the essentials for starting with the Linux operating system and terminal. In this module, we will cover: Linux structure Using the shell Navigating the Linux operating system Working with files and directories Linux administration Service management Permissions management" This module is structured into sections with practical exercises designed to reinforce the concepts we discuss. At the end of the

How to get a job in cybersecurity earning over six figures : Zero to Cyber Hero - New Book

Image
  From what I can see, many people in the industry recommend this position. Interestingly, on Amazon , reader ratings are 4.8/5 - which is quite a nice result. I'll want to keep it for my next vacation. For now, though, let me write about what you can find in it.  " If you want to work in cyber security but don’t know where to begin, you are in the right place. This book uncovers how to start from zero and become a six-figure earning cybersecurity hero in less than a year. The book will cover everything from: The different roles in cybersecurity Salary expectations How to ace the job interview Building skills from the ground up How to network in cybersecurity Mindset and principles Lessons learned from my career This book will give you all the tools and everything you need to succeed to have a long and rewarding career in cybersecurity. "