Introduction
Imagine receiving a suspicious file or program and wanting to know if it is harmful before opening it. Malware analysis helps uncover what a suspicious file does and whether it can damage your computer or steal information.
Think of malware analysis like a detective investigating a suspicious package. First, the detective examines the package without opening it to look for warning signs. Then, they open it carefully in a safe room to see what it does. They also look for clues that show if the package has caused trouble before.
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Static │──────▶│ Sandbox │──────▶│ Dynamic │
│ Analysis │ │ Environment │ │ Analysis │
└───────────────┘ └───────────────┘ └───────────────┘
│
▼
┌─────────────────────┐
│ Indicators of │
│ Compromise (IoCs) │
└─────────────────────┘log = []
for action in ['open_file', 'modify_registry', 'send_data']:
log.append(f"Action: {action}")
print(log)def is_malicious(file):
if file.endswith('.exe') or '.dll':
return True
else:
return Falseactions = ['open_file', 'send_data', 'open_file', 'modify_registry', 'send_data', 'send_data']
Pass the test and this pattern moves unknown