lackra1n RC3 is by far the fastest and the most complete jailbreaking and unlocking tool for iPhone running on the latest iPhone 3.1.2 firmware. The latest RC3 version includes blacksn0w which can unlock iPhone 3G and iPhone 3GS running 05.11.07 baseband. When iPhone 3.1.x firmware was released, Apple patched the exploit that allowed iPhone users to unlock iPhone’s. As a result, many users who upgraded to the latest firmware were left locked out with 05.11.07 baseband until geohot came to the rescue. Follow the simple step-by-step guide below to jailbreak all iPhone’s (2G/3G/3GS) and iPod touches (1G/2G/3G) on firmware 3.1.2.

Note for iPhone 3G and 3GS Unlockers: If you are looking for iPhone 3.1.2 firmware unlock on 05.11.07 baseband then take a look at the step-by-step guide posted here.
Step 1: Download and install the latest version of iTunes if you haven’t already. (download link given below).
Step 2: You will now need to first update/restore to the original iPhone OS firmware 3.1.2 on your iPhone by using the latest version of iTunes. Download link for iPhone Firmware 3.1.2 is given at the end of the post.

Step 3: Download blackra1n RC3 for Windows or Mac (download link at the end of the post).
Step 4: Start blackra1n app. If you are running it on Windows 7 or Vista, run the app with “Windows XP Compatibility” mode by enabling it from the “Properties” tab to avoid any errors during the jailbreak process.
Step 5: Click on “make it ra1n”:

Step 6: Let the app do its thing and wait for the phone to automatically reboot.
Step 7: You should now have “blackra1n” in the list of applications on your iPhone. Run “blackra1n” app and select the packages you want to install like “Cydia”. This will jailbreak your iPhone or iPod touch on iPhone 3.1.2 firmware.
Step 8: Finally reboot your iPhone. Voila! You should now have fully jailbroken iPhone or iPod touch running on firmware 3.1.2.