<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-408416705712336061</id><updated>2012-02-08T16:05:50.219-08:00</updated><title type='text'>jsunpack blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>36</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-1489885795392747617</id><published>2011-10-03T08:43:00.001-07:00</published><updated>2011-10-03T08:45:41.987-07:00</updated><title type='text'>New jsunpack server!</title><content type='html'>I brought a new server online for jsunpack.jeek.org over the weekend and everything should be operating normally now. I expect this server to last about 6 months based on the volume of past submissions. I hope you enjoy it!&lt;br /&gt;&lt;br /&gt;Blake&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-1489885795392747617?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/1489885795392747617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2011/10/new-jsunpack-server.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/1489885795392747617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/1489885795392747617'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2011/10/new-jsunpack-server.html' title='New jsunpack server!'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-689074191218353196</id><published>2011-06-15T15:56:00.000-07:00</published><updated>2011-06-15T16:00:32.240-07:00</updated><title type='text'>The jsunpack website is accepting submissions again</title><content type='html'>I removed the ability for people to submit URLs and files to http://jsunpack.jeek.org/, partially due to abusive submissions in late May. I brought the submissions interface back online today with some changes to help prevent further abuse. Please let me know if you encounter any sort of problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-689074191218353196?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/689074191218353196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2011/06/jsunpack-website-is-accepting.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/689074191218353196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/689074191218353196'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2011/06/jsunpack-website-is-accepting.html' title='The jsunpack website is accepting submissions again'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-2418035336723254439</id><published>2011-04-01T07:56:00.000-07:00</published><updated>2011-04-01T08:32:31.177-07:00</updated><title type='text'>Temporary downtime for jsunpack website</title><content type='html'>The website for this project &lt;a href="http://jsunpack.jeek.org/"&gt;jsunpack.jeek.org&lt;/a&gt; has been down for the past 2 days because I was moving it to new hardware. The old hardware was running ESXi and caused all virtual machines to lock up repeatedly. While I was moving it the site was completely offline but I'm happy to say its back now!&lt;br /&gt;&lt;br /&gt;Keep in mind, if you had been running jsunpack-n locally then you wouldn't have experienced any problems (thats software is freely available and that is what the server is running). &lt;br /&gt;&lt;br /&gt;[off topic] I've seen a few people do a great job in downtime situations, none of which I did because this whole project is running from a single virtual machine with limited resources. For instance, when Netflix was recently down they acknowledged the problem and credited subscriber's accounts. When another site was down, they played a funny "Doh!" error message video from the Simpsons. In yet another case, DreamHost apologized and wrote a &lt;a href="http://blog.dreamhost.com/2011/03/18/goin-down/"&gt;funny blog&lt;/a&gt; about it (note: I do not use or endorse DreamHost but I do read their blog). Some quotes from that post:&lt;br /&gt;&lt;br /&gt;"I’d like compensation. You’ve earned it! You pay for 365 days of service – not 364.375"&lt;br /&gt;&lt;br /&gt;"Why didn’t you call me? We would have loved to reach out to every customer individually, but with over one million domains hosted, that could – quite literally – have taken all year. We’d have loved to email you too, but well, we had this little network problem blocking emails."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-2418035336723254439?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/2418035336723254439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2011/04/temporary-downtime-for-jsunpack-website.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/2418035336723254439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/2418035336723254439'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2011/04/temporary-downtime-for-jsunpack-website.html' title='Temporary downtime for jsunpack website'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-2435269687622545628</id><published>2010-12-22T11:08:00.000-08:00</published><updated>2010-12-22T11:45:49.318-08:00</updated><title type='text'>Jsunpack Website Database Optimizations</title><content type='html'>I just published some new optimizations for the jsunpack.jeek.org database. This should dramatically improve the performance of the website. &lt;br /&gt;&lt;br /&gt;Contact me if you need anything related to this update. I removed the search functionality (and associated RSS feeds) because that was one of the most performance intensive features on the database. While this type of function is still possible, I think I'll either have to limit terms that may be searched for or build a separate index structure so that it is better optimized.&lt;br /&gt;&lt;br /&gt;[edit] In case you are curious, the jsunpack database has 186,459 submissions and 686,232 evalated scripts and URLs since 2010-01-29 14:17:36. This year was pretty active for web exploits. The majority of the submissions to jsunpack were publicly released in one of the RSS feeds with 167,356 submissions over this year. The opposite of that were the entries where users wished those submissions to remain private totaling 19,107 submissions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-2435269687622545628?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/2435269687622545628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/12/jsunpack-website-database-optimizations.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/2435269687622545628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/2435269687622545628'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/12/jsunpack-website-database-optimizations.html' title='Jsunpack Website Database Optimizations'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-7654156582980123874</id><published>2010-12-01T07:14:00.000-08:00</published><updated>2010-12-01T07:29:52.961-08:00</updated><title type='text'>Importing jsunpackn.py as a python library</title><content type='html'>In case you were wondering, it *IS* possible to import jsunpack-n from your own python programs. The benefits include:&lt;br /&gt;1) greater control of the options (that you'd normally specify on the command line or in the configuration file) &lt;br /&gt;2) control of the output in their native data structures (no more &lt;code&gt;$ ./jsunpackn.py file|grep -E "suspicious|malicious" &gt;&gt; readme.log&lt;/code&gt;)&lt;br /&gt;&lt;br /&gt;Check out the new exampleImport.py script, now available in the &lt;a href="https://code.google.com/p/jsunpack-n/source/browse/trunk/exampleImport.py"&gt;project's google code svn site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you review the main code for the exampleImport.py script, you will see that it defines a function that allows you to directly pass JavaScript... for example:&lt;br /&gt;&lt;code&gt;main('eval("var a=123;");')&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then you can see these loops in the main function:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;        for type,hash,data in js.rooturl[url].files:&lt;br /&gt;            print 'file              type=%s, hash=%s, data=%d bytes' % (type,hash,len(data))&lt;br /&gt;        for printable,impact,msg in js.rooturl[url].msg:&lt;br /&gt;            print 'output message    printable=%d, impact=%d, msg=%s' % (printable,impact,msg)&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The point of this post is to show you that you can directly access these files and perform decoding using jsunpackn.py as a python library. If you need examples for how to operate on more than just JavaScript as the exampleImport.py shows, then try looking at the main function of jsunpackn.py, and you'll see how I process the various different types of input. &lt;br /&gt;&lt;br /&gt;Cheers,&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-7654156582980123874?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/7654156582980123874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/12/importing-jsunpacknpy-as-python-library.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/7654156582980123874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/7654156582980123874'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/12/importing-jsunpacknpy-as-python-library.html' title='Importing jsunpackn.py as a python library'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-3840570729862978632</id><published>2010-08-12T08:35:00.000-07:00</published><updated>2010-08-12T08:46:31.302-07:00</updated><title type='text'>Jsunpack through a proxy</title><content type='html'>I have a special guest blog from &lt;a href="http://twitter.com/malc0de"&gt;http://twitter.com/malc0de&lt;/a&gt; today. He submitted some proxy suggestions for jsunpack-n, which I've added to svn. Here is a description of the features. Thanks for the great new feature ideas, keep them coming! also check out his site at &lt;a href="http://malc0de.com/"&gt;http://malc0de.com/&lt;/a&gt; if you haven't already.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;In todays threatscape the ability to forward requests through proxy servers can come in handy in certain situations. Generally speaking a majority of drive-by exploit kits in the wild have logic built in that does not allow for duplicate requests originating from the same IP address. Since I primarily use jsunpack-n to investigate potentially malicious domains and am one of the many jsunpack-n users out there I thought it would be useful if jsunpack supported proxies. At first diving into the 1300+ lines of python was intimidating but after a few hours I had a working prototype that I sent to Blake who later modified (improved) and added to the svn repository. &lt;br /&gt;&lt;br /&gt;Once you have checked out a new copy (&lt;a href="https://code.google.com/p/jsunpack-n/source/checkout"&gt;https://code.google.com/p/jsunpack-n/source/checkout&lt;/a&gt;) you will notice two additional options: &lt;br /&gt;&lt;br /&gt;-p PROXY, --proxy=PROXY&lt;br /&gt; -  use a random proxy from this list (comma separated)&lt;br /&gt;-P CURRENTPROXY, --currentproxy=CURRENTPROXY&lt;br /&gt;        -  define a single proxy&lt;br /&gt;&lt;br /&gt;The first option -p allows you to specify a comma delimited list of proxies of which jsunpack will randomly pick one. &lt;br /&gt;&lt;br /&gt;Example &lt;br /&gt;./jsunpackn.py -u "www.google.com" -p 189.3.47.146:3128,187.49.68.11:8080,187.45.175.66:3128&lt;br /&gt;&lt;br /&gt;URL fetch www.google.com&lt;br /&gt;[fetch config] random proxy 187.45.175.66:3128&lt;br /&gt;[fetch config] currentproxy 187.45.175.66:3128 &lt;br /&gt;&lt;br /&gt;The second option -P allows you to define a single proxy. &lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;./jsunpackn.py -u "www.google.com" -P 187.45.175.66:3128&lt;br /&gt;URL fetch www.google.com&lt;br /&gt;[fetch config] currentproxy 187.45.175.66:3128&lt;br /&gt;&lt;br /&gt;For your convenience a perl script called getCurrentProxies.pl can be found in the tools directory. This script interfaces with a popular website named malwaregroup.com to retrieve an updated list of active proxies. The IP’s are printed out in a comma delimited format accepted by the new -p option. &lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;&lt;br /&gt;./tools/getCurrentProxies.pl&lt;br /&gt;193.255.184.210:3128,193.110.187.209:3128,193.105.240.32:8080,190.200.151.23:8080,189.84.116.88:3128,189.3.177.146:8080,189.3.150.32:3128,189.3.47.146:3128,187.49.68.11:8080,187.45.175.66:3128,187.23.145.82:3128,187.0.80.180:3128,180.149.49.114:8080&lt;br /&gt;&lt;br /&gt;I enjoyed working on this project with Blake and would like to take this opportunity to encourage others to contribute their ideas. Jsunpack has come a long way since it was first introduced and continues to remain one of my favorite tools. &lt;br /&gt;&lt;hr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-3840570729862978632?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/3840570729862978632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/08/jsunpack-through-proxy.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3840570729862978632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3840570729862978632'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/08/jsunpack-through-proxy.html' title='Jsunpack through a proxy'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-1690502288819188039</id><published>2010-07-02T13:40:00.000-07:00</published><updated>2010-07-02T14:00:00.462-07:00</updated><title type='text'>I need your encrypted PDF files</title><content type='html'>I just released some major improvements to jsunpackn today in version 0.3.2c. The main new feature is the ability to parse encrypted PDF documents. One problem though, the output isn't quite perfect. For example, see one of these encrypted PDFs where jsunpackn extracted JavaScript:&lt;br /&gt;&lt;br /&gt;&lt;a href='http://jsunpack.jeek.org/dec/go?report=2ed7fde3fbc8d7c2857bfd69878f78e3b008518e'&gt;http://jsunpack.jeek.org/dec/go?report=2ed7fde3fbc8d7c2857bfd69878f78e3b008518e&lt;/a&gt;&lt;br /&gt;&lt;a href='http://jsunpack.jeek.org/dec/go?report=1873b5faccc1574ce065f6528e85e64464e4b09c'&gt;http://jsunpack.jeek.org/dec/go?report=1873b5faccc1574ce065f6528e85e64464e4b09c&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note, how certain characters in the output are not quite right, therefore the JavaScript decoding doesn't go beyond the first stage. If you find any PDF files with the string "/Encrypt" in them, please let me know, I'd like to test them to see if I can improve the parsing further. In the process of supporting the /Encrypt tag, I was able to build a testbed and was able to detect 20 new PDFs in my testcases with the new parsing!&lt;br /&gt;&lt;br /&gt;I would like to thank Dave Touretzky (from the Computer Science Department and the Center for the Neural Basis of Cognition at Carnegie Mellon University) for posting details of encrypted PDFs within his &lt;a href='http://www.cs.cmu.edu/~dst/Adobe/Gallery/'&gt;Gallery of Adobe Remedies&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-1690502288819188039?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/1690502288819188039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/07/i-need-your-encrypted-pdf-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/1690502288819188039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/1690502288819188039'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/07/i-need-your-encrypted-pdf-files.html' title='I need your encrypted PDF files'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-7457629654522355748</id><published>2010-06-18T15:02:00.000-07:00</published><updated>2010-06-18T15:47:32.988-07:00</updated><title type='text'>Friday Link Trifecta</title><content type='html'>Here are some cool things I ran into this week.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.kotowicz.net/2010/06/ultimate-tostring-override.html"&gt;koto's Ultimate String override&lt;/a&gt;&lt;br /&gt;koto gave a presentation to a polish owasp meeting describing how to detect and evade jsunpack. He also presents some ways to fix those evasions in Ultimate toString override. Great work!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://paulmakowski.wordpress.com/2009/09/30/from-pass_file-to-script-kiddies/"&gt;Paul Makowski's Blog&lt;/a&gt;&lt;br /&gt;In this post, Paul uses his hacked sshd (it logs attempted usernames and passwords) in order to track down the tools used against his server. I was investigating some similar tools, so it was great to see this. One of the interesting tools Paul found was a Mac OSX IRC bot. They all seem to have some connection to "trance". I even found some new files "trance.pdf", which isn't really a PDF if you were wondering :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.reddit.com/r/ReverseEngineering/comments/cfdr3/swf_disassembler_plugin_for_ida_pro_pdf/"&gt;SWF Disassembler Plug-in for IDA Pro [PDF]&lt;/a&gt;&lt;br /&gt;This looks like a great plugin for IDA. If you want to try it with some live samples from jsunpack, monitor &lt;a href="http://jsunpack.jeek.org/dec/go?search=%5BSWF%5D&amp;list=search"&gt;this rss feed&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-7457629654522355748?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/7457629654522355748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/06/friday-link-trifecta.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/7457629654522355748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/7457629654522355748'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/06/friday-link-trifecta.html' title='Friday Link Trifecta'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-6288676429493883057</id><published>2010-05-20T08:39:00.000-07:00</published><updated>2010-05-20T08:46:11.785-07:00</updated><title type='text'>Jsunpack-n update 0.3.2b Custom Spidermonkey and Google Code Subversion</title><content type='html'>I now distribute my own modifications to Spidermonkey with the project. This allows you to easily compile it with my preferred modifications. If you want to see what modifications I make, read the INSTALL.spidermonkey or INSTALL.spidermonkey.shellcode files.&lt;br /&gt;&lt;br /&gt;You can now get the source code for the project from &lt;a href="https://code.google.com/p/jsunpack-n/"&gt;https://code.google.com/p/jsunpack-n/&lt;/a&gt; (instead of my website).&lt;br /&gt;&lt;br /&gt;Updates 2010-05-20 version 0.3.2b&lt;br /&gt;&lt;br /&gt;1) added INSTALL.spidermonkey.shellcode instructions. This adds improved shellcode detection.&lt;br /&gt;2) updated jsunpack class options structure. New options will always use file contents instead of filenames (where possible). Also, rules are now part of the options structure.&lt;br /&gt;3) socket defaulttimeout now part of jsunpack class (it was global before). If you import jsunpack, make sure to set a timeout on your own.&lt;br /&gt;4) you can use jsunpack.version to get the current version string&lt;br /&gt;5) new performance option (-f "fasteval") for disabling non-critical features in favor of performance&lt;br /&gt;6) fixed a bug in redoevaltime option affecting performance of malicious scripts&lt;br /&gt;7) fixed a pdf parsing bug for /Page related to testcase samples/pdf-numPages.file&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-6288676429493883057?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/6288676429493883057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/05/jsunpack-n-update-032b-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6288676429493883057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6288676429493883057'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/05/jsunpack-n-update-032b-custom.html' title='Jsunpack-n update 0.3.2b Custom Spidermonkey and Google Code Subversion'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-1488831745915307346</id><published>2010-05-05T15:21:00.000-07:00</published><updated>2010-05-05T15:27:51.626-07:00</updated><title type='text'>Three days ... of bug hunting (and a new release) I blame python</title><content type='html'>This is the worst bug related to the project that I've encountered so far and I just spent a few days trying to find what went wrong... Well, I just found and fixed it!&lt;br /&gt; &lt;br /&gt;I'd highly recommend NOT using version 0.3.2 because of this bug, version 0.3.2a has only a few new features but YOU SHOULD UPGRADE immediately if you use 0.3.2. Version 0.3.2 is the only version affected by this bug and it prevents jsunpack-n timeouts from killing the SpiderMonkey process (if the script never terminates).&lt;br /&gt;&lt;br /&gt;Updates 2010-05-05 version 0.3.2a&lt;br /&gt;1) implemented this.numPages, getPageNthWord, and getPageNumWords&lt;br /&gt;2) fixed bug (python 2.6 only) for log_ips functionality&lt;br /&gt;3) fixed REALLY BAD performance bug related to python dynamic types. This is why type checking is a good thing and why python sucks at it. Most of my python bugs are because I redefine another variable, wipe out a loop variable, or otherwise use a bad type.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-1488831745915307346?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/1488831745915307346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/05/three-days-of-bug-hunting-and-new.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/1488831745915307346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/1488831745915307346'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/05/three-days-of-bug-hunting-and-new.html' title='Three days ... of bug hunting (and a new release) I blame python'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-4038556007751240225</id><published>2010-04-30T12:53:00.000-07:00</published><updated>2010-04-30T12:56:58.517-07:00</updated><title type='text'>Jsunpack-n update 0.3.2: Major Updates</title><content type='html'>Happy Friday! ;)&lt;br /&gt;&lt;br /&gt;I added LOTS of great new features in this release. Here's the CHANGELOG. &lt;br /&gt;Sorry for the Friday update, it seems like I've still got lots of work left to do still!&lt;br /&gt;&lt;br /&gt;Updates 2010-04-30 version 0.3.2&lt;br /&gt;1) added configuration command line option -c which replaces all former directories and filenames specified on the&lt;br /&gt;    command line, now uses options.config instead&lt;br /&gt;2) added command line option -J option to disable any decoding&lt;br /&gt;3) added document.title parsing&lt;br /&gt;4) js.files is now part of urlattr/rooturl structure&lt;br /&gt;5) handle referrers in building the tree&lt;br /&gt;6) detection now can be performed against full decoded stream (ie. between different decode levels on the same decoding)&lt;br /&gt;    don't use decodedOnly filter in the rule if you expect to match on the full decoded stream&lt;br /&gt;7) ipaddress logging upon detecting malicious contents with a 'options.config' option&lt;br /&gt;8) make PDF headers available to future decodings&lt;br /&gt;9) added navigator.plugins enumeration in pre.js&lt;br /&gt;10) support getAnnot calls (note: previously getAnnots was supported only)&lt;br /&gt;11) html parsing customizable configuration file (see htmlparse.config file)&lt;br /&gt;12) fixed a bug in htmlparsing related to NULL bytes&lt;br /&gt;13) added pdf app.plugIns enumeration&lt;br /&gt;14) other bug fixes&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-4038556007751240225?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/4038556007751240225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/04/jsunpack-n-update-032-major-updates.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/4038556007751240225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/4038556007751240225'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/04/jsunpack-n-update-032-major-updates.html' title='Jsunpack-n update 0.3.2: Major Updates'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-6495321119462317558</id><published>2010-03-18T12:39:00.000-07:00</published><updated>2010-03-18T12:43:56.592-07:00</updated><title type='text'>Jsunpack-n update 0.3.1e: Bug Fixes Release</title><content type='html'>I released an update to jsunpack-n that fix some bugs and add some new features. The detection updates for this release mostly involve improvements in PDF parsing. Some jsunpack users suggested that I add better detection capabilities for PDF files and content within deflated streams. That is not yet available, but I am planning to make those updates available in a future version.&lt;br /&gt;&lt;br /&gt;Updates 2010-03-18 version 0.3.1e&lt;br /&gt;1) added LZW and RunLength decoding to pdf.py&lt;br /&gt;2) fixed pdf.py so that streams that fail to decompress are not output&lt;br /&gt;3) rooturl is now a member of jsunpack objects (to better support threading)&lt;br /&gt;4) js.files now contains three entries [filename,origin,contents] (contents is new)&lt;br /&gt;5) new command line argument -Q (for Quit-outputting-files), incase you plan to use the output from a python script&lt;br /&gt;6) updated rules&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-6495321119462317558?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/6495321119462317558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/03/jsunpack-n-update-031e-bug-fixes.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6495321119462317558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6495321119462317558'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/03/jsunpack-n-update-031e-bug-fixes.html' title='Jsunpack-n update 0.3.1e: Bug Fixes Release'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-3747945615002036881</id><published>2010-02-17T08:04:00.000-08:00</published><updated>2010-02-17T08:19:41.467-08:00</updated><title type='text'>Executables Feed for Malware Analysis</title><content type='html'>Someone sent me an email wondering why I don't continue to publish a feed for recent executables (like the older version of jsunpack), and I do! I thought the answer could be useful to others wanting to perform malware analysis so keep reading if that interests you.&lt;br /&gt;&lt;br /&gt;You can perform a search with the term "executable" under the recent submissions of jsunpack.jeek.org. These are not guaranteed to be malicious, but there is a high likelihood that most of them are malicious. Many of the URLs are from decoded javascript or environment variables pointing to executables. &lt;br /&gt;&lt;br /&gt;Here are the links for you, &lt;br /&gt;&lt;br /&gt;Search &lt;a href='http://jsunpack.jeek.org/dec/go?list=1&amp;search=executable'&gt;http://jsunpack.jeek.org/dec/go?list=1&amp;search=executable&lt;/a&gt;&lt;br /&gt;RSS Feed: &lt;a href='http://jsunpack.jeek.org/dec/go?search=executable&amp;list=search'&gt;http://jsunpack.jeek.org/dec/go?search=executable&amp;list=search&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For each executable you find, you may choose not to download it from the actual server (the server may not offer the file anymore). In that case, you can download the executables from jsunpack instead.&lt;br /&gt;&lt;br /&gt;Each link in the RSS feed contains a link to the decoding report like this:&lt;br /&gt;&lt;a href='http://jsunpack.jeek.org/dec/go?report=d6257c1932efa718fe424fbdd92ae7e0779aa9df'&gt;http://jsunpack.jeek.org/dec/go?report=d6257c1932efa718fe424fbdd92ae7e0779aa9df&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you replace the "go" part with "download" you'll get all the files created and the executable file. &lt;br /&gt;&lt;a href='http://jsunpack.jeek.org/dec/download?report=d6257c1932efa718fe424fbdd92ae7e0779aa9df'&gt;http://jsunpack.jeek.org/dec/&lt;b&gt;download&lt;/b&gt;?report=d6257c1932efa718fe424fbdd92ae7e0779aa9df&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please enjoy and send me any reports for malware that you analyze and I'll post them on the site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-3747945615002036881?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/3747945615002036881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/02/executables-feed-for-malware-analysis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3747945615002036881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3747945615002036881'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/02/executables-feed-for-malware-analysis.html' title='Executables Feed for Malware Analysis'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-1866863242415782261</id><published>2010-02-09T06:57:00.000-08:00</published><updated>2010-02-09T07:04:47.034-08:00</updated><title type='text'>Shmoocon Recap and Presentation Slides</title><content type='html'>Shmoocon was great! At the Own the Con talk hosted by Bruce Potter, the event organizer, he explained one of the reasons for limiting the con to 1500 people given that his house, living room, and garage become full of swag. He also mentioned that at the open bar on Saturday night Shmoocon attendees created a bar tab of $28k!&lt;br /&gt;&lt;br /&gt;He also said attendance was great given that we just experienced the worst snowstorm in Washington DC's history. (about 95 percent attendance)&lt;br /&gt;&lt;br /&gt;Thanks to Bruce, his wife, and all the volunteers for putting on another awesome Shmoocon this year! I put the slides from my presentation online for those of you that couldn't make it:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jsunpack.jeek.org/BlakeHartstein_Shmoocon_Jsunpack_20100206.pdf"&gt;http://jsunpack.jeek.org/BlakeHartstein_Shmoocon_Jsunpack_20100206.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-1866863242415782261?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/1866863242415782261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/02/shmoocon-recap-and-presentation-slides.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/1866863242415782261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/1866863242415782261'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/02/shmoocon-recap-and-presentation-slides.html' title='Shmoocon Recap and Presentation Slides'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-5504480377104459509</id><published>2010-02-04T12:00:00.000-08:00</published><updated>2010-02-04T12:02:59.321-08:00</updated><title type='text'>Shmoocon and New Releases</title><content type='html'>Hi everyone,&lt;br /&gt;If you make it to Shmoocon this weekend I'll be presenting jsunpack on Saturday at 10am. Also, check out the &lt;a href='http://jsunpack.jeek.org/dec/go'&gt;improved web interface&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;See you there!&lt;br /&gt;Blake&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-5504480377104459509?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/5504480377104459509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/02/shmoocon-and-new-releases.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5504480377104459509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5504480377104459509'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/02/shmoocon-and-new-releases.html' title='Shmoocon and New Releases'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-145332155619157466</id><published>2010-01-08T08:20:00.000-08:00</published><updated>2010-01-08T08:31:11.193-08:00</updated><title type='text'>Jsunpack-n update 0.3.1c: Decoding and Functionality Updates</title><content type='html'>I just released a new version of jsunpack-n, this version has some great new features! First off, it handles new decoding techniques like PDF annots. What are Annots you ask? Well, its just like getElementByID but for PDF files. This allows exploit authors to store arbitrary content within a PDF file then access that content directly from javascript using the getAnnots() function. Similarly, attackers have been using the "this.info.title" variable also! This version of jsunpack-n supports both of these new obfuscation techniques.&lt;br /&gt;&lt;br /&gt;I also added many improvements to PDF decoding and added a few new detection rules for new exploits. You will find that I've also added many new sample-* files for jsunpack-n users to test with and see what jsunpack-n is capable of. &lt;br /&gt;&lt;br /&gt;IDEA: I've been considering creating an svn repository to store high volumes of pcaps and malicious samples ... if there is interest contact me or let me know if you would find it valuable.&lt;br /&gt;&lt;br /&gt;Updates 2010-01-08 version 0.3.1c&lt;br /&gt;1) pdf improvements&lt;br /&gt;1a) handling and decoding of pdf annots (see sample-pdf-annots.file)&lt;br /&gt;1b) octal-based object decoding support&lt;br /&gt;1c) handling of obfuscation for this.info.title (see sample-infoTitle.pcap)&lt;br /&gt;2) graphing in verbose mode now displays all nodes rather than just malicious ones, increased node limit to 60&lt;br /&gt;3) bug fix for gzip python library to better handle IOError case for 'Not a gzipped file'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-145332155619157466?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/145332155619157466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2010/01/jsunpack-n-update-031c-decoding-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/145332155619157466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/145332155619157466'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2010/01/jsunpack-n-update-031c-decoding-and.html' title='Jsunpack-n update 0.3.1c: Decoding and Functionality Updates'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-399256637975956874</id><published>2009-12-21T15:25:00.000-08:00</published><updated>2009-12-21T15:47:27.898-08:00</updated><title type='text'>Rule2Alert Project Release</title><content type='html'>This is an idea I had a while ago and the Rule2Alert project implemented it (awesome work Josh)&lt;br /&gt;&lt;br /&gt;Step1. Take a snort rule like this:&lt;br /&gt;alert tcp $HOME_NET any -&gt; $EXTERNAL_NET 80 (msg:"Snort alert"; flow:to_server,established; content:"|56 24 5a 63|"; content:"hey"; distance:5; within:12; sid:2000000; rev:1;)&lt;br /&gt;&lt;br /&gt;Step2. Create a pcap (packet capture file) or network traffic to trigger this rule.&lt;br /&gt;(Mind you certain things like pcre are incredibly challenging to implement)&lt;br /&gt;&lt;br /&gt;Why is this useful you say?&lt;br /&gt;I can see many uses - &lt;br /&gt;&lt;br /&gt;1) You can test your rules to make sure they work&lt;br /&gt;&lt;br /&gt;2) You can determine if overlap exists between one or more different rule (therefore, consider disabling one, or merging the rule into one). This was a goal of one of the public community/EmergingThreats/Sourcefire project that I think has dropped off the radar since it was initially started.&lt;br /&gt;&lt;br /&gt;3) You can also test other non-snort Intrusion Detection Engines for known signatures to determine how much overlap exists.&lt;br /&gt;&lt;br /&gt;4) An attacker could also use this tool to do some sneaky things. I won't go into much detail here, but leave a comment if you think of anything.&lt;br /&gt;&lt;br /&gt;More on the project from "New Project - Rule2Alert" at &lt;a href='http://malforge.com/node/22'&gt;http://malforge.com/node/22&lt;/a&gt; or get the source code from &lt;a href='http://code.google.com/p/rule2alert/'&gt;http://code.google.com/p/rule2alert/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-399256637975956874?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/399256637975956874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/12/rule2alert-project-release.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/399256637975956874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/399256637975956874'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/12/rule2alert-project-release.html' title='Rule2Alert Project Release'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-7663793392354072154</id><published>2009-12-08T11:12:00.000-08:00</published><updated>2009-12-08T11:18:10.327-08:00</updated><title type='text'>Jsunpack-n update 0.3.1b: Functionality Updates</title><content type='html'>Today I am releasing a new version of jsunpack-n that fixes several different bugs and increases the functionality of jsunpack-n.&lt;br /&gt;&lt;br /&gt;This release REQUIRES an up to date version of YARA (1.3 or greater), because the rules file makes use of the new rule syntax. If you experience problems compiling the YARA rules, this is likely the reason.&lt;br /&gt;&lt;br /&gt;In this release, I added support for lastModified, which attackers have used in attacks to prevent analysis (this will only work if you use a pcap file), since it is part of the network traffic that an attacker sends from a malicious server.&lt;br /&gt;&lt;br /&gt;Here is the full CHANGELOG below:&lt;br /&gt;&lt;br /&gt;1) rule updates for yara 1.3 rule language&lt;br /&gt;2) fixes in PDF JavaScript parsing&lt;br /&gt;3) improvements to the tree structure, made appending children better&lt;br /&gt;4) cmdline options for logging and temporary directories&lt;br /&gt;5) additions to pre.js and post.js to handle App.eval, String.eval, and better definitions for Adobe version variables&lt;br /&gt;6) handle document.write and document.writeln with multiple parameters&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-7663793392354072154?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/7663793392354072154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/12/jsunpack-n-update-031b-functionality.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/7663793392354072154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/7663793392354072154'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/12/jsunpack-n-update-031b-functionality.html' title='Jsunpack-n update 0.3.1b: Functionality Updates'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-5691783264769406924</id><published>2009-10-08T11:27:00.000-07:00</published><updated>2009-10-08T11:42:36.948-07:00</updated><title type='text'>Using a Custom Spidermonkey Version and bug fixes</title><content type='html'>I've added instructions within "INSTALL.spidermonkey" showing how to build a js-1.8.0rc1 custom version of spidermonkey with hooked eval() statements. Upon doing so, your decodings will be more reliable and effective!&lt;br /&gt;&lt;br /&gt;Attackers can use techniques that change the scope of variables, therefore JavaScript hooks are not sufficient to handle them. When you modify the spidermonkey engine in this manner, you do not change the scope and such cases will continue to decode successfully. I do not distribute spidermonkey with jsunpack-n so you still have some choices in this area, and therefore I did not disable the eval() hooks in pre.js, which this spidermonkey modification replaces. &lt;br /&gt;&lt;br /&gt;I've been working much more on parsing SWF files and I have a development version of a Flash Decompiler (for ActionScript code) in the works, stay tuned for that!&lt;br /&gt;&lt;br /&gt;From the CHANGELOG: &lt;br /&gt;Updates 2009-10-08 version 0.3.1a&lt;br /&gt;1) bug fixes release&lt;br /&gt;1a) I now distribute an optional gzip.py file (on by default)&lt;br /&gt;        This file was built to fix gzip decompression errors (from python2.5), you may not want to use js this if you use python2.6&lt;br /&gt;2) rule detection updates&lt;br /&gt;3) updates to pre.file&lt;br /&gt;4) added instructions for compiling and using custom spidermonkey version INSTALL.spidermonkey&lt;br /&gt;5) (not new) you can type "make clean" to destroy all temporary and log files&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-5691783264769406924?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/5691783264769406924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/10/using-custom-spidermonkey-version-and.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5691783264769406924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5691783264769406924'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/10/using-custom-spidermonkey-version-and.html' title='Using a Custom Spidermonkey Version and bug fixes'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-4731417157501320811</id><published>2009-09-25T12:10:00.000-07:00</published><updated>2009-09-25T12:16:40.109-07:00</updated><title type='text'>Jsunpack-n update v0.3a: SWF parsing and Bug fixes release</title><content type='html'>The main new feature in this release is the "swf.py" file, as a standalone you can run it like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$ ./swf.py sample-swf-js.file&lt;br /&gt;processing flash file [version 4] (length 115, actual length 115)type=0x9       length=3        name=SetBackgroundColor&lt;br /&gt;type=0x18       length=31       name=Protect&lt;br /&gt;type=0xc        length=46       name=DoAction&lt;br /&gt;       actionCode 0x83 len(42)         ActionGetURL javascript:eval(fV6("ZlY4KGZWMSwxKQ=="))&lt;br /&gt;       actionCode 0x0 len(0)   unknownAction&lt;br /&gt;&lt;br /&gt;tags (with counts) of length=0&lt;br /&gt;End:1, ShowFrame:1&lt;br /&gt;sample-swf-js.file ['javascript:eval(fV6("ZlY4KGZWMSwxKQ=="))']&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;$ ./swf.py sample-swf-url.file&lt;br /&gt;processing flash file [version 8] (length 1125772, actual length 1125772)type=0x45      length=4        name=FileAttributes&lt;br /&gt;type=0x9        length=3        name=SetBackgroundColor&lt;br /&gt;type=0xc        length=65       name=DoAction&lt;br /&gt;       actionCode 0x83 len(45)         ActionGetURL http://5173vip.seawww.cn/cuteqq.htm  (_blank)&lt;br /&gt;       actionCode 0x96 len(12)         ActionPush      datatype[0]=string(text)&lt;br /&gt;       actionCode 0x1d len(0)  ActionSetVariable&lt;br /&gt;       ...&lt;/blockquote&gt;&lt;br /&gt;As you can see, you can embed both URLs and javascript within Flash SWF files. jsunpack-n uses this module to follow those links and report any obtained information.&lt;br /&gt;&lt;br /&gt;The changelog follows:&lt;br /&gt;&lt;br /&gt;Updates 2009-09-25 version 0.3a&lt;br /&gt;1) new extraction of URLs/JavaScript from Flash files (CWS/FWS) with swf.py&lt;br /&gt;2) significant performance improvements in shellcode processing&lt;br /&gt;3) bug fixes&lt;br /&gt;3a) fixed tree structure of urls (specific to pcap processing)&lt;br /&gt;       when a node could detatch itself from the tree incorrectly&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-4731417157501320811?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/4731417157501320811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/09/jsunpack-n-update-v03a-swf-parsing-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/4731417157501320811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/4731417157501320811'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/09/jsunpack-n-update-v03a-swf-parsing-and.html' title='Jsunpack-n update v0.3a: SWF parsing and Bug fixes release'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-8578752920531938705</id><published>2009-09-18T11:59:00.000-07:00</published><updated>2009-09-18T13:22:56.275-07:00</updated><title type='text'>Jsunpack-n update v0.1f: Active Mode and Client version Enumeration</title><content type='html'>Attackers frequently try to hide their exploits using version detection. They profile the client software (browser or PDF reader), then only launch an exploit or decode the payload provided you use a vulnerable version. To counteract this, jsunpack-n now uses multiple different version strings and uses the best result.&lt;br /&gt;&lt;br /&gt;More signatures and better PDF decoding (pdf.py) with Ascii85Decode support!&lt;br /&gt;&lt;br /&gt;I also added active mode (-a), which fetches any [not analyzed] URLs and can be used with URL fetching (-u):&lt;br /&gt;&lt;blockquote&gt;$ ./jsunpack-n.py -u "www.bbkmobile.com" -a&lt;br /&gt;URL fetch www.bbkmobile.com&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; (referer=www.google.com/trends/hottrends)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; saved 1647 bytes to ./files/fetch_b8df4c6607205922a41d6448de0dda45d3885951&lt;br /&gt;&lt;br /&gt;Active Mode, fetching x new URLs&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; [...cut...]&lt;br /&gt;&lt;br /&gt;[nothing detected;children=malicious:10] (script) www.bbkmobile.com/&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; [suspicious:5] (script) www.crcf.org.cn/logo.gif?b&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; suspicious: DecodedIframe detected &amp;lt;iframe&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; [nothing detected;children=malicious:10] (iframe) knownsec.7766.org/wwj2/1.htm?&lt;br /&gt;[...cut...]&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;More info from the CHANGELOG:&lt;br /&gt;&lt;br /&gt;Updates 2009-09-18 version 0.1f&lt;br /&gt;1) active fetching of with -a, and evaluation of urls with -u, use both (-u URL and -a) for purely active analysis&lt;br /&gt;2) evaluation of multiple different client version strings:&lt;br /&gt;2a) version enumeration: adobe reader for pdf&lt;br /&gt;2b) version enumeration: IE7, IE8, Firefox, Opera&lt;br /&gt;2c) cumulative evaluation time limits per decoding, and inference of code coverage based upon evaluation time&lt;br /&gt;3) added pdf decoding support for ASCII85Decode and made other improvements to pdf decoding&lt;br /&gt;4) rules updates&lt;br /&gt;&lt;br /&gt;Get it &lt;a href='http://jsunpack.jeek.org/jsunpack-n.tgz'&gt;here&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-8578752920531938705?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/8578752920531938705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/09/jsunpack-n-update-v01f-active-mode-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/8578752920531938705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/8578752920531938705'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/09/jsunpack-n-update-v01f-active-mode-and.html' title='Jsunpack-n update v0.1f: Active Mode and Client version Enumeration'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-3906604576874550039</id><published>2009-09-02T14:50:00.000-07:00</published><updated>2009-09-02T16:56:31.477-07:00</updated><title type='text'>Jsunpack-n Update v0.1e: Graphical output, directory output, command line options and fixes</title><content type='html'>A new version of &lt;a href="http://jsunpack.jeek.org/jsunpack-n.tgz"&gt;jsunpack-n is available 0.1e&lt;/a&gt;! This version makes some major improvements in the rule language (using Yara) and allows you to make pretty pictures like this:&lt;br /&gt;&lt;br /&gt;&lt;img src=http://jsunpack.jeek.org/img/sample-pdf.png&gt;&lt;br /&gt;&lt;br /&gt;One thing I think you will like is the new output ./files/ directory and command line options! Enjoy.&lt;br /&gt;&lt;br /&gt;Here is it running with the sample files included in the archive:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;$ ./jsunpack-n.py sample-http-exploit.pcap&lt;br /&gt;[malicious:10] hifgejig.cn/nuc/&lt;br /&gt;        [impact=5] DecodedGenericCLSID  detected F0E42D60-368C-11D0-AD81-00A0C90DC8D9&lt;br /&gt;        [impact=10] MSOfficeSnapshotViewer  detected F0E42D60-368C-11D0-AD81-00A0C90DC8D9&lt;br /&gt;        [impact=5] ObfuscationPattern  detected location eval&lt;br /&gt;        [impact=10] MSIENestedSpan  detected CDATA[&amp;lt;image SRC=http://&amp;# DATAFORMATAS= &amp;lt;SPAN DATASRC= DATASRC= DATAFLD=&lt;br /&gt;        [info] find_urls: [javascript var] hifgejig.cn/nuc/exe.php&lt;br /&gt;&lt;br /&gt;$ ./jsunpack-n.py sample-pdf.pcap&lt;br /&gt;[suspicious:5] trughtsa.com/&lt;br /&gt;        [impact=5] DecodedIframe  detected &amp;lt;iframe&lt;br /&gt;        [info] [iframe /] trughtsa.com/img/pfqa.php&lt;br /&gt;&lt;br /&gt;[malicious:10] trughtsa.com/img/pfqa.php&lt;br /&gt;        [impact=10] PDFexploit  detected util.printf Collab.getIcon getAnnots Collab.collectEmailInfo spell.customDictionaryOpen&lt;br /&gt;        [malicious] identified shellcode of length 1533 (./files/shellcode_9ac3a76f70caef94f2773abc1043e9511d2d0f09)&lt;br /&gt;        [info] XOR key [shellcode]: 33&lt;br /&gt;        [info] shellcode url [xor] trughtsa.com/img/uet.php&lt;br /&gt;        [impact=5] ObfuscationPattern  detected eval String.fromCharCode&lt;br /&gt;&lt;br /&gt;[malicious:10] trughtsa.com/img/uet.php&lt;br /&gt;        [incident:10] [0]  requested by 192.168.203.60&lt;br /&gt;        [incident:10] [0]  origin trughtsa.com/img/pfqa.php&lt;br /&gt;        [incident:10] [0]  method=GET type=shellcode&lt;br /&gt;        [incident:10] [0] filetype MS-DOS executable PE  for MS Windows (GUI) Intel 80386 32-bit&lt;br /&gt;&lt;br /&gt;$ ./jsunpack-n.py sample-pdf.file&lt;br /&gt;[malicious:10] sample-pdf.file&lt;br /&gt;        [impact=10] PDFexploit  detected collab.getIcon&lt;br /&gt;        [suspicious] likely NOP sled shellcode variable of length 167&lt;br /&gt;        [malicious] identified shellcode of length 1526 (./files/shellcode_da344d16e814e40dec67592bdccdf3ad50e0069d)&lt;br /&gt;        [info] XOR key [shellcode]: 33&lt;br /&gt;        [info] shellcode url [xor] b35.info/w/who.exe&lt;br /&gt;        [suspicious] likely NOP sled shellcode variable of length 2048&lt;br /&gt;        [suspicious] likely NOP sled shellcode variable of length 1714&lt;br /&gt;        [suspicious] likely NOP sled shellcode variable of length 522574&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;More from the RELEASE notes:&lt;br /&gt;&lt;br /&gt;RELEASE NOTES:&lt;br /&gt;Updates 2009-09-02 version 0.1e&lt;br /&gt;&lt;br /&gt;First and foremost, thanks to Victor! (for creating the Yara detection library)&lt;br /&gt;Yara is now a required dependency and the supported format for the 'rules' file&lt;br /&gt;&lt;br /&gt;1) improved URL tracking using 'urlattr' class and urls dictionary&lt;br /&gt;1a) new command line option -g, to create a URL graph (only when pcap contains 10 or fewer URL requests)&lt;br /&gt;2) bug fixes for stream reassembly and pdf parsing&lt;br /&gt;2a) stream reassembly now handles all streams when processing a pcap file,&lt;br /&gt;    regardless of whether the nids state is in end_states&lt;br /&gt;4) detection of NOP sled shellcode and performance improvements in shellcode processing&lt;br /&gt;    (this was one of the performance bottlenecks)&lt;br /&gt;5) new output format with ./files/ directory or -d OUTDIR command line option&lt;br /&gt;6) CVE references are available in the 'rules' file but are temporarily unavailable in alerts&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-3906604576874550039?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/3906604576874550039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/09/new-version-of-jsunpack-n-is-available.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3906604576874550039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3906604576874550039'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/09/new-version-of-jsunpack-n-is-available.html' title='Jsunpack-n Update v0.1e: Graphical output, directory output, command line options and fixes'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-6481286863039282614</id><published>2009-08-01T14:03:00.000-07:00</published><updated>2009-08-01T14:44:14.821-07:00</updated><title type='text'>Jsunpack-n Update v0.1d: Great New Features, Detection, and Other Improvements</title><content type='html'>The coolest feature in my opinion is demonstrated below using the sample-pdf.pcap file &lt;a href='http://jsunpack.jeek.org/jsunpack-n.tgz'&gt;included in the archive&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;$ ./jsunpack-n.py sample-pdf.pcap&lt;br /&gt;[suspicious:2] trughtsa.com/&lt;br /&gt;        [impact=2] CVE-NO-MATCH (id 9) detected eval&lt;br /&gt;        [suspicious] [0]&lt;br /&gt;        [info] [iframe /] trughtsa.com/img/pfqa.php&lt;br /&gt;&lt;br /&gt;[malicious:10] trughtsa.com/img/pfqa.php&lt;br /&gt;        [impact=2] CVE-NO-MATCH (id 9) detected eval&lt;br /&gt;        [suspicious] [0]&lt;br /&gt;        [suspicious] [0] decoded 25275 bytes&lt;br /&gt;        [impact=2] CVE-NO-MATCH (id 9) detected eval&lt;br /&gt;        [suspicious] [1]&lt;br /&gt;        [suspicious] [1] decoded 12269 bytes&lt;br /&gt;        [impact=10] CVE-2008-2992 (id 1) detected util.printf&lt;br /&gt;        [impact=10] CVE-2009-1493 (id 2) detected spell.customdictionaryopen&lt;br /&gt;        [impact=10] CVE-2009-1492 (id 3) detected getannots&lt;br /&gt;        [impact=10] CVE-2007-5659 (id 4) detected collab.collectemailinfo&lt;br /&gt;        [impact=10] CVE-2009-0927 (id 5) detected collab.geticon&lt;br /&gt;        [impact=3] CVE-NO-MATCH (id 8) detected string.fromcharcode&lt;br /&gt;        [impact=2] CVE-NO-MATCH (id 9) detected eval&lt;br /&gt;        [malicious] identified shellcode of length 1533&lt;br /&gt;        [info] XOR key [shellcode]: 33&lt;br /&gt;        [info] exploit_watch append [shellcode] trughtsa.com/img/uet.php&lt;br /&gt;        [malicious] [2]&lt;br /&gt;        [malicious] [2] decoded 4626 bytes&lt;br /&gt;&lt;br /&gt;[malicious:10] trughtsa.com/img/uet.php&lt;br /&gt;        [incident] [0] Exploit successful [origin trughtsa.com/img/pfqa.php]&lt;br /&gt;        [incident] [0] Exploit successful [victim 192.168.203.60]&lt;br /&gt;        [incident] [0] Exploit successful [type MS-DOS executable PE  for MS Windows (GUI) Intel 80386 32-bit]&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Notice that each URL is flagged as suspicious/malicious (or [benign] in case you use -v or -V). Check out the "rules" file, which uses a Snort-like syntax to express what exactly you want to detect. For now, it is very simple and only allows pcre-style detection rules, each of which must match for it to classify the URL according to the impact level (-1 is experimental, 0 is benign, 0-5 is suspicious, 6-10 is malicious). If you create some great new rules, post them as a reply to this thread or send them to me and I'll add them to the "rules" file that I &lt;a href='http://jsunpack.jeek.org/jsunpack-n.tgz'&gt;distribute with jsunpack-n&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Another cool thing about this version is that you no longer need the pynids/libnids libraries for it to work with non-PCAP files. A lot of people wanting to use jsunpack-n been having issues installing this library so that is the reason I've made it optional. Here is an example of processing a PDF file on the local system (sample-pdf.file is an example file included in the &lt;a href='http://jsunpack.jeek.org/jsunpack-n.tgz'&gt;jsunpack-n package&lt;/a&gt; for testing that your local installation functions properly).&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$ ./jsunpack-n.py -V sample-pdf.file&lt;br /&gt;Processing sample-pdf.file&lt;br /&gt;[malicious:10] sample-pdf.file&lt;br /&gt;        [info] [0] found JavaScript&lt;br /&gt;        [info] [0] decoded 14602 bytes&lt;br /&gt;        [info] [1] found JavaScript&lt;br /&gt;        [malicious] analysis exceeded 30 seconds (125644 bytes, incomplete)&lt;br /&gt;        [info] [1] decoded 125644 bytes&lt;br /&gt;        [impact=10] CVE-2009-0927 (id 5) detected collab.geticon&lt;br /&gt;        [malicious] identified shellcode of length 35223&lt;br /&gt;        [info] XOR key [shellcode]: 33&lt;br /&gt;        [info] exploit_watch append [shellcode] b35.info/w/who.exe&lt;br /&gt;        [malicious] [2]&lt;br /&gt;        [malicious] [2] no JavaScript&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;One thing you will notice about this case is that collab.geticon is not visible from the immediate decoding (but is visible via a print "//jsunpack.called collab.getIcon". It also demonstrates the timeout on JavaScript evaluation (the -t command line option). The new command line arguments that are available can be listed via the following:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$ ./jsunpack-n.py -h&lt;br /&gt;Usage:&lt;br /&gt;        ./jsunpack-n.py [fileName]&lt;br /&gt;        ./jsunpack-n.py [interfaceName]&lt;br /&gt;        jsunpack-network version 0.1d (alpha)&lt;br /&gt;&lt;br /&gt;Options:&lt;br /&gt;  -h, --help            show this help message and exit&lt;br /&gt;  -t TIMEOUT, --timeout=TIMEOUT&lt;br /&gt;                        limit on number of seconds to evaluate JavaScript&lt;br /&gt;                        (default 30 seconds)&lt;br /&gt;  -v, --verbose         verbose mode displays status for all files, even if&lt;br /&gt;                        they are benign&lt;br /&gt;  -V, --very-verbose    shows all decoding errors (noisy)&lt;br /&gt;  -D, --debug           (experimental) debugging option to profile memory&lt;br /&gt;                        usage&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Additionally, you can inspect the CHANGELOG file for all new features:&lt;br /&gt;Updates 2009-08-01 version 0.1d&lt;br /&gt;1) determination of whether the code is malicious or benign (see detection.py)&lt;br /&gt;2) better tracking with exploit_watch and ability incident alert for infected IP address&lt;br /&gt;3) pynids 'import nids' library is now optional due to user feedback&lt;br /&gt;4) additional command line arguments -h (help), -t (timeout), -v (verbose), and -V (very verbose)&lt;br /&gt;5) bug fixes and performance improvements&lt;br /&gt;6) added debug option -D, which profiles memory usage (get Heapy from http://guppy-pe.sourceforge.net/#Heapy)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-6481286863039282614?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/6481286863039282614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/08/jsunpack-n-update-great-new-features.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6481286863039282614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6481286863039282614'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/08/jsunpack-n-update-great-new-features.html' title='Jsunpack-n Update v0.1d: Great New Features, Detection, and Other Improvements'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-2218904104731220464</id><published>2009-07-07T07:02:00.001-07:00</published><updated>2009-07-07T12:50:50.517-07:00</updated><title type='text'>Zero-day directshow exploits that don't work with jsunpack, an explanation why</title><content type='html'>Hey guys,&lt;br /&gt;My friend recently was attempting to decode some JavaScript and he sent me the URL to look at. This case reveals that attackers are gaining sophistication because they have a model for blocking researchers from analyzing URLs.&lt;br /&gt;&lt;br /&gt;&lt;a href='http://jsunpack.jeek.org/dec/go?url=222.231.60.19_seraph_door_iisHelp_help.js'&gt;This&lt;/a&gt; is the request. If you download the the non-cached contents of that URL you get three iframes (instead of just one):&lt;br /&gt;&lt;br /&gt;The new iframes contain the directshow 0-day exploit, which is currently unpatched:&lt;br /&gt;&lt;br /&gt;hxxp://guama.9966.org/images/images/chanm.htm [&lt;a href='http://jsunpack.jeek.org/dec/go?url=hxxp://guama.9966.org/images/images/chanm.htm'&gt;analysis&lt;/a&gt;]&lt;br /&gt;hxxp://www.7iai.cn/index.htm [&lt;a href='http://jsunpack.jeek.org/dec/go?url=hxxp://www.7iai.cn/index.htm'&gt;analysis&lt;/a&gt;]&lt;br /&gt;&lt;br /&gt;More information on the vulnerability &lt;a href='http://www.microsoft.com/technet/security/advisory/972890.mspx'&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This is a case for using jsunpack-n, which you can run from your local IP address to decode traffic. It also highlights the importance of not trusting online tools and performing additional verification. In this case, if you had downloaded the contents and submitted them in HTML form (instead of using the jsunpack cached copy) you would have revealed the 0-day exploits.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-2218904104731220464?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/2218904104731220464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/07/zero-day-exploits-blacklist-jsunpack.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/2218904104731220464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/2218904104731220464'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/07/zero-day-exploits-blacklist-jsunpack.html' title='Zero-day directshow exploits that don&apos;t work with jsunpack, an explanation why'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-5399583238653271837</id><published>2009-06-30T12:29:00.002-07:00</published><updated>2009-06-30T13:27:20.935-07:00</updated><title type='text'>Jsunpack-n update: Automatic shellcode detection and other improvements</title><content type='html'>Hey guys, &lt;br /&gt;I just released jsunpack-n version 0.1c. This release introduces JavaScript variable enumeration using a new file "post.js". &lt;a href="http://jsunpack.jeek.org/jsunpack-n.tgz"&gt;get the source code here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check out the new output for the sample-pdf.pcap included in the archive:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$ ./jsunpack-n.py sample-pdf.pcap&lt;br /&gt;[0] decoded 25275 trughtsa.com/img/pfqa.php&lt;br /&gt;[1] decoded 12269 trughtsa.com/img/pfqa.php&lt;br /&gt; identified shellcode of length 1533&lt;br /&gt; XOR key [shellcode]: 33&lt;br /&gt; exploit_watch append [shellcode] http://trughtsa.com/img/uet.php&lt;br /&gt; Match signature [CVE-2007-5659] Collab.collectEmailInfo&lt;br /&gt; Match signature [CVE-2009-0927] Collab.getIcon&lt;br /&gt; Match signature [CVE-2008-2992] util.printf&lt;br /&gt; Match signature [CVE-2009-1493] spell.customDictionaryOpen&lt;br /&gt; Match signature [CVE-2009-1492] getAnnots&lt;br /&gt;&lt;br /&gt; undefined variable s fixing&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Notice how jsunpack-n identified the shellcode, identified that it uses an XOR key of 33, and determined the URL that the shellcode presumably tries to download and execute. This URL is automatically added to the exploit_watch variable, so that a new alert will result if the victim downloads that file.&lt;br /&gt;&lt;br /&gt;Other great features, such as default definitions for undefined variables indicated by the debug output shown above by "undefined variable s fixing".&lt;br /&gt;&lt;br /&gt;Yet another feature, evaluation timeouts will prevent infinite loops and scripts that consume too much time/cpu/memory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-5399583238653271837?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/5399583238653271837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/06/jsunpack-n-update-automatic-shellcode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5399583238653271837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5399583238653271837'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/06/jsunpack-n-update-automatic-shellcode.html' title='Jsunpack-n update: Automatic shellcode detection and other improvements'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-6898134656347094026</id><published>2009-06-24T12:40:00.000-07:00</published><updated>2009-06-24T12:49:40.426-07:00</updated><title type='text'>Jsunpack-n updates for PDF decoding, improved HTTP handling, dynamic JavaScript and Logging</title><content type='html'>Hey everyone,&lt;br /&gt;I released jsunpack-n version 0.1b today (get source code from &lt;a href='http://jsunpack.jeek.org/jsunpack-n.tgz'&gt;http://jsunpack.jeek.org/jsunpack-n.tgz&lt;/a&gt;). While this code is still being released as alpha/unstable, there are some great new features in this edition.&lt;br /&gt;&lt;br /&gt;For example, try to decode the sample-pdf.pcap file included with the distribution and you will notice that I've added not only PDF decoding, but minimal PDF CVE signatures.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$ ./jsunpack-n.py sample-pdf.pcap&lt;br /&gt; decoded 25275 bytes in pdf&lt;br /&gt; [0]   decoded 25275 trughtsa.com/img/pfqa.php&lt;br /&gt; [1]   decoded 7627 trughtsa.com/img/pfqa.php&lt;br /&gt; Match signature [CVE-2007-5659] Collab.collectEmailInfo&lt;br /&gt; Match signature [CVE-2007-5659] Collab.getIcon&lt;br /&gt; Match signature [CVE-2008-2992] util.printf&lt;br /&gt; Match signature [CVE-2009-1493] spell.customDictionaryOpen&lt;br /&gt; Match signature [CVE-2009-1492] getAnnots&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I hope you enjoy all of the new features in this update. As always, I like feedback so send me an email blake_at_jeek_org.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-6898134656347094026?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/6898134656347094026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/06/jsunpack-n-updates-for-pdf-decoding.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6898134656347094026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6898134656347094026'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/06/jsunpack-n-updates-for-pdf-decoding.html' title='Jsunpack-n updates for PDF decoding, improved HTTP handling, dynamic JavaScript and Logging'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-5296613041338490023</id><published>2009-06-07T16:23:00.000-07:00</published><updated>2009-06-07T18:10:18.398-07:00</updated><title type='text'>Very Cool jsunpack-n release: JavaScript Decoding on the Network (The Future)</title><content type='html'>My favorite tools to decode JavaScript today are for security research and often have too little impact because administrators must find URLs, submit them for research, and it requires significant additional effort. There is no current way to detect threats against a real network using these tools in an automatic manner.&lt;br /&gt;&lt;br /&gt;Until now! I started building a tool that is useful to administrators defending networks. The main difference is that it is a completely passive JavaScript decoder to perform Intrusion Detection, by processing network traffic (either an interface or pcap file), rather than URLs.&lt;br /&gt;&lt;br /&gt;I built a basic implementation of this concept as a new version of "jsunpack-network" or (jsunpack-n). Some of the benefits of this technique are:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Tracks streams and decodes Transfer and Content encodings of types chunked and gzip.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Completely passive: Don't need to worry about User-Agents, proxies, or other tricks that attackers use to prevent analysis&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Detect if an exploit is successful: the system monitors all URLs. It can determine if an exploit would fetch another URL and when the client requests that URL, the system knows that the exploit was successful.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The source code for this project is available from &lt;a href="http://jsunpack.jeek.org/jsunpack-n.tgz"&gt;http://jsunpack.jeek.org/jsunpack-n.tgz&lt;/a&gt;. Here is an example output using the test file (included in the jsunpack-n.tgz archive):&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;$ ./jsunpack-n.py sample-http-exploit.pcap&lt;br /&gt;DECODED JavaScript Data&lt;br /&gt;exploit_watch append hxxp://hifgejig.cn/nuc/exe.php&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The exploit_watch variable tracks all URLs to track if an exploit is successful and if it is, then the script prints the associated IP addresses and URLs:&lt;br /&gt;&lt;br /&gt;print 'Exploit Successful ', tcp.addr, ' from URL ', exploit_watch[host+url]&lt;br /&gt;&lt;br /&gt;Since this project is very new, I expect there will be a few issues and therefore you run this at your own risk. I am releasing this code as alpha/unstable, because I think that there is a lot of opportunity to improve it. &lt;br /&gt;&lt;br /&gt;Two of the areas that are completely lacking at this point are&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;signature-based detection&lt;/li&gt;&lt;br /&gt;&lt;li&gt;pdf decoding&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;I am releasing a PDF decoding script with this code, available in the jsunpack-n.tgz archive called "pdf.py"; however, I haven't integrated it with jsunpack-n yet. While this should be a simple task, I'm still testing and improving the PDF decoding, as it now only handles a few of the decoding techniques I'd like it to support.&lt;br /&gt;&lt;br /&gt;Please leave me your comments (good or bad), to improve the project. I haven't fully integrated jsunpack's algorithms yet (I will soon, I promise).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-5296613041338490023?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/5296613041338490023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/06/very-cool-javascript-decoding-on.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5296613041338490023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5296613041338490023'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/06/very-cool-javascript-decoding-on.html' title='Very Cool jsunpack-n release: JavaScript Decoding on the Network (The Future)'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-3628932896662173626</id><published>2009-06-07T16:07:00.000-07:00</published><updated>2009-06-08T07:44:45.994-07:00</updated><title type='text'>Improved Command Line API for jsunpack</title><content type='html'>A few weeks ago Jesse wrote an excellent script which is a command line interface for jsunpack.&lt;br /&gt;&lt;br /&gt;Last week, one reader made some great improvements to this script by allowing you to upload a local file for decoding. It checks each command line argument to see if a local file exists, then if it does it uploads it. Otherwise, it works in the same way as Jesse's original script and just decodes URLs.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;blockquote&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use CGI;&lt;br /&gt;use LWP::Simple;&lt;br /&gt;use LWP::UserAgent;&lt;br /&gt;use HTTP::Request::Common;&lt;br /&gt;&lt;br /&gt;my $ua = LWP::UserAgent-&gt;new;&lt;br /&gt;$ua-&gt;agent("jsunpack");&lt;br /&gt;&lt;br /&gt;for my $url (@ARGV){&lt;br /&gt;        if (-f "$url"){&lt;br /&gt;                if(open(FIN, "&amp;lt; $url")){&lt;br /&gt;                        $url = &amp;lt;FIN&amp;gt;;&lt;br /&gt;                        close(FIN);&lt;br /&gt;                }&lt;br /&gt;                else {&lt;br /&gt;                        print "warning: ignoring '$url', cannot open file\n";&lt;br /&gt;                }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        my $res = $ua-&gt;post(&lt;br /&gt;                        'http://jsunpack.jeek.org/dec/api',&lt;br /&gt;                        Content_Type =&gt; 'application/x-www-form-urlencoded',&lt;br /&gt;                        Content =&gt;&lt;br /&gt;                                [&lt;br /&gt;                                        'url'      =&gt;   [$url],&lt;br /&gt;                                        'apikey'   =&gt;   ['exploitme']&lt;br /&gt;                                ]&lt;br /&gt;                );&lt;br /&gt;&lt;br /&gt;        if ($res-&gt;is_success){&lt;br /&gt;                print $res-&gt;content;&lt;br /&gt;        }&lt;br /&gt;        else {&lt;br /&gt;                print "\n\n"."Failed to fetch remote file"."\n\n";&lt;br /&gt;                print "jsunpack"."\n".$res-&gt;status_line, "\n";&lt;br /&gt;        }&lt;br /&gt;}&lt;/blockquote&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-3628932896662173626?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/3628932896662173626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/06/improved-command-line-api-for-jsunpack.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3628932896662173626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3628932896662173626'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/06/improved-command-line-api-for-jsunpack.html' title='Improved Command Line API for jsunpack'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-3235387964383266420</id><published>2009-05-18T15:46:00.000-07:00</published><updated>2009-05-18T15:59:09.667-07:00</updated><title type='text'>PDF Decoding Bugfix and Open Source from Adobe</title><content type='html'>I fixed a bug today, which was causing some of the scripts to fail decoding.&lt;br /&gt;Basically, the JavaScript contained within a PDF file can be part of a special tag where it escapes special characters like (, ), &amp;, \, and so on. The problem with this is that some of the regular expressions would incorrectly show up like this:&lt;br /&gt;&lt;blockquote&gt;(hOPz).replace(/\\&amp;/g,BiY+(13+20-8))&lt;br /&gt;p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c])&lt;/blockquote&gt;&lt;br /&gt;In those cases, you could make them function correctly by replacing '\\' with a single '\' fixes the problem.&lt;br /&gt;&lt;blockquote&gt;(hOPz).replace(/\&amp;/g,BiY+(13+20-8))&lt;br /&gt;p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This bug has been corrected in any future decodings see examples &lt;a href='http://jsunpack.jeek.org/dec/go?url=martuz.cn_vid__id=2'&gt;here&lt;/a&gt; and &lt;a href='http://jsunpack.jeek.org/dec/go?url=litedownloadfinest.cn_cache_readme.pdf'&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I originally thought this might be related to custom Adobe Reader javascript engine, since Adobe uses a custom version of SpiderMonkey. I would still like to integrate Adobe reader's custom JavaScript engine whenever processing PDF files, however, &lt;a href='http://partners.adobe.com/public/developer/opensource/index.html'&gt;their website&lt;/a&gt; says &lt;br /&gt;&lt;blockquote&gt;In some Adobe products, Adobe uses a modified version of the open source SpiderMonkey code. Use of that source is subject to the Mozilla Public License Version 1.1 (the License). You may obtain a copy of the License on the Mozilla website or in the download files.&lt;/blockquote&gt;&lt;br /&gt;However, read on and you will see "Download files - Coming soon!". There goes that plan! Anyone at Adobe care to comment on when they plan to release this code?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-3235387964383266420?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/3235387964383266420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/05/pdf-decoding-bugfix-and-open-source.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3235387964383266420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3235387964383266420'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/05/pdf-decoding-bugfix-and-open-source.html' title='PDF Decoding Bugfix and Open Source from Adobe'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-2265808476207607721</id><published>2009-05-14T10:04:00.000-07:00</published><updated>2009-05-14T10:12:42.139-07:00</updated><title type='text'>Command Line API for jsunpack</title><content type='html'>Thanks Jesse! &lt;br /&gt;Yesterday, he sent me this script, which takes URLs as parameters then provides the decoding as output. The "api" script does not escape HTML characters whenever the User-Agent is "jsunpack" and the parameter "apikey=exploitme" is set (to prevent accidental accesses of a malicious page).&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;#!/usr/bin/perl -w&lt;br /&gt;use strict;&lt;br /&gt;use CGI;&lt;br /&gt;use LWP::Simple;&lt;br /&gt;use LWP::UserAgent;&lt;br /&gt;use HTTP::Request::Common;&lt;br /&gt;&lt;br /&gt;my $unpackurl = 'http://jsunpack.jeek.org/dec/api?url=';&lt;br /&gt;my $apikey = '&amp;apikey=exploitme';&lt;br /&gt;&lt;br /&gt;my $ua = LWP::UserAgent-&gt;new;&lt;br /&gt;$ua-&gt;agent("jsunpack");&lt;br /&gt;&lt;br /&gt;for my $url (@ARGV){&lt;br /&gt; my $req = HTTP::Request-&gt;new( GET =&gt; ($unpackurl . CGI::escape($url) . $apikey));&lt;br /&gt; my $res = $ua-&gt;request($req);&lt;br /&gt;&lt;br /&gt; if ($res-&gt;is_success){&lt;br /&gt;  print $res-&gt;content;&lt;br /&gt; }&lt;br /&gt; else {&lt;br /&gt;  print "\n\n"."Failed to fetch remote file"."\n\n";&lt;br /&gt;  print "jsunpack"."\n".$res-&gt;status_line, "\n";&lt;br /&gt; }&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;One feature that could improve this script would have it POST the contents of a local file. Does anyone feel like doing some scripting to extend this?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-2265808476207607721?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/2265808476207607721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/05/command-line-api-for-jsunpack.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/2265808476207607721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/2265808476207607721'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/05/command-line-api-for-jsunpack.html' title='Command Line API for jsunpack'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-6841572873391144960</id><published>2009-05-13T21:14:00.000-07:00</published><updated>2009-05-13T21:32:54.657-07:00</updated><title type='text'>Using ClamAV on the command line as an automatic unpacker</title><content type='html'>A few people have asked me about how exactly the automatic unpacking in jsunpack works whenever it finds an executable. Well, here is the answer.&lt;br /&gt;&lt;br /&gt;Take &lt;a href='http://jsunpack.jeek.org/dec/go?url=mxviewworldmy2.com_download_1_1000_5'&gt;this executable&lt;/a&gt; submitted on 05/13/09 as an example:&lt;br /&gt;&lt;blockquote&gt;Sections ( UPX0 UPX1 UPX2  )&lt;br /&gt;File:    MS-DOS executable PE  for MS Windows (GUI) Intel 80386 32-bit, UPX compressed&lt;br /&gt;   Strings:5.com/&lt;br /&gt;   Strings:.NET CLR&lt;br /&gt;   Strings:UNPACKED %sc%sok.com/&lt;br /&gt;   Strings:UNPACKED %sm0%s09.biz&lt;br /&gt;   Strings:UNPACKED %sn%s9.info&lt;br /&gt;   Strings:UNPACKED c:\43214354.bat&lt;br /&gt;   Strings:UNPACKED Us%se%sla/4.0 (compatible; MSIE 7.0; %s; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)&lt;br /&gt;   Strings:UNPACKED http://%s%s&lt;br /&gt;   Strings:UNPACKED c:\win&lt;br /&gt;   Strings:UNPACKED c:\wi%sft%df44.dat&lt;br /&gt;   Strings:UNPACKED %s\jopaxx_%d.exe&lt;br /&gt;   Strings:UNPACKED c:\w%sws\t55ft%df44.dat&lt;br /&gt;   Strings:UNPACKED %s\st_%d.exe&lt;br /&gt;   Strings:UNPACKED %s\yoo_%d.exe&lt;br /&gt;   Strings:UNPACKED %s\lim_%d.exe&lt;br /&gt;   Strings:UNPACKED c:\windows\%s%s.exe&lt;br /&gt;   Strings:UNPACKED reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 00 /f&lt;br /&gt;   Strings:UNPACKED reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 00 /f&lt;br /&gt;   Strings:UNPACKED www.google.com&lt;br /&gt;   Strings:UNPACKED 127.0.0.1&lt;br /&gt;   Strings:UNPACKED Software\Microsoft\Windows\CurrentVersion\Internet Settings&lt;br /&gt;   Strings:UNPACKED tmp_%d_%d.exe&lt;br /&gt;Size:    14848 bytes,&lt;br /&gt;MD5:    78d18e15a1ce15d4869f8db16f4e8642&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;UPX isn't particularly impressive because "upx -d" works fine most of the time, but this method gets a lot of other packed files too. It uses clamscan (from clamav.net) with --leave-temps, then it looks for URLs, Registry keys, domain names, and anything else interesting it could find in the strings. If it finds the same string in the original binary, then it does not display UNPACKED before outputting it. In this way, the analyst can see if it was really hidden or available in the original strings output.&lt;br /&gt;&lt;br /&gt;The --leave-temps method is not perfect, but it has helped me on a number of occassions when I was in a hurry to evaluate the likelihood that a binary was malicious or find the purpose of an unknown binary or large number of malicious samples. In particular, I found it the most useful when it finds an autoit-compiled executable. In those cases, you get the entire autoit script from taking this simple step, which is much easier to quickly analyze.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-6841572873391144960?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/6841572873391144960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/05/using-clamav-on-command-line-as.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6841572873391144960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/6841572873391144960'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/05/using-clamav-on-command-line-as.html' title='Using ClamAV on the command line as an automatic unpacker'/><author><name>jsunpack</name><uri>http://www.blogger.com/profile/16380424012076240146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-7856478168371402344</id><published>2009-05-13T20:37:00.000-07:00</published><updated>2009-05-13T20:42:54.381-07:00</updated><title type='text'>Jsunpack blog online</title><content type='html'>Hey guys,&lt;br /&gt;It's Blake. I finally added a proper blog! Add it to your RSS reader at http://jsunpack.blogspot.com/.&lt;br /&gt;I've been getting some good feedback from users and I plan to add some new features soon. Stay tuned and I'll update you soon on some raw data feeds and command line utilities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-7856478168371402344?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/7856478168371402344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/05/jsunpack-blog-online.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/7856478168371402344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/7856478168371402344'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/05/jsunpack-blog-online.html' title='Jsunpack blog online'/><author><name>jsunpack</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-3005816561722790054</id><published>2009-05-13T20:36:00.002-07:00</published><updated>2009-05-13T20:37:36.735-07:00</updated><title type='text'>Example of malicious site with rogue anti-virus with javascript exploits</title><content type='html'>&lt;h5&gt;[23/Feb/2009:11:10:26 -0500] Interesting JavaScript case here -&gt; &lt;a href="http://jsunpack.jeek.org/dec/go?url=nortonantivirus.antivirus.axspace.com"&gt;link&lt;/a&gt;, looks like a rogue AV that is either infected or spreading exploits too. Send me ones you decode if you think they are interesting (or if they fail too)&lt;/h5&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-3005816561722790054?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/3005816561722790054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/05/example-of-malicious-site-with-rogue.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3005816561722790054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/3005816561722790054'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/05/example-of-malicious-site-with-rogue.html' title='Example of malicious site with rogue anti-virus with javascript exploits'/><author><name>jsunpack</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-5959891438838080965</id><published>2009-05-13T20:36:00.001-07:00</published><updated>2009-05-13T20:36:49.512-07:00</updated><title type='text'>Shmoocon and Presentation Slides (pdf)</title><content type='html'>&lt;h5&gt; [09/Feb/2009:09:37:18 -0500] Shmoocon was lots of fun. Here is a copy &lt;a href="http://jsunpack.jeek.org/BlakeHartstein_Shmoocon_Jsunpack_20090208.pdf"&gt;my talk&lt;/a&gt; on jsunpack. [02/Feb/2009:11:36:39 -0500] Shmoocon! I'll be speaking about jsunpack on Sunday Feb 8 [&lt;a href="http://shmoocon.org/presentations.html"&gt;more&lt;/a&gt;]. Also, brief update - I added meta refresh static crawling to jsunpack this morning.&lt;br /&gt;&lt;br /&gt;&lt;/h5&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-5959891438838080965?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/5959891438838080965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/05/shmoocon-and-presentation-slides-pdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5959891438838080965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5959891438838080965'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/05/shmoocon-and-presentation-slides-pdf.html' title='Shmoocon and Presentation Slides (pdf)'/><author><name>jsunpack</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-8580863068272248601</id><published>2009-05-13T20:35:00.000-07:00</published><updated>2009-05-13T20:36:16.756-07:00</updated><title type='text'>PDF and SWF decoding in jsunpack</title><content type='html'>&lt;h5&gt;[29/Jan/2009:11:26:02 -0500] I added PDF decoding to jsunpack several months ago, and I noticed some exploit toolkits using SWF files to redirect to additional exploit pages recently. Please let me know if you like or dislike the new SWF decoding.&lt;br /&gt;&lt;/h5&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-8580863068272248601?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/8580863068272248601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/05/pdf-and-swf-decoding-in-jsunpack.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/8580863068272248601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/8580863068272248601'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/05/pdf-and-swf-decoding-in-jsunpack.html' title='PDF and SWF decoding in jsunpack'/><author><name>jsunpack</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-408416705712336061.post-5085441710664331953</id><published>2009-05-13T20:34:00.000-07:00</published><updated>2009-05-13T20:35:51.196-07:00</updated><title type='text'>Contact me for samples or data</title><content type='html'>&lt;h5&gt;[09/Jan/2009:00:16:16 -0500] I noticed someone looking for data/logs and they were getting 404 as responses. Please contact me if you would like access to my data - blake_at_jeek.org&lt;/h5&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/408416705712336061-5085441710664331953?l=jsunpack.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jsunpack.blogspot.com/feeds/5085441710664331953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jsunpack.blogspot.com/2009/05/contact-me-for-samples-or-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5085441710664331953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/408416705712336061/posts/default/5085441710664331953'/><link rel='alternate' type='text/html' href='http://jsunpack.blogspot.com/2009/05/contact-me-for-samples-or-data.html' title='Contact me for samples or data'/><author><name>jsunpack</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
