black hat
[common among security specialists] A cracker, someone bent on breaking into the system you are protecting. Oppose the less comon `white hat' for an ally or friendly security specialist; the term `gray hat' is in occasional use for people with cracker skills operating within the law, e.g. in doing security evaluations. All three terms derive from the dress code of formulaic Westerns, in which bad guys wore black hats and good guys white ones.