RE: Pointers 07-27-2013, 01:42 PM
#11
(04-22-2013, 05:34 AM)ArkPhaze Wrote: We really need to kill all the usage of system() calls in C/C++... I've seen it many times now but I don't think people realize how bad it is, aside from the fact that it limits your binary to Windows only. I would love to have a program that I want to crack, do that.
I know this is an old post, but I just glanced at it and am very confused as to why you say system needs to be killed. The system call is not limited to windows by any means, it's part of libc.
(07-25-2013, 05:00 PM)lady_godiva Wrote: More over the system function can also lead to a quite sophisticated buffer overflow attack.
Just because you call "system()" in your binary, doesn't mean it's vulnerable to a buffer overflow attack. I know you didn't directly say that, but wanted to clear up the confusion. Also, if you do happen to have a bof where the stack isn't executable, meaning you can't place your shellcode on the stack and just return to it and pop a shell, then you will need to "return to libc" via ROP (Return Oriented Programming) and call system with the parameters of your choice. It's actually fairly simple once you see how to do it, maybe I'll write up a post sometime and explain.
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)