| d | a | t | e | - | R | |||||||||||
| var buffer | var comm | |||||||||||||||
buffercomm and store
results at the end of logfilebuffer onto the end of logfilebuffer and return to Step 1
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.