Malwoverview Cheat Sheet
"Clase de la hoja" id="copy-btn" class="copy-btn" onclick="copyAllCommands()" Copiar todos los comandos id="pdf-btn" class="pdf-btn" onclick="generatePDF()" Generar PDF seleccionado/button ■/div titulada
Sinopsis
Malwoverview es una herramienta integral de búsqueda de amenazas y análisis de malware diseñado para proporcionar a los analistas de seguridad información detallada sobre archivos sospechosos, URLs y amenazas potenciales. Desarrollado como una utilidad basada en Python, Malwoverview se integra con múltiples plataformas de inteligencia de amenazas y servicios de análisis de malware para ofrecer evaluaciones de amenazas integrales. La herramienta sirve como una interfaz centralizada para consultar diversos servicios de seguridad, permitiendo a los analistas reunir rápidamente información sobre posibles amenazas sin acceder manualmente a múltiples plataformas.
La fuerza principal de la herramienta reside en su capacidad de agregar inteligencia de amenazas de diversas fuentes, incluyendo VirusTotal, Análisis híbrido, URLVoid, Shodan y otros servicios de seguridad. Esta capacidad de agregación permite a los profesionales de seguridad obtener una visión holística de las amenazas potenciales mediante la correlación de información de múltiples fuentes autorizadas. Malwoverview apoya el análisis de varios tipos de artefactos incluyendo hashes de archivos, URLs, direcciones IP y dominios, haciéndolo versátil para diferentes escenarios de caza de amenazas.
Malwoverview es particularmente valioso en los escenarios de respuesta a incidentes donde la evaluación rápida de amenazas es crítica. Las capacidades automatizadas de consulta de la herramienta pueden reducir significativamente el tiempo necesario para reunir inteligencia de amenazas, permitiendo que los analistas se centren en el análisis y la toma de decisiones en lugar de la recopilación manual de datos. La herramienta también proporciona formatos de salida estructurados que pueden integrarse fácilmente en plataformas de orquestación de seguridad y flujos de trabajo de respuesta a incidentes.
El marco admite modos de procesamiento interactivos y por lotes, lo que permite a los analistas realizar análisis de un solo artefacto o procesar de forma eficiente conjuntos de datos grandes. Su arquitectura modular permite una fácil extensión y personalización, lo que lo hace adaptable a requisitos organizativos específicos y flujos de trabajo de inteligencia de amenaza. Las capacidades de registro y presentación de informes de la herramienta proporcionan pistas de auditoría y facilitan el intercambio de conocimientos entre los equipos de seguridad.
Instalación
Prerrequisitos
# Install Python and pip
sudo apt update
sudo apt install python3 python3-pip git
# Install required Python packages
pip3 install requests colorama configparser pefile python-magic
# Install additional dependencies
sudo apt install libmagic1 libmagic-dev
# For CentOS/RHEL
sudo yum install python3 python3-pip git file-devel
pip3 install requests colorama configparser pefile python-magic
# For macOS
brew install python3 git libmagic
pip3 install requests colorama configparser pefile python-magic
Instalación estándar
# Clone Malwoverview repository
git clone https://github.com/alexandreborges/malwoverview.git
cd malwoverview
# Install Python dependencies
pip3 install -r requirements.txt
# Make executable
chmod +x malwoverview.py
# Test installation
python3 malwoverview.py --help
# Create symbolic link for system-wide access
sudo ln -s $(pwd)/malwoverview.py /usr/local/bin/malwoverview
Virtual Environment Instalación
# Create virtual environment
python3 -m venv malwoverview-env
source malwoverview-env/bin/activate
# Clone and install
git clone https://github.com/alexandreborges/malwoverview.git
cd malwoverview
pip install -r requirements.txt
# Create activation script
cat << 'EOF' > activate-malwoverview.sh
#!/bin/bash
source /path/to/malwoverview-env/bin/activate
cd /path/to/malwoverview
python3 malwoverview.py "$@"
EOF
chmod +x activate-malwoverview.sh
Docker Instalación
# Create Dockerfile
cat << 'EOF' > Dockerfile
FROM python:3.9-slim
RUN apt-get update && apt-get install -y \
git \
libmagic1 \
libmagic-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN git clone https://github.com/alexandreborges/malwoverview.git .
RUN pip install -r requirements.txt
ENTRYPOINT ["python3", "malwoverview.py"]
EOF
# Build image
docker build -t malwoverview .
# Run container
docker run --rm -it -v $(pwd)/config:/app/config malwoverview --help
# Create alias
echo 'alias malwoverview="docker run --rm -it -v $(pwd)/config:/app/config malwoverview"' >> ~/.bashrc
Configuración de configuración
# Create configuration directory
mkdir -p ~/.malwoverview
# Create API configuration file
cat << 'EOF' > ~/.malwoverview/malwoverview.conf
[VIRUSTOTAL]
vtapi = your_virustotal_api_key
[HYBRIDANALYSIS]
haapi = your_hybrid_analysis_api_key
[URLVOID]
urlvoidapi = your_urlvoid_api_key
[SHODAN]
shodanapi = your_shodan_api_key
[MALSHARE]
malshareapi = your_malshare_api_key
[POLYSWARM]
polyswarmapi = your_polyswarm_api_key
[ALIENVAULT]
alienvaultapi = your_alienvault_api_key
EOF
# Set proper permissions
chmod 600 ~/.malwoverview/malwoverview.conf
Uso básico
Interfaz de línea de mando
# Show help
malwoverview --help
python3 malwoverview.py -h
# Show version
malwoverview --version
# Basic file analysis
malwoverview -f /path/to/suspicious_file.exe
# Hash analysis
malwoverview -H md5_hash_here
malwoverview -H sha1_hash_here
malwoverview -H sha256_hash_here
# URL analysis
malwoverview -u http://suspicious-domain.com
# IP address analysis
malwoverview -i 192.168.1.100
# Domain analysis
malwoverview -d suspicious-domain.com
Opciones de configuración
# Use custom configuration file
malwoverview -c /path/to/custom.conf -f file.exe
# Specify output format
malwoverview -f file.exe -o json
malwoverview -f file.exe -o csv
malwoverview -f file.exe -o xml
# Enable verbose output
malwoverview -v -f file.exe
# Quiet mode
malwoverview -q -f file.exe
# Save output to file
malwoverview -f file.exe > analysis_report.txt
malwoverview -f file.exe -o json > report.json
Análisis de archivos
Análisis de archivos únicos
# Analyze executable file
malwoverview -f /path/to/malware.exe
# Analyze document
malwoverview -f /path/to/document.pdf
# Analyze script
malwoverview -f /path/to/script.js
# Analyze with specific engines
malwoverview -f file.exe --engines virustotal,hybridanalysis
# Force analysis even if cached
malwoverview -f file.exe --force
# Include metadata extraction
malwoverview -f file.exe --metadata
Análisis de archivos de lotes
# Analyze multiple files
malwoverview -f file1.exe file2.dll file3.pdf
# Analyze directory
malwoverview -d /path/to/malware_samples/
# Recursive directory analysis
malwoverview -d /path/to/samples/ --recursive
# Filter by file type
malwoverview -d /path/to/samples/ --filter "*.exe,*.dll"
# Exclude certain files
malwoverview -d /path/to/samples/ --exclude "*.txt,*.log"
# Parallel processing
malwoverview -d /path/to/samples/ --threads 5
Hash-Based Analysis
# MD5 hash analysis
malwoverview -H 5d41402abc4b2a76b9719d911017c592
# SHA1 hash analysis
malwoverview -H aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
# SHA256 hash analysis
malwoverview -H 2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae
# Multiple hashes
malwoverview -H hash1,hash2,hash3
# Hash list from file
malwoverview -H @hash_list.txt
# Specific hash type
malwoverview -H hash_value --hash-type sha256
Análisis de redes
Análisis de URL
# Single URL analysis
malwoverview -u http://suspicious-site.com
# Multiple URLs
malwoverview -u http://site1.com,http://site2.com
# URL list from file
malwoverview -u @url_list.txt
# Include screenshot
malwoverview -u http://site.com --screenshot
# Check redirects
malwoverview -u http://site.com --follow-redirects
# Custom user agent
malwoverview -u http://site.com --user-agent "Mozilla/5.0..."
IP Address Analysis
# Single IP analysis
malwoverview -i 192.168.1.100
# Multiple IPs
malwoverview -i 192.168.1.100,10.0.0.1
# IP range analysis
malwoverview -i 192.168.1.0/24
# Include geolocation
malwoverview -i 192.168.1.100 --geolocation
# Port scanning
malwoverview -i 192.168.1.100 --ports
# Include WHOIS information
malwoverview -i 192.168.1.100 --whois
Análisis de dominio
# Domain reputation check
malwoverview -d suspicious-domain.com
# Include subdomains
malwoverview -d domain.com --subdomains
# DNS analysis
malwoverview -d domain.com --dns
# Certificate analysis
malwoverview -d domain.com --certificate
# Historical data
malwoverview -d domain.com --historical
# Passive DNS
malwoverview -d domain.com --passive-dns
Análisis avanzado
Threat Intelligence Integración
# VirusTotal analysis
malwoverview -f file.exe --vt-only
# Hybrid Analysis
malwoverview -f file.exe --ha-only
# Multiple engines
malwoverview -f file.exe --engines vt,ha,urlvoid
# Custom API keys
malwoverview -f file.exe --vt-api your_api_key
# Rate limiting
malwoverview -f file.exe --rate-limit 4
# Timeout settings
malwoverview -f file.exe --timeout 30
Extracción de metadatos
# Extract PE metadata
malwoverview -f file.exe --pe-info
# Extract strings
malwoverview -f file.exe --strings
# Extract imports
malwoverview -f file.exe --imports
# Extract exports
malwoverview -f file.exe --exports
# Extract resources
malwoverview -f file.exe --resources
# Extract certificates
malwoverview -f file.exe --certificates
# All metadata
malwoverview -f file.exe --all-metadata
Análisis conductual
# Dynamic analysis
malwoverview -f file.exe --dynamic
# Sandbox analysis
malwoverview -f file.exe --sandbox cuckoo
# Network behavior
malwoverview -f file.exe --network-behavior
# File system behavior
malwoverview -f file.exe --fs-behavior
# Registry behavior
malwoverview -f file.exe --registry-behavior
# Process behavior
malwoverview -f file.exe --process-behavior
Presentación de informes y productos
Formatos de salida
# JSON output
malwoverview -f file.exe -o json
# CSV output
malwoverview -f file.exe -o csv
# XML output
malwoverview -f file.exe -o xml
# HTML report
malwoverview -f file.exe -o html
# PDF report
malwoverview -f file.exe -o pdf
# Custom template
malwoverview -f file.exe --template custom_template.jinja2
Informe de personalización
# Include specific sections
malwoverview -f file.exe --sections detection,metadata,behavior
# Exclude sections
malwoverview -f file.exe --exclude-sections strings,imports
# Custom report title
malwoverview -f file.exe --title "Malware Analysis Report"
# Add analyst information
malwoverview -f file.exe --analyst "John Doe" --organization "Security Team"
# Include timestamps
malwoverview -f file.exe --timestamps
# Add executive summary
malwoverview -f file.exe --executive-summary
Exportación de datos
# Export to database
malwoverview -f file.exe --export-db sqlite:///analysis.db
# Export to SIEM
malwoverview -f file.exe --export-siem splunk
# Export to MISP
malwoverview -f file.exe --export-misp http://misp-server.com
# Export IOCs
malwoverview -f file.exe --export-iocs iocs.txt
# Export YARA rules
malwoverview -f file.exe --export-yara rules.yar
# Export STIX
malwoverview -f file.exe --export-stix report.stix
Automatización y scripting
Procesamiento de lotes
# Process hash list
cat << 'EOF' > hash_list.txt
5d41402abc4b2a76b9719d911017c592
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae
EOF
malwoverview -H @hash_list.txt -o json > batch_results.json
# Process URL list
cat << 'EOF' > url_list.txt
http://suspicious-site1.com
http://malicious-domain.net
http://phishing-site.org
EOF
malwoverview -u @url_list.txt -o csv > url_analysis.csv
Scripts de automatización
#!/bin/bash
# Automated malware analysis script
cat << 'EOF' > analyze_samples.sh
#!/bin/bash
SAMPLE_DIR="/path/to/samples"
OUTPUT_DIR="/path/to/reports"
DATE=$(date +%Y%m%d_%H%M%S)
# Create output directory
mkdir -p "$OUTPUT_DIR/$DATE"
# Analyze all samples
for file in "$SAMPLE_DIR"/*; do
if [ -f "$file" ]; then
filename=$(basename "$file")
echo "Analyzing $filename..."
malwoverview -f "$file" -o json > "$OUTPUT_DIR/$DATE/$\\\\{filename\\\\}.json"
malwoverview -f "$file" -o html > "$OUTPUT_DIR/$DATE/$\\\\{filename\\\\}.html"
# Extract IOCs
malwoverview -f "$file" --export-iocs "$OUTPUT_DIR/$DATE/$\\\\{filename\\\\}_iocs.txt"
fi
done
# Generate summary report
python3 generate_summary.py "$OUTPUT_DIR/$DATE" > "$OUTPUT_DIR/$DATE/summary.html"
echo "Analysis complete. Reports saved to $OUTPUT_DIR/$DATE"
EOF
chmod +x analyze_samples.sh
Python Integration
#!/usr/bin/env python3
# Python wrapper for Malwoverview
import subprocess
import json
import sys
class MalwoverviewAPI:
def __init__(self, config_file=None):
self.config_file = config_file
self.base_cmd = ['python3', 'malwoverview.py']
if config_file:
self.base_cmd.extend(['-c', config_file])
def analyze_file(self, file_path, output_format='json'):
cmd = self.base_cmd + ['-f', file_path, '-o', output_format]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode == 0:
if output_format == 'json':
return json.loads(result.stdout)
return result.stdout
else:
raise Exception(f"Analysis failed: \\\\{result.stderr\\\\}")
def analyze_hash(self, hash_value, output_format='json'):
cmd = self.base_cmd + ['-H', hash_value, '-o', output_format]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode == 0:
if output_format == 'json':
return json.loads(result.stdout)
return result.stdout
else:
raise Exception(f"Analysis failed: \\\\{result.stderr\\\\}")
def analyze_url(self, url, output_format='json'):
cmd = self.base_cmd + ['-u', url, '-o', output_format]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode == 0:
if output_format == 'json':
return json.loads(result.stdout)
return result.stdout
else:
raise Exception(f"Analysis failed: \\\\{result.stderr\\\\}")
# Usage example
if __name__ == "__main__":
api = MalwoverviewAPI()
# Analyze file
try:
result = api.analyze_file('/path/to/sample.exe')
print(f"Detection ratio: \\\\{result.get('detection_ratio', 'N/A')\\\\}")
print(f"Threat level: \\\\{result.get('threat_level', 'N/A')\\\\}")
except Exception as e:
print(f"Error: \\\\{e\\\\}")
Ejemplos de integración
SIEM Integración
# Splunk integration
#!/bin/bash
cat << 'EOF' > splunk_integration.sh
#!/bin/bash
# Analyze file and send to Splunk
analyze_and_send() \\\\{
local file="$1"
local splunk_index="malware_analysis"
# Analyze file
result=$(malwoverview -f "$file" -o json)
# Send to Splunk
echo "$result"|curl -k -H "Authorization: Splunk $SPLUNK_TOKEN" \
-X POST "$SPLUNK_HEC_URL/services/collector" \
-d @- \
-H "Content-Type: application/json"
\\\\}
# Monitor directory for new samples
inotifywait -m -e create /path/to/samples --format '%w%f'|while read file; do
analyze_and_send "$file"
done
EOF
chmod +x splunk_integration.sh
MISP Integration
#!/usr/bin/env python3
# MISP integration script
import requests
import json
import subprocess
from pymisp import PyMISP
class MalwoverviewMISP:
def __init__(self, misp_url, misp_key):
self.misp = PyMISP(misp_url, misp_key, ssl=False)
def analyze_and_create_event(self, file_path, event_info):
# Analyze with Malwoverview
cmd = ['malwoverview', '-f', file_path, '-o', 'json']
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
raise Exception(f"Analysis failed: \\\\{result.stderr\\\\}")
analysis_data = json.loads(result.stdout)
# Create MISP event
event = self.misp.new_event(info=event_info)
# Add file hash
if 'md5' in analysis_data:
self.misp.add_hashes(event, md5=analysis_data['md5'])
if 'sha1' in analysis_data:
self.misp.add_hashes(event, sha1=analysis_data['sha1'])
if 'sha256' in analysis_data:
self.misp.add_hashes(event, sha256=analysis_data['sha256'])
# Add detection information
if 'detections' in analysis_data:
for detection in analysis_data['detections']:
self.misp.add_attribute(event, 'text', detection['name'])
# Add network indicators
if 'network_indicators' in analysis_data:
for indicator in analysis_data['network_indicators']:
if indicator['type'] == 'domain':
self.misp.add_attribute(event, 'domain', indicator['value'])
elif indicator['type'] == 'ip':
self.misp.add_attribute(event, 'ip-dst', indicator['value'])
elif indicator['type'] == 'url':
self.misp.add_attribute(event, 'url', indicator['value'])
return event
# Usage
misp_integration = MalwoverviewMISP('https://misp.example.com', 'your_api_key')
event = misp_integration.analyze_and_create_event('/path/to/malware.exe', 'Malware Analysis')
Corriente de trabajo de caza de amenazas
#!/bin/bash
# Automated threat hunting workflow
cat << 'EOF' > threat_hunting.sh
#!/bin/bash
HUNT_DIR="/tmp/threat_hunt_$(date +%Y%m%d_%H%M%S)"
mkdir -p "$HUNT_DIR"
# Function to analyze suspicious files
hunt_files() \\\\{
echo "Hunting for suspicious files..."
# Find recently modified executables
find /tmp /var/tmp -name "*.exe" -mtime -1 2>/dev/null|while read file; do
echo "Analyzing: $file"
malwoverview -f "$file" -o json > "$HUNT_DIR/$(basename $file).json"
done
# Find files with suspicious names
find / -name "*crypt*" -o -name "*hack*" -o -name "*payload*" 2>/dev/null|while read file; do
if [ -f "$file" ]; then
echo "Analyzing suspicious file: $file"
malwoverview -f "$file" -o json > "$HUNT_DIR/suspicious_$(basename $file).json"
fi
done
\\\\}
# Function to analyze network connections
hunt_network() \\\\{
echo "Hunting for suspicious network activity..."
# Get active connections
netstat -an|grep ESTABLISHED|awk '\\\\{print $5\\\\}'|cut -d: -f1|sort -u|while read ip; do
if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Analyzing IP: $ip"
malwoverview -i "$ip" -o json > "$HUNT_DIR/ip_$ip.json"
fi
done
\\\\}
# Function to analyze suspicious domains
hunt_domains() \\\\{
echo "Hunting for suspicious domains..."
# Extract domains from browser history, logs, etc.
grep -h "http" /var/log/*.log 2>/dev/null|grep -oE 'https?://[^/]+'|cut -d/ -f3|sort -u|while read domain; do
echo "Analyzing domain: $domain"
malwoverview -d "$domain" -o json > "$HUNT_DIR/domain_$domain.json"
done
\\\\}
# Execute hunting functions
hunt_files
hunt_network
hunt_domains
# Generate summary report
echo "Generating threat hunting report..."
python3 << 'PYTHON'
import json
import glob
import os
hunt_dir = os.environ.get('HUNT_DIR', '/tmp/threat_hunt_latest')
results = []
for json_file in glob.glob(f"\\\\{hunt_dir\\\\}/*.json"):
try:
with open(json_file, 'r') as f:
data = json.load(f)
if data.get('threat_level', 0) > 5:
results.append(\\\\{
'file': json_file,
'threat_level': data.get('threat_level'),
'detections': data.get('detections', [])
\\\\})
except:
continue
print(f"Threat Hunting Summary - \\\\{len(results)\\\\} high-risk items found:")
for result in sorted(results, key=lambda x: x['threat_level'], reverse=True):
print(f"- \\\\{result['file']\\\\}: Threat Level \\\\{result['threat_level']\\\\}")
PYTHON
echo "Threat hunting complete. Results saved to $HUNT_DIR"
EOF
chmod +x threat_hunting.sh
Solución de problemas
Cuestiones comunes
# API key configuration issues
malwoverview --test-apis
# Network connectivity issues
malwoverview --test-connectivity
# Permission issues
sudo chown -R $USER:$USER ~/.malwoverview
chmod 600 ~/.malwoverview/malwoverview.conf
# Python dependency issues
pip3 install --upgrade requests colorama configparser pefile python-magic
# File magic issues
sudo apt install libmagic1 libmagic-dev
pip3 install --upgrade python-magic
Modo de depuración
# Enable debug logging
malwoverview -f file.exe --debug
# Verbose output
malwoverview -f file.exe -v
# Log to file
malwoverview -f file.exe --log-file analysis.log
# Test specific API
malwoverview --test-api virustotal
# Check configuration
malwoverview --show-config
Optimización del rendimiento
# Increase timeout for slow APIs
malwoverview -f file.exe --timeout 60
# Reduce rate limiting
malwoverview -f file.exe --rate-limit 1
# Use caching
malwoverview -f file.exe --cache-results
# Parallel processing
malwoverview -d /samples/ --threads 3
# Memory optimization
export PYTHONOPTIMIZE=1
ulimit -v 1048576 # Limit virtual memory
-...
** Aviso de seguridad**: Malwoverview es una herramienta de caza de amenazas y análisis de malware que debe ser utilizado responsablemente y de acuerdo con las leyes y regulaciones aplicables. Al analizar archivos o URL sospechosos, asegúrese de tener una autorización adecuada y está operando en un entorno seguro y aislado. La herramienta se integra con varios servicios externos, así que tenga en cuenta la privacidad de los datos y las políticas de intercambio. Verifique siempre la legitimidad de las muestras antes de analizar y siga los procedimientos de respuesta a incidentes de su organización al manejar amenazas potenciales.
** Recursos adicionales**: - Malwoverview GitHub Repository - VirusTotal API Documentation - Hybrid Analysis API Documentation - Threat Intelligence Platforms Comparison