White Hat
Seen Westworld? The white cowboy hat is indeed symbolic. White hat means something is done ethically...the right way. For instance, “white hat search engine optimization” is SEO following the rules...not trying to “trick” search engines, but rather trying to be actually good enough for search engines to notice, for the benefit of the end-user.
White hat hackers are hackers who are hired by businesses to hack their own systems. White hat hackers help businesses find the weaknesses in their security systems, which helps them close the gaps where black hat hackers could enter and make a big mess.
Nobody likes getting their private info stolen, a sad sack fact that has actually happened at a lot of big companies in the last decade (think: Equifax, Yahoo, Facebook, Home Depot, Google Plus, Starbucks, the State of Texas...check out the data breach list on Wikipedia for all the deets). We could obviously use more white hat hackers (or better ones). The thing is: white hat hackers might be the same people as black hat hackers.
There are also grey hat hackers, who are a cross between white and black hat hackers. Way more interesting story line (retired cop who won't take "no" for an answer). Grey hat hackers steal info, but for a good reason, selling the info to governments and agencies for the public good. Rebels with a cause, doing “bad” for the greater good.