Sometimes there are questions from people with obvious illegal or at the very least ethically questionable goals. Such as this one from a guy who seems to be trying to write some malware:

How can I run an executable from RAM using C++?

Should SO be used for such purposes? If not, then there should be close option for such questions (something like "Illegal content").

I understand this is a sensible topic since it is verging on Internet censorship (which I usually do not approve), but I also think that there are cases (such as this one) which are severe enough to warrant closing the question.


8 Answers 8


Actually, I think NO is the best answer to this question. I already think that the moderators are a bit heavy-handed here. Down-votes will get the point across without stifling discussion.

1- The community should note (in responses or in edits) any legal or ethical boundaries that may be crossed. It is quite possible that the questioner does not know of the problems with the desired actions or results.

2- Closing/deleting is the SO equivalent of putting one's head in the sand. Better to discuss the bad stuff and note that it is bad then to pretend it isn't there.

3- Getting into someone's head and being certain of motives is virtually impossible. It quickly goes from conclusion to assumption, presumption and speculation.

4- It is not illegal or unethical to talk (generally) about things that might themselves be illegal or unethical, at least not in the the country where this site is running.
--> It is fine to discuss how one might successfully rob a bank. It is illegal to seriously discuss specifically robbing 1st National Bank next Monday.

5- One of the reasons that rational discussion is becoming increasingly difficult nowadays is because of a hyper-sensitivity to offense. One does not have the right to not be offended. Feeling offended does not give one the right to offend back, or to act to squelch the discussion.


You know as much as I would like to punch the crap out of anyone who writes malware, it is still a valid programming question. He didn't mention malware, but there is a chance he just wants to learn the limits of programming. I would think most programmers would want to know their limits and what is possible. I personally do. It is not for sure malware, so we can't make assumptions. I think the downvotes will suffice for now.

As always, flag any comment, answer, question you might have concern over so it will bring moderator attention. We love our hard working moderators.

  • Unfortunately downvotes do not really work here since the post's author has just one point anyway. Commented Aug 27, 2009 at 14:28
  • 1
    Downvotes are intended to be more than just a "rep decrease". They also show the community view on the quality/content of the question. User Rep is just an extra feature of the site. A good portion of the questions ever asked are 1 rep users.
    – Troggy
    Commented Aug 27, 2009 at 14:38
  • IMHO Programmers should know their "limits". You can't be a good one without knowing them. Don't forget to test those extreme cases! ;)
    – Troggy
    Commented Aug 27, 2009 at 15:14
  • 1
    Shoot, maybe he is in a secure coding or network security class and was given a problem. We have no way know what his true intentions are unless he stated them.
    – Troggy
    Commented Aug 27, 2009 at 15:18
  • He has been asked to state his reasons already. That's the only question he has ignored so far, so I guess his reasons are not good... Commented Aug 27, 2009 at 15:22

I think the close options as they exist now are sufficient for this. The global nature of the Internet would come into question here. Who's laws are you basing "illegal" on?

  • 2
    You are right, the reason should rather be "Ethically questionable intent". Commented Aug 27, 2009 at 14:29
  • 1
    Yikes, that's even broader than "illegal"...
    – squillman
    Commented Aug 27, 2009 at 14:38
  • questionable intent? That is like 2 layers of assumptions, possible assumptions of assumptions.
    – Troggy
    Commented Aug 27, 2009 at 14:41
  • So what would you do about someone asking about good basic software architecture for a botnet that can be used for DNS attacks? Or an application that is supposed to send spam so that it passes most spam checks? I know that people from all kinds of cultural and legal regions participate on SO, but I still think there must be some common moral ground for everyone who participates. Even if these cannot be exactly defined, I still think there should be borders. Commented Aug 27, 2009 at 14:55
  • As long as it is programming related code questions and nothing links to anything questionable/illegal content on the web.
    – Troggy
    Commented Aug 27, 2009 at 15:00
  • I'd state my opinions of the question clearly in comments, vote to close as spam and, if you want to take it further, flag it for moderator attention. In your example it's pretty clear what the community thinks of the question.
    – squillman
    Commented Aug 27, 2009 at 15:08
  • In this case, it could be that he is writing a self updating application (so you need to spawn something to replace yourself, which is doable via codedom magic in .Net), and has just worded it poorly Commented Aug 27, 2009 at 15:10
  • ...in other words, I'm assuming good faith, and would excercise my right to vote in this instance... Commented Aug 27, 2009 at 15:10
  • @squillman: But you see that's exactly the problem: You would be voting to close as spam while it isn't really spam. That's why I was asking for a new close option. Commented Aug 27, 2009 at 15:20
  • @squillman -- why the "vote to close as spam"? It certainly isn't spam. IMHO Community opinion is sufficient.
    – tomjedrz
    Commented Aug 27, 2009 at 15:23
  • Guess I just view things like this as a waste and equate it with spam...
    – squillman
    Commented Aug 27, 2009 at 15:36

SO is an international community. In some places, freedom of expression is illegal. Who's ethics would the new SO World Police enforce?

We can already give a big boooo to anyone in the form of downvotes. There's no need for extra vigilante justice.

  • If it's illegal, flag it for moderator attention so that it gets deleted
  • If it's just morally questionable but otherwise valid, I see no problems with it. It's that old "Guns don't kill people" discussion.
  • Besides, I see a few valid uses for his question. Some Exe-Packers and Copy-Protection mechanisms work like that.
  • Why should general discussions of things that are illegal in some places be deleted?
    – tomjedrz
    Commented Aug 27, 2009 at 15:22
  • To protect the owner of the site (StackOverflow, LLC.) from a lawsuit. Commented Aug 27, 2009 at 15:32
  • IMO because we should not support people who are trying to write malware, build spam botnets, conduct DDOS attacks, etc. Commented Aug 27, 2009 at 15:52

I think it would have to be blatantly illegal. The post you referenced could help someone doing something illegal, but then so could any other post. If the post was "where can I get a cracked copy of xxx", then that's another story.


Superuser has a tag for tor. I'd be surprised if tor were legal in all jurisdictions (though I assume you had in mind western democracies' idea of "illegal").


I don't answer questions that are unethical, clearly ill-advised, or offend my sensibilities. What's so hard about that? The same rules and safeguards apply as they do to any other question: vote to close or flag as offensive.

The close reason can be "blatantly offensive." I am not a lawyer, so adding an option to "close as illegal" wouldn't help me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .