0
0
Cybersecurityknowledge~10 mins

Malware analysis basics 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 identify the type of malware based on its behavior.

Cybersecurity
if malware_behavior == [1]:
    print("This is a ransomware.")
Drag options to blanks, or click blank then click option'
Asends_spam
Bencrypts_files
Csteals_passwords
Dmines_cryptocurrency
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing ransomware with spyware or adware.
2fill in blank
medium

Complete the code to check if a file is suspicious based on its extension.

Cybersecurity
if file_extension == [1]:
    print("This file might be malicious.")
Drag options to blanks, or click blank then click option'
A".jpg"
B".pdf"
C".exe"
D".txt"
Attempts:
3 left
💡 Hint
Common Mistakes
Thinking image or document files are usually malicious.
3fill in blank
hard

Fix the error in the code that detects if a process is running suspiciously.

Cybersecurity
if process_name == [1]:
    alert('Suspicious process detected!')
Drag options to blanks, or click blank then click option'
A"svchost.exe"
Bsvchost.exe
C'svchost.exe'
Dsvchost
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes causes syntax errors.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps file names to their sizes only if size is greater than 1000.

Cybersecurity
file_sizes = {filename: [1] for filename, size in files.items() if size [2] 1000}
Drag options to blanks, or click blank then click option'
Asize
B<
C>
Dfilename
Attempts:
3 left
💡 Hint
Common Mistakes
Using filename as value or wrong comparison operator.
5fill in blank
hard

Fill both blanks to filter a dictionary of malware samples where the name is uppercase, the type is 'trojan', and the risk score is above 7.

Cybersecurity
filtered = {sample[1]: info for sample, info in samples.items() if info['type'] == [2] and info['risk'] > 7}
Drag options to blanks, or click blank then click option'
A.upper()
C"trojan"
D.lower()
Attempts:
3 left
💡 Hint
Common Mistakes
Using .lower() instead of .upper(), or wrong type string.