TryHackMe Flashcards

(47 cards)

1
Q

Command to transfer files over SSH

A

scp [source] [destination]
Me to Target:
[file name] [user@IP:file path]
Target to Me:
[user@IP:file path] [file name]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Command to connect to an SSH server

A

ssh [target user]@[target IP]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Command to start a web server from directory you’re in

A

python3 -m http.server
(-m = run module as script)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to download a file from a web server

A

Start a web server with: python3 -m http.server
Then: wget http://[IP:port]/[file]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does a PID represent

A

Stands for process ID. The PID number tells you when the process started. Processes are numbered in the order they’re started.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Command to display running processes

A

ps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Command to display all processes including those run by other users

A

ps aux

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Command for real-time statistics for processes running

A

top

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Command to kill a process

A

kill [PID]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Command to cleanly kill a process

A

sigterm [PID]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Command to stop a service

A

systemctl stop [service]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Command to start a service

A

systemctl start [service]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you suspend/background a process?

A

Add a ‘&’ at the end of the command
or press ctrl+z while the process is running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you bring a process to the foreground/unsuspend it?

A

fg (for most recent process)
fg [jobID] (for specific job)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Command to enable or disable a service on boot

A

systemctl enable/disable [service]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Command to automate tasks after boot

A

crontab -e

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does HTTP stand for?

A

Hypertext Transfer Protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does HTTPS stand for?

A

Hypertext Transfer Protocol Secure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What HTTP header tells the browser how much data to expect?

A

content-header

20
Q

What are the most common HTTP methods?

A

GET, POST, PUT, & DELETE

21
Q

What does http GET method do?

A

Gets information from a web server

22
Q

What does http POST method do?

A

Submits data to a web server

23
Q

What does http PUT method do?

A

Updates information on a web server

24
Q

What does http DELETE method do?

A

Deletes information on a web server

25
HTTP Status codes 200-299
Tells client the request was successful
26
HTTP Status codes 300-399
Redirects client to different web page or site
27
HTTP Status codes 400-499
Tells client there's an error in their request
28
HTTP Status codes 500-599
Indicates server error
29
What HTTP header is used to save cookies to your computer?
set-cookie
30
What does XSS stand for?
Cross-Site Scripting
31
Where is the list of users located on linux?
/etc/passwd
32
Command to check file type
file [file]
33
Command to see what sudo commands can be used
sudo -l (L)
34
What is the file used by search engines on a website
robots.txt
35
What's a common file type for web pages, besides .html?
.php
36
Command to view file page by page
less
37
Command to view last line of a file
tail
38
Command to create a directory
mkdir
38
Command to create a file
touch
39
Option to affect all sub directories and files
-r
40
What's the file name of an ssh key?
id_rsa
41
How are ssh keys protected?
with a passphrase
42
What does TLD stand for?
Top Level Domain
43
What are some examples of gTLDs?
.com, .gov, .edu
44
What are some examples of ccTLDs?
.co.uk, .ca (Canada)
45
What is the Second-Level Domain?
the part that comes before the end of the url like .com
46
What is the Subdomain?
the first section of a url that comes before the second and top level domains.