3 ms·
I personally like the nostarch security books. They published a book recently called "Designing secure software" which is still on my todo list, but based on th
by blub 5y ago
I personally like the nostarch security books. They published a book recently called "Designing secure software" which is still on my todo list, but based on the TOC it has really good breadth. Includes threat modelling, low-level issues, but also how to think about designing secure software or web security.
It might make sense for you to read that, before moving to the specialised books below.
The classic for C++ is Seacord's "Secure coding in C and C++". As for techniques, you'll want a mix of:
* design (using smart pointers, taking advantage of array, vector and string, using optionals, atomics, etc)
* compiler flags (gcc can for example make integer overflows which are normally undefined behaviour defined by wrapping)
* static analysis (e.g. clang static analyser, clang-tidy, many commercial products)
* dynamic analysis (e.g. the clang/gcc sanitizers or whatever VC++ is offering nowadays). They work well together with automated tests.
* code review. It's extremely helpful to have an experienced engineer review your code.
* fuzzing combined with sanitizers
You'll probably want to read about threat modelling (e.g. Adam Shostack's book), to understand common attacks and how to think about them in relation to your projects.
- starwind 5y agoThanks! I just ordered that book