LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Retro

MIT's Multics Cookie Monster Begged for Cookies, Then Hid From the Debugger

C. D. Tavares recalls how a story about a teasing Brown operator became software that reached practically every Multics site, including a classified one at the Pentagon.

Chris lifts the desk lid above a ringing alarm clock and cookie crumbs, with all five digits visible on the hand gripping the lid.
Illustration: LockerGnome

Seth Stein, an MIT freshman from Providence, had a story to tell at Senior House. An IBM computer operator at Brown liked to lock users out of their terminals, then send messages by hand asking for a cookie until they typed “cookie.”

C. D. Tavares heard that and saw a manual process in need of help. “‘Say,’ I immediately thought, ‘this concept cries out for automation!’” Tavares wrote in a 1995 recollection. Every sysadmin has had that thought about a repetitive chore, though usually about backups (usually).

The programming was relatively simple. It got done during a vacation week on an IBM 2741 typing terminal that SIPB, MIT’s student computing group, had recently installed in the dorm for student use. As for the name, Tavares says the inspiration was the annoying “Cookie Bear” from Andy Williams’ 1960s TV show. Sesame Street’s cookie fiend had barely reached the air by 1970, so the blue guy has an alibi.

Planting the thing took some opportunity. Multics had fine security, so a prankster usually had to wait for a victim to walk away from a terminal, then start the program inside that person’s own process. Your coffee break was their deployment window.

Sloppy file permissions offered a nastier route. A tormentor could slip the command into your start_up command file, your abbreviations, or an executable reminder memo. Tavares ranks those hiding places in rising order of how hard they were to find later. A reminder that reminds you to feed a bear is one productivity feature nobody should charge a subscription for.

Then came the clever crumb. Multics let a program set an alarm timer and terminate. When the time arrived, the timer invoked a program exactly as if the user had typed the command. That program could set another timer, and so on, giving the pest as many second helpings as it liked.

Tavares compares it to UNIX cron, with one difference: the only process involved was the user’s own. Picture a scheduled job living inside your login session, back before you had a handy way to list your scheduled jobs.

So the victim sees cookie messages, fires up the debugger, and inspects the stack to find which program is printing them. “It was never there!” Tavares wrote. The program had already finished and left, and the next visit was waiting in the timer queue.

Finding the crumbs

Two handles existed for tracking it down. You could list every initiated segment in your process, which sounds easy until your display is a 133-baud typing terminal. The line printer was available if you could wait until the next day (bring a snack).

The other handle was the timer manager’s chain of pending requests, tucked in the user’s static section. First you had to suspect a timer. Then you had to read that data, and when the cookie program was written there was no tool to find or dump it.

It also got around. With no internet between sites and magnetic tape as the usual way to move software, it still spread from MIT to practically every Multics site in the world. People wrote lookalikes for other machines, including one on the MIT AI lab’s PDP-10. It even reached a high-security classified installation in the Pentagon, where Tavares notes that getting “cookied” was about the last thing you wanted your commanding officer to hear about.

The family recipe

Tavares says at least one publication on computer viruses has named the program as the earliest known example of one. Tavares isn’t sold: “I am not convinced that amused human beings count as a qualifying infection vector.” The author’s caveat belongs on the label, especially since Tavares also warns that much of the old Usenet folklore about the program is probably wrong or exaggerated.

The recipe did travel. In a note dated July 11, 2014, Tom Perrine remembered a variant on GCOS at Honeywell Phoenix around 1978. A card slipped into a batch job’s deck required operator input. The job paused and repeated its demand every few minutes, much like a tape mount request, until the operator typed “cookie.” Some jobs pulled the stunt more than once.

My forecast, with decent confidence: office pranks will keep following the scheduler, because delayed mischief gives the culprit time to look innocent. The Honeywell crew already understood timing. Perrine says their version was a favorite to spring on new operators working their first solo third shift.

Nothing says welcome aboard like a hungry mainframe.

More Retro

Every Retro story →