<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://revspace.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=NewsItem11x05x30x0</id>
	<title>NewsItem11x05x30x0 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://revspace.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=NewsItem11x05x30x0"/>
	<link rel="alternate" type="text/html" href="https://revspace.nl/wiki/index.php?title=NewsItem11x05x30x0&amp;action=history"/>
	<updated>2026-05-14T01:46:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://revspace.nl/wiki/index.php?title=NewsItem11x05x30x0&amp;diff=192&amp;oldid=prev</id>
		<title>10.42.42.9: Created page with &quot;  &lt;noautolink&gt; Our WiFi access point was located at one end of the space, in the hacklab, and the workshop is all the way on the other side. Sure, we could easily just move the a...&quot;</title>
		<link rel="alternate" type="text/html" href="https://revspace.nl/wiki/index.php?title=NewsItem11x05x30x0&amp;diff=192&amp;oldid=prev"/>
		<updated>2011-10-01T23:24:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  &amp;lt;noautolink&amp;gt; Our WiFi access point was located at one end of the space, in the hacklab, and the workshop is all the way on the other side. Sure, we could easily just move the a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noautolink&amp;gt;&lt;br /&gt;
Our WiFi access point was located at one end of the space, in the hacklab, and&lt;br /&gt;
the workshop is all the way on the other side. Sure, we could easily just move&lt;br /&gt;
the access point over, but if you can borrow an expensive dedicated access&lt;br /&gt;
point, why not try that one first? So, the new shiny metal box was mounted to the wall in a few minutes and the fun began.&lt;br /&gt;
&lt;br /&gt;
It turns out the WNDAP350 from NETGEAR was really easy to configure. It has the&lt;br /&gt;
usual open-wifi-by-default design flaw, but that&amp;#039;s quickly remedied using the&lt;br /&gt;
web interface. Apart from having two radios (2.4 GHz and 5 GHz) that can be&lt;br /&gt;
active simultaneously, the device is well endowed with software features,&lt;br /&gt;
ranging from RADIUS support to SSH. The wifi throughput is good, even at the other end of our space, so in terms of signal and bandwidth it easily outperforms the access point that we already had.&lt;br /&gt;
&lt;br /&gt;
The SSH support works out of the box and is enabled by default. You can log in&lt;br /&gt;
as &amp;quot;admin&amp;quot; to get a configuration CLI or as &amp;quot;root&amp;quot; to get a BusyBox shell. The&lt;br /&gt;
password is whatever you configured, or &amp;quot;password&amp;quot; by default.&lt;br /&gt;
&lt;br /&gt;
The device turns out to be a Linux box running on an Atheros chip. Its web&lt;br /&gt;
interface is powered by lighttpd and PHP. Obviously, I had to read the source&lt;br /&gt;
of those PHP files, and sure enough they were as crappy as I had expected.&lt;br /&gt;
Several parts of the code would not be out of place on a site like http://thedailywtf.com/. But when I&lt;br /&gt;
read downloadFile.php, my jaw just dropped. This is the single most insecure&lt;br /&gt;
Linux based device that I have encountered in the past few years.&lt;br /&gt;
&lt;br /&gt;
The NETGEAR WNDAP350 is targeted at businesses and costs � 250. For that price&lt;br /&gt;
you get something that is utterly unsafe to use in your corporate environment,&lt;br /&gt;
or even your home network. The security hole is so extremely simple&lt;br /&gt;
to exploit that really anyone with even the slightest knowledge of PHP and&lt;br /&gt;
Linux could find it even without any help. It is for that reason that I don&amp;#039;t&lt;br /&gt;
think I&amp;#039;m doing any more damage by publishing this information. &lt;br /&gt;
&lt;br /&gt;
This product was clearly released without ANY security review. That&amp;#039;s a&lt;br /&gt;
terrible shame because I am, in general, a big fan of their products and their&lt;br /&gt;
friendliness toward the open source community.&lt;br /&gt;
&lt;br /&gt;
downloadFile.php lets you do exactly that: download a file. You can only choose&lt;br /&gt;
from a preset list of files, though. But that doesn&amp;#039;t matter, as this list&lt;br /&gt;
includes /var/config, which contains the admin password and the WPA secrets in&lt;br /&gt;
clear text. And once you have the admin password, which is also the root&lt;br /&gt;
password, you can just get everything else from SSH.&lt;br /&gt;
&lt;br /&gt;
downloadFile.php works even if you have no login cookie; it just doesn&amp;#039;t check&lt;br /&gt;
whether you&amp;#039;ve logged in.&lt;br /&gt;
&lt;br /&gt;
And in case one giant hole wasn&amp;#039;t enough, NETGEAR added a second one just like&lt;br /&gt;
it: BackupConfig.php, which is practically the same, but will only let you&lt;br /&gt;
download /var/config. You know, the file that contains the passwords you need&lt;br /&gt;
to gain access to the rest of the system.&lt;br /&gt;
&lt;br /&gt;
So just browsing to either http://192.168.0.237/downloadFile.php or&lt;br /&gt;
http://192.168.0.237/BackupConfig.php is enough to get the following:&lt;br /&gt;
&lt;br /&gt;
(excerpt from /var/config)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
system:basicSettings:sysMacAddress 00-00-00-00-00-00&lt;br /&gt;
system:basicSettings:sysVersion 1.0&lt;br /&gt;
system:basicSettings:sysCountryRegion 528&lt;br /&gt;
system:basicSettings:adminName admin&lt;br /&gt;
system:basicSettings:adminPasswd ourpassword&lt;br /&gt;
system:basicSettings:dhcpClientStatus 0&lt;br /&gt;
system:basicSettings:ipAddr 192.168.0.237&lt;br /&gt;
system:basicSettings:netmaskAddr 255.255.255.0&lt;br /&gt;
(...)&lt;br /&gt;
system:vapSettings:vapSettingTable:wlan0:vap1:ssid revspace-workshop-2.4GHz-WPA&lt;br /&gt;
system:vapSettings:vapSettingTable:wlan0:vap1:hideNetworkName 0&lt;br /&gt;
system:vapSettings:vapSettingTable:wlan0:vap1:vlanID 1&lt;br /&gt;
system:vapSettings:vapSettingTable:wlan0:vap1:clientSeparation 0&lt;br /&gt;
system:vapSettings:vapSettingTable:wlan0:vap1:authenticationType 32&lt;br /&gt;
system:vapSettings:vapSettingTable:wlan0:vap1:encryption 4&lt;br /&gt;
system:vapSettings:vapSettingTable:wlan0:vap1:presharedKey ourpresharedkey&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The WNDAP350 came with firmware version 2.0.1. An upgrade to 2.0.9 is&lt;br /&gt;
available from the NETGEAR website. But alas, both PHP files are still present&lt;br /&gt;
and will still present the passwords to anyone who wants them.&lt;br /&gt;
&lt;br /&gt;
Since the filesystem of the WNDAP350 is read only, you can&amp;#039;t just remove the files and be done with it. One way to prevent web users from accessing your passwords is to log in as root and =killall lighttpd= to disable the web interface. It will be back when the thing reboots, though, so it doesn&amp;#039;t help if the user can access the power plug, or trigger any circuit breaker (e.g. a fuse or a power switch) for it.&lt;br /&gt;
&lt;br /&gt;
Oh, by the way, NETGEAR, if you&amp;#039;re reading this: =accesslog.filename= doesn&amp;#039;t work if you disable mod_accesslog. The warning from lighttpd is a dead giveaway:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1999-12-31 16:39:18: (server.c.918) WARNING: unknown config-key: accesslog.filename (ignored) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hm, and why is /var/messages executable and setuid? It&amp;#039;s a log file, and nonmalicious users typically never need to execute those...&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@netgear /var]# ls -l messages&lt;br /&gt;
-r-srw----    1 root     root        65224 Dec 31 17:05 messages*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/noautolink&amp;gt;&lt;/div&gt;</summary>
		<author><name>10.42.42.9</name></author>
	</entry>
</feed>