American fuzzy lop
lcamtuf.coredump.cx
lcamtuf.coredump.cx
This page brings me back to a question that I've been having a lot recently: how does one get really good at *nix in this day and age?
It seems like the era of learning on a college mainframe computer is over, and "sysadmining" for hobby and SaaS nowadays projects often totally abstracts the nitty-gritty bits of the OS. Yet these systems still power our computers and servers, and there appears to be a real utility in understanding them well. I run Debian as my daily driver, with a fairly "hardcore" setup without a fancy GUI, but I still feel like I haven't even scratched the surface of my OS. I don't really understand how library linking or process messaging or anything like that works, and I'm not sure how to start learning.
The "problem" now is, *nix has gotten pretty good/stable/justworks(tm).
So the other, more time consuming way, is probably contributing to different areas.
That should force you understand all the different systems better.
My best advice would be, don't overthink it. Take one random thing apart, see how it works, and see if you can break it. Try digging into the inner workings of memory virtualization, or write a "hello world" bootsector in assembly, or figure out how syscalls happen and write your own that does something silly, or design a simple program that injects something into an ELF binary without using any higher-level tools. Or, perhaps, just browse random 2- an 3-section manpages and experiment with what you find.
I, for one, am glad that I don't really _have_ to know all of this. If it does become critical to a component I'm writing, I'm glad to know this stuff, but like a sibling comment said, everything just works. Shoulders of giants and all that, but at the end of the day, what's important is being able to build functional systems, and that's gotten easier.
The good folks Debian build and maintain a solid linux disto, but you need to realize how a linux distro will only teach you the "linux way" of doing things. There are other ways, and of course, other systems. The various BSD operating systems like OpenBSD, FreeBSD, NetBSD, DragonFlyBSD, ArchBSD, BitRig, and so forth all tend to stick a bit more closely to the classic or historic "UNIX way" of doing things.
If the goal is to learn C so you can learn the underlying system code, my choice would be OpenBSD. It's simple, solid, and secure, but the best reason to pick it would be the quality of the code and documentation. It really helps to have reliable code and docs when you're trying to learn, and like all active projects, they keep trying to improve both.
The only reason why I know about the AFL fuzzer is due to the never ending auditing of OpenBSD since some of the OpenBSD developers, like Damien Miller [1] and Jonathan Gray [2], have recently been using AFL to discover and fix bugs.
[1] https://twitter.com/damienmiller/status/534156368391831552
[2] https://www.marc.info/?l=openbsd-cvs&m=141646270127039&w=2
[0] More driver problems are probably good, right? :)
WARNING: some of the demo pages will crash your browser.
More specifically, I want to test against a stack with an API written in C, but the problem is that it is only accessible through code. Code that needs to be flashed to physical hardware before running. A crash in the stack leads to some trigger that can give output, so it's easy to identify a crash. For now, I have made a serialization layer for the API functions, but feel like any fuzzing methodologies would mainly test the serialization instead of the underlying stack.
Is there any tools out there that can do this, or what AFL-fuzz does but on ARM Cortex M running with a debugger?
echo core | sudo tee /proc/sys/kernel/core_pattern ifneq "$(shell echo $$HOSTNAME)" "raccoon"
CFLAGS += -Wno-format
endifThe embedded world really needs some better tooling.