What flag should be used when it appears that a user is asking how to program malicious code through stack overflow?

Example Question: String overflowing when concatting

I used the "it needs moderator attention" option and then selected "other", but is this the best tactic?

  • 4
    Include a trojan horse in your example code? His code looks misguided but not malicious (or if it is, he's not very good).
    – user7116
    Mar 22, 2012 at 20:02
  • Perhaps a poor example, but the question is still valid. Say we found a question with comments like "Create a memory overflow and access memory from other applications". "it is not welcome in our community" and "needs moderator attention" could both be used, but I'm not sure which gives it the right degree of exposure. Mar 22, 2012 at 20:45

3 Answers 3


The real question that looms here (and the one you have to ask yourself every time that you raise a moderator flag on a non-obvious issue) is what do you expect the moderator who processes your flag to do about it?

They have a very limited range of options to respond to this category of question, including:

  • Leaving a comment explaining to the asker that it appears their question contains some malicious code, and that this community generally discourages providing help to people attempting to write malware, so they should consider either 1) revising the question to make clear that they're not engaging in malicious behavior, or 2) asking the question on a different website.
  • Closing the question (and if so, for which reason do you think it should be closed?)
  • Instantly deleting the question

As for the first option of leaving a comment, that's probably a good idea, but it's one that you can do yourself without a moderator having to intervene. The moderators are pretty busy handling things that only moderators can do, so regular users are encouraged to help "moderate" the site in ways they can. This is certainly something you can do yourself without moderator intervention, and it's unlikely to mean much more coming from another user than it is coming from a moderator. Which highlights another issue with this tactic: people generally don't read or pay any attention to those messages. Especially people trying to do illicit things...

Regarding the second option of question closure, the same concern applies here as leaving a comment (at least if you have over 3k reputation): you can vote to close questions yourself, without moderator intervention. There's little to no reason to flag a moderator just to close a question. Moreover, selecting this option raises more questions than it answers; namely, which close reason should be selected when the question is closed? Is it "off topic"? "Not constructive"? "Too localized"? Or none of the above?

I think it's pretty obvious why the third option is generally a poor choice. This is pretty heavy-handed moderation, and I think completely unnecessary in cases like this. There are potentially edge cases where it looks like someone is doing something malicious, but they have a perfectly innocuous reason for wanting to do so. Should we just delete those questions outright without giving them a chance to explain and/or revise?

And since closure is the only thing that you require a moderator for, you probably don't need to flag these questions for moderator attention at all. I'm not saying to use your moderator flags sparingly, I'm saying to use them wisely. Moderators have a lot of great tools at their disposal, but they can't work magic, so if you can't imagine what you would ask a moderator to do in response to your flag, it's probably not a good candidate for a flag.

Personally, I would opt to leave a comment (if the question seems like it might have any merit whatsoever, and/or the asker is not a brand-new user to the site) much like the one I allude to above, and then probably cast a vote to close. I used to choose "too localized", which wasn't a perfect fit, but seemed to somewhat adequately capture my objections to answering the question. Now that "not constructive" has been provided as an option across the network, that's usually the one I choose.

The great thing about close votes is that they require the agreement of 4 other users. That keeps everyone relatively honest, and prevents the arbitrary or unfair closure of valid questions. If 5 knowledgeable users think the question is not a good fit for our community, well then it's probably not.

If you don't have close vote privileges, but you feel strongly that a question should be closed because of the topic it concerns, then you should follow Yannis's advice, selecting the "other" option and providing a detailed justification for why the question should be closed.

  • Thanks Cody, some excellent information in here! Mar 23, 2012 at 14:53

I have absolutely no idea if the code in the linked question is malicious or not, but if you think it is then flagging it for moderation attention with a custom message ("other"), is the best course of action. Be very descriptive in your flag message though, if you write something like malicious code your flag will probably be declined.

The moderators will need every piece of information you can fit in the flag message to decide if the question requires moderator intervention.


I would say "it is not welcome in our community" option but currently the text there doesn't really fit:


So right now choosing "Other" is the most fit option and if the text of the "it is not welcome in our community" will be changed e.g. like this:

This question contains malicious code or content that a reasonable person would consider offensive, abusive, or hate speech.

It will be ideal.

  • If you can cram gibberish posts into that definition, then there's definitely room for malicious code as well. Just don't throw it around lightly because there are a bunch of penalties for getting red-flagged.
    – a cat
    Mar 22, 2012 at 20:14
  • @lunboks thanks, guess you're right - and indeed, it must be used with care only for obvious malicious code request. Mar 22, 2012 at 21:26
  • Malicious code isn't considered abusive? I think people take abusive way too literally, like they're "abusing the system." Abusive covers a lot more. The other answer seems more suitable, as you should explain to the moderator that the code is malicious, as it may not always be easy to tell.
    – animuson StaffMod
    Mar 22, 2012 at 22:49
  • @animuson on first glance, malicious code doesn't sound like abuse. But on second look you might be right. Anyway, when it's obvious malicious code (e.g. "please help me write program that send passwords to remote server") no need to explain anything otherwise "Other" and explanation are more proper indeed. Mar 22, 2012 at 23:03

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