Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,928 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,815 people online right now. Registration is fast and FREE... Join Now!




Need to identify vulnerability and exploit it.

 
Reply to this topicStart new topic

Need to identify vulnerability and exploit it.

Lucifer.bits
19 Jan, 2008 - 04:37 AM
Post #1

New D.I.C Head
*

Joined: 19 Jan, 2008
Posts: 1


My Contributions
CODE
int some_function(intx,inty,intz)
{  char buff[5];
    gets(buff);
    return0;
}
intmain()
{  some_function(10,15,20);
   return0;
}


MOD EDIT: Use CODE Tags like this to enclose your code code.gif
User is offlineProfile CardPM
+Quote Post

Israel
RE: Need To Identify Vulnerability And Exploit It.
21 Jan, 2008 - 01:25 AM
Post #2

D.I.C Addict
Group Icon

Joined: 21 Nov, 2004
Posts: 626


Dream Kudos: 175
My Contributions
Well, I don't think they do that sort of thing around here much. But I know one thing for certain, no one here is just going to give you code. Whether its malicious or not, your going to have to at least make an attempt at writing it or no one here is going to help you. I don't see a vulnerability in that code but perhaps someone more 1337 than me could point it out. But are you trying to inject something malicious into that code to make it do something after compiling? Or are you waiting to attack it after it is already in binary form?
User is offlineProfile CardPM
+Quote Post

born2c0de
RE: Need To Identify Vulnerability And Exploit It.
23 Jan, 2008 - 05:51 AM
Post #3

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 4,029



Thanked: 38 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
gets() is prone to buffer overflow.
This can be exploited if more than 5 bytes worth of data is entered through the keyboard.

Usually, the buffer is filled with enough trash bytes so that the neighbouring bytes are overwritten with NOP instructions (0x90) so that control would be transferred to another part of the program. (The latter half of the buffer contains the address that is to receive control)

Read more articles and papers on Buffer Overflows for more information.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/8/09 03:13PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month