SSL Certificates Rant…

It’s May; it’s coming to that time of the year where I have to update my SSL certificate again. As I did last year I had a good look round for an official SSL option. Since I only use it for accessing my own web-mail and a few other toys, I loath the thought of having to pay for it. Even the cheapest I find are still more than $100, which is absolutely ludicrous considering you have to renew it annually.

There may be hope yet though; Startcom.org began a project making themselves a free SSL Certification Authority. Provided you pass their verification tests they will issue you a SSL certificate endorsed by themselves free of charge. Unfortunately, they are not widely known enough to be taken seriously; they haven’t made it into the CA bundle of any major browsers yet.

Their project does look very promising though; they have already issued more than 3,000 server certificates and had more than 14,000 browsers install their CA certificate as a trusted Certification Authority.

My current solution is Do It Yourself SSL. I am my own Certification Authority, meaning I can issue my own server & client certificates. I do however get the annoying SSL nag-screen’s until I manually install my Lobstertech CA certificate into the browser I am using. For the moment this is all I need. I can sit comfortably reading my web-mail knowing its encrypted using 256-bit AES and it didn’t cost me a penny.

[to be continued]

Prolific PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller

I have a generic USB2/IEEE1394 (Firewire) external hard drive enclosure. It is built on the Prolific PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller; this is a record of my recent troubles with it.

Currently it house’s a Maxtor 6 Y130M0 (120Gb) Hard Drive. I’ve found it to be totally unreliable over the firewire interface and only just bearable over the USB interface. The enclosure itself isn’t by any brand and there is no direct customer support for it. I found the following pages while googling.

http://missig.org/julian/blog/2004/06/10/prolific-pl3507…
http://championable.com/2005/01/avoid-prolific-pl3507-chip…
http://www.hollants.com/external_usb_controller_chips.html
http://www.alexking.org/blog/wp-mobile.php?p=1152&more=1

I followed the general advice and downloaded the firmware and various versions of the Flash Utility from:

http://member.newsguy.com/~siccos/PL3507%20Firmware.htm

Basically none of them worked. I used ROMWriter2.0.4.exe and tried the earliest firmware I found: PL3507-0907B.hex. This would go through “Erasing…”, “Writing ROM code…”, “Reading code from ROM…” then would fail with “ROM code verification error.”. I used this version of the tool to successfully copy the firmware off the chip, then re-write it to the chip without problems. I just cant get newer firmware to work.

Currently the chip is on firmware “2003.06.19.241″. I have tried all versions of the Flashing Utility I can find against all versions of the firmware I can find.

Unfortunately this chip appears to be widely used, I was about to buy a replacement enclosure when I found that all of them were using the PL3507 chip.

Next Stop, contacting Prolific

Update: 28th December 2005 – Six months later and Prolific never did reply, in the end I threw away the old enclosure as it was no longer needed. Shame.

Java Snippet – ANT Jar Task

Builds a JAR file Test.jar and generates a manifest specifying that class Test is the Main-Class.

XML:
  1. <target name="dist" depends="dist-clean">
  2.     <jar jarfile="Test.jar" index="true" compress="true">
  3.         <fileset dir="classes"/>
  4.         <fileset dir=".">
  5.             <include name="Test.properties"/>
  6.         </fileset>
  7.         <manifest>
  8.             <attribute name="Built-By" value="Michael Cutler"/>
  9.         <attribute name="Main-Class" value="Test"/>
  10.         </manifest>
  11.     </jar>
  12. </target>

Java Snippet – Using SecureRandom

A better random number generator

JAVA:
  1. import java.security.SecureRandom;
  2.  
  3. ...
  4.  
  5. public static SecureRandom random = null;
  6.  
  7. static {
  8.     try {
  9.         random = SecureRandom.getInstance("SHA1PRNG");
  10.         random.setSeed( random.generateSeed(256) );
  11.     } catch( Exception e ) {
  12.         e.printStackTrace();
  13.     }
  14. }

Java Snippet – Fast File Copy

When using JDK 1.4 and above...

JAVA:
  1. public static void copyFile(File in, File out) {
  2.     try {
  3.         FileChannel sourceChannel = new FileInputStream(in).getChannel();
  4.         FileChannel destinationChannel = new FileOutputStream(out).getChannel();
  5.         sourceChannel.transferTo(0, sourceChannel.size(), destinationChannel);
  6.         // or, you can also copy it this way
  7.         // destinationChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
  8.         sourceChannel.close();
  9.         destinationChannel.close();
  10.     } catch ( Exception e ) {
  11.         e.printStackTrace();
  12.     }
  13. }

Java Snippet – Recursive Directory Deletion

Returns true on success, false on failure:

JAVA:
  1. public static boolean deleteDir(File dir) {
  2.     if (dir.isDirectory()) {
  3.         String[] children = dir.list();
  4.         for (int i=0; i&lt;children.length; i++) {
  5.             boolean success = deleteDir(new File(dir, children[i]));
  6.             if (!success) {
  7.                 return false;
  8.             }
  9.         }
  10.     }
  11.     return dir.delete();
  12. }

Long exposure shot from a moving car

long exposure photograph of a bus moving past the viewpoint


Taken: 11th March 2005 20:47
Exposure Time: 1/2 sec
Aperture: F/3.5
Focal Length: 18mm
Camera: NIKON D70

Innards of a server manipulated in photoshop

innards of a server manipulated in photoshop

Instant Password Recovery Tool

I made this back in April 2004, it only took a couple of hours to write and build the database.

Basically, I took a wordlist of 535,683 words and hashed them in MD5, SHA1 & LANMAN. The results are stored in a simple MySQL table, indexes on that table make lookups REALLY fast and thats about it. You enter the hash you want to lookup, select the type of hash it is *if you know it*, then hit "Look It Up".

The MySQL table is fairly lightweight, 535,683 rows, 48,164 KB total ( 37,030 KB of Data, 11,134 KB of Indexes ).

It's mostly useful for recovering / auditing passwords on web applications like PhpBB & Bugzilla where the database stores unsalted hashes. It found about 90% of the passwords on a PhpBB message board I administer. You can also use it to test Windows NT/2000 passwords provided you've extracted the LANMAN hashes from the system first.

http://lobstertechnology.com/password-recovery/