fortify-source Questions
9
Solved
I am on CentOS 6.4 32 bit and am trying to cause a buffer overflow in a program. Within GDB it works. Here is the output:
[root@localhost bufferoverflow]# gdb stack
GNU gdb (GDB) Red Hat Enterpris...
Yong asked 21/7, 2013 at 17:55
1
Solved
I have this snippet of code (lets name it problem.cpp):
#include <string>
using str = std::wstring;
static str foo(str text = str())
{
text.resize(4);
return text;
}
int main()
{
str a =...
Handgun asked 9/3, 2023 at 19:10
12
Solved
I have heard about a buffer overflow and I would like to know how to cause one.
Can someone show me a small buffer overflow example?
New(And what they are used for?)
Formwork asked 22/2, 2009 at 2:5
2
Solved
Can someone point out the difference between gcc -D_FORTIFY_SOURCE=1 and -D_FORTIFY_SOURCE=2? I guess =2 is more secure? I haven't been able to find a list which lists differences point by point.
...
Obese asked 22/11, 2012 at 17:24
4
Solved
There are some binary buffers with fixed sizes in a program that are used to store data,
and memcpy is used to copy the buffer from one to another one. Since the source buffer may be larger than th...
Noriega asked 31/8, 2012 at 7:6
4
Solved
Since there is an option -fstack-protector-strong in gcc to detect stack smashing. However, it can not always detect stack buffer overflow. For the first function func, when I input a 10 char more ...
Voltammeter asked 30/9, 2013 at 10:12
7
Solved
{
char buf[8];
sprintf(buf,"AAAA%3s","XXXXXXXX");
printf("%s\n",buf);
}
What will happen?
The buffer has 8 characters worth of space and only 3 free characters le...
Putupon asked 26/11, 2010 at 3:11
2
I'm experimenting with buffer overflows and try to overwrite the return address of the stack with a certain input of fgets
This is the code:
void foo()
{
fprintf(stderr, "You did it.\n");
}
voi...
Poop asked 18/12, 2013 at 17:10
2
Solved
I observe that a c++ program uses sprintf, where this sprintf implicitly invokes __sprintf_chk().
This __sprintf_chk() seems to check buffer overflow by examining stack frames.
For my research pur...
Hedva asked 30/8, 2012 at 16:41
4
As part of a course at university in computer security, I'm soon about to learn about buffer overflows and how to use them to as exploits. I'm trying to do some simple buffer overflow with the foll...
Ex asked 13/4, 2011 at 19:59
1
Solved
I was experimenting some security stuff and especially trying to understand a ret2ret exploit.
The code I was experimentating on :
void foo(char * val){
char buffer[64];
int i;
for (i=0; val[i]...
Mechanize asked 1/2, 2014 at 21:51
2
Solved
In my attempt to get "Steam for Linux" working on Debian, I've run into an issue. libcef (Chromium Embedded Framework) works fine with GLIBC_2.13 (which eglibc on Debian testing can provide), but r...
Gershom asked 14/2, 2013 at 16:36
1
I have a small C program to be exploited. And I also understood the logic behind the attack to be performed. However, as much as I try, it is just not working for me.
#include <stdio.h>
#inc...
Pilose asked 16/11, 2012 at 2:27
1
Solved
I have stumbled upon the following problem. The below code snippet does not link on Mac OS X with any Xcode I tried (4.4, 4.5)
#include <stdlib.h>
#include <string.h>
#include <emmi...
Rejuvenate asked 17/10, 2012 at 10:19
5
Solved
I got a homework assignment asking me to invoke a function without explicitly calling it, using buffer overflow. The code is basically this:
#include <stdio.h>
#include <stdlib.h>
voi...
Electrolyze asked 25/2, 2010 at 12:27
1
© 2022 - 2024 — McMap. All rights reserved.