I've seen many hacks that simply use amount and repetition to cause a failure in the code somewhere. The basics are:
1. Analyze code in the target computer.
2. Find some code that will break when presented with a contrived data input.
Note this input can be huge and even presented over time with careful timing.
3. Imbed code in your input that does what you want.
4. Hit the target with this input.
5. When the code breaks the computer blithly keeps on running - right into your code.
6. Computer is now running your code with whatever permissions the broken code had or possibly more or even maybe ALL permission (depends on design, cpu etc etc)
Anyway, the quick version. Years ago I remember being amazed at how the memory allocation from repeated calls was tricked into providing unzeroed memory to the process. Guess what? The process assumed the memory would have all zeros. Bham!