Servicios y soporteCarreras profesionalesIniciar sesión
AlgoSec
Volver a la página de inicio
Horizon
Horizon
Horizon Platform
Explore los módulos de nuestra plataforma
Horizon ACE
Transforme la seguridad de su red en la nube
Horizon FireFlow
Gestión automatizada de políticas de seguridad
Horizon ObjectFlow
Automatización inteligente para cambios de políticas
Horizon AppViz
Descubra, visualice y proteja aplicaciones
Horizon Security Analyzer
Visualice y gestione redes híbridas
Algo Assistant
Asistente de IA para tareas de políticas de seguridad
Integraciones
Microsoft Teams
Slack
Check Point
BMC
F5
Microsoft Azure
Google Cloud
HP
AWS
Cisco
Explorar todas las integraciones
Utilidades del producto
Centro de seguridad de AlgoSec

Garantía de devolución de dinero

Alternativas a AlgoSec

Soluciones
Soluciones

Por caso de uso

Automatización de cambios

Gestión de riesgos

Reducción de costes

Cumplimiento normativo

Por sector

Proveedores de servicios de seguridad

Finanzas

Seguros

Atención sanitaria

Gobierno

Telecomunicaciones

Recursos
Recursos

Explorar

Centro de recursos

Centro central para todo el contenido de AlgoSec

Algo-Library

Investigación exhaustiva y perspectivas técnicas

Casos de éxito

Historias y resultados reales de clientes

Blog

Artículos, perspectivas y actualizaciones de productos

Vea y aprenda

Videos

Videos sobre seguridad de red

Demostraciones de productos

Vea la plataforma en acción

Seminarios web

Charlas de expertos sobre desafíos de seguridad

Socios
Socios

Nuestro programa de socios

Conviértase en socio

Únase al programa de socios AlgoSec Elevate

Nuestro ecosistema de socios

Localizar un socio

Encuentre un socio en nuestra red global

Socios tecnológicos

Integraciones con proveedores de tecnología líderes

Socios de servicios

Trabaje con expertos certificados en servicios y consultoría

Empresa
Empresa

Descripción general de la empresa

Acerca de

Quiénes somos y el valor que aportamos

Liderazgo

Los ejecutivos que dirigen AlgoSec

Carreras profesionales

Vacantes y vida en AlgoSec

Contáctenos

Contacte con nuestras oficinas y equipos globales

Eventos

Conferencias y próximos eventos

Centro de medios

Noticias de la empresa y actualizaciones de productos

Utilidades de la empresa

Nuestros clientes

Servicios profesionales de AlgoSec

Ingeniero residente de AlgoSec

Servicios de formación y certificación

Programas de soporte de AlgoSec

Kit de prensa de AlgoSec

Iniciar sesiónServicios y soporteCarreras profesionales
Programar una demostración
Programar una demostración
Abstract network background
Inicio
Blog
Router honeypot for an IRC bot

Router honeypot for an IRC bot

Rony Moshkovich

Rony Moshkovich

September 13, 2020

|

4

minuto de lectura

Compartir
YouTubeLinkedIn

In our previous post we have provided some details about a new fork of Kinsing malware, a Linux malware that propagates across misconfigured Docker platforms and compromises them with a coinminer.

Several days ago, the attackers behind this malware have uploaded a new ELF executable b_armv7l into the compromised server dockerupdate[.]anondns[.]net.

The executable b_armv7l is based on a known source of Tsunami (also known as Kaiten), and is built using uClibc toolchain:

$ file b_armv7l b_armv7l: ELF 32-bit LSB executable, ARM, EABI4 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, with debug_info, not stripped

Unlike glibc, the C library normally used with Linux distributions, uClibc is smaller and is designed for embedded Linux systems, such as IoT. Therefore, the malicious b_armv7l was built with a clear intention to install it on such devices as routers, firewalls, gateways, network cameras, NAS servers, etc.

Some of the binary’s strings are encrypted. With the help of the HexRays decompiler, one could clearly see how they are decrypted:

memcpy(&key, "xm@_;w,B-Z*j?nvE|sq1o$3\"7zKC<F)utAr.p%=>4ihgfe6cba~&5Dk2d!8+9Uy:", 0x40u);
memcpy(&alphabet, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. ", 0x40u);

for (i = 0; i <= 64; ++i){ if (encoded[j] == key[i]) { if (psw_or_srv)
            decodedpsw[k] = alphabet[i];
        else
            decodedsrv[k] = alphabet[i];
        ++k;
    }}

The string decryption routine is trivial — it simply replaces each encrypted string’s character found in the array key with a character at the same position, located in the array alphabet.

Using this trick, the critical strings can be decrypted as:

Variable NameEncoded StringDecoded String
decodedpsw$7|3vfaa~8logmeINNOW
decodedsrv$7?*$s7<Flocalhost
chanE7zv"fopen
servers[0]m,;y,-ymx,yZ,164[.]68[.]106[.]96
servers[1]qC?jny*"7"n"<y"vFircbd[.]anondns[.]net

How to run/debug it?

Rather than infecting a physical router or re-building a uClibc-based distribution for Raspberry Pi, a viable alternative is to set up an emulation environment where uClibc toolchain is used by default.

For example, Valerio Di Giampietro has provided an excellent set of scripts to set up a Qemu emulation environment to emulate D-link DVA-5592 router. The environment it builds will emulate the router’s ARM v7 Cortex A9 Processor, memory, root file system and an older version of Linux kernel (3.4.11-rt19).

As a result, the IRC bot b_armv7l will run under such QEMU VM out-of-the-box. Apart from an opportunity to deploy such honeypot into a cloud, another advantage of this approach is that the honeypot traffic can easily be sniffed on the host.

When the IRC bot is executed in the virtual honeypot, it will connect to the remote IRC server. As seen in the intercepted traffic, the IRC server will respond with high-level statistics along with the Message of the Day (MOTD):

:-                        _____             _____ _  _ _____ 
:-                       |_   _|__ __ _ _ _|_   _| \| |_   _|
:-                         | |/ -_) _` | '  \| | | .` | | |  
:-                         |_|\___\__,_|_|_|_|_| |_|\_| |_|  
:- 
:-                                          \|/
:-                                         .-*-
:-                                        / /|\
:-                                       _L_
:-                                     ,"   ".
:-                                 (\ /  O O  \ /)
:-                                  \|    _    |/
:-                                    \  (_)  /
:-                                    _/.___,\_
:-                                   (_/     \_)
:-                             
:- 
:-             '##:::::'##:'########:::::'######:::::'###::::'##::: ##:
:-              ##:'##: ##: ##.....:::::'##... ##:::'## ##::: ###:: ##:
:-              ##: ##: ##: ##:::::::::: ##:::..:::'##:. ##:: ####: ##:
:-              ##: ##: ##: ######:::::: ##:::::::'##:::. ##: ## ## ##:
:-              ##: ##: ##: ##...::::::: ##::::::: #########: ##. ####:
:-              ##: ##: ##: ##:::::::::: ##::: ##: ##.... ##: ##:. ###:
:-             . ###. ###:: ########::::. ######:: ##:::: ##: ##::. ##:
:-             :...::...:::........::::::......:::..:::::..::..::::..::
:-           '########::::'###::::'##:::'##:'########::::'####:'########:
:-           ... ##..::::'## ##::: ##::'##:: ##.....:::::. ##::... ##..::
:-           ::: ##:::::'##:. ##:: ##:'##::: ##::::::::::: ##::::: ##::::
:-           ::: ##::::'##:::. ##: #####:::: ######::::::: ##::::: ##::::
:-           ::: ##:::: #########: ##. ##::: ##...:::::::: ##::::: ##::::
:-           ::: ##:::: ##.... ##: ##:. ##:: ##::::::::::: ##::::: ##::::
:-           ::: ##:::: ##:::: ##: ##::. ##: ########::::'####:::: ##::::
:-           :::..:::::..:::::..::..::::..::........:::::....:::::..:::::
:-                   '########:::'#######::'##:::::'##:'##::: ##:
:-                    ##.... ##:'##.... ##: ##:'##: ##: ###:: ##:
:-                    ##:::: ##: ##:::: ##: ##: ##: ##: ####: ##:
:-                    ##:::: ##: ##:::: ##: ##: ##: ##: ## ## ##:
:-                    ##:::: ##: ##:::: ##: ##: ##: ##: ##. ####:
:-                    ##:::: ##: ##:::: ##: ##: ##: ##: ##:. ###:
:-                    ########::. #######::. ###. ###:: ##::. ##:
:-                   ........::::.......::::...::...:::..::::..::
:-                   
:- 
:-                              .-.                      .-. _    .-.
:-                              : :                      : ::_;   : :
:-               .--.  ,-.,-. .-' :  .-..-..-. .--.    .-' :.-. .-' :
:-              ' .; ; : ,. :' .; :  : `; `; :' '_.'  ' .; :: :' .; :
:-              `.__,_;:_;:_;`.__.'  `.__.__.'`.__.'  `.__.':_;`.__.'
:-                                                                   
:-                                                                   
:-                          just talk to us,
:-                          when you spot us
 

Next, the client will join an IRC channel GLIBC_2.

Once joined, the server will reply its vendetta message aimed at Cado security, a company that reported about TeamTNT earlier.

:TeamTNT.IRC.Hub 332 DPAOKJ #GLIBC_2:CadoSecurity lies to look really good

After that, the client falls into a waiting state, periodically sending PING commands to the server and receiving PONG responses.

We’ve got a bee! (or, is it a fly?)

After approximately two days of running, the honeypot has finally registered a remote command sent by the attackers to the IRC bot running in the virtualised honeypot:

:!* SH netstat -ntl | grep -v grep | grep -v “:1982 ” | grep -v “:6697 ” | grep -v “:1982 ” | grep -v “:2105 ” | grep -v “:51982 “

The request starts from the “SH “ command, which is then parsed by the bot and executed with popen() function — a function that opens a process by invoking the shell.

With this remote command, the attackers have executed netstat command to see what ports were open on the ‘router’. The command was accompanied with a filter to exclude ‘noisy’ ports from reporting.

The bot complied — it executed the netstat command, and then sent back the output as a private message, using the NOTICE command. The message stated that the ‘router’ had only one port open: SSH port 22.

NOTICE NKDE:Active Internet connections (only servers)

NOTICE NKDE:Proto Recv-Q Send-Q Local Address Foreign Address State

NOTICE NKDE:tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN

NOTICE NKDE: NKDE!~NKDE@[HONEYPOT_IP_ADDRESS] QUIT:Client closed connection

If the router’s SSH server is not hidden behind an ISP’s NAT, the attackers might then attempt to connect to it directly, either by using default credentials or by brute-forcing them.

The ultimate goal of the attackers is to infect a compromised device with an XMRig coinminer, also built for ARMv7 CPU.

As an extra feature, the IRC bot itself can be instructed to initiate a DoS attack against other targets.

As their Message of the Day claims, they’ve done this before.

Rony Moshkovich

Rony Moshkovich

Rony Moshkovich, director de producto de AlgoSec, cuenta con décadas de experiencia práctica en investigación e ingeniería en el sector de la seguridad informática. Su trayectoria incluye una amplia experiencia en gestión, con especial énfasis en la investigación y el desarrollo de software, lo que le permite orientar de forma única los requisitos empresariales y los servicios profesionales para soluciones destinadas a grandes empresas, pymes y consumidores.

Tabla de contenido

Elemento de la tabla de contenido

¿Está listo para tomar el control de la seguridad de su red?

Descubra cómo la Horizon Platform de AlgoSec puede transformar la gestión de sus políticas de seguridad: ¡del caos al control!

[Marcador de posición: Marketo creará el mensaje de error]
[Marcador de posición: Marketo creará el mensaje de error]
[Marcador de posición: Marketo creará el mensaje de error]
[Marcador de posición: Marketo creará el mensaje de error]
[Marcador de posición: Marketo creará el mensaje de error]
[Marcador de posición: Marketo creará el mensaje de error]
Al enviar este formulario, acepto la de AlgoSecpolítica de privacidad
[Marcador de posición: Marketo creará el mensaje de error]
¡Gracias!
AlgoSec
LinkedInYouTube
Temas de tendencia
AlgoSec y CiscoMicrosegmentaciónSeguridad de red en la nubeCumplimiento de seguridad en la nubeCumplimiento de red HIPAA
Herramientas esenciales
Integraciones
Información útil
ContáctenosAcuerdo de licencia de usuario finalSLA de SaaSEstrategia medioambientalEstrategia ESGCentro de seguridad

© 2004 – 2026 Todos los derechos reservados por AlgoSec

Política de privacidadCondiciones de usoConfiguración de cookies