Meterpreter
"Clase de la hoja"
########################################################################################################################################################################################################################################################## Copiar todos los comandos
########################################################################################################################################################################################################################################################## Generar PDF seleccionado/button
■/div titulada
Comandos y patrones de uso de medidores completos para una gestión eficiente del flujo de trabajo.
Sinopsis
Meterpreter es una herramienta poderosa para diversas operaciones y gestión del sistema. Esta hoja de trampa cubre comandos esenciales, opciones de configuración y mejores prácticas.
Instalación
Linux/Ubuntu
# Package manager installation
sudo apt update
sudo apt install meterpreter
# Alternative installation
wget -O meterpreter https://github.com/example/meterpreter/releases/latest/download/meterpreter-linux
chmod +x meterpreter
sudo mv meterpreter /usr/local/bin/
macOS
# Homebrew installation
brew install meterpreter
# Manual installation
curl -L -o meterpreter https://github.com/example/meterpreter/releases/latest/download/meterpreter-macos
chmod +x meterpreter
sudo mv meterpreter /usr/local/bin/
Windows
# Chocolatey installation
choco install meterpreter
# Scoop installation
scoop install meterpreter
# Manual installation
# Download from official website and add to PATH
Comandos básicos
Command | Description |
---|---|
meterpreter --help |
Display help information |
meterpreter --version |
Show version information |
meterpreter init |
Initialize meterpreter in current directory |
meterpreter status |
Check current status |
meterpreter list |
List available options |
meterpreter info |
Display system information |
meterpreter config |
Show configuration |
meterpreter update |
Update to latest version |
Operaciones esenciales
Comienzo
# Initialize meterpreter
meterpreter init
# Basic usage
meterpreter run
# With verbose output
meterpreter --verbose run
# With configuration file
meterpreter --config config.yaml run
Configuración
# View configuration
meterpreter config show
# Set configuration option
meterpreter config set key value
# Get configuration value
meterpreter config get key
# Reset configuration
meterpreter config reset
Operaciones avanzadas
# Debug mode
meterpreter --debug run
# Dry run (preview changes)
meterpreter --dry-run run
# Force operation
meterpreter --force run
# Parallel execution
meterpreter --parallel run
Operaciones de archivo
Command | Description |
---|---|
meterpreter create <file> |
Create new file |
meterpreter read <file> |
Read file contents |
meterpreter update <file> |
Update existing file |
meterpreter delete <file> |
Delete file |
meterpreter copy <src> <dst> |
Copy file |
meterpreter move <src> <dst> |
Move file |
Operaciones de red
# Connect to remote host
meterpreter connect host:port
# Listen on port
meterpreter listen --port 8080
# Send data
meterpreter send --data "message" --target host
# Receive data
meterpreter receive --port 8080
Características de seguridad
Autenticación
# Login with credentials
meterpreter login --user username
# Logout
meterpreter logout
# Change password
meterpreter passwd
# Generate API key
meterpreter generate-key
Encryption
# Encrypt file
meterpreter encrypt file.txt
# Decrypt file
meterpreter decrypt file.txt.enc
# Generate certificate
meterpreter cert generate
# Verify signature
meterpreter verify file.sig
Solución de problemas
Cuestiones comunes
Issue: Command not found
# Check if installed
which meterpreter
# Reinstall if necessary
sudo apt reinstall meterpreter
Issue: Permission denied
# Run with sudo
sudo meterpreter command
# Fix permissions
chmod +x /usr/local/bin/meterpreter
Issue: Errores de configuración
# Reset configuration
meterpreter config reset
# Validate configuration
meterpreter config validate
Debug Commands
Command | Description |
---|---|
meterpreter --debug |
Enable debug output |
meterpreter --verbose |
Verbose logging |
meterpreter test |
Run self-tests |
meterpreter doctor |
Check system health |
Buenas prácticas
Seguridad
- Siempre verifique las sumas de verificación al descargar
- Use métodos de autenticación fuertes
- Actualización regular a la última versión
- Seguir el principio de mínimo privilegio
Ejecución
- Use los tamaños adecuados de amortiguación
- Supervisar el uso de los recursos
- Optimize configuración para su caso de uso
- Mantenimiento y limpieza regulares
Mantenimiento
# Update meterpreter
meterpreter update
# Clean temporary files
meterpreter clean
# Backup configuration
meterpreter backup --config
# Restore from backup
meterpreter restore --config backup.yaml
Integración
Scripting
#!/bin/bash
# Example script using meterpreter
if ! command -v meterpreter &> /dev/null; then
echo "meterpreter is not installed"
exit 1
fi
if meterpreter run; then
echo "Success"
else
echo "Failed"
exit 1
fi
API Integration
import subprocess
import json
def run_meterpreter(command):
try:
result = subprocess.run(['meterpreter'] + command.split(),
capture_output=True, text=True)
return result.stdout
except Exception as e:
print(f"Error: \\\\{e\\\\}")
return None
Medio ambiente
Variable | Description | Default |
---|---|---|
METERPRETER_CONFIG |
Configuration file path | ~/.meterpreter/config |
METERPRETER_HOME |
Home directory | ~/.meterpreter |
METERPRETER_LOG_LEVEL |
Logging level | INFO |
METERPRETER_TIMEOUT |
Operation timeout | 30s |
Archivo de configuración
# ~/.meterpreter/config.yaml
version: "1.0"
settings:
debug: false
timeout: 30
log_level: "INFO"
network:
host: "localhost"
port: 8080
ssl: true
security:
auth_required: true
encryption: "AES256"
Ejemplos
Corrientes básicas de trabajo
# 1. Initialize
meterpreter init
# 2. Configure
meterpreter config set host example.com
# 3. Run operation
meterpreter run
# 4. Check results
meterpreter status
# 5. Cleanup
meterpreter clean
Avanzado flujo de trabajo
# Comprehensive operation
meterpreter run \
--config production.yaml \
--parallel \
--verbose \
--timeout 300
# Monitoring
meterpreter monitor \
--interval 60 \
--alert-threshold 80
Recursos
Documentación oficial
Comunidad
Tutoriales
-...
Última actualización: 2025-07-05