Memory:
d a t e - R
var buffer var comm


logfile:

Time Stamped Name Logger Server Program:
1. listen for input on port 1845
2. read input into buffer
3. execute command comm and store results at the end of logfile
4. write value in buffer onto the end of logfile
5. clear buffer and return to Step 1

Input:



The above illustrates the simplest (and stupidest!) way a service might be vulnerable to a buffer overflow attack. Here's the scenario:

The Time Stamped Name Logger (TSNL) service runs on port 1845. The purpose of the service is to receive a name sent on UDP port 1845 and record to a logfile that name prefaced by a time-date stamp. Above is pseudo-code for a TSNL server program, along with a visualization of how that program executes.