A friend of mine wrote me: "I have designed a rifle that cannot be used for a terrorist attack. It fails to shoot in the instance of it. Other than that it is a good gun. In fact it is the best and a potential gunman is most likely to chose it among others. Here is how my design works..." Any ideas what followed?


closed as off-topic by JBH, Cyn, Measure of despare., Slarty, Tyler S. Loeper Mar 29 at 20:13

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 11
    $\begingroup$ One gun's terrorist is another gun's freedom fighter... $\endgroup$ – AlexP Mar 29 at 0:48
  • $\begingroup$ This was well-covered in the 1973 episode The Slaver Weapon of Star Trek: The Animated Series $\endgroup$ – user535733 Mar 29 at 2:36
  • 3
    $\begingroup$ Unless you can define explicitly how a terrorist would use a gun compared to how the valid gunman would use a gun from the gun's perspective I don't think this question is answerable. I'd presume this boils down to a moral judgement, which you won't have a consistent definition for from society to society, and thus won't be able to encode a universal standard into the gun. And that'd just the decision portion of this problem, not the senors/mechanics. $\endgroup$ – Nex Terren Mar 29 at 3:08
  • 2
    $\begingroup$ This throws up so many philosphical questions -from the perspective of certain groups in the ME, the US military is one big terrorist organisation. Is a terrorist in training a terrorist? Is training the act of a terrorist? Is a deranged person with no discernible motive (Las Vegas) a terrorist? What is top-of-the-line for a terrorist? I think the question massively oversimplifies the human aspect and looks into a over-complex technical solution. $\endgroup$ – bukwyrm Mar 29 at 6:12
  • 1
    $\begingroup$ The only answer I can come up with is some sort of magic that determines intent. Which makes it a story problem. $\endgroup$ – Cyn Mar 29 at 17:08

12 Answers 12


I am afraid your friend's design is bogus, for the simple fact that the "terrorism" is in the eye of the beholder. There are many evidences of groups being called terrorist from one side, and patriots from the other. E.g. all the groups fighting for national independence under the Austro-Hungarian empire were called terrorists from the legitimate government, and were called patriots (and celebrated as such today) from the other side.

Your friend's device therefore would be no better than a gunman trained to discriminate between friend or foe based on visible features (i.e. uniform).

  • 1
    $\begingroup$ Anyone from the Republic of Ireland would say the same thing. The IRA did some pretty terrible things to the British and to the Irish but they still held the title of Freedom Fighters and Patriots to many Irish citizens. $\endgroup$ – GuidingOlive Mar 29 at 15:19
  • $\begingroup$ @GuidingOlive, I purposely used an example from the distant past to avoid raising discussions $\endgroup$ – L.Dutch Mar 29 at 15:23
  • $\begingroup$ A fair point, granted the Good Friday Agreement was over 20 years ago. Time sure does slip by doesn't it. But I do agree with the sentiment. $\endgroup$ – GuidingOlive Mar 29 at 15:25
  • $\begingroup$ @L.Dutch Terrorists use terror to fight where the alternative is peace. Therefore terrorism is used as the only way to have violence, death and destruction, instead of surrender. In a world where terrorism is acceptable, there will be far more violence, death, and destruction than there would be if terrorism was unacceptable. A society with total pacifism is best, a society with conventional war is worse, a society with conventional war plus terrorism is worst. $\endgroup$ – M. A. Golding Mar 29 at 16:33

Fundamentally, this cannot be done. In addition to the moral and philosophical problems, there's a basic information security problem. Essentially, this is that people who own (or are issued) guns spend a lot of time in possession of them. People who steal guns spend as much time as they want in possession of them. During this time the user has total physical access to the gun and any electronics on-board. It's a fundamental principle in information security that you can only delay an attacker with total physical access, not stop them.

If your would-be terrorist knows what they're doing, any electronic means of disabling the gun or restricting its use can be circumvented. Sensors can be fed bogus data, chips can be cut out of the system and replaced with imitators, or the whole thing can be removed while a microprocessor spoofs the needed authorization. There's no particularly advanced techniques required, just a hobbyist ability to tinker with hardware. Software requirements can always be reverse engineered, particularly because your fire-control mechanism must reply to each and every request the attacker makes.

The best you can do is slow them down. Weapons that are new on the market might take weeks or months to be "cracked" the first time. Individual guns that are stolen might take time and tools to unlock that would preclude it being done in the heat of battle, or require terrorists (or suppliers) to set up specialized workshops. But at the end of the day, they will get through eventually.


Impossible edited

"Can't be used" is a restriction and in America, guns must be able to be used anywhere at any time by anyone cause it's their right to guns. Any form of restriction must be fought at all cost and would cause protests and legal challenges. Since guns must be able to used everywhere at anytime by anyone, there is no way to stop terrorists. Things like safety, not being able to be stolen or played with by children or used to shoot up a preschool doesn't matter and isn't a selling feature but is instead a form of evil government control of their legal rights.

For the rest of the world.

A smart gun

See Metal Storm

Metal Storm is a gun system that is electronically controlled. Each bullet is fired via an electrical charge.

Since it's electrically controlled, a smart gun system can be installed to decide if it should fire or not.

Part of the system could include GPS tracking. Part of the purchase involves the manufacturer coding allowable areas. Your home is allowed for home defence. The range is allowed for practice. Hunting areas are also allowed. If you want a new area, it has to be encoded by the manufacturer.

The gun is also locked to the user via palm scanner built in so it can't be used by others. It could also be locked to the total number of bullets per day or per hour so you can't just keep reloading.

It would be as safe a gun as could be made.

  • 2
    $\begingroup$ Still not terrorist proof, if you can reprogram a cellphone into a detonator, you can bypass an electronic safety mechanism. $\endgroup$ – John Mar 29 at 1:47
  • 1
    $\begingroup$ It's not a electronic safety system, it's the whole firing mechanism. Sure you can reprogram a phone but it's made to be reprogrammed and can install software on it. A gun would be set up to be tamper proof. Sure you could replace the electronics but that you be the same as keeping the barrel and replacing the bolt, trigger and receiver in an existing gun which is basically building a new gun. $\endgroup$ – Thorne Mar 29 at 2:04
  • 1
    $\begingroup$ "It is the best and a potential gunman is most likely to choose among others." I don't know what this gunman needs, but if he's a US citizen, and one of the ~5% who conceal carry, you'd need to GPS code "everywhere the gunman goes" or else he'd pick a different firearm to conceal carry with. $\endgroup$ – Nex Terren Mar 29 at 3:04
  • 1
    $\begingroup$ If a gun can be used anywhere, anytime, what's there to stop a terrorist? $\endgroup$ – Thorne Mar 29 at 3:17
  • $\begingroup$ That's a great point, @Thorne, and basically what OP is asking. He needs a gun that is the go-to top-pick for a non-terrorist, but cannot be used in a terrorist attack. OP didn't specify the nation in question, but if it is the US, there's plenty of legal gunmen who conceal carry, and would need it active and ready wherever they go. $\endgroup$ – Nex Terren Mar 29 at 3:23

A gun that achieves the gun mans purpose, while not presenting a generally conceived threat to the safety of those standing around that gunman.

So two points:

  1. A gun that achieves a gunman's purpose
  2. A gun that is of no significant threat to a human


Most gunmen are employed by national militaries, state police, and private security guards. The primary purpose of the gun as viewed by these institutions is to dissuade opposition through the threat of maiming and death. The secondary use case (in the event that the threat fails) is to ensure that the opposition does not oppose for very long by maiming and killing them. There do exist private individuals who are gun men not within these institutions that also hold this view.

The sole difference between national militaries, state police, private security guards; and terrorists, freedom fighters, vigilantes, and gangs; is that the former set are supposedly sanctioned by the governing institutions of the land, and the others are not. What they all have in common is the use of guns to threaten, and actuate - maiming and killing.

Therefor it is the case that any gun not capable of use to threaten or actuate maiming and killing will not be the first choice of gun. The chosen gun could be used to perform a horrific act regardless of wielder. There are even events in history where soldiers have performed terrorist acts in their own country.

Threat to a Human

However for those not interested in maiming and killing humans, who do not want the weapon to ever achieve that outcome, may still want a non-threatening gun.

The next most dangerous gun would be for use against animals. Say farmers, and hunters with a mind to killing the animal.

This might be possible, but there are still challenges...

  • Anything traveling at sufficient speed to defy gravity over 50-200 meters will likely be capable of piercing skin, breaking bone, smashing a windpipe, or literally poking out an eye.
  • A safe fire mechanism cannot prevent a human from walking into the firing path after having been fired, especially if they were occluded from the vision/senses of the firing mechanism.
  • Bullets will smash human skin just as well, perhaps even better than any animals skin. Some of those animals are armoured.
  • Tranquilisers or chemicals designed to kill that could bring down an animal will likely do the same to humans, particularly children.
  • Electrical bullets can still harm individuals by inducing heart-attacks.
  • Anything that surprises, or temporarily disables an individual (be they animal or human) can lead to a chain of events that causes harm to a human. A simple event might be falling over or tipping hot liquid over themselves. A more complex one might require something approaching a slap stick situation with a gruesome outcome.

Unfortunately each of these issues would need to be addressed in order to make a gun that does not represent a threat of maiming or death to a human. I am probably missing a few other key issues, so even if these were all engineered around there are likely more hoops to leap through. These are just at a minimum.


location location location

Only real difference between "a terrorist attack" and general use is the context where they happen. Terrorist attacks happen in populated areas with potential targets, legitimate use happens in areas specifically devoid of those same targets because for legitimate use those targets are not targets but security threats.

So a simple GPS system that detects if the gun is in a area where firing the gun is legitimate for its registered user and only allows firing the gun if it is would be sufficient to prevent almost all "terrorist attacks". You would need to implement an extensive system of gun registration, up-to-date location data database, and a system for securely updating the local copy of the database within the gun.

But people have been talking about such smart gun systems for years. Usually with addition of biometrics for increased security and with a simple ballistic computer and sighting system for improved accuracy.

  • $\begingroup$ I recollect that the location aspect was mentioned by the author of the design, yes $\endgroup$ – Vadum R Mar 30 at 0:25

What followed was a monologue explaining how either the inventor

  • Had misconceptions about what a "terrorist attack" is, or
  • Had atypical opinions about what makes a "good" gun (which they likely need to propagate to others).

The latter seems most likely. The truth is, nobody's concept of a "good" gun is real. It's always an abstraction -- an ideal. And not everybody has the same ideal. But in general, I find the vast majority of gun owners have the following rule: When I pull the trigger, the gun fires. There's variants on this, to handle things like safeties and running out of ammunition and overheating, but fundamentally they want an extraordinarily high probability of the gun firing when the trigger is pulled.

Thus, part of the ideal is that the gun is a tool which is effectively enslaved to the person holding the trigger. This is the origin of the long standing phrase "guns don't kill people, people kill people." While I hope those who use that phrase are very aware of precisely what part a gun plays in a killing, it draws attention to a distinction which many gun owners care about: they make the decision. This is one step more abstract than "the gun fires when the trigger is pulled." This is now "The gun fires if and only if I decide it should fire."

Again, there's room for variation to account for reliability, physical access to the gun, and so on and so forth. But the ideal, crisp and clear as it is, is an "if and only if" clause. More interestingly, it's a rather metaphysical clause. What does it actually mean to say "I decide?" At a neurological level, decision is a terribly mushy complicated process involving sodium ion channels and electrical fields. But when we say "decide," we almost universally have an agreed upon ideal for what that word means. It's such a poignant term that we can have phrasings like "If you choose not to decide you still have made a choice" (You can choose from phantom fears / and kindness that can kill... Sorry, I'll stop now.).

So this forms the fundamental basis for your ideal gun, in a very philosophical sense. Using first order logic phrasing, "The gun will fire if and only if I decide it should fire and it is not used for a terrorist attack." Thus, if a user finds any one hypothetical example where the user decides the gun should fire, is not engaging in a terrorist attack, and the gun didn't fire, then it has failed the ideal. Likewise, if someone finds one hypothetical example where the gun does fire for a terrorist attack, it has failed the ideal.

Let's reduce this one step further. Assume a hypothetical example where the user has decided the gun should fire. This reduces the logic:

If the user has decided the gun should fire:

  • If this is for a terrorist attack, the gun does not fire.
  • If this is not a terrorist attack, the gun fires.

So we clearly need a decision engine on this gun. Now the best answer is to have a small fairy in a cage who has control of a safety. This fairy has a direct-line to some omniscient being which can tell them whether this is for a terrorist attack or not. Sadly, my training program for such fairies has fallen a bit behind schedule... mostly because I haven't found any fairies which wish to be locked in a small cage on a fire arm (and/or I haven't found any fairies in general, but that's another question for another time).

So we almost certainly have to turn to computers. Feed a description of the situation into a computer and have it churn out an answer. Then we just start feeding more and more detail into the computer algorithm until it has enough information to discern the situation.

Sadly, this will not work. There's a major theorem in computer science called Rice's Theorem. It says for any semantic property of a program, the decision whether that property is true or false is undecidable. This can be used to show that whether a particular program can decide whether this is for a terrorist attack or not is undecidable -- meaning it is mathematically impossible to demonstrate that a program can discern a terrorist attack from not.

There's some tricks you can play, of course. If you get all of the terrorists to register ahead of time and wear IFF beacons at all times, that turns the semantic property of a terrorist into a syntactic one ("people wearing IFF beaons"). I tried this too, but strangely enough, terrorists willing to register and wear IFF beacons to prevent them from hurting people are nearly as hard to come by as little fairies.

So this means we cannot rely on a computer to solve this problem, without violating the ideal. We cannot show that any particular program can identify a terrorist attack. Which leaves us with the reality: a person has to make the decision whether this is a terrorist attack or not. Thus a third party must make the decision (I leave it as an exercise to the reader why we cannot trust the user, who may be a terrorist, to decide whether this is a terrorist attack and convey this information to the gun).

So what would be required is some system to permit a trusted third party to view the situation and make a decision. This starts to run afoul of the ideal of "the gun fires when I decide." Making a decision on this magnitude takes time. It's literally on-par with the decision making a judge must make when ruling in a courtroom. The arbiter may need several weeks to fully process the evidence and make a decision. Life evolves faster than that. Consider the bumpersticker, "When seconds count, the police are only minutes away." This is certainly going to run afoul of this ideal.

At least in the United States. This is an opinion issue, after all. In Australia, guns are illegal. It is forbidden for anyone to have a gun except for a few sporting reasons, such as having a .22 target practice rifle if you can demonstrate that you are part of a target shooting sports club. Thus in that country, people's expectations of what a "good" gun does are different. You may be able to manage easier solutions (such as locking up all of the .22's at the gun range rather than letting people take them home).

So likely your inventor friend has some ideas to peddle about how society should operate which have surprisingly little to do with stopping guns in terrorist attacks. But they're not alone. Lots of people have opinions about how society should operate.


Biometrics, register the palm and fingerprints of a person to their gun. Incorporate that into the handle as a scanner. It won't fire for anyone else and will sound an alarm and send GPS coordinates if an unauthorised attempt to use it is made.

  • 1
    $\begingroup$ You might have heard of the US soldier shooting on their comrades in their base. Your proposal would have not stopped that act of terrorism. $\endgroup$ – L.Dutch Mar 29 at 7:24
  • 1
    $\begingroup$ This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review $\endgroup$ – Frostfyre Mar 29 at 12:07
  • $\begingroup$ @Frostfyre are you sure this doesn't answer the OP's question? $\endgroup$ – JBH Mar 29 at 15:51
  • $\begingroup$ @JBH The question asks for a method of preventing a firearm from being used in a terror incident. The answer posted here only prevents Bob from using Joe's firearm. Bob can still use his own firearm in a terrorist incident. $\endgroup$ – Frostfyre Mar 29 at 16:00
  • 1
    $\begingroup$ @Frostfyre, IMO, the answer may be inadequate, but it is a legitimate attempt to answer the question. $\endgroup$ – JBH Mar 29 at 16:08

Consider a variation of an IFF system:
Your gun has a transponder built in, which registers the presence of other guns. This, of course, requires all guns to have an IFF system, otherwise the system won't work.

When you aim an pull the trigger, the gun sends out a narrow beam signal in the direction of the target, querying if they have a firearm. If there is no response, the trigger depression does not fire. Alternately, you can program "friendlies" into the gun's database, and the gun won't fire if the signal response returns friendly.

There is a rather obvious flaw to this system, namely that if the IFF transponder is somehow disabled, the gun owner registers to opponents as unarmed, even though he is carrying a weapon, and most criminals will seek to take advantage of this--better than bulletproof.

  • 1
    $\begingroup$ So, you need an IFF transponder near every target on a range? If so, terrorist steals transponders from a range and puts them on/near doorways and corridors with their intended victims. And how does hunting work? $\endgroup$ – KerrAvon2055 Mar 29 at 8:41
  • 1
    $\begingroup$ @KerrAvon2055: Much easier to disable the transponder in the terrorist's own firearm, as I stated above $\endgroup$ – nzaman Mar 29 at 8:49

Frame challenge: A prospective murderer is looking for a gun to shoot at people. She'll want the best gun there is. Her MO will be to indiscriminately shoot at people from any range, though preferably into larger groups, for as long as she can. Currently this would mean as many guns and magazines and bullets as she can procure and transport. We cannot change the murderer or her preferred MO (in the bounds of this question) - thus we need to change guns. The proposed gun will not shoot when used by a murderer. This, of course, is impossible. So the gun dies not fire at all. For the murderer to still buy it, she needs to think that it is the best gun - so she cannot know it does not shoot. Nobody can know that the gun doesnt shoot, so it has to be neigh impossible to get. 'Best gun' for the murderer includes availability as a measure, so to make this gun top gun, all other guns need to be abysmal and/or unavailable. Some people will be able to get at the jamming gun, so they cannot tell anybody it's not top gun. Marketing needs to focus on 'Its a multiplier for the skill and worthiness of the user' so nobody dares talk about it jamming. Seal Team Six will pose with it, every episode of CSI-x will feature rugged individuals expertly using the top gun to incapacitate Y+1 people, where Y is the ammo capacity.

The murderer will buy it, then proceed to use it. There can be no training with it. So the gun needs to be known to be networked, and every shot centrally registered. The gun also needs to be illegal, otherwise the registering carries no penalty for the murderer.

The murderer now proceeds to her chosen killing field and presses the trigger. It jams. A beacon is deployed for police to pick her up. All this will be sketched up to an unnamed three-letter agency, because no one can know.

tldr: all guns are bad and illegal, with the top gun being marketed as brilliant (though still illegal) while being a dud.


This would be really, really hard. The only plausible way I can think of to do this would be monitoring the brain activity of the wielder to determine their frame of mind (this is possible with modern tech, but difficult and unreliable).

  • Calm, collected: target shooting.
  • Afraid: self-defense
  • Rage: disable weapon
  • Exerted, determined: hunting
  • Depressed: disable weapon

However, the brain reader would require an EEG helmet at the least, so nobody would want to use the gun (oh crap, they're shooting at me: better get out my 10 pound brain scanner helmet!), and the readings would be so unreliable that it would randomly turn off every so often, making it useless.

So you can't make it the best gun on the market and also try the 'scan person' thing. I don't know, maybe in a future setting where crime is nonexistent and firearms are just for hobbyists, this could be a safety feature like the ignition interlock device, mandated by courts to those convicted of unsafe gun use.


The rifle is a paintball gun.

It is completely useless for a terrorist attack. But real gunslingers don't care because they don't kill with their guns, they kill with their hearts.


It's possible that in the next 50 years bio-mechanical implants will exist, and the average person will use the technology to enhance their lives, allowing for a whole new life experience.

Like all technology, these devices will be rooted by savy users, and custom potentially illegal features like overclocking the body might exist. A group of terrorists in the future using a custom OS on their implants, and running at high overclocked speeds would produce a significantly higher body heat then a normal user. If a bullet was manufactured to target a body mass producing higher heat, the anti-terrorist shooter would be able to easily dispatch the "bullet" without fear of a terrorist being able to pick up and use the weapon on non-terrorists because they would have a cooler temp.

  • $\begingroup$ This solution is imperfect, it can be fooled by someone with the flu or holding a chemical hand-warmer or having just finished any strenuous activity (if "overclocking" produced higher temps, it would kill the host). $\endgroup$ – JBH Mar 29 at 18:55
  • $\begingroup$ The terrorists could wear clothing that cooled them and exhausted the heat via radiator, that would allow for an extremely high temp, and critical spot for targeting bullets. $\endgroup$ – Alex Mar 29 at 19:09
  • $\begingroup$ That has nothing to do with the gun (OP's question is only about the gun). $\endgroup$ – JBH Mar 29 at 19:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.