They are on topic.
For all we know the person could be a budding security researcher writing a malicious program to test it out against a system.
Even if they were a malicious actor, the only thing we do by closing these questions is to drive that knowledge underground, or what we call it when other companies do it: Security through obscurity.
So long as they follow the guidelines we set out for every other question, they're welcome.
Robert Harvey has a post about this; and I'm highlighting the portions that apply to this specific type of question:
Your question here is not materially different than the click-fraud one, and the answer is essentially the same: close if it's crap, or if it clearly intends to harm someone else.
That's key: The intent to harm another person (companies are people too, right?).
He goes on to say:
There is, of course, nothing to prevent people from asking general questions about a technique such as injecting code into a DLL. The question you have to ask yourself is this: does the technique have any possible legitimate uses? If you're a white hat, the answer is often "yes," because understanding the technique can help you defend yourself against black hats. (emphasis mine)
That's the key question to ask when deciding whether to close these questions:
does the technique have any possible legitimate uses?
You can't just ask from the perspective of yourself, you also have to ask from the perspective of a 'white hat' hacker.