During one scene in the upcoming hacker action movie Blackhat, a team is sent into the control room of a burned-out nuclear power plant to gather clues about the evil computer saboteur who sparked its catastrophic meltdown. The investigators, led by a convicted carder sprung from prison to track down the enigmatic perp, take an axe to a server cabinet so they can retrieve a badly corrupted hard drive that ultimately reveals the suspect's true location.

As a way to advance the plot, the 60-second scene is mostly unremarkable. But had computer and security expert Christopher McKinlay not been retained as one of the movie's two hacking consultants, it would have been the kind of Hollywood fare that makes technically savvy viewers groan. Originally, McKinlay said, the screenplay called for the investigators to pull the data off of a perfectly functioning computer. When the 36-year-old—best known for hacking the OKCupid dating site to make him the most popular male user located in Los Angeles—told director Michael Mann electronics don't function in highly irradiated environments, the scene was rewritten to make it more technically accurate. The movie opens Friday.

Method acting

The scene isn't the only example of the pains Mann took to ensure his film portrayed computers and hacking in a realistic light. McKinley provided virtually all of the Unix line commands furiously typed by convicted hacker turned whitehat Nicholas Hathaway as he closes in on his quarry. The protagonist, played by actor Chris Hemsworth, was modeled after Max Butler, aka Max Vision, the security consultant turned credit card stealing hacker profiled in Kingpin, a book written by fellow Blackhat hacking consultant Kevin Poulsen. (Poulsen himself served time in prison on a hacking conviction before becoming a journalist.) Early on in the planning, the director toyed with the idea of Hemsworth becoming a coder himself.

Legendary Pictures



Legendary Pictures



























"Michael Mann was really interested in having Chris learn a lot," McKinlay told Ars. "He originally wanted Chris to be able to type all the Unix commands live during shooting. He said, 'Yeah, just teach him how to program so he can type all this stuff.' That didn't happen, but Chris did learn how to type and [learned] a lot about hacker culture and a little bit about Unix."

The approach was intended to avoid the pitfalls that have visited so many other hacker movies, where crucial plot twists are facilitated through events or technical slights of hand that would never happen in real life. In Blackhat, for instance, the remote access tool used to penetrate the Chinese nuclear plant was used in a separate, seemingly unrelated calamitous hack, adding intrigue and helping to set the plot in motion. That detail has parallels to the real-world hack carried out on Sony Pictures in November, in which the wiping software that destroyed terabytes of sensitive data was seen in previous attacks on South Korean banks and earlier on gas refineries in the Middle East.

Other examples: the bad guys cover their tracks via the open-source GPG encryption software, the investigators use real disassemblers to analyze malware, and the hacks are facilitated by bulletproof hosting providers who cater to criminals with no questions asked.

Beyond using lots of realistic details as the raw materials for the plot, Mann and his crew actively tried to avoid mistakes found in most other hacking movies.

"It's mostly what they don't do," Poulsen said. "The blackhat hacker is portrayed as having significant skills, but hacking doesn't come off as some sort of wizardry that can be used to advance the plot at every turn or solve every problem."

Overwrought details, gratuitous explosions

That's not to say the film's hacking portrayals always have a natural feel. All too often they're overwrought and forced, as is the case in the opening minutes of the movie, when the prison warden grills Hathaway about a hack that has added $900 of commissary credit to every inmate on the character's cell block. Brandishing a smartphone confiscated from Hathaway's cell, the warden takes the convict through the precise hacking technique, including gaining a command shell on the mobile device and using it to access the prison network. At another point, when Hathaway wants to analyze Bluetooth signals in an area frequented by suspected bad guys, he insists on using a phone running Android, as if he's a fanboy more interested in affirming his loyalty to a platform than achieving the task at hand. In both cases, the details feel gratuitous and slow the movie's flow.

And then there are plot devices that are just plain unrealistic. One occurs when Hathaway hacks into an NSA computer with the tacit blessing of the FBI agent and federal marshal supervising the furloughed prisoner. Another happens when Hathaway gains root access to the backend servers of a major bank a mere hour or two after a security guard is tricked into attaching a booby-trapped USB drive to a PC in a bank's reception area.

The irony is that for all of the work Mann devoted to ensuring hacking was portrayed realistically, the film is replete with the same explosions, car chases, and other excesses that populate so many Hollywood movies. Ultimately, the effort doesn't take mainstream viewers inside a never-before-seen hacking world so much as force a handful of miscellaneous commands, apps, and events down their throats. Bringing more realism to hacking is a great thing, but Mann needs to hone his technique.