The blacksn0w software unlock utility is now available for unlocking any iPhone 3G and iPhone 3GS that runs iPhone OS 3.1.2 and baseband 05.11 reports an article over on intomobile.
Blacksn0w will even unlock brand new out of the box iPhone 3GS units. For those that are running the earlier version baseband 0.4.26 all you need to do is jailbreak your iPhone and run Ultrasn0w.
However, for those that have baseband 05.11 the guys have a step by step tutorial of how to unlock your iPhone using the blackra1n jailbreak utility, you can use PwnageTool but will require downloading blacksn0w separately. So for that complete blacksn0w tutorial, just follow the link.