Skip to main content

Questions tagged [buffer-overflow]

Usually occurs when you attempt to copy data into a buffer without checking for sufficient space, causing data to be overwritten in neighboring cells.

buffer-overflow
0 votes
0 answers
58 views

In C, There is no buffer overflow in strings [duplicate]

Whenever we store data more than the memory allocated to variable we got some unexpected results.But I declare a character array (name) with size 5 and get value from the user (greater than 5 ...
Allwin_6's user avatar
0 votes
0 answers
37 views

Issue of readdir() reading the pointer to a directory

The basic logic in this problem is that the program scans over a directory for N times, and does some operation on specific file inside. The bug comes out as: program employs rewinddir() to put the ...
Yuming_J's user avatar
-1 votes
1 answer
57 views

how to debug "*** buffer overflow detected ***: program_name terminated" along with _FORTIFY_SOURCE=2

My program crashes with the message "*** buffer overflow detected ***: program_name terminated", and I suspect it may be related to the compiler option "_FORTIFY_SOURCE=2" that I ...
user180574's user avatar
  • 5,972
2 votes
1 answer
52 views

Broken pipe passing Python output to C++ input due to size

I'm trying to transform an image into a matrix of it's rbg values in c++, i really like the simplicity of PIL on handling different images extensions, so i currently have two codes from PIL import ...
Leonardo Dantas's user avatar
0 votes
4 answers
86 views

Avoiding buffer overflow at scanf using a macro determining string length [closed]

I've got an assignment where I have to acquire a string input whose length must not be greater than, say, 32. This length is given by a macro called MAX_BUF_LEN. I found solutions on StackOverflow ...
truberfighter's user avatar
1 vote
0 answers
37 views

Buffer overflow with gdb: can't print to the stack to identify buffer start

I'm a student trying to solve an exercise for my cybersecurity course. It's the first time I get in contact with buffer overflows, gdb and so on, so not a lot of experience here. I was given a simple ...
rotkehlchen55's user avatar
3 votes
0 answers
51 views

Buffer Overflow Exploit to Redirect Execution to Another Function Causes Segmentation Fault

I am working on a security engineering assignment where I need to create a buffer overflow exploit to change the execution flow of a C program. The goal is to overwrite the return address and redirect ...
Hade Bayaa's user avatar
0 votes
1 answer
44 views

Shellcode stub got exited right after executed in Buffer Overflow Exploitation

I am currently playing around with some exploitation techniques in 64-bit Intel executable. My program was compiled with canary protection disabled (-fno-stack-protector), buffer overflow error ...
Anh Phan's user avatar
0 votes
0 answers
57 views

How do buffer overflows execute instructions on stack?

I have read a bit about buffer overflows, one thing I don't understand is that normally space isn't executable to my knowledge, how can code placed in it be run?
FourierFlux's user avatar
0 votes
0 answers
19 views

How to get notified when programm-code is being written to and to ensure that only programm code gets executed (using unified memory)?

Background: On some microcontrollers memory is split into PMEM (programm memory) and DMEM (data memory) with only PMEM being executable (e.g. instructions can't even be fetched from DMEM). PMEM can be ...
user25100341's user avatar
0 votes
0 answers
9 views

How to use buffer overflow to call function

I have an assignment to use buffer overflow(required) to reach another function: struct name { char name[10]; } void func1() { printf("1"); return; } struct name setup() { ...
Harry K's user avatar
2 votes
1 answer
215 views

Trying to write a pwntools exploit to buffer-overflow a binary

My goal is to buffer-overflow a binary written in C. That binary asks me to input a name. After having opened the binary with Ghidra, I discovered the following code that should help me to build an ...
Julien's user avatar
  • 619
2 votes
1 answer
147 views

The dangers of overflow using sprintf and how to avoid them

I've been using an IDE making calls to the compiler without me having to configure much, but from the options I can see it seems my project is set to use gnu99 for the C Language Standard and gnu++11 ...
rmarques's user avatar
  • 123
0 votes
1 answer
68 views

Writing a application which uses a Buffer Overflow to execute code from within application which is not called normally

For demonstration / educational purposes I want to write a simple proof of concept application which uses a buffer overflow to execute code from within this app which is not called normally. I thought ...
Flavio's user avatar
  • 1
1 vote
1 answer
89 views

Exploiting this code in order to change grade into an A+

#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> /* I obtained access to the professor's grade management program. Can I change my grade to an '...
vivian phung's user avatar

15 30 50 per page
1
2 3 4 5
102