0
0
Cybersecurityknowledge~10 mins

Why monitoring detects threats early in Cybersecurity - Test Your Understanding

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

Complete the code to show what monitoring tools check first.

Cybersecurity
if system_logs.[1]('error') != -1:
    alert_admin()
Drag options to blanks, or click blank then click option'
Afind
Bsearch
Cindex
Dcontains
Attempts:
3 left
💡 Hint
Common Mistakes
Using methods that do not exist on strings like 'search' or 'contains'
Using 'index' which raises an exception if not found
2fill in blank
medium

Complete the code to trigger an alert when CPU usage is high.

Cybersecurity
if cpu_usage [1] 80:
    send_alert('High CPU usage')
Drag options to blanks, or click blank then click option'
A>
B==
C<
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using less than operator
Using equality operator instead of comparison
3fill in blank
hard

Fix the error in the code that checks for unusual login attempts.

Cybersecurity
if login_attempts.get('user123', 0) [1] 5:
    lock_account('user123')
Drag options to blanks, or click blank then click option'
A=>
B>=
C==
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using => which is invalid in Python
Using == which checks equality only
4fill in blank
hard

Fill both blanks to filter logs for failed login attempts over 3 times.

Cybersecurity
suspicious_users = {user: count for user, count in login_failures.items() if count [1] [2]
Drag options to blanks, or click blank then click option'
A>
B3
C==
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using equality instead of greater than
Using less than which filters wrong users
5fill in blank
hard

Fill both blanks to create a dictionary of IPs with requests over 100.

Cybersecurity
high_traffic_ips = { ip: count for ip, count in requests.items() if count {BLANK_2}} {{BLANK_2}}
Drag options to blanks, or click blank then click option'
A{
B>
C100
D[
Attempts:
3 left
💡 Hint
Common Mistakes
Using square brackets which create lists
Using less than operator
Missing the opening brace