(CNN) -- They dress like allies, but they kill like enemies.
Gunmen wearing Afghan military uniforms turning against coalition troops has been an ongoing nightmare for NATO's International Security Assistance Forces.
It's impossible to tell if or when the next "green-on-blue" attack might occur. But here's what we do know:
How often do these attacks happen?
Such assaults were rare in the first few years of the Afghan War, averaging no more than one a year through 2008, according to the New America Foundation. But after the "surge" of 33,000 U.S. troops in 2009, the number of insider attacks jumped to four.
The attacks spiked in 2012 with 48, according to a Pentagon report. The incidents have declined since then, with 15 attacks in 2013 and two in the first quarter of 2014, as more troops withdraw and coalition forces try new ways of mitigating the attacks.
"Despite this sharp decline, these attacks may still have strategic effects on the campaign and could jeopardize the relationship between coalition and ANSF (Afghan National Security Forces) personnel," a U.S. Defense Department report said.
Who carries out these attacks?
Sometimes it's actual Afghan soldiers or police officers; sometimes it's insurgents such as Taliban militants disguised as Afghan security forces.
The Taliban acknowledged Gen. Greene's killing Tuesday, but hasn't claimed responsibility for it. Pentagon spokesman Rear Adm. John Kirby said officials believe an Afghan soldier was the gunman.
An ISAF official said the group of coalition forces was standing outside, and the attacker shot from inside a nearby building at a distance of about 100 yards.
The Pentagon isn't commenting on the possibility of Taliban involvement, saying the Afghan military and international forces are in the early stages of an investigation.
But the Taliban have claimed responsibility for previous attacks. The terror group even released a video showing how their fighters trained to break through the fence at Camp Bastion, the site of a 2012 assault that left two U.S. Marines dead and six jets destroyed.
NATO said the Taliban militants were wearing U.S. Army uniforms. They also carried automatic rifles, rocket-propelled grenade launchers and suicide vests.
What are the motives?
The intentions can run the gamut.
Witnessing the horrors of war sometimes inspires soldiers to turn against their onetime allies, said Philip Mudd, a CNN counterterrorism analyst and former CIA official.
In 2012, the deadliest year of insider attacks, a Defense Department official said the United States estimated 40% of them were due to Afghan members' own combat or emotional stress, and 15% are a result of intimidation by the insurgency or actually being recruited by it.
The official said about 10% came from impersonators who are not part of the military. But in more than 30% of the assaults, no clear motivations were found.
In many cases, such as in Tuesday's attack, the answer might never be known because the assailant was killed.
How does the Afghan military vet its soldiers?
Military recruits are vetted by their high school grades, an entrance exam, a health screening and biometrics, said Daulat Waziri, deputy spokesman for the Afghan Ministry of Defense.
They must also pass a background check and provide two references who are government employees.
It's still unclear whether the gunman in Tuesday's attack had Taliban ties or whether he slipped through the military's screening process.
"I don't think we should look and make judgments about the vetting process too quickly," Mudd said. "You would think on the surface that maybe he was recruited by the Taliban. That's not necessarily the case."
What about allied forces turning against Afghan civilians?
In March 2012, U.S. Army Staff Sgt. Robert Bales slipped away from the camp where he was stationed and into a village in Kandahar province, where he began shooting at civilians. He returned to the base, reloaded, and went out again to target another village.
He left a trail of blood and gore in both villages, with nine children among the dead. Witnesses claimed the U.S. soldier dragged some bodies of his victims' outside and set them ablaze.
By the end of the rampage, 16 villagers were dead. Bales was charged with murder and eventually sentenced to life in prison.
Bales described his attack as "an act of cowardice" and said he'd taken steroids and drank sporadically.
The Taliban vowed to retaliate "by killing and beheading Americans anywhere in the country."
What can be done to mitigate insider attacks?
Coalition forces have started using what they call "guardian angels," or armed troops who oversee others during meal times and when soldiers are sleeping.
Two years ago, after the deadliest spate of attacks, troops started receiving a fold-up pamphlet called "Inside the Wire Threats - Afghanistan Green on Blue" to help prevent such assaults.
A Defense Department official said it advises troops under attack who have their own weapons on them to "resolve the situation with forces at hand" and not wait for backup. Unarmed troops at meetings or dining halls have been vulnerable in the past, but now, all are carrying their weapons, preloaded with a magazine of ammunition. Weapons must be within arm's reach at all times, according to U.S. military sources.
The pamphlet also offers broad indicators of behaviors by Afghans that could indicate they are a threat, the Defense Department official said.
Things to watch for include complaints about other countries or religions, comments that advocate violence, a personality change, becoming isolated and not wanting to be around others, speaking in favor of radical ideology or showing an undue interest in coalition base headquarters or living quarters.
But Kirby said insider attacks are "a pernicious threat" that are "difficult to always ascertain, to come to grips with ... anywhere, particularly in a place like Afghanistan."
"Afghanistan is still a war zone," he noted.
What's the future of U.S. troops in Afghanistan?
In February, the Obama administration announced it had started planning for the possible withdrawal of all U.S. troops by the end of 2014 if Afghanistan did not sign a security agreement pertaining to rights of U.S. troops operating there.
President Barack Obama called for 9,800 U.S. troops to stay in Afghanistan after the end of 2014, along with some allied forces.
The number would get cut roughly in half by the end of 2015, and a year later the U.S. military presence would scale down to what officials described as a "normal" embassy security contingent.
CNN's Masoud Popalzai, Barbara Starr, Randi Kaye, Emily Smith and Greg Botelho contributed to this report.