Sockets, Shellcode, Porting & Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals

The history of programming languages is short, yet dynamic. It was not that long ago that assembly language was at the cutting edge of computing technology. Programming has come a long way in the years since, incorporating new ideas and technologies, from objects to visual programming tools. Today, there are three main programming paradigms: procedural (e.g., C and Pascal), functional (e.g., Lisp and ML), and object-oriented (e.g., Java, C++, and SmallTalk). Logic or declarative programming (e.g., Prolog) is usually relegated to academic study.
Each paradigm represents a distinct and unique way of approaching and solving problems. Procedural programs may be viewed as a sequence of instructions where data at certain memory locations are modified at each step. Such programs also involve constructs for the repetition of certain tasks, such as loops and procedures. Functional programs are organized into mathematical functions on given inputs. True functional programs do not have variable assignments; lists and functions are all that are necessary to achieve the desired output. Object-oriented programs are organized into classes. Instances of classes, called objects, contain data and methods that perform actions on that data. Objects communicate by sending messages to other objects, requesting that certain actions be performed.
Understanding programming languages is important for both application programmers and security professionals who use and test those applications. Each language has its own security features that must be understood when attempting to crack an application. For example, programmers used to writing buffer overflow exploits for C programs may...