0
0
Cybersecurityknowledge~10 mins

Service and port management in Cybersecurity - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to display the port number used by the HTTP service.

Cybersecurity
print('The HTTP service uses port [1]')
Drag options to blanks, or click blank then click option'
A21
B25
C443
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing HTTP port with FTP (21) or HTTPS (443).
2fill in blank
medium

Complete the command to check which service is listening on port {{BLANK_1}}.

Cybersecurity
netstat -an | grep [1]
Drag options to blanks, or click blank then click option'
A22
B53
C80
D110
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 80 which is for HTTP, not SSH.
3fill in blank
hard

Fix the error in the command to stop the service running on port {{BLANK_1}}.

Cybersecurity
sudo fuser -k [1]/tcp
Drag options to blanks, or click blank then click option'
A21
B22
C80
D25
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 22 which is for SSH, not HTTP.
4fill in blank
hard

Fill both blanks to create a dictionary mapping services to their default ports.

Cybersecurity
services = {'HTTP': [1], 'FTP': [2]
Drag options to blanks, or click blank then click option'
A80
B21
C22
D443
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing FTP port with SSH port 22.
5fill in blank
hard

Fill all three blanks to filter services running on ports greater than 1024.

Cybersecurity
filtered_services = {service: port for service, port in services.items() if port [1] 1024 [2] service != '[3]'}
Drag options to blanks, or click blank then click option'
A>
Band
C<
DHTTP
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' for port comparison.
Not excluding HTTP service correctly.