New Challenge Type

General technological topics without their own forum go here

New Challenge Type

Post by -Ninjex- on Sat Feb 02, 2013 9:50 am
([msg=73235]see New Challenge Type[/msg])

I know this would not be coming anytime soon, even if the idea is liked, as the devs/admins are very busy now.

I was thinking that it would be cool to simulate a Terminal/CLI, and make it interactive; probably by some flash programming. We could use this to create challenges, where the goal would be to do what it takes to gain root access into a target machine, place a root-kit on the machine, gain persistent access to the machine, etc... If you could program the flash script to respond to certain commands and outcomes like a real terminal, it would be a great new set of challenges! When making the challenges, you could do something like these examples (Of course excluding the parenthesis):

1. Figure out what the os for remote host 192.168.1.0 is. (nmap -Pn 192.168.1.0)
2. Gain root access to a Linux Ubuntu machine, the IP is 192.168.1.0 (SSH Not Protected > ssh root@192.168.1.0)
3. Gain root access to a Linux Ubuntu machine, the IP is 192.168.1.0 (SSH Protected > bruteforce the password with a dictionary on our programmed machine, and then ssh into remote host ssh root@192.168.1.0)
etc..

You could use any number like 192.168.1.0 in the example above, and ask for certain things to be done, such as the 3 above. The flash program would simulate a real terminal, although it doesn't do any harm, as it's all programmed to only simulate what would happen in real life.
Just a thought...
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1306
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)


Re: New Challenge Type

Post by 0phidian on Sat Feb 02, 2013 9:02 pm
([msg=73327]see Re: New Challenge Type[/msg])

Cool idea, but why flash? Why not just write a cli app to simulate a teminal in something like c++? In fact that this sounds like a fun project. I may start writing some code. :geek:

Edit:

This is what I have got so far. It's really basic and needs alot of work, but here it is in case you want to use it or work on it. I will probably work on this some more whenever I get a chance(Darn, schoolwork).
Code: Select all
#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main()
{
    const char* commands[] = {
        "", "exit","ls", "pwd"
        };
    string user_input;
    while(1){
        cout << "1337@hts~$ ";
        getline(cin, user_input);

        //Finds the user input in the commands array. commands+number: number must be num of elements in commands array
        int cmdid = find(commands, commands+4, user_input) - commands;

        //Takes number corresponding to element in commands array.
        switch (cmdid){
            case 0: break; break;
            case 1: exit(0); break;
            case 2: cout << "hi.txt" << endl; break;
            case 3: cout << "/home/1337" << endl; break;
            default: cout <<  "Invalid command" << endl; break;
        }

    }
    return 0;
}



-- Sun Feb 03, 2013 11:45 am --

Update:
It's coming along nicely, should done in about a week depending on how much time I have to work on it. When I'm done I'll post the source code somewhere in case anyone wants to use it to make there own challenges.
User avatar
0phidian
Poster
Poster
 
Posts: 269
Joined: Sat Jun 16, 2012 7:04 pm
Blog: View Blog (0)


Re: New Challenge Type

Post by -Ninjex- on Sun Feb 03, 2013 3:44 pm
([msg=73335]see Re: New Challenge Type[/msg])

I love the idea, I compiled it and ran it, it seems to be a great way to make the challenges as well.
I was thinking of flash because you could easily put it on the site without having to make users download a file to run in the terminal, but either way, it seems like it would be great.

I can't wait to see the finished version.
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1306
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests