These steps are only for iPhone 3G and 3GS using Modern Firmware(Baseband) v05.11.
iPhone should be connected to usb and latest iTunes should be installed in your Machine.
Step1:Download the latest version of Sn0wbreeze from here for windows.
Step2: Start Sn0wbreeze and select “Simple Mode”.
Step3:Sn0wbreeze will now ask you to browse for your .ipsw file. Select the correct 3.1.3 firmware .ipsw file by clicking the “Browse” button. Sn0wbreeze will verify the selected file.
Step4:Click on "Yes" when Sn0wbreeze asks you “Do you want to activate your iPhone?” for hacktivation. Click on “No” only if you are on an officially supported carrier like AT&T.
Step5:Sn0wbreeze will now create the custom .ipsw file for your iPhone which will be jailbroken.
Step6:Now you will...