Black hat hackers have malicious intent, white hat hackers are ethical hackers identifying vulnerabilities, and gray hat hackers fall somewhere in between.