📖 Scenario: You work in a small company's IT department. Your manager asked you to prepare a simple report that lists common malware types and their key characteristics. This will help the team recognize and prevent malware attacks.
🎯 Goal: Create a structured list of malware types with their descriptions and an example of how each one spreads or affects computers.
📋 What You'll Learn
Create a dictionary called malware_types with four keys: 'Virus', 'Worm', 'Trojan', and 'Ransomware'.
Add a variable called example_spread that holds a string describing how malware spreads or acts.
Use a for loop with variables malware and info to iterate over malware_types.items().
Add a final dictionary called malware_report that combines malware_types and example_spread for each malware type.
💡 Why This Matters
🌍 Real World
IT professionals and cybersecurity learners use this knowledge to identify malware threats and educate users on how malware spreads.
💼 Career
Understanding malware types is essential for roles like IT support, cybersecurity analyst, and network administrator to protect systems and respond to attacks.
Progress0 / 4 steps
1
Create the malware types dictionary
Create a dictionary called malware_types with these exact entries: 'Virus' with value 'Needs a host file to spread', 'Worm' with value 'Spreads itself over networks', 'Trojan' with value 'Disguises as legitimate software', and 'Ransomware' with value 'Locks files and demands payment'.
Cybersecurity
Hint
Use curly braces {} to create the dictionary and separate each key-value pair with a comma.
2
Add example spread descriptions
Create a dictionary called example_spread with these exact entries: 'Virus' with value 'Attaches to executable files', 'Worm' with value 'Uses email to spread', 'Trojan' with value 'Hidden in free software', and 'Ransomware' with value 'Sent via phishing emails'.
Cybersecurity
Hint
Use a dictionary similar to malware_types but with the example spread descriptions.
3
Loop over malware types and example spreads
Use a for loop with variables malware and info to iterate over malware_types.items(). Inside the loop, create a new dictionary called combined_info that stores 'Description' as info and 'Spread' as the matching value from example_spread for the current malware.
Cybersecurity
Hint
Use for malware, info in malware_types.items(): and create combined_info inside the loop with keys 'Description' and 'Spread'.
4
Create the final malware report dictionary
Create an empty dictionary called malware_report before the loop. Inside the for loop, add each combined_info dictionary to malware_report using the current malware as the key.
Cybersecurity
Hint
Create malware_report = {} before the loop and add each combined_info inside the loop using malware_report[malware] = combined_info.
Practice
(1/5)
1. Which type of malware replicates itself to spread to other computers without needing to attach to a program?
easy
A. Worm
B. Virus
C. Trojan
D. Ransomware
Solution
Step 1: Understand malware replication methods
Viruses need to attach to files, but worms can spread independently over networks.
Step 2: Identify malware that self-replicates without a host
Worms are known for spreading themselves without needing to attach to other programs.
Final Answer:
Worm -> Option A
Quick Check:
Self-replicating malware without host = Worm [OK]
Hint: Worms spread alone, viruses need hosts [OK]
Common Mistakes:
Confusing virus with worm
Thinking trojans self-replicate
Mixing ransomware with spreading behavior
2. Which of the following correctly describes a Trojan horse in malware terms?
easy
A. Malware that replicates itself over networks
B. Malware that encrypts files and demands payment
C. Malware that spreads by attaching to files
D. Malware disguised as legitimate software
Solution
Step 1: Define Trojan horse malware
Trojans appear as normal software but hide harmful actions inside.
Step 2: Match description to options
Malware disguised as legitimate software matches the definition of a Trojan as disguised malware.
Final Answer:
Malware disguised as legitimate software -> Option D
3. Consider this scenario: A malware encrypts all files on a computer and demands money to unlock them. What type of malware is this?
medium
A. Ransomware
B. Worm
C. Trojan
D. Virus
Solution
Step 1: Identify malware behavior described
The malware encrypts files and demands payment to restore access.
Step 2: Match behavior to malware type
Ransomware is known for encrypting files and demanding ransom.
Final Answer:
Ransomware -> Option A
Quick Check:
Encrypts files + demands money = Ransomware [OK]
Hint: Ransomware locks files and asks for payment [OK]
Common Mistakes:
Confusing ransomware with virus
Thinking Trojan encrypts files
Mixing worm behavior with ransomware
4. A user reports their computer is slow and programs crash often. They find a malware that attaches itself to files and spreads when files are shared. Which malware type is most likely causing this?
medium
A. Trojan
B. Virus
C. Worm
D. Ransomware
Solution
Step 1: Analyze malware behavior
The malware attaches to files and spreads when files are shared, causing crashes and slowdowns.
Step 2: Identify malware type matching this behavior
Viruses attach to files and spread through sharing, unlike worms which spread independently.
Final Answer:
Virus -> Option B
Quick Check:
Attaches to files + spreads by sharing = Virus [OK]
Hint: Virus attaches to files, spreads via sharing [OK]
Common Mistakes:
Confusing worm with virus
Thinking Trojan spreads by itself
Mixing ransomware symptoms with virus
5. A company wants to protect its network from malware that can spread automatically without user action and also from malware disguised as useful software. Which two malware types should they focus on preventing?
hard
A. Virus and Ransomware
B. Trojan and Virus
C. Worm and Trojan
D. Ransomware and Worm
Solution
Step 1: Identify malware that spreads automatically
Worms spread automatically over networks without user action.
Step 2: Identify malware disguised as useful software
Trojans appear as legitimate software but carry harmful payloads.
Final Answer:
Worm and Trojan -> Option C
Quick Check:
Auto-spread = Worm, disguised = Trojan [OK]
Hint: Worm spreads alone; Trojan hides in apps [OK]