In my opinion, the best way to learn how to write safe code is by learning how attacks work. Build a server and hack the crap out of it. Scan it, compromise it, patch it, and review what the patch did. Learn from others' mistakes! When you see how easy it is to use SQL injection or write a buffer overflow attack, you gain a level of appreciation for the value of "never trust input".
1
02 Aug 2015 18:08
u/Sardasha
in v/programming
In my opinion, the best way to learn how to write safe code is by learning how attacks work. Build a server and hack the crap out of it. Scan it, compromise it, patch it, and review what the patch did. Learn from others' mistakes! When you see how easy it is to use SQL injection or write a buffer overflow attack, you gain a level of appreciation for the value of "never trust input".