VirusTotal

VirusTotal

One-liner: Free online service that analyzes files, URLs, IPs, and domains using 70+ antivirus engines and threat intelligence feeds.

🎯 What Is It?

VirusTotal is a crowd-sourced malware analysis platform acquired by Google (Chronicle) that aggregates results from dozens of antivirus scanners, URL/domain blacklists, and file analysis tools. It's a first-stop resource for Malware Analysis, threat intel, and SOC analysts investigating suspicious artifacts.

Website: https://www.virustotal.com

🛠️ Core Features

1. File Analysis

Upload files (max 650MB) for scanning.

What it checks:

Example:

# Calculate hash first
sha256sum suspicious.exe
# 5d41402abc4b2a76b9719d911017c592

# Search on VirusTotal by hash (no need to upload if already scanned)

2. URL/Domain Analysis

Check URLs, domains, and IPs for malicious activity.

What it checks:

Example:

URL: http://malicious-site.com/payload.exe
Detection: 45/90 security vendors flagged as malicious
Category: Trojan downloader

3. IP Address Lookup

Investigate IPs for malicious infrastructure.

What it provides:

4. Behavior Analysis (Sandbox)

For executable files, VirusTotal runs dynamic analysis:

Output Example:

Process: malware.exe
├─ Creates: C:\Users\Admin\AppData\Roaming\update.exe
├─ Registry: HKCU\Software\Microsoft\Windows\CurrentVersion\Run
├─ Network: 192.168.1.100:8080 (C2 server)
└─ DNS Query: evil-c2.com

5. Community & Threat Intel

📊 Detection Ratio

Example: 45/70 engines detected malware
         ↑   ↑
    Detections Total Engines

Interpretation:

Warning: 0 detections ≠ safe!

🔑 VirusTotal API

For automation and integration.

API Endpoints

# File hash lookup
curl --request GET \
  --url https://www.virustotal.com/api/v3/files/{hash} \
  --header 'x-apikey: YOUR_API_KEY'

# URL scan
curl --request POST \
  --url https://www.virustotal.com/api/v3/urls \
  --header 'x-apikey: YOUR_API_KEY' \
  --form 'url=http://example.com'

# Domain lookup
curl --request GET \
  --url https://www.virustotal.com/api/v3/domains/evil.com \
  --header 'x-apikey: YOUR_API_KEY'

Rate Limits

Python Example

import requests

api_key = "YOUR_API_KEY"
file_hash = "5d41402abc4b2a76b9719d911017c592"

url = f"https://www.virustotal.com/api/v3/files/{file_hash}"
headers = {"x-apikey": api_key}

response = requests.get(url, headers=headers)
data = response.json()

print(f"Detections: {data['data']['attributes']['last_analysis_stats']['malicious']}/70")

💡 Use Cases

1. Malware Analysis

1. Receive suspicious .exe from phishing email
2. Upload to VirusTotal
3. Check detection ratio: 52/70 (malicious)
4. Review behavioral analysis: Creates persistence, contacts C2
5. Extract IOCs: IPs, domains, file hashes
6. Share with team

2. Threat Intelligence

3. Incident Response

4. Alert Triage

Alert: Suspicious file downloaded from email
File Hash: abc123...
VirusTotal: 0/70 detections
→ Upload for behavioral analysis
→ Review sandbox results
→ Determine if malicious or FP

⚠️ Operational Security Considerations

🚫 Do NOT upload:

Why?

Safe practices:

🔍 Advanced Features (Premium)

VirusTotal Intelligence

VirusTotal Graph

LiveHunt

📊 Statistics

🎤 Interview Angles

Q: How would you use VirusTotal in an investigation?

STAR Example:
Situation: User reported suspicious email attachment (invoice.exe).
Task: Determine if file is malicious.
Action:

Q: What are the limitations of VirusTotal?

Q: Why shouldn't you upload sensitive files?