Here is the Tutorial for Jailbreak iphone 3.1.2 with blackra1n
WARNING: GeoHot jailbreak supports 3.1.2 do not update if you are on iPhone OS 3.0.1 or 3.0. Warning 3g and 3gs unlockers, do not upgrade to 3.1.2 using iTunes if you want to keep your unlock. Baseband cannot be downgraded. This one is Only Jailbreak not the Unlock. It worked on iphone 2G, 3G, 3GS.
Jailbreak iphone 3.1.2 with blackra1n | TechnoBuzz.net
WARNING: GeoHot jailbreak supports 3.1.2 do not update if you are on iPhone OS 3.0.1 or 3.0. Warning 3g and 3gs unlockers, do not upgrade to 3.1.2 using iTunes if you want to keep your unlock. Baseband cannot be downgraded. This one is Only Jailbreak not the Unlock. It worked on iphone 2G, 3G, 3GS.
Jailbreak iphone 3.1.2 with blackra1n | TechnoBuzz.net