Realtime 3-D printing has moved beyond trendy trinkets and has moved into businesses, homes and even the battlefield. Now that military branches have created and tested 3-D printed weapons, Navy submarine-like vessels and even MREs, the conversation around additive manufacturing in the military has turned to securing those assets from cyberattacks.

For years, the biggest challenge within 3-D printing for the military was getting the technology to work in remote locations. Today, 3-D printing can be used to replace parts, create weapons and more — and sometimes by using material found or purchased locally.

“One of our biggest challenges in the Army is there’s a huge logistics burden,” said Dr. Thomas Russell, former director of the U.S. Army Research Laboratory, in a 2014 DoD video interview, “and if we could actually forward deploy manufacturing capabilities and we had the opportunity, we could actually manufacture parts in theater or repair parts.”

The U.S. Army built and tested a 3-D-printed grenade launcher (and even printed the testing grenade) in May — they named the M203 grenade launcher the Rapid Additively Manufactured Ballistics Ordinance, or RAMBO for short. And the U.S. Navy 3-D printed a carbon fiber submersible earlier this year.

If weapons or other essential equipment were regularly created on-site in warfighting zones, a small manufacturing error could mean the difference between a grenade launcher that works and one that jams immediately, killing the operator. Or a submersible that stays air-tight and one that develops a structural weakness and ultimately sinks to the ocean floor.

Those flaws could be introduced in the 3-D printing software by a cyberattack if the printers aren’t equipped with proper cybersecurity, said Nikhil Gupta, New York University associate professor of mechanical and aerospace engineering and an affiliate faculty at the NYU Center for Cyber Security. The possibility of a bug altering a 3-D file, whether intentionally or unintentionally, to the point of making the end product unusable is a real threat.

Hackers could also steal valuable CAD files to reproduce the same items at another location.

“The technology comes at a price, and the price is the possibility of stealing those files or intellectual property or sabotage,” he said.

A study from New York University published earlier this year details some of the vulnerabilities that can lead to dangerous defects in 3-D printing.

“Additive manufacturing is, by its definition, inextricably linked to the digital world. The cyber-physical nature of [additive manufacturing] raises important concerns: [additive manufacturing] enables a globally distributed business model wherein trusted, partially trusted and untrusted parties may be involved in the design and [additive manufacturing] of a part,” the study reads. “Many [additive manufacturing] machines are always connected to the network for possible remote queuing of jobs, diagnostics, and monitoring. This connectivity creates vulnerabilities and opens up possibilities of attack from external parties.”

Danish 3-D printing research company Create It REAL is among the companies creating encryption processes for 3-D printing files to protect them from alteration. By encrypting the file and requiring the decryption to take place at the 3-D printer itself, the risk of alteration is reduced as the file moves from a server to a user’s computer to the printer.

Military operations aren’t the only way 3-D printing hacks could be damaging to the defense industry. After the FBI bought a 3-D printer in 2014 to manufacture bombs, the question was raised about whether explosions from hacked 3-D printers could be a threat, Nextgov reported.

Gupta said some cybersecurity measures for 3-D printing high-value items include creating local interconnected networks, rather than connecting a 3-D printer to the entire internet, and requiring a security key before an item can be printed.

Another, newer method includes adding in an “Easter egg” into the design of an item that can be checked before an item is used to ensure the item isn’t counterfeit. For example, a designer could print their name inside an item that could only be detected with special scans.

“What you can do is somewhere deep inside the part geometry, you can code something that isn’t visible from the outside,” Gupta said. “What people are manufacturing in 3-D printing are usually very high value parts: aircraft parts, spacecraft parts. So to protect those parts you need to have certain strategies.”