<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Mark Goodwin&#039;s Blog - applet tag</title>
  <link>http://directwebremoting.org/blog/mark/tags/applet/</link>
  <description>Security, information, miscellanea</description>
  <language>en</language>
  <copyright>Mark Goodwin</copyright>
  <lastBuildDate>Thu, 16 Aug 2007 22:02:00 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  
  <item>
    <title>More intranet hacks with applets</title>
    <link>http://directwebremoting.org/blog/mark/2007/08/16/more_intranet_hacks_with_applets.html</link>
    
      
        <description>
          &lt;p&gt;We&#039;ve already looked at one of the two big problems posed by anti DNS pinning on
Java applets; because there&#039;s rebinding on the applet and not the browser
&lt;a href=&#034;http://getahead.org/blog/mark/2007/08/10/intranet_port_forwarding.html&#034; id=&#034;bigv&#034; title=&#034;you can open a channel from an Internet host to an internal system&#034;&gt;you
can open a channel from an Internet host to an internal system&lt;/a&gt; (this is also
true of Flash, of course).&lt;/p&gt;
&lt;p&gt;
The other problem is that, over the past decade, people have been developing a
massive body of Java code to do just about anything. For example, there&#039;s:&lt;br/&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;a href=&#034;http://jcifs.samba.org/&#034; id=&#034;posf&#034; title=&#034;JCIFS&#034;&gt;JCIFS&lt;/a&gt; for
    CIFS/SMB if you want to talk to windows file servers - can attackers use
    null sessions to gather information on your systems?&lt;br/&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&#034;http://java.sun.com/javase/technologies/database/&#034; id=&#034;jwba&#034; title=&#034;JDBC&#034;&gt;JDBC&lt;/a&gt;
    if you want to talk to a database (just pick your driver) - all of your
    developers change the passwords on their local MySQL installation, right?&lt;br/&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&#034;http://www.dnsjava.org/index.html&#034; id=&#034;g3ri&#034; title=&#034;DNSJava&#034;&gt;DNSJava&lt;/a&gt;
    if you want to do zone transfers, etc. from a DNS server - no-one bothers
    preventing zone transfers on internal DNS; should we?&lt;br/&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;a href=&#034;http://java.sun.com/products/javamail/&#034; id=&#034;j:hm&#034; title=&#034;JavaMail&#034;&gt;JavaMail&lt;/a&gt;
    if you want to talk to a mail server - do you prevent relay from internal
    hosts?&lt;br/&gt;
  &lt;/li&gt;
  &lt;li&gt;
    libraries to support
    &lt;a href=&#034;http://javacvs.netbeans.org/library/&#034; id=&#034;le53&#034; title=&#034;CVS&#034;&gt;CVS&lt;/a&gt;,
    &lt;a href=&#034;http://svnkit.com/&#034; id=&#034;v9ah&#034; title=&#034;Subversion&#034;&gt;Subversion&lt;/a&gt;,
    and
  &lt;/li&gt;
  &lt;li&gt;
    thousands of other things there&#039;s not time to mention.
  &lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
These things are all really useful in the right context, but combine them with
the
&lt;a href=&#034;http://seclists.org/fulldisclosure/2007/Jul/0159.html&#034; id=&#034;dnpy&#034; title=&#034;proxy bypass&#034;&gt;proxy
bypass&lt;/a&gt; or
&lt;a href=&#034;http://shampoo.antville.org/stories/1566124/&#034; id=&#034;aeg6&#034; title=&#034;LiveConnect&#034;&gt;LiveConnect&lt;/a&gt;
anti DNS pinning attacks and you can see how easy things have just got for
attackers.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://directwebremoting.org/blog/mark/2007/08/16/more_intranet_hacks_with_applets.html#comments</comments>
    <guid isPermaLink="true">http://directwebremoting.org/blog/mark/2007/08/16/more_intranet_hacks_with_applets.html</guid>
    <pubDate>Thu, 16 Aug 2007 22:02:00 GMT</pubDate>
  </item>
  
  <item>
    <title>Intranet port forwarding</title>
    <link>http://directwebremoting.org/blog/mark/2007/08/10/intranet_port_forwarding.html</link>
    
      
        <description>
          &lt;p&gt;It has been known for a month or so now that &lt;a href=&#034;http://seclists.org/fulldisclosure/2007/Jul/0159.html&#034;&gt;proxy bypass is an effective way of breaking DNS pinning on Java applets&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It&#039;s been known since forever that Java applets can interact with scripts on the parent page (same origin restrictions apply, IIRC).&lt;/p&gt;

&lt;p&gt;It&#039;s been known for a few years now that it&#039;s really easy to do nice async data transfer to a remote server with fancy AJAXy stuff; there&#039;s even &lt;a href=&#034;http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications&#034;&gt;Comet&lt;/a&gt; to keep latencies down on the upstream.&lt;/p&gt;

&lt;p&gt;So here&#039;s what you can do:
&lt;ul&gt;
&lt;li&gt;Write an ajax service on &#039;attacker&#039; that allows you to forward the data from a connection on a local port to JS on a page on the victim&#039;s browser.&lt;/li&gt;
&lt;li&gt;Load an applet in victim&#039;s browser from &#039;attacker&#039;, change &#039;attacker&#039; DNS entry as soon as connection to download the applet jar is established.  Don&#039;t break pinning on the browser.&lt;/li&gt;
&lt;li&gt;Have the applet attempt a connection to &#039;attacker&#039;; this will resolve to &#039;target&#039;.&lt;/li&gt;
&lt;li&gt;On connection, the applet phones home via the browser; pinning&#039;s not broken so the ajax call goes to the original server which results in the port being opened.&lt;/li&gt;
&lt;li&gt;Voila! Browser based intranet port forwarding.  This could work for TCP or UDP; the possibilities are endless...&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;There&#039;s nothing new here but it&#039;s interesting to see the combination.  Let me know what you think.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://directwebremoting.org/blog/mark/2007/08/10/intranet_port_forwarding.html#comments</comments>
    <guid isPermaLink="true">http://directwebremoting.org/blog/mark/2007/08/10/intranet_port_forwarding.html</guid>
    <pubDate>Thu, 09 Aug 2007 23:29:00 GMT</pubDate>
  </item>
  
  </channel>
</rss>
