gray hat

Etymology
From being, a mix between and , morally grey/gray. From +. From country and western, where good guys wear white  s with light attire, and bad guys wear black ones with black attire. From fiction, with s and s. From the association of the color white with good and black with evil.

Noun

 * 1)  A morally ambiguous character; an antihero.
 * 2)  A hybrid between a white hat and a black hat hacker, who hacks for no personal gain, and does not have malicious intentions, but does sometimes commit crimes.