buffer-overflow

Secure C and the universities - trained for buffer overflow

北城以北 提交于 2019-12-04 14:09:09
问题 I recently finished a university course in C. Therefore I lack experience, of course. Some universities tend to teach their students secure programming, or at least some elements. There's even a video (taken from here). Being in C, copying strings, requires - as far as I know - strcpy or string.h functions. How do you use it securely in every-day programming? Do you have some functions, which handle allocation to prevent buffer overflows? There's the CERT secure coding standard for C. It's

What is the difference between STATUS_STACK_BUFFER_OVERRUN and STATUS_STACK_OVERFLOW?

廉价感情. 提交于 2019-12-04 04:10:00
I just found out that there is a STATUS_STACK_BUFFER_OVERRUN and a STATUS_STACK_OVERFLOW. What's the difference between those 2? I just found Stack overflow (stack exhaustion) not the same as stack buffer overflow but either it doesn't explain it or I don't understand it. Can you help me out? Regards Tobias Consider the following stack which grows downward in memory: +----------------+ | some data | | +----------------+ | growth of stack | 20-byte string | V +----------------+ limit of stack A buffer overrun occurs when you write 30 bytes to your 20-byte string. This corrupts entries further

Smashing the stack example3.c confusion

混江龙づ霸主 提交于 2019-12-04 03:08:51
Article can be found here . I'm reading up on smashing the stack and have found myself to be getting stuck on example3.c. 0x80004a3 <main+19>: call 0x8000470 <function> 0x80004a8 <main+24>: addl $0xc,%esp 0x80004ab <main+27>: movl $0x1,0xfffffffc(%ebp) 0x80004b2 <main+34>: movl 0xfffffffc(%ebp),%eax The author indicates that we want to skip from 0x80004a8 to 0x80004b2 and that this jump is 8 bytes; how has the author determined this is 8 bytes? I have recreated the code and sent it through objdump and found that it's not 8 bytes (I am on a 64 bit machine but I've made sure to compile using 32

Is buffer overflow/overrun possible in completely managed asp.net c# web application

杀马特。学长 韩版系。学妹 提交于 2019-12-04 00:58:08
Can there be buffer overflow/overrun vulnerabilities in completely managed asp.net web portal.If yes how can this be tested. Not unless you exploit the webserver or .NET/ASP.NET stack itself. In the general case, you don't need to worry about buffer overruns. This is one of the major advantages of managed code, garbage collection being perhaps the other major advantage. There are a few edge cases that you should be aware of - any time your managed code interacts with unmanaged code (Win32 API calls, COM interop, P/Invoke, etc) there is a potential for buffer overruns in the unmanaged code,

Valgrind giving error but everything seems fine

你。 提交于 2019-12-03 22:10:40
问题 This one seems like a duplicate of my previous post but it is not..... Here Valgrind giving the following error: udit@udit-Dabba ~/mec $ valgrind --leak-check=full sendip -v -p ipv6 -f file.txt -6s ::1 -p esp -es 0x20 -eq 0x40 -ei z30 -eI z100 -p tcp -ts 21 -td 21 ::2 ==4331== Memcheck, a memory error detector ==4331== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==4331== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==4331== Command: sendip -v -p ipv6

Set RTSP/UDP buffer size in FFmpeg/LibAV

半腔热情 提交于 2019-12-03 20:25:11
问题 Note : I'm aware ffmpeg and libav are different libraries. This is a problem common to both. Disclaimer : Duplicate of SO question marked as answered but actually didn't give a proper solution. Insufficient UDP buffer size causes broken streams for several high resolution video streams. In LibAV/FFMPEG it's possible to set the udp buffer size for udp urls (udp://...) by appending some options (buffer_size) to it. However, for RTSP urls this is not supported. These are the only solutions I've

Buffer overflows on 64 bit

谁说胖子不能爱 提交于 2019-12-03 17:23:08
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 character argument and runs until segmentation fault. So I supply arguments until I get a message that I overwrote the return address with "A" which is 41. My buffer character length, in which I copy my input strings is [5]. Here is what I did in gdb. run $(perl -e 'print "A"x32 ; ') Program received signal SIGSEGV, Segmentation fault. 0x0000000000400516 in main (argc=Cannot access memory at address

performing simple buffer overflow on Mac os 10.6

大憨熊 提交于 2019-12-03 16:24:36
I'm trying to learn about stack base overflow and write a simple code to exploit stack. But somehow it doesn't work at all but showing only Abort trap on my machine (mac os leopard) I guess Mac os treats overflow differently, it won't allow me to overwrite memory through c code. for example, strcpy(buffer, input) // lets say char buffer[6] but input is 7 bytes on Linux machine, this code successfully overwrite next stack, but prevented on mac os (Abort trap) Anyone know how to perform a simple stack-base overflow on mac machine? include int main(int argc, char **argv) { char buffer[4]; puts(

Is there any way to bypass SSP (StackSmashing Protection)/Propolice?

爷,独闯天下 提交于 2019-12-03 16:11:57
After some research i haven't found any paper describing method to do this (no even an unreliable one). It seems that SSP (StackSmashing Protection)/Propolice Canary's are a very good security measure for protecting against some buffer overflows. Over the years various Canary implementations have been broken and then made more secure. What is important is that even despite advanced memory protection buffer overflows are still being exploited on Vista, Windows 7 and Fedora 11... One very important thing to mention is that Canary's only protect the function's call frame (which includes the

Why do I get access violations when a control's class name is very, very long?

混江龙づ霸主 提交于 2019-12-03 14:52:56
问题 I subclassed a control in order so I can add a few fields that I need, but now when I create it at runtime I get an Access Violation . Unfortunately this Access Violation doesn't happen at the place where I'm creating the control, and even those I'm building with all debug options enabled (including "Build with debug DCU's") the stack trace doesn't help me at all! In my attempt to reproduce the error I tried creating a console application, but apparently this error only shows up in a Forms