![]() |
How to test Shell-Codes
Continuation of Shell-coding basics..I suggest a glance over it before you start reading this..
TestingWe'll be using a simple C program to accomplish our task. test.c Code:
// #include<stdio.h> we will not be needing this as we are not using any functions from the C library...Just basic logic of Pointers.. This is the basic skeleton of the program...Check the comments...Its quite self-explanatory... Now lets have a look on our obdump :- Code:
aneesh@aneesh-laptop:~/articles/ASM$ objdump -d shell So out set of opcodes will be :- Code:
\x31\xc0\xb0\x01\x31\xdb\xb3\x07\xcd\x80Lets add it to 'test.c' test it Code:
// #include<stdio.h> we will not be needing this as we are not using any functions from the C library...Just basic logic of Pointers.. Code:
aneesh@aneesh-laptop:~/articles/C$ gcc test.c -o test -fno-stack-protectorRunning Code:
aneesh@aneesh-laptop:~/articles/C$ ./test Now lets verify that by knowing our exit status Code:
aneesh@aneesh-laptop:~/articles/ASM$ echo $? |
Re: How to test Shell-Codes
Thanks.. For accepting.. 2 more in the queue...
|
| All times are GMT +5.5. The time now is 12:58. |