7

Unix files system related puzzle

This question is about a capture-the-flag exercise. It's on-topic since the point of the exercise is to use various unix features. However, it's too localized in the sense that an answer would only be useful to solve this particular exercise. On the gripping hand, the answer would illustrate some simple unix penetration testing techniques. On the fourth hand (the dummy?), the answer is not discoverable because the question it's on isn't about any kind of repeatable, searchable problem.

I've answered, because, well, I might as well put up a solution somewhere, and illustrate these general concepts. But I am not at all convinced that the question should remain on the site. It could be generalized to ask about penetration testing in general, but then it would become far too broad: there are oodles of potential penetration avenues, this exercise just illustrates a couple.

  • Also thank for the link, I never knew about these types of games/problems before today! meta.security.stackexchange.com/questions/1117/… – slm Sep 21 '13 at 0:43
  • Someone mentioned codegolf, codegolf.stackexchange.com, on another Q on U&L. I was not aware of that SE site (in beta). Does it seem like this type of Q would be more suited to that site? – slm Sep 21 '13 at 5:10
  • +1 for raising a good point. Wish I could give you another for the moties reference :). – terdon Sep 21 '13 at 15:31
  • We don't have a "too localized" close reason anymore :-( – derobert Sep 23 '13 at 14:33
5

The asker initially tried to dance around the CTF situation by paraphrasing it as a philosophical exercise. Which didn't work at all, as the solution was specific to a slightly contrived VM set up. Which is one way the question was too localised.

If someone just asks “succeed at this online exercise” or even “win this CTF, post a transcript”, there's an actual clear goal, which is more fun for answerers, but the goal isn't contained in the question, and succeeding at this goal requires expediency which doesn't make for answers of lasting value. As a guideline, I think questions and answers should both be useful to future participants. Getting a highly specific problem solved is more immediately rewarding but also more selfish.

I would prefer questions that can be judged on their own merits, sufficiently self-contained that one can participate from the question alone, and sufficiently open-ended that answers can also be evaluated with an open mind, rather than letting external factors decide which is canonical.

  • Well said! I'd like to add that we need to strike a balance between what is perceived as a high value Q&A, and Q&A's from real people trying to solve their problems. Often times it's difficult to derive any reuse out of a particular person's Q, since it's often very specific, almost too specific. I think we should welcome both types of Q & A's, otherwise the site runs the risk of becoming nothing more than a glorified Wikipedia to a few museum piece questions, a homage to Unix, rather than a dynamic, growing, and thriving site. – slm Sep 21 '13 at 3:48
4

I think that in this particular case, the question does not belong here, no. I say this despite spending a pleasant few minutes banging my head against that puzzle. The problem is that the solution depends on non-standard tools. There was a specific binary with SUID that returned an SSH key which then could be used to log in to the server.

This is not a a solution that will ever be applicable anywhere else. If it were a puzzle that could be solved using standard tools that one could expect to find on a *nix machine, I would vote to leave it as both helpful and fun. Since this solution is only applicable to this particular VM set up, I would vote to close the question since we (we = @slm and @Gilles who solved it ) are just showing the solution to the quiz without teaching anyone anything that could be applied elsewhere.

So, I would suggest that as a general rule puzzle questions are fine as long as their answer is portable and can be applied to any *nix. If they can only be solved in the context of a specific set-up, then they should be closed. Of course, we can't know that until actually solving the puzzle so it might be hard to identify them before hand.

  • Looking for setuid executables and for SSH keys lying around are repeatable penetration techniques. The thing is, the only relationship between them and the question is the particular way this exercise is set up. I don't see how to phrase the question in such a way that “look for setuid executables and unprotected SSH keys” would be the answer. “How do I penetrate a system?” would be far too broad, and the only way I can find to make it more specific is “how do I penetrate this particular system?” which is non-repeatable. – Gilles Sep 21 '13 at 15:55
2

I see your points but I disagree. I think general concepts as to how to approach these types of questions are valuable to help others learn how to break this type of problem down into discernible parts. I've answered as well and I think others stand to learn from how we both attacked the problem.

These types of question, IMO, are analogous to the types of questions we already field on the site where people ask how to parse text string X from a file. There are literally dozens of these questions, which really could have a single canonical solution, yet we allow them to exist because they each have an inherent value in how someone both approaches the problem and ultimately solves it.

  • You couldn't have picked a worse example than the “type grep for me” category. Frequently rephrased questions push away the rest and make for a depressing front page. – Tobu Sep 21 '13 at 3:22
  • I wasn't referring to the grep variety, I was referring to the awk/sed varieties, where people are trying to parse the text in various ways and sum up the columns or what not. They generally field the most answers per question. – slm Sep 21 '13 at 3:27

You must log in to answer this question.

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