All Questions
3 questions
0
votes
1
answer
741
views
Does a segmentation fault in gdb show the physical or virtual address?
I tried to smash the stack:
int main (void) {
int ar[5] = {1,2,3,4,5};
for(int i =0; i<255 ; i++)
ar[i] = 10;
return 0;
}
with gcc -fno-stack-protector somefile.c. First ...
0
votes
1
answer
476
views
Segmentation Fault - finding buffer size
I'm trying to smash the stack and am using the below C code:
#include<stdio.h>
get_inp()
{
char buf[8];
gets(buf);
puts(buf);
}
main(){
get_inp();
return 0;
}
I get the Segmentation fault ...
5
votes
1
answer
677
views
Skipping an instruction using stack smashing
I have been trying to skip an instruction by changing the return address through stack smashing. The following code skips a++ in main and prints an output of "1 3". I have executed this code on a 32-...