 It could be rust or it could be another reaction of the water and the drywall and the paint. It often causes, and the nail, of course, it often causes those sort of blackish stains. In fact, I don't think it is mold in this case, although everyone will probably default to calling it that. I really think it's just a stain that should be easy to fix, but only if you attack it in the right way.