Help my Linksys WRT54G router was broken into using the "curl" command

It's way too easy to break into the Linksys WRT54G router!

Instantly bypassing the administrator password, my fifteen-year old neighbor broke into my Linksys WRT54G router (firmware revision v1.0.0.6) in ten seconds simply by sending this one "curl" command to it via the Internet from his home next door!

c:\\> curl -d "SecurityMode=0&layout=en" http://192.168.0.1/Security.tri This kid was kind enough to knock on my door today to tell me to fix it.

I invited him in, and from inside my own house, he showed me the Linksys WRT54G command above which immediately disabled all my wireless security WITHOUT him having to enter any password!

He showed me how to disable remote administration but he said the vulnerability still exists until I get a new router. I can't believe everyone with a Linksys WRT54G router is throwing it in the garbage.

Where/how can I find a firmware update that protects me from this vulnerability?

Reply to
Debbie Hurley
Loading thread data ...

Unless I am getting old then if he posted this command via the Internet it would have got him nowhere. The curl -d command would post the data to 192.168.0.1 which is not a public IP address available on the Internet and would have have given him a timeout, unless his router address is 192.168.0.1.

For him to use this command on your computer implies you are using a Linux distribution and have installed curl and should know what it is capable of doing.

formatting link

Reply to
kev

With the IP Address changed to 192.168.1.1, my WRT54G returned "curl: (52) Empty reply from server" and encryption was still on. Using 192.168.0.1, it timed out. I don't know what is different with your system, but it seems not to be a general problem.

Larry

Reply to
Larry Finger

The Firmware V 1.0.0.6 suggests they are playing with the Version 5 router which used Vxworks, so I don't know what the commands were for that and I can't really be bothered to search for them.

Reply to
kev

While I've not verified it, you should have googled for basic security methods and you would have found that you need to change the default subnet to something else, keeping the 192.168.0, which is the default, is always a bad idea.

192.168.0 and 192.168.1 are common default subnets for home routers, don't use them.
Reply to
Leythos

I called him about this just now. He said there were two easy ways to wipe out the security of any Linksys WRT54G router without having to enter any log in information by taking advantage of Linksys widespread "access control error" vulnerabilities.

The first was to access my router by it's IP address and then to do a remote configuration into the router that way. I had the remote configuration enabled so he showed me how to disable that in the router so the average person wouldn't disable my router security from half way around the world. He says it definately can be done remotely and said he'd mail me the instructions. He ended with saying that anyone who says it can't be done doesn't know what they're talking about. I'll wait for his instructions before I go any further on that.

Reply to
Debbie Hurley

Among the reasons having wireless security disabled and letting neighbors join your local network for free is a bad idea.

formatting link

or... use third party firmware such as

formatting link

Reply to
Todd H.

No. He showed me how to do it on my OWN Windows computer. All he did was download curl from

formatting link
and put the windows binary into my c:\\os\\winxp\\system32\\curl.exe location.

He told me curl works on just about every operating system in the world, and from the looks of the web page above, it sure looks like it.

formatting link
When I type Start cmd and then curl, I get a response of: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.

C:\\My Stuff\\Documents and Settings\\debbie>curl curl: try 'curl --help' or 'curl --manual' for more information

Reply to
Debbie Hurley

I meant to paste this vulnerability of v5 wrt54g's here:

Linksys WRT54GS POST Request Configuration Change Authentication Bypass Vulnerability

formatting link
It's a known issue. The fix is to upgrade firmware per the link below.

And I'd have a chat with the parents of the kid, thanking him for bringing the issue to your attention, but alwso warning him that his "gray hat" actitivities can get him sent to jail, despite being well meaning.

You don't "test" stuff you don't own or are engaged to test with written legal permission of the owner.

Some news stories to drive the point home:

formatting link

Best Regards,

Reply to
Todd H.

Empty reply from server"

what is different with

I just grabbed my horrified notes from yesterday.

Try this which is the simplified test my neighbor wrote down for me when he showed it to me yesterday - and let us know if it disables your Linksys WRT54G router security without asking for a password.

  1. Assume the vulnerable WRT54G Linksys router (mine is v5 v1.0.0.6).
  2. Connect a yellow wire from the router to the computer
  3. Install curl on Windows XP from
    formatting link
    Add curl to your path (or put it in system32)
  4. Start Run cmd telnet 192.168.0.1 80
  5. Enter the web command to disable wireless security POST /Security.tri SecurityMode=0&layout=en
  6. Look at your router to see you now have NO SECURITY!

He said the only reason we used the wire was to make it easier to show me. He even did it wirelessly while out on my driveway outside my house. He said ANYONE could do it from the Internet if they knew my IP address. Luckily, he said nobody knows my IP address. Whew!

I didn't realize using a Linksys WRT54G router was so dangerous!

Reply to
Debbie Hurley

On the bottom of the Linksys WRT54G router it says it's version 5.

My neighbor has been sending me emails as I told him about this thread. He says it happens with a lot of versions, his being a Linksys WRT54g home router, firmware revision 1.00.9 and he says all his friends' routers are similarly vulnerable which he called the "GENERIC-MAP-NOMATCH" vulnerability.

Reply to
Debbie Hurley

My neighbor says what you said above is totally wrong in that it doesn't matter what IP address I use because he uses something called winpcap to snair the router IP address off the air!

He says he gets an "ARP" from a program called ethereal which tells him all the "who" and "tell" arp commands which tells him every router's IP address in the neighborhood. So he called it 'smoke and mirrors' to change my IP address.

That's why he suggested I find a patch to the Linksys WRT54G GENERIC-MAP-NOMATCH vulnerability.

By the way, he said there are more than one vulnerabilities. I asked him to show me in writing and he just sent me something which I'll post to you once I clean it up a bit.

Reply to
Debbie Hurley

Debbie Hurley hath wroth:

Old bugs never die. They just get reposted:

etc... Note the dates from about a year ago. This was fixed with a firmware update to the v5/v6 hardware mutation router with v1.01.0. The current version is v1.02.0. Please download, install, and retest.

All the routers I have handy are running DD-WRT v23 SP2 and SP3. The curl trick doesn't work on any of them from either Ubuntu 6.10 or Cygwin 1.5.xx on W2K.

You must really be concerned as you also posted the comment to the Linksys Forums at:

Nice kid. Be sure to thank him. If you're in the computah biz, hire him.

If he's doing it from the LAN side, that's cheating a bit. In order to do the same thing from the WAN side, your router would need to have remote admin enabled, which is disabled by default. Note the default settings:

This is v1.00.6.

If remote admin was enabled, someone has been tinkering with the default setup.

Incidentally, all the router manufacturers, except 2Wire ship their routers not very secure by default. If you simply plugged the router in straight out of the box, you have a wide open system, with well know passwords, and an invitation for problems. I've been trying to get various manufacturers to change their evil ways and start shipping routers that require the user to setup:

  1. A suitable router password
  2. A unique SSID
  3. A reasonable WPA-PSK encryption key The wireless would be disabled until this is done. None of them want to do this for fear that it would diminish your "out of box experience".

I've been tempted quite often as there are plenty of other things I detest about the WRT54G/GS v5 and v6 mutations. The general lack of RAM and NVRAM are my biggest gripe, which make loading alternative firmware a PITA. v5 and v6 routers also tend to lockup and hang for no obvious reason. The inability to simultaneously connect more than a few clients:

formatting link
bottom of chart) in v5 and v6 also sucks. Yeah, it's a terrible router. If you're planning on recycling yours, please mail it to the address in my .signature.

The kid didn't tell you this? First he breaks in. He leaves remote admin turned on so he can break in again. Then he shows you how it works, but doesn't tell you how to fix it? Is he selling wireless routers door to door? Smart kid.

Perhaps you should try the Linksys support web pile:

Your WRT54G hardware mutation number is on the serial number tag on the bottom of the router.

Reply to
Jeff Liebermann

But, he showed me it works while WIRED to my vulnerable Linksys WRT54G router! He said the GENERIC-MAP-NOMATCH vulnerability has nothing to do with wireless. It's inherent in the Linksys WRT54G router unfortunately!

Here is his email talking about TWO vulnerabilities in the Linksys WRT54G router!

"You have two problems. The first is the password validation for configuration settings is not needed for your Linksys WRT54G router and the second is that with java turned on any web site anywhere can force a request to the linksys router, and the router will accept the request."

He also sent me a 2600 web address explaining the whole thing but I didn't understand it at all.

Reply to
Debbie Hurley

Here is a forwarded email which explains the severe Linksys WRT54G vulnerability I'm afraid. It looks like this vulnerability which allows any web site to disable your browser security has been around for a long time based on the time stamps of the email!

Debbie

Date: Fri, 04 Aug 2006 14:00:01 +0000 From: "Ginsu Rabbit" Subject: [Full-disclosure] linksys WRT54g authentication bypass I'm having some trouble believing this hasn't been reported before. If you have a linksys router handy, please check to see whether it is vulnerable to this attack. It's possible that all of the linksys router web UIs have the same bug. Hopefully the problem is isolated to one particular model or firmware revision.

I. DESCRIPTION

Tested product: Linksys WRT54g home router, firmware revision 1.00.9.

Problem #1: No password validation for configuration settings.

The WRT54g does not attempt to verify a username and password when configuration settings are being changed. If you wish to read configuration settings, you must provide the administrator ID and password via HTTP basic authentication. No similar check is done for configuration changes.

This request results in a user-id and password prompt: GET /wireless.htm

This request disables wireless security on the router, with no password prompt: POST /Security.tri Content-Length: 24

SecurityMode=0&layout=en

Problem #2: Cross-site request forgery

The web administration console does not verify that the request to change the router configuration is being made with the consent of the administrator. Any web site can force a browser to send a request to the linksys router, and the router will accept the request.

II. Exploitation

The combination of these two bugs means that any internet web site can change the configuration of your router. Recently published techniques for port-scanning and web server finger printing via java and javascript make this even easier. The attack scenario is as follows:

- intranet user visits a malicious web site

- malicious web site returns specially crafted HTML page

- intranet user's browser automatically sends a request to the router that enables the remote administration interface

- the owner of the malicious web site now has complete access to your router

I'm not going to share the "specially crafted HTML page" at this time, but it isn't all that special.

III. DETECTION

If your router is vulnerable, the following curl command will disable wireless security on your router. Tests for other router models and firmware revisions may be different:

curl -d "SecurityMode=0&layout=en" http://192.168.0.1/Security.tri

IV. MITIGATION

1) Make sure you've disabled the remote administration feature of your router. If you have this "feature" enabled, anybody on the internet can take control of the router.

2) Change the IP address of the router to a random value, preferably in the range assigned to private networks. For example, change the IP address to

10.x.y.z, where x, y, and z are numbers between 0 and 255 inclusive. This makes it more difficult for an attacker to forge the request necessary to change the router configuration. This mitigation technique might not help much if you have a java-enabled browser, because of recently published techniques for determining gateway addresses via java applets.

3) Disable HTTP access to the administration interface of the router, allowing only HTTPS access. Under most circumstances, this will cause the browser to show a certificate warning before the configuration is changed.

V. VENDOR NOTIFICATION

Linksys customer support was notified on June 24, 2006. Full disclosure on August 4, 2006

Reply to
Debbie Hurley

Okay.

Reply to
Warren Oates

You are giving advice to hire someone just because they could search the web and find some outdated information? How does this qualify them? You are kidding right? You don't happen to be in the computer business yourself are you?

Reply to
Robert

Hi Jeff! Yes. I am really concerned. And scared that it takes all of ten seconds to break into my router by a fifteen year old cute kid who mows my lawn every month. I believ him when he says I need to upgrade my router. You are the only one here who believed me. Thank you. Thank you. Thank you. For a moment, I thought I was going crazy when the "experts" were telling me what I saw I didn't see. I felt like I was being persecuted for reporting this. I didn't realize that the Linksys WRT54G router I bought was so weak. Why didn't Linksys TELL me about this in the package? I have never updated my "firmware" before. Can you hand hold my hands a bit to tell me how to do it. I don't want to ruin the router.

I'll first read everything I can find on updating the router and then post back if I ruin it doing so. I can read well but I don't know how to debug once I hit a problem. But I keep trying and that's why I'm here taling to you!

Thank you - I love your post the best because I was beginning to wonder why nobody else knew about this which seemed pretty bad that it took all of ten seconds to wipe out all my hardware security.

BTW, my neighbor said to change my IP address and the hostname and media address of my router and pc constantly because that's what he used to figure out which was mine in the neighborhood. Is there a way to change the router & PC hostname and media name automatically every day or do I have to do it manually every day to be safe?

Reply to
Debbie Hurley

One thing I'd like to do is change the login name! I asked on the linksys forums and will check to see if there is a way to change the login name from just a dumb blank stare to something interesting so others can't get in so easily through the front door of the router.

I will also read up on how to upgrade the firmware of my router using your links. Thanks. I love you!

Reply to
Debbie Hurley

The kid knew how to find the information and use it. That's the key to using Information Technology is does one know how to go find the information when needed and apply it.

Most don't know how to do it.

Reply to
Mr. Arnold

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.