LOS ANGELES -- The gunman who killed his wife and four others in a rampage in Northern California this week found an easy way around a court order prohibiting him from having guns: He built his own at home.

Kevin Janson Neal, 44, was armed with what authorities believe were two high-powered rifles that he made himself when he opened fire Tuesday on homes, cars and an elementary school around his tiny hometown of Rancho Tehama Reserve. A deputy finally shot and killed him.

It is the latest case of homemade semi-automatic weapons being used in a crime, and it comes as federal authorities try to draw attention to the dangers posed by these "ghost guns," which contain no registration numbers that can be used to trace them. In Baltimore, a man used a homemade AR-15-style rifle to shoot at four police officers in July 2016. They returned fire, killing him.

Get Breaking News Delivered to Your Inbox

It's legal to build a gun in a home or a workshop, and advances in 3-D printing and milling has made it easier to do that. Kits can be purchased legally for $450 to $1,000 from hundreds of websites without the kind of background check required for traditional gun purchases.

"The more restrictive the laws become for people to purchase firearms, we're going to see those criminal elements build their own," Tehama County Assistant Sheriff Phil Johnston said. "That's what they do."

Kevin Janson Neal Tehama County Sheriff's Office

In Neal's case, he had been ordered to give up all his guns earlier this year under a restraining order that was issued against him after he was charged with assaulting two women who lived nearby. He signed a document in February saying he surrendered a 9 mm handgun to a gun store, which also attested to that. When Neal was arrested, police seized an AR-15 Bushmaster semi-automatic rifle.

During Tuesday's rampage, officials say he chose random targets and stole two vehicles as he moved through town. Officers recovered one semi-automatic rifle and two handguns. One of the stolen vehicles, a white truck with bullet holes in the windshield, was removed from the area Tuesday night, reports CBS News correspondent Jamie Yuccas.

Neal was known to authorities and had at least one prior arrest. His neighbors had complained he had fired multiple rounds for days before Tuesday's deadly incident.

"He's a bad guy and I'm not going to glorify him in any manner whatsoever. He attacked my school," Johnston said.

While making a ghost gun is legal, selling one is not. Federal officials are sounding the alarm about an increasing black market for homemade military-style semiautomatic rifles and handguns.

Mills where guns are built are popping up across the country and especially in California, which has strict gun laws. By 2019, people who own or create homemade firearms in California will have to apply for a serial number from the state and permanently affix it to the weapon.

The critical component in building an untraceable gun is what is known as the lower receiver, a part typically made of metal or polymer. An unfinished receiver -- sometimes referred to as an "80-percent receiver" -- can be legally bought online with no serial numbers or other markings, no license required.

Converting the piece of metal into a firearm is relatively simple and takes only a few hours. A drill press or a metal cutting machine known as a Computer Numeric Control, or CNC, is used to create a few holes in the receiver and well out a cavity. The receiver is then combined with a few other parts to create a fully functioning semiautomatic rifle or handgun.

Ghost guns are increasingly turning up at crime scenes and being purchased from gang members and other criminals by undercover federal Alcohol, Tobacco, Firearms and Explosives agents. It is hard to say how many are circulating on the streets. In many cases, police departments don't even contact the ATF about the guns because they can't be traced.

Cody Wilson, who runs a website and sells unfinished receivers and a CNC machine specifically marketed for making ghost guns, said although there is no legal requirement that he conduct background checks, he tries to take precautions to make sure the weapons aren't used nefariously. For example, he said, he won't sell to foreigners.

Wilson said each month he sells about 175 Ghost Gunner machines for about $1,700 each. Purchasers can use them over and over to mill out their guns. Wilson said most of his customers are gun enthusiasts and survivalists who simply enjoy building their own military-style weapons.

"There's a genuine excitement," he said.

Criminals, though, see the guns as a way to sidestep federal laws that prohibit them from owning guns, said Paul Ware, an attorney with the ATF in Los Angeles.

"The unfinished receiver is a total workaround because the prohibited person doesn't have to provide any identification," Ware said. "You just get it delivered to your home, and you build the exact same gun you could have bought at the store."

Some illegal gun mills provide one-stop shopping -- they build the guns and sell them on site, Ware said.

Anthony Keeling operated a business out of a motorcycle shop in Riverside where he finished receivers and illegally sold them, authorities said. Keeling pleaded guilty to federal charges earlier this year and was sentenced to four months in prison.

In another case, a business tried to skirt the federal firearms licensing requirements by claiming it was selling barbeques and giving away ghost guns free with each purchase.

"It was like a parting gift," Ware said. "Instead of beans and a hotdog, you were getting an AK" rifle.