<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title><![CDATA[[SecurityRatty] tag: dwr-invoker]]></title>
    <link>http://securityratty.com/tag/dwr-invoker</link>
    <description></description>
    <pubDate>Tue, 24 Jun 2008 15:09:34 +0000</pubDate>
    <generator>iRatty Engine</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <item>
      <title><![CDATA[DWR 2.0.5 Fixes XSS Vulnerability]]></title>
      <link>http://securityratty.com/article/17edeff537933523a97f80fd17675a5d</link>
      <guid>http://securityratty.com/article/17edeff537933523a97f80fd17675a5d</guid>
      <description><![CDATA[DWR 2.0.5 addresses an XSS vulnerability that is likely to be exploitable in most 2.0.4 installations. If your web application uses DWRs Ajax implementation, download and install this update now
As an...]]></description>
      <content:encoded><![CDATA[<p><a href="http://directwebremoting.org/dwr/download">DWR 2.0.5</a> addresses an XSS vulnerability that is likely to be exploitable in most 2.0.4 installations.  If your web application uses DWR&#8217;s Ajax implementation, download and install this update now!</p>
<p>As an aside, I&#8217;ve been a fan of DWR for a while now, not only because of its ease of integration but also because it was the first Ajax framework to offer built-in CSRF protection.  You could tell that <a href="http://getahead.org/blog/joe/">Joe Walker</a> was taking security seriously.  For this particular vulnerability, I e-mailed him on a Saturday night, and within 12 hours, he had confirmed the problem, patched the code, and built a 2.0.5 release candidate.  Granted, it was a tiny code change, but I&#8217;ve still never seen a response that fast.  Less than a week later, the official 2.0.5 release (which incorporated a couple other fixes) was ready for download.</p>
<p>That&#8217;s it for now, but I&#8217;ll be referencing this example again when I get around to writing Part 2 of my <a href="http://www.veracode.com/blog/?p=111">Minimizing the Attack Surface</a> post.</p>
]]></content:encoded>
      <pubDate>Sun, 29 Jun 2008 23:04:21 +0000</pubDate>
      <category domain="http://securityratty.com/tag/vulnerability">vulnerability</category>
      <category domain="http://securityratty.com/tag/xss vulnerability">xss vulnerability</category>
      <category domain="http://securityratty.com/tag/code">code</category>
      <category domain="http://securityratty.com/tag/dwr">dwr</category>
      <category domain="http://securityratty.com/tag/tiny code change">tiny code change</category>
      <category domain="http://securityratty.com/tag/attack surface post">attack surface post</category>
      <category domain="http://securityratty.com/tag/dwrs ajax implementation">dwrs ajax implementation</category>
      <category domain="http://securityratty.com/tag/ajax framework">ajax framework</category>
      <category domain="http://securityratty.com/tag/saturday night">saturday night</category>
      <source url="http://www.veracode.com/blog/?p=115">DWR 2.0.5 Fixes XSS Vulnerability</source>
    </item>
    <item>
      <title><![CDATA[Minimizing the Attack Surface, Part 1]]></title>
      <link>http://securityratty.com/article/4cc07bb9b410d28285eec3f2156fa1e6</link>
      <guid>http://securityratty.com/article/4cc07bb9b410d28285eec3f2156fa1e6</guid>
      <description><![CDATA[What was the first thing you learned about network security? Theres a good chance it had something to do with port scanning. After scanning a few boxes, you realized that modern operating systems have...]]></description>
      <content:encoded><![CDATA[<p>What was the first thing you learned about network security?  There&#8217;s a good chance it had something to do with port scanning.  After scanning a few boxes, you realized that modern operating systems have a lot of open ports by default, meaning a lot of services.  Some had an obvious purpose, like telnet on tcp/23 or ftp fon tcp/21.  Others left you wondering, what the heck is listening on tcp/515 or tcp/7100?  And remember, you couldn&#8217;t ask Google because it didn&#8217;t exist (well, maybe it did depending on when you got into security).</p>
<p>Your first real lesson about locking down a host was how to reduce its attack surface.  You learned how to disable services using /etc/inetd.conf.  Then you learned about rc.d and how to prevent unnecessary services from being launched at startup.  Next, maybe you configured the Xserver to disallow remote connections or moved on to removing setuid permissions from files.  As you worked, you&#8217;d periodically re-scan the box to gauge progress, asking yourself &#8220;have I removed everything I don&#8217;t need?&#8221;  The underlying motivation, of course, is that an attacker can&#8217;t hack something that isn&#8217;t there.</p>
<p>You learned how to extend those concepts to the network &#8212; configuring firewall rules, router ACLs, VLANs, etc.  Segmenting the network.  Creating a DMZ.  No need to dwell on this, you get the idea.</p>
<p>Eventually, people realized that applications had an attack surface too.  Web servers and application servers got a lot of attention, followed closely by custom web applications.  &#8220;What do you mean you can execute SQL queries against my database?  That&#8217;s impossible, I have a firewall!&#8221;</p>
<p>Some companies, the ones who could afford it anyway, started to build security into their development cycle.  Doing threat modeling during the design phase made sense, because hey, it&#8217;s much cheaper to fix security holes in a whiteboard drawing than it is to rewrite your authorization module from scratch after it&#8217;s in production.</p>
<p>Let&#8217;s talk strictly about custom web applications now.  What I&#8217;ve observed is that most development groups, even the ones who actively engage in threat modeling, do not understand their web application&#8217;s attack surface.  The lead architect can whiteboard a high-level diagram of all the major components and how they interact.  Individual developers can go a bit deeper, telling you which files they touch, what database permissions they need, or how various pieces of data are encrypted in storage.  At the end of this exercise you have a complete picture of the processes, data flows, protocols, privilege boundaries, external entities, and so on, and you&#8217;re well on your way to understanding all of the potential attack vectors.</p>
<p>Or are you?</p>
<p>What often gets overlooked or glossed over is the impact of external libraries or packages.  Nobody writes everything from scratch. A typical list of third-party libraries for a Java-based Web 2.0 application might include DWR, GWT, Axis, and Dojo, plus about 30 other libraries to do everything from logging to parsing to image manipulation.  Nine out of ten times, the libraries will be installed in full, using the default configuration from page one of the README file.</p>
<p>Why is this relevant? Because just as those old Unix boxes exposed unnecessary services, libraries expose unnecessary code.  Let&#8217;s say you installed Dojo to simplify the process of creating an HTML table with rows and columns that can be sorted on demand.  Did you remember to remove all the .js files you didn&#8217;t need?  Or maybe you installed Axis or DWR or anything else that has its own Servlet(s) for processing requests.  Have you compared what that Servlet <i>can do</i> against what you <i>need it to do</i>?  </p>
<p>A fictitious example may help illustrate further.  Imagine you just downloaded a new library called WhizBang.  You follow the installation instructions to define and map two servlets in your web.xml file, WhizServlet and BangServlet, and you configure it to integrate with your web app.  After a bit of trial and error, it&#8217;s functional. Yay!  This is where most developers stop.  </p>
<p>Nobody asks, &#8220;how much of this do I actually need?&#8221;  Case in point, what if your application only uses WhizServlet?  BangServlet is still exposed, and you don&#8217;t even use it!  Similarly, what if WhizServlet takes an &#8220;action&#8221; parameter which can be either &#8220;view&#8221;, &#8220;edit&#8221;, or &#8220;delete&#8221;, and your application only uses &#8220;view&#8221;?  You&#8217;re still exposing the other actions to anybody who knows the URL syntax (pretty trivial if it&#8217;s open source).  You wouldn&#8217;t expose large chunks of your own code that you weren&#8217;t using, so why should it be any different with libraries?</p>
<p>This post is getting kind of long so I&#8217;m going to split it up.  In the next post, I&#8217;ll continue the discussion of attack surface minimization, as well as some of the tradeoffs that go along with this approach.</p>
]]></content:encoded>
      <pubDate>Tue, 24 Jun 2008 15:09:34 +0000</pubDate>
      <category domain="http://securityratty.com/tag/attack surface">attack surface</category>
      <category domain="http://securityratty.com/tag/custom web applications">custom web applications</category>
      <category domain="http://securityratty.com/tag/web">web</category>
      <category domain="http://securityratty.com/tag/services">services</category>
      <category domain="http://securityratty.com/tag/prevent unnecessary services">prevent unnecessary services</category>
      <category domain="http://securityratty.com/tag/unnecessary services">unnecessary services</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/third-party libraries">third-party libraries</category>
      <category domain="http://securityratty.com/tag/fix security holes">fix security holes</category>
      <source url="http://www.veracode.com/blog/?p=111">Minimizing the Attack Surface, Part 1</source>
    </item>
  </channel>
</rss>
