I don't know how to verify a serial number, but what I do know is, you've got a genuine iPhone if it runs iOS. I don't think any other phone could do that easily.
Well, if you're worried, call Apple and ask them to verify it for you, even if you're jailbroken its okay, they can't know without actually seeing your device.(i think)
All the best.
-lawrence