<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Thanks for the very thoughtful reply,
      Ron. I was actually referring to work. I didn't get a chance to
      test home until last night and it turns out that one was ok. It's
      a much newer router. We don't actually have guests very often at
      work, so that one doesn't get used much. One of the things we do
      occasionally use it for is to test being outside the firewall,
      e.g., to troubleshoot VPN connections. Still, we don't want our
      occasional guests or ourselves when we do connect to that router
      to be wide open on the Internet, so I'm very glad to have caught
      that problem. I did go through all the grc.com tests and passed. <br>
      <br>
      After starting this email, I discovered the firmware update broke
      some configuration. Finally got it all straightened out again. It
      did pass a complete all 65k nmap tcp and upd port scan this time.
      I did understand about external UPnP being a bug--I was just
      bugged D-Link didn't have a firmware fix for it. It is an old
      device, though. I watched the whole Security Now video you posted.
      Lots of other interesting tid-bits in there too, like the <a
        href="http://jps.anl.gov/v6iss1.shtml">Journal of Physical
        Security</a> and the explanation of how networking works at a
      physical voltage-high/voltage-low level.<br>
      <br>
      Scott<br>
      <pre class="moz-signature" cols="72">
</pre>
      On 2/7/2013 8:01 PM, Ron Frazier (ALE) wrote:<br>
    </div>
    <blockquote
      cite="mid:76468040-eb05-4172-8c9f-72e76822a99c@email.android.com"
      type="cite">
      <pre wrap="">Hi Scott,

You're welcome.  That makes it worth the time I spent to know that it helped someone.  I thought, statistically, with 1 of 50 people having the problem, that someone reading the message might have the problem.  I'm glad you discovered the issue on your dlink and were able to troubleshoot it.  You may wish to do a thorough port scan on the external ports on your router to make sure that it's not exposing any open ports.  Hopefully, you caught it soon enough that one of the cracker scans never compromised your unit.  It is possible that some configuration data could have survived the new firmware installation.  Note that the GRC shields up all ports port scanner, the part not related to UPNP, only scans the 1st 1056 TCP ports.  The GRC common ports scanner only scans about 20 ports but does also scan two which are above 1056.  Depending on how paranoid you are, you could do a more thorough port scan on your router with some other tool.  As far as I know, the potential TCP port!
 s are 1 - 65535 and the UDP ports are the same.  You might be able to use something like nmap or zenmap (I think) to do the scan.  The two problems are that you'd have to do it external to your house and it may take up to about 1 sec / port to scan based on some experiments I've done on my Android tablet.  So, scanning all the ports might take a while.  Note also, that some upper ports will be open if you have active network connections as ephemeral ports are opened to receive replies from packets you send out, if I recall correctly.

I wanted to clarify something based on what you said.  External UPNP is a bug in the firmware and is something that was never supposed to exist in the first place.  If the systems were working properly, and were designed and tested properly, there would be no such thing as external UPNP.  So, you will never see a control to disable external UPNP since it's not even supposed to exist.

You said your guest router was hanging outside your firewall.  For what it's worth, I'll share a possible alternative to that which will allow you to keep your guest router inside the firewall.  This is a variation of something I use to segregate my wifi access at home from the access for my wife who uses a VPN for her company.

You can gang routers together.  I have 4 routers in my house.  One for me, which throttles my download bandwidth, which I use when my wife is working.  Another one for me, which is unthrottled, for use when she's not there.  One router for her.  And one to tie them all together and send packets to the internet.

In your case, your guest router could replace the one that I use for my wife.  And, the guest router would be behind your firewall.

Here's how you set it up.

Imagine the capital letter 'Y'.

On the upper left leg of the 'Y' is your router.  On the upper right leg of the 'Y' is the guest router.  On the bottom leg of the 'Y' is the master router, which could be your firewall, which ties the other two together on one side and connects to your cable / dsl modem on the other side.

Connect a lan cable from your router's WAN port to a LAN port on the switch on the master router.  Set up your router to get its WAN address via DHCP from the master router.

Connect a lan cable from the guest router's WAN port to a LAN port on the switch of the master router.  Set up the guest router to get its WAN address via DHCP from the master router.

Connect any devices that need to be shared, like a printer, to a LAN port on the switch of the master router.

Connect the WAN port on the master router to the cable / dsl modem.

This way, your router and your guest router are both behind your firewall.  The guest router is a separate network and will be completely isolated from your network.

If the master is 192.168.1.1, and yours is 192.168.2.1, and the guest is 192.168.3.1, then:

Users / programs on your router can communicate with other users / programs on that router.
Users / programs on the guest router can communicate with other users / programs on that router.
Users / programs on either your router or the guest router can communicate with users / programs / devices on the master router, or with the internet.

In this case, you have three separate networks, which are the lan switches and the wifi interfaces of each respective router.  It will be impossible for your router to communicate with the guest router, but that's the kind of isolation you want for the guest.

Another option is that many modern routers have a guest login feature available.  This allows you to set up a separate SSID and separate password for the guest.  Most routers which have guest logins have a feature which Netgear calls "wireless isolation".  If you turn that on, guests cannot access other wireless clients on the same router.  They also have a feature which allows the guest to only access the internet.  If you turn that on, the guest cannot access anything attached to the lan switch of the router.  With both these on, the guest can only access the internet or anything on the downstream router, like the printer, etc.  However, if you really wanted to nail it down, you could program your master router / firewall to only allow data coming from the guest router to access the internet.

Hopefully that makes at least some sense.  Glad you solved your problem.

Sincerely,

Ron



Scott Plante <a class="moz-txt-link-rfc2396E" href="mailto:splante@insightsys.com">&lt;splante@insightsys.com&gt;</a> wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">Thanks, Ron! Our main network was fine, but the little D-Link wireless 
router we have hanging outside the firewall for guest Internet access 
did have the flaw. I had to both update the firmware, and then I had to

completely disable UPnP.  I still couldn't just disable the external 
UPnP. Of course, in our case we don't really want guests modifying the 
config on the router anyway, but it's disgusting that there's still no 
fix to just block external UPnP to this day.

Scott

On 2/7/2013 3:06 PM, Ron Frazier (ALE) wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Hi all,

I wanted to let you know about a nasty bug in the UPNP implementation
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">of millions of routers.  This could allow an external hacker free and
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">open access to your internal network.  I think this mainly applies to
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">home and small office routers, but this could apply to commercial
</pre>
        </blockquote>
        <pre wrap="">ones 
</pre>
        <blockquote type="cite">
          <pre wrap="">as well.

UPNP stands for Universal Plug and Play.  It is a feature of almost 
all routers that is usually on by default.  It allows things INTERNAL
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">to your network, like XBox game systems, Skype, DVR's and other
</pre>
        </blockquote>
        <pre wrap="">things 
</pre>
        <blockquote type="cite">
          <pre wrap="">to OPEN HOLES for incoming communications through your firewall, 
usually without your knowledge or permission, and sometimes without 
your ability to monitor or control it.  This is designed to allow 
gamers, for example, to instantly participate in network gaming 
without configuring the router.  It generally doesn't require 
authentication, and assumes anyone making a UPNP request from within 
your network is trustworthy.  This, in itself, is somewhat of a 
security risk, and I've had UPNP turned off for years on my routers. 
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">It's one of the first things I disable when I set up a router, since
</pre>
        </blockquote>
        <pre wrap="">I 
</pre>
        <blockquote type="cite">
          <pre wrap="">have no need for it.

They discussed the new issue, which is much much worse, on the last 
two Security Now podcasts.

<a class="moz-txt-link-freetext" href="http://twit.tv/sn">http://twit.tv/sn</a>
<a class="moz-txt-link-freetext" href="http://twit.tv/show/security-now/389">http://twit.tv/show/security-now/389</a>
<a class="moz-txt-link-freetext" href="https://www.youtube.com/watch?v=wEa43qM4JjQ#t=09m44s">https://www.youtube.com/watch?v=wEa43qM4JjQ#t=09m44s</a>  (Youtube video 
of 389.  Relevant part starts at 09:44.)
<a class="moz-txt-link-freetext" href="http://media.grc.com/sn/sn-389.mp3">http://media.grc.com/sn/sn-389.mp3</a> - MP3 audio of 389.
<a class="moz-txt-link-freetext" href="http://twit.tv/show/security-now/390">http://twit.tv/show/security-now/390</a>
<a class="moz-txt-link-freetext" href="http://www.grc.com/securitynow.htm">http://www.grc.com/securitynow.htm</a>  (Episode 390 hasn't been posted 
here yet, but should be shortly.)

UPNP was always intended to be used only on your INTERNAL LAN.  It
</pre>
        </blockquote>
        <pre wrap="">was 
</pre>
        <blockquote type="cite">
          <pre wrap="">never intended to be exposed on the Internet on the WAN.  A group of 
security researchers at Rapid7 spent months last year using bots to 
probe EVERY routable IPv4 address on the Internet. They sent UDP UPNP
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">discovery packets to every address several times.  The results of the
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">probes were both surprising and very disconcerting.

They found that 2.2% of ALL IPv4 routers exposed to the internet 
responded to UPNP discovery requests.  This corresponds to 81 MILLION
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">routers.  This means that they are exposing the UPNP service to the 
EXTERNAL internet at large.  This is a MAJOR security flaw.  Of
</pre>
        </blockquote>
        <pre wrap="">those, 
</pre>
        <blockquote type="cite">
          <pre wrap="">20%, or 16.2 MILLION are exposing their SOAP API to the EXTERNAL 
internet at large.

This means that a REMOTE cracker, just by sending a few UDP packets
</pre>
        </blockquote>
        <pre wrap="">to 
</pre>
        <blockquote type="cite">
          <pre wrap="">your router's EXTERNAL address, can punch holes in your firewall and 
break into your INTERNAL LAN just as though he was your XBOX sitting 
in your house.  It requires no authentication or decryption on the 
cracker's part, and is trivially easy.

This is very bad news for the 81 million people, most of which, don't
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">even know they are vulnerable.

For years, Steve Gibson has been operating the Shields Up service on 
his website.  It provides a way to scan your network from the outside
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">to see if net bios is being exposed, or if common TCP service ports 
are being exposed.  In light of these events, he has added testing
</pre>
        </blockquote>
        <pre wrap="">for 
</pre>
        <blockquote type="cite">
          <pre wrap="">the UPNP vulnerability.

I would recommend that each person reading this make use of Steve's 
port scanner to test your router's external IPv4 address to determine
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">if you are vulnerable to the UPNP attack vector. Here's how.

Go to the Shields Up main page at:
</pre>
        </blockquote>
        <pre wrap=""><a class="moz-txt-link-freetext" href="https://www.grc.com/x/ne.dll?bh0bkyd2">https://www.grc.com/x/ne.dll?bh0bkyd2</a>
</pre>
        <blockquote type="cite">
          <pre wrap="">
You will probably have to trust grc.com in noscript, etc. for 
everything to work.  Read what it says there and click proceed. Keep 
in mind, some of the verbiage is a decade old, but the site is still 
very useful.  The stuff related to UPNP is new.

Once you're on the second page, you will get to a screen with some 
menu buttons on it.

Click the orange GRC's Instant UPNP Exposure Test button.

His server will query the UPNP ports for your external IPv4 address. 
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">It will then report back as to whether your router didn't respond at 
all (PREFERABLE), actively rejected the remote request (OK), or did 
respond to the UPNP discovery request (BAD). The result page also 
contains verbiage explaining the results.

Note that a simple port scan, like from nmap, will not do the trick 
here.  First, you have to send the scan from outside your router, on 
the internet side.  Second, the UPNP discovery request is a 
specifically formatted UDP packet, not just a simple ping. Since it's
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">UDP, the source address can be spoofed by a cracker.

If your router is in the category that did respond, you are 
potentially vulnerable to attack.  At the very least, a cracker could
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">find out that your UPNP service is listening on the WAN, and it will 
probably tell him which UPNP stack you have in its reply. This may 
give him the info he needs to attack you.  If your router is among
</pre>
        </blockquote>
        <pre wrap="">the 
</pre>
        <blockquote type="cite">
          <pre wrap="">1 in 5 (of the 81 million) that exposes its SOAP API to the WAN, you 
are vulnerable to immediate attack.  If your router responds to an 
external UPNP request, which it NEVER should, you should find a way
</pre>
        </blockquote>
        <pre wrap="">to 
</pre>
        <blockquote type="cite">
          <pre wrap="">turn off that functionality and retest it.  If you cannot turn it
</pre>
        </blockquote>
        <pre wrap="">off, 
</pre>
        <blockquote type="cite">
          <pre wrap="">you should discontinue using this router.

While you're there on the Shields Up page, you can select other 
buttons as follows:

File Sharing - tests to see if your router is exposing any net bios 
file sharing ports to the WAN.
Common Ports - tests to see if certain commonly used TCP service
</pre>
        </blockquote>
        <pre wrap="">ports 
</pre>
        <blockquote type="cite">
          <pre wrap="">are listening on the WAN.
All Service Ports - tests to see if the first 1056 TCP service ports 
are listening on the WAN
User Specified Custom Port Probe - used to test a specific TCP port 
number after entering it into the blank.
Lookup Specific Port Information - used to lookup data about what 
certain port numbers are commonly used for.

Here are other resources that Steve provides relative to the UPNP 
problem so you can research it:


</pre>
        </blockquote>
        <pre wrap=""><a class="moz-txt-link-freetext" href="https://community.rapid7.com/servlet/JiveServlet/download/2150-1-16596/SecurityFlawsUPnP.pdf">https://community.rapid7.com/servlet/JiveServlet/download/2150-1-16596/SecurityFlawsUPnP.pdf</a>

</pre>
        <blockquote type="cite">
          <pre wrap="">
<a class="moz-txt-link-freetext" href="http://toor.do/DEFCON-19-Garcia-UPnP-Mapping-WP.pdf">http://toor.do/DEFCON-19-Garcia-UPnP-Mapping-WP.pdf</a>
<a class="moz-txt-link-freetext" href="http://www.upnp-hacks.org/upnp.html">http://www.upnp-hacks.org/upnp.html</a>
<a class="moz-txt-link-freetext" href="http://toor.do/upnp.html">http://toor.do/upnp.html</a>

</pre>
        </blockquote>
        <pre wrap=""><a class="moz-txt-link-freetext" href="http://www.h-online.com/security/news/item/Millions-of-devices-vulnerable-via-UPnP-Update-1794032.html">http://www.h-online.com/security/news/item/Millions-of-devices-vulnerable-via-UPnP-Update-1794032.html</a>

</pre>
        <blockquote type="cite">
          <pre wrap="">

I recommend that you test your internet facing IPv4 addresses for
</pre>
        </blockquote>
        <pre wrap="">UPNP 
</pre>
        <blockquote type="cite">
          <pre wrap="">vulnerability immediately.  If your router responds to the external 
UPNP inquiry, I suggest turning off UPNP from its control panel and 
retesting.  If it still responds, consider upgrading the firmware and
</pre>
        </blockquote>
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">retesting, or removing and replacing the router.

I hope you find this information useful.

Sincerely,

Ron


</pre>
        </blockquote>
        <pre wrap="">
_______________________________________________
Ale mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ale@ale.org">Ale@ale.org</a>
<a class="moz-txt-link-freetext" href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a>
See JOBS, ANNOUNCE and SCHOOLS lists at
<a class="moz-txt-link-freetext" href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a>
</pre>
      </blockquote>
      <pre wrap="">

--

Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.
Please excuse my potential brevity.

(To whom it may concern.  My email address has changed.  Replying to former
messages prior to 03/31/12 with my personal address will go to the wrong
address.  Please send all personal correspondence to the new address.)

(PS - If you email me and don't get a quick response, you might want to
call on the phone.  I get about 300 emails per day from alternate energy
mailing lists and such.  I don't always see new email messages very quickly.)

Ron Frazier
770-205-9422 (O)   Leave a message.
linuxdude AT techstarship.com


_______________________________________________
Ale mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ale@ale.org">Ale@ale.org</a>
<a class="moz-txt-link-freetext" href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a>
See JOBS, ANNOUNCE and SCHOOLS lists at
<a class="moz-txt-link-freetext" href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>