I will be a little heretical and go out on a limb and say:
- You really need to talk to sysadmin / network users who protect their machines. These people deal with the concept of hacks daily and are always looking for potential exploits to be used against them. For the most part, ignore the "motivational" aspect of how attackers think, since the days of "hacking for fame" are long gone. Focus on the methodology. A competent administrator can easily demonstrate this.
When you write a program, you imagine that (hopefully) a seamless, sleek interface for $ {any-else-accepts-your-programs-I / O}. In this case, it may be the end user, or it may be a different process on another machine, but it does not matter. ALWAYS believe that the “client” of your application is potentially hostile, regardless of whether it is a machine or a person.
Do not believe me? Try to write a small application that takes orders from sellers from sellers, and then a company rule that must be followed using this application, but sellers are constantly trying to get around so they can earn more money. Only this small exercise will demonstrate how a motivated attacker - in this case, the intended end user - will actively seek ways to either exploit flaws in the logic or play the system in other ways. And these are trusted end users!
Multiuser online games are constantly involved in the war against cheaters, because server software usually trusts the client; and in all cases, the client can and will be hacked, as a result, players play the system. Think about it - here we have people who just enjoy themselves and they will use extreme measures to prevail over activities that do not involve making money.
Imagine the motivation of a professional shepherd bot who earns money for a living this way ... writing malware so they can use other people's machines as income generators, selling their botnets at the highest price for massive spam flows ... yes , this really does .
Regardless of motivation, the point remains, your program may and at some point will be attacked. This is not enough to protect against buffer overflows. splitting a stack , executing a stack (data of type "code" is loaded onto the stack, then returning to unload the stack, which leads to code execution), executing data , crossite scripting , privilege escalation , race conditions or other "software" attacks, although this helps. In addition to your “standard” software protection, you also need to think about trust, verification, identification, and credentials — in other words, dealing with what your program input provides and what your program consumes. For example, how to protect against DNS poisoning from a software point of view? And sometimes, you cannot avoid errors in the code - forcing your end users not to translate their passwords to employees is an example.
Include these concepts in a safety methodology, not in a “technology”. Security is a process, not a product . When you start thinking about the “other side” of your program and the methods that you can use to mitigate these problems, it will become much clearer what can go right and what can go horribly wrong.