[Challenge] Get Shell via BOF 02-17-2014, 09:52 PM
#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$
PM me your attack vector to be added to the list of solvers.
Solvers:
Adorafuck
w00t
tropic
VollPlus
BreShie
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


















![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
















![[Image: F4Z9Dqw.png]](https://i.imgur.com/F4Z9Dqw.png)
