11

The specific question I'm referring to is this: Was my site hacked?

It caught my eye because of the title. Well, that could be just about anything, probably poor server security which wouldn't even be on-topic for our site anyways. Upon inspection of the question, it appears to be more of an "identify this code" type of question asking what it is and where it came from.

My instinct here is still to close it as off-topic, but:

  1. I can't think of a good, solid reason to close it, which may indicate that it is actually on-topic.

  2. It has a very detailed answer which I wouldn't care to even begin reading.

So, what does the community think about this type of question? Keep it or close it? Can anyone think of a way to edit this into shape that it would definitely be on-topic?

  • 2
    I don't see why it's off topic. Would it help to edit the title to something like "Is this code found in my PHP files malicious?" – David Robinson Oct 13 '13 at 16:36
  • 5
    I don't like these types of questions because finding out what the malicious code does has no practical relevance: when you've been hacked, there is a set of steps you need to take to clean up the mess and make sure it doesn' happen again, period. On the other hand, they're good questions from a programming perspective, especially with a great answer like that. – Pekka supports GoFundMonica Oct 13 '13 at 16:44
  • 2
    A more general question about identifying malicious code and more on what to do would be better, I think. We only need one, and this is the latest of… several. – Ry- Oct 13 '13 at 16:51
  • @perhapsPekka how about when someone in the future finds the same or similar malicious code, Googles it, and finds this question? – David Robinson Oct 13 '13 at 17:05
  • 2
    @David but what benefit is there for the Googler? When you find a bomb in your garden, what is more important - learning how to get rid of it, or learning how it works? That's why I don't think the questions are useful. Minitech's idea sounds good. You raise a valid point about Googling, but I'm not sure Stack Overflow is the right place for these kinds of issues. – Pekka supports GoFundMonica Oct 13 '13 at 17:21
12

I'm no mod, or even seasoned user, but it's a well written question with all info needed, and has received a fantastic answer.
I know that doesn't mean it's on topic but to me they've identified the issue is PHP code, and not an unsecured server, network etc.

on-topic page states

  • practical, answerable problems that are unique to software development
  • Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself.

And they've ticked a lot of the other required boxes for a Q to be on-topic.
So while the question seems about a hack/security issue, the root cause is a problem with PHP code which is what they've asked about.

I'd say the title could be better:

Is this PHP code insecure and potential for someone to hack

  • I've gone ahead and improved the question with what I think is a very suitable title. I also updated the questions in the body to try and make it seem more applicable to the wider scope of things in agreement with minitech's comment above. – animuson Oct 14 '13 at 3:26

You must log in to answer this question.

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