Tryhackme-Linux Fundamentals

Linux Fundamentals

文章目录

  • Linux Fundamentals
    • Linux Fundamentals Part 1
      • task1 Introduction
      • task2 A Bit of Background on Linux
      • task3 Interacting With Your First Linux Machine (In-Browser)
      • task4 Running Your First few Commands
      • task5 Interacting With the Filesystem!
      • task6 Searching for Files
      • task7 An Introduction to Shell Operators
      • task8 Conclusions & Summaries
      • task9 Linux Fundamentals Part 2
    • Linux Fundamentals Part 2
      • task1 Introduction
      • task2 Accessing Your Linux Machine Using SSH (Deploy)
      • task3 Introduction to Flags and Switches
      • task4 Filesystem Interaction Continued
      • task5 Permissions 101
      • task6 Common Directories
      • task7 Conclusions and Summaries
      • task8Linux Fundamentals Part 3
    • Linux Fundamentals Part 3
      • task1 Introduction
      • task2 Deploy Your Linux Machine
      • task3 Terminal Text Editors
      • task4 General/Useful Utilities
      • task5 Processes 101
      • task6 Maintaining Your System: Automation
      • task7 Maintaining Your System: Package Management
      • task8 Maintaining Your System: Logs
      • task9 Conclusions & Summaries

Linux Fundamentals Part 1

task1 Introduction

无需回答

task2 A Bit of Background on Linux

What year was the first release of a Linux operating system?

1991

task3 Interacting With Your First Linux Machine (In-Browser)

无需回答

task4 Running Your First few Commands

1.If we wanted to output the text “TryHackMe”, what would our command be?

echo TryHackMe

2.What is the username of who you’re logged in as on your deployed Linux machine?

tryhackme

task5 Interacting With the Filesystem!

1.On the Linux machine that you deploy, how many folders are there?

4

2.Which directory contains a file?

folder4

3.Which directory contains a file?

Hello World!

4.Use the cd command to navigate to this file and find out the new current working directory. What is the path?

/home/tryhackme/folder4

考察命令 ls,cd,cat,pwd

task6 Searching for Files

1.Use grep on “access.log” to find the flag that has a prefix of “THM”. What is the flag?

THM{ACCESS}

image-20210702161233231

2.And I still haven’t found what I’m looking for!

无需回答

task7 An Introduction to Shell Operators

1.If we wanted to run a command in the background, what operator would we want to use?

&

2.If I wanted to replace the contents of a file named “passwords” with the word “password123”, what would my command be?

echo password123 > passwords

3.Now if I wanted to add “tryhackme” to this file named “passwords” but also keep “passwords123”, what would my command be

echo tryhackme >> passwords

考察 &,&&,>,>>

task8 Conclusions & Summaries

无需回答

task9 Linux Fundamentals Part 2

无需回答

Linux Fundamentals Part 2

task1 Introduction

无需回答

task2 Accessing Your Linux Machine Using SSH (Deploy)

ssh远程连接

task3 Introduction to Flags and Switches

1.Explore the manual page of the ls command

无需回答

2.What directional arrow key would we use to navigate down the manual page?

down

3.What flag would we use to display the output in a “human-readable” way?

-h

task4 Filesystem Interaction Continued

1.How would you create the file named “newnote”?

touch newnote

2.On the deployable machine, what is the file type of “unknown1” in “tryhackme’s” home directory?

ASCII text

3.How would we move the file “myfile” to the directory “myfolder”

mv myfile myfolder

4.What are the contents of this file?

THM{FILESYSTEM}

image-20210704151028432

5.Continue to apply your knowledge and practice the commands from this task

无需回答

task5 Permissions 101

1.On the deployable machine, who is the owner of “important”?

user2

image-20210704151312011

2.What would the command be to switch to the user “user2”?

su user2

3.Now switch to this user “user2” using the password “user2”

无需回答

4.Output the contents of “important”, what is the flag?

THM{SU_USER2}

image-20210704151613775

task6 Common Directories

1.Read me!

无需回答

2.What is the directory path that would we expect logs to be stored in?

/var/log

3.What root directory is similar to how RAM on a computer works?

/tmp

/tmp 临时目录

4.Name the home directory of the root user

/root

5.Now apply your learning and navigate through these directories on the deployed Linux machine.

无需回答

task7 Conclusions and Summaries

Proceed to the next task to continue your learning

无需回答

task8Linux Fundamentals Part 3

无需回答

Linux Fundamentals Part 3

task1 Introduction

无需回答

task2 Deploy Your Linux Machine

无需回答

task3 Terminal Text Editors

1.Create a file using Nano

无需回答

2.Edit “task3” located in “tryhackme”'s home directory using Nano. What is the flag?

THM{TEXT_EDITORS}

image-20210705090813168

task4 General/Useful Utilities

1.Ensure you are connected to the deployed instance (10.10.153.121)

无需回答

2.Now, use Python 3’s “HTTPServer” module to start a web server in the home directory of the “tryhackme” user on the deployed instance.、

无需回答

3.Download the file http://10.10.153.121:8000/.flag.txt onto the TryHackMe AttackBox

THM{WGET_WEBSERVER}

image-20210705091348552

4.Create and download files to further apply your learning – see how you can read the documentation on Python3’s “HTTPServer” module.

Use Ctrl + C to stop the Python3 HTTPServer module once you are finished.

无需回答

task5 Processes 101

1.Read me!

无需回答

2.If we were to launch a process where the previous ID was “300”, what would the ID of this new process be?

301

3.If we wanted to cleanly kill a process, what signal would we send it?

SIGTERM

4.Locate the process that is running on the deployed instance (124.70.216.43). What flag is given?

THM{PROCESSES}

image-20210708161513490

5.What command would we use to stop the service “myservice”?

systemctl stop myservice

6.What command would we use to start the same service on the boot-up of the system?

systemctl enable myservice

systemctl命令,start启动/stop停止/enable开启自启/disable关闭自启 进程/服务

7.What command would we use to bring a previously backgrounded process back to the foreground?

fg

task6 Maintaining Your System: Automation

1.Ensure you are connected to the deployed instance and look at the running crontabs.

无需回答

2.When will the crontab on the deployed instance (10.10.21.237) run?

@reboot

Tryhackme-Linux Fundamentals_第1张图片

task7 Maintaining Your System: Package Management

Since TryHackMe instances do not have an internet connection…this task only requires you to read through the material.

无需回答

task8 Maintaining Your System: Logs

1.Look for the apache2 logs on the deployable Linux machine

无需回答

日志文件存放在 /var/log/apache2 目录下

2.What is the IP address of the user who visited the site?

10.9.232.111

3.What file did they access?

catsanddogs.jpg

image-20210708165109399

task9 Conclusions & Summaries

无需回答

你可能感兴趣的:(#,信息安全)