This post will be pretty brief, as there are no significant differences in the solution for abo6.c from other previously covered exercises, while abo7.c and abo8.c are both not exploitable. The latter two exercises demonstrate important concepts regarding the placement of variously defined variables within memory for compiled C code which I’ll outline, but it [...]
Tag Archives: C
Insecure Programming by Example: abo5.c we GOT this…
Introduction I actually solved this one a bit ago, while messing around at the GFIRST 2010 conference in San Antonio. Just now getting around to writing it up. Here is the code for abo5.c: Gera says: ch-ch-ch-changes Use your sixth sense, will you be able to gain control given the possibility of writing wherever you [...]
Insecure Programming by Example: abo4.c POINTER MADNESS
Introduction I love sensational titles. Here is abo4.c: Gera says: oh pointers, pointers! Do you remember when you had problems with * and &? everybody has that kind of problems at least once when learning C, what about poiners to pointers? let’s see… There are a few elements of this that we should go over [...]
Insecure Programming by Example: abo3.c
Updated 03/20/2010 to add an excellent introduction to pointers in C and C++. The theme for this exercise was provided by one of the folks I follow on Twitter. @kpyke: And so sayeth the @pusscat: “If you gave me the source code, I’d just compile it and look at it in a debugger anyways…” This [...]
Insecure Programming by Example: abo2.c, not vulnerable…o rly?
Introduction Note 02/13/2010: This post has been a long time coming (started on 01/15 I think), I’m sorry for the delay. At first, it took me a while to (SPOILER, YOU WILL DIE ALONE) find out that abo2.c was not exploitable under x86 due to the exit() call…I saw this immediately, but it took me [...]
Insecure Programming by Example: Advanced Buffer Overflows 1
Introexecuduction Ok, after a nice break, I’m ready to…break . I have a couple of Python related posts in my docket, but today we’re going to start work on the next exploit exercises by Gera in his Insecure Programming by Example series, Advanced Buffer Overflows! I hope they aren’t too advanced. This should be refreshing [...]
Insecure Programming by Example: shellcode & stack5.c
Introduction Now it’s time for Insecure Programming by Example exercise stack5.c, and in the interest of brevity I’ll just go ahead and post the damned thing. So, what’s new in this version…oh wait, if we set the cookie correctly, it prints out “you loose!”…so what the heck are we supposed to do now? The answer [...]
Insecure Programming by Example – controlling EIP, stack4.c
Note: I couldn’t get this exploit to work on Debian 5, I think there must be some overflow protection or something I was working against on top of the ASLR I had already disabled. So I moved to the Hacking; the Art of Exploitation LiveCD, but any much older Linux should work for you (think [...]
Insecure Programming by Example – ruminations on stack3.c
So, last things first on this one, lets get the solution out of the way, and then we can talk about why exactly this challenge was so easy, and how it could be written to teach something. I’m not sure, but I think this one may have been an oversight on gera’s part…either way, let’s [...]
Insecure Programming by Example – gdb debugging & stack2.c
This post will be less detailed than the previous one, mainly because most of the concepts are identical. Here is Insecure Programming by Example stack2.c: As you can see, the only real change is the value of the cookie variable. Seems simple enough, right? We can just send the program “5321″ and be done with [...]