0
votes
1answer
33 views

hex code implementation for spawning a shell

I am trying to implement the codes given in smashing the stack for fun and profit by Aleph to learn the basics of buffer overflow attacks. Machine architecture: Ubuntu 12.10 64 bit programs compiled ...
0
votes
2answers
78 views

Buffer overflows on 64 bit

I am trying to do some experiments with buffer overflows for fun. I was reading on this forum on the topic, and tried to write my own little code. So what I did is a small "C" program, which takes ...
5
votes
4answers
127 views

Distinguish between string and byte array?

I have a lot of functions that expect a string as argument, for which I use char*, but all my functions that expect a byte-array, also use char*. The problem is that I can easily make the mistake of ...
3
votes
1answer
74 views

Buffer overflow doesn't run

I try an basic buffer overflow, i overwrite the saved EIP on the stack an jump on to the adress. This adress point to à shell variable who containt my shellcode. But on gdb, program sigserv on the ...
5
votes
1answer
234 views

What is the most hardened set of options for GCC compiling C/C++?

What set of GCC options provide the best protection against memory corruption vulnerabilities such as Buffer Overflows, and Dangling Pointers? Does GCC provide any type of ROP chain mitigation? Are ...
5
votes
2answers
460 views

Why does this memory address have a random value?

I am running linux on i386:x86_64.I've written a piece of c code and I've disassembled it as well as read the registers to understand how the program works in assembly. Below is my c program that I've ...
0
votes
1answer
114 views

will change from <iostream.h> to <iostream> cause buffer overflow?

I need to build some old codes I got on my office computer, which has gcc 4.4.5 installed. I edited the code (deleting .h or adding things like <cstring>) in order to bring them up to date so ...
2
votes
4answers
666 views

Question with stack smashing protection and buffer overflows

Im doing some research on buffer overflows and I was wondering how does stack smashing protection works i have this code: int main( ) { char Buf[16]; printf(“Digite o seu nome: ”); ...
2
votes
3answers
1k views

Disabling ASLR in Mac OS X Snow Leopard

Essentially I want to disable ASLR in Mac OS X Snow Leopard and use gcc todo some buffer overflowing and stack overflows. Anyone know how to disable ASLR?
4
votes
6answers
4k views

How to write a buffer-overflow exploit in GCC,windows XP,x86?

void function(int a, int b, int c) { char buffer1[5]; char buffer2[10]; int *ret; ret = buffer1 + 12; (*ret) += 8;//why is it 8?? } void main() { int x; x = 0; function(1,2,3); ...
10
votes
4answers
10k views

How to turn off gcc compiler optimization to enable buffer overflow

I'm working on a homework problem that requires disabling compiler optimization protection for it to work. I'm using gcc 4.4.1 on ubuntu linux, but can't figure out which flags are are the right ones. ...
0
votes
1answer
691 views

Buffer Overflow Memory Map interpretation

I'm tackling a trivial buffer overflow (yes, exploitation; but unrelated to the problem) I'm trying to figure out the fields in the memory map, when GCC's stack protector is enabled. As an ...