Login Register






The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.
Thread Rating:
  • 0 Vote(s) - 0 Average


[Challenge] Get Shell via BOF filter_list
Author
Message
[Challenge] Get Shell via BOF #1
Okay, so this is a very simple challenge.
All you have to do is spawn a shell.
You can not modify the source code
I did not write this code. I found it online.
Compile the code with G++ then run the program.
From there enter your attack vector.
A successful attack vector will result in the following:
sh-3.2$
Spoiler:
Code:
#include <stdio.h>
#include <stdlib.h>

class Test{
public:

Test(){
    command[0] = 'l';
    command[1] = 's';
    command[2] = '\0';
}

void a(){
    scanf("%s", buffer);
    system(command);
}

private:
char buffer[KEYCAP TEN];
char command[KEYCAP TEN];
};

int main(){
    Test aTest = Test();
    aTest.a();
}
PM me your attack vector to be added to the list of solvers.
Solvers:
Adorafuck
w00t
tropic
VollPlus
BreShie
#MakeSinisterlySexyAgain

Reply

RE: [Challenge] Get Shell via BOF #2
Any counter measures we should know about like ASLR, DEP, NX etc?
Unleash the lead from my pistol into my head bumpin' crystal

Reply

[Challenge] Get Shell via BOF #3
(02-21-2014, 07:22 PM)VolPlus Wrote: Any counter measures we should know about like ASLR, DEP, NX etc?

Nah, this is a basic challenge with a simple attack vector. Anyone with basic knowledge of BOF could accomplish this.
#MakeSinisterlySexyAgain

Reply

RE: [Challenge] Get Shell via BOF #4
(02-21-2014, 08:28 PM)Adorapuff Wrote: Nah, this is a basic challenge with a simple attack vector. Anyone with basic knowledge of BOF could accomplish this.

Okay, will give this a go right now.
Unleash the lead from my pistol into my head bumpin' crystal

Reply

RE: [Challenge] Get Shell via BOF #5
EDIT: Wow, the below information is total bullshit. I didn't even read the code and just assumed it was a lame sprintf() like vuln.

Make sure to compile with the proper options to disable all these protections. By default, most systems will turn them on and make this a total bitch.
PGP
Sign: F202 79C9 76F7 40BB 54EC 494F 5DEF 1D70 14C1 C4CC
Encrypt: A5B3 1B21 55E1 80AF 4C6E DE83 467B 8EFC 3DEE 681C
Auth: CD55 E8A5 1A08 2933 8BA6 BC88 D81F 1943 739A 3C47

Reply

RE: [Challenge] Get Shell via BOF #6
(02-21-2014, 08:38 PM)Starfall Wrote: Make sure to compile with the proper options to disable all these protections. By default, most systems will turn them on and make this a total bitch.

It's not necessary in this case.

Reply

RE: [Challenge] Get Shell via BOF #7
I would attempt this if I could even get the script to compile. It's pissing me off, lol.
[Image: F4Z9Dqw.png]

Reply

RE: [Challenge] Get Shell via BOF #8
(02-23-2014, 12:34 AM)BreShiE Wrote: I would attempt this if I could even get the script to compile. It's pissing me off, lol.

What error are you getting when you compile it?

(02-23-2014, 12:34 AM)BreShiE Wrote: I would attempt this if I could even get the script to compile. It's pissing me off, lol.

Yeh, I'm trying to compile it right now, and it's throwing me tons of errors.
(This post was last modified: 02-23-2014, 12:55 AM by Alan Turing.)
Unleash the lead from my pistol into my head bumpin' crystal

Reply

RE: [Challenge] Get Shell via BOF #9
Compile the following using -fpermissive( system expects a const char, not a char ), it's the same code except for the declaration of types.

Code:
#include <stdio.h>
#include <stdlib.h>

class Test{
public:

Test(){
    command[0] = 'l';
    command[1] = 's';
    command[2] = '\0';
}

void a(){
    scanf("%s", buffer);
    system(command);
}

private:
char buffer[10];
char command[10];
};

int main(){
    Test aTest = Test();
    aTest.a();
}

Reply

RE: [Challenge] Get Shell via BOF #10
(02-23-2014, 02:35 AM)w00t Wrote: Compile the following using -fpermissive( system expects a const char, not a char ), it's the same code except for the declaration of types.

Code:
#include <stdio.h>
#include <stdlib.h>

class Test{
public:

Test(){
    command[0] = 'l';
    command[1] = 's';
    command[2] = '\0';
}

void a(){
    scanf("%s", buffer);
    system(command);
}

private:
char buffer[10];
char command[10];
};

int main(){
    Test aTest = Test();
    aTest.a();
}

Thank-you, that worked. Now time to try this. :3
[Image: F4Z9Dqw.png]

Reply







Users browsing this thread: 2 Guest(s)