Archive

Archive for the ‘TryHackMe’ Category

Linux Fundamentals 2

TryHackMe is an amazing platform to learn CyberSecurity, regardless your knowledge level. Recently they lanched a new PreSecurity learning pathway , in case you have no prior security knowledge.

The pathway includes multiple rooms with entry level knowledge on Networks, Web, Linux and Windows Fundamentals.

Task 1:-

This writeup is for Linux Fundamentals 2 room.

I prefer to start with the AttackBox provided by the platform, but you can still use your own machine.

Task 2:-

Start with deploying the Linux Machine. Once deployed you will have the machine IP address.

For your own delopyment or attack box, try accessing the machine with ssh.

SSH is a way to use commandline to access remote machines. It is widely used, even more than remote desktop , for ease of use and being lightweight.

The IP provided for me is : 10.10.100.49

The username provided is tryhackme

Password is : tryhackme

To access the machine with SSH, start the Termianl then type :

ssh username@ipaddress

enter the password when requested

Accept to connect by typing yes

Once connection is established, you will have the username@machinename prompt

Task 3:-

The room starts with learning some basic commands on linux

ls : To view the contents of a directory ( this is simliar to dir in windows)

man : this is to show the manual pages for the command

you can also use other flags like -h or –help ( if the command allows) .

It is always good to view the help / manual page for any command to see the different flags you can use and the proper syntax.

You can use the up and down arrow keys to navigate across the manual page.

Task 4:-

These commands are common to use in your terminal:-

CP: cpy file or folder

touch: create a file

mkdir: Creates a folder

mv: moves a file or a folder

rm: removes ( deletes) a file or a folder

file : Determines the file typeclear

to see the contents of a file use the cat command

Task 5:-

File permissions on linux are read, write and excute. They are distributed on owner level, user level, group level and folder level.

If you can’t access a file with your current user permissions, you need to change the user using the su command , and enter the new user password

Task 6:-

Linux has a large directory structure. The directories of importantce to start looking at :-

/etc : this has the passwd and shadow files where the encrpyer passwords hases are located. These two files are important in pen testing

/ var :Has the /log subfolder. Logs usually have a lot of imporatnt information

/root: This is the root folder directory. If you can access it you have root access to the machine.

/tmp: for temporary files. This has useful information for the temporary files info used by different applications. This is also useful in pentesting

After finisihing your exploration on the vm , don’t forget to terminate it !

Categories: CTF, Linux, TryHackMe