Some Entertaining Distractions

For the last day of term, some stuff that's more fun than the exercises. This will not be on the exam.

Buffer Over Run Attacks

First of all, look up or get Martin to talk about how the stack works in C. Then read, run and play with the following silly bits of code:

Now have a read of this article, it explains what a buffer overflow attack is, how to cause one and how to avoid them.

Do Not Write Code Like This

The International Obfuscated C Code Contest.

Consider Writing Code Like This

The Underhanded C Contest

Syscalls

Get Martin to explain the basics of what syscalls are and then have a look at intro(2) (man -s 2 intro)