manoj9372 wrote: |
have few question in my mind about buffer overflow
i know what is a buffer over flow,but i want to know what actually happens after the buffer gets over flowed can the students in the lab can able to get admin access from a restricted account by using this buffer over flow technique? can any body explain this fact in detail please? And i even seen some buffer-over flow exploits in metasploit,but i want to know the theory behind it... Please feel free to share your toughts here... |
Quote: |
can any body post a simple buffer over flow script to understand this better? |
Code: |
int main(int argc, char **argv){ char buffer[5]; strcpy(buffer, argv[1]); } |
Code: |
(gdb) run AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Starting program: /root/test AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Program received signal SIGSEGV, Segmentation fault. 0x080483d4 in main () Current language: auto; currently asm (gdb) info reg eax 0xbffff35f -1073745057 ecx 0x41414141 1094795585 edx 0x29 41 ebx 0xb7f3eff4 -1208750092 esp 0x4141413d 0x4141413d ebp 0x41414141 0x41414141 esi 0x80483f0 134513648 |
output generated using printer-friendly topic mod, All times are GMT + 2 Hours