Newsweek Reports Zombie Invasion

Newsweek.com becomes the latest in a long list of sites that will reveal an Easter egg if you enter the Konami Code (↑, ↑, ↓, ↓, ←, →, ←, →, B, A, enter) correctly. The Konami Code is a cheat code that appeared in many of Konami’s video games, starting in around 1986 (my favorite places to use it were Contra and Life Force, 30 lives FTW). Ostensibly this is probably something that was included by a developer unbeknownst to the powers that be at Newsweek, similar to an incident that happened at ESPN involving unicorns last year.



Enter Konami code, be warned of Zombie attack.


Buried in a file of other Javascript libraries used by the Newsweek site is the Konami Javascript library code written by George Mandis. Within http://www.newsweek.com/etc/designs/newsweek/lib.js is the following Javascript, which looks for the keyboard pattern (↑, ↑, ↓, ↓, ←, →, ←, →, B, A, enter) and replaces content on the page when successful as shown:


/* * Konami-JS ~ * Modified variable names and obscured (March 31st, 2010), but otherwise intact * :: Now with support for touch events and multiple instances for * :: situations that call for multiple easter eggs! * Code: http://konami-js.googlecode.com/ * Examples: http://www.snaptortoise.com/konami-js * Copyright (c) 2009 George Mandis (georgemandis.com, snaptortoise.com) * Version: 1.2 (1/30/2010) * Licensed under the GNU General Public License v3 * http://www.gnu.org/copyleft/gpl.html * Tested in: Safari 4, Firefox 3, IE7 and Mobile Safari 2.2.1 */ var AdDebug = function() { var adDebug= { addEvent:function ( obj, type, fn, ref_obj ) { if (obj.addEventListener) obj.addEventListener( type, fn, false ); else if (obj.attachEvent) { // IE obj["e"+type+fn] = fn; obj[type+fn] = function() { obj["e"+type+fn]( window.event,ref_obj ); } obj.attachEvent( "on"+type, obj[type+fn] ); } }, input:"", pattern:"3838404037393739666513", load: function(link) { this.addEvent(document,"keydown", function(e,ref_obj) { if (ref_obj) adDebug = ref_obj; // IE adDebug.input+= e ? e.keyCode : event.keyCode; if (adDebug.input.indexOf(adDebug.pattern) != -1) { adDebug.code(link); adDebug.input=""; return; } },this); this.iphone.load(link) }, code: function(link) { window.location=link}, iphone:{ start_x:0, start_y:0, stop_x:0, stop_y:0, tap:false, capture:false, keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"], code: function(link) { window.location=link}, load: function(link){ adDebug.addEvent(document,"touchmove",function(e){ if(e.touches.length == 1 && adDebug.iphone.capture==true){ var touch = e.touches[0]; adDebug.iphone.stop_x = touch.pageX; adDebug.iphone.stop_y = touch.pageY; adDebug.iphone.tap = false; adDebug.iphone.capture=false; adDebug.iphone.check_direction(); } }); adDebug.addEvent(document,"touchend",function(evt){ if (adDebug.iphone.tap==true) adDebug.iphone.check_direction(); },false); adDebug.addEvent(document,"touchstart", function(evt){ adDebug.iphone.start_x = evt.changedTouches[0].pageX adDebug.iphone.start_y = evt.changedTouches[0].pageY adDebug.iphone.tap = true adDebug.iphone.capture = true }); }, check_direction: function(){ x_magnitude = Math.abs(this.start_x-this.stop_x) y_magnitude = Math.abs(this.start_y-this.stop_y) x = ((this.start_x-this.stop_x) < 0) ? "RIGHT" : "LEFT"; y = ((this.start_y-this.stop_y) < 0) ? "DOWN" : "UP"; result = (x_magnitude > y_magnitude) ? x : y; result = (this.tap==true) ? "TAP" : result; if (result==this.keys[0]) this.keys = this.keys.slice(1,this.keys.length) if (this.keys.length==0) this.code(this.link) } } } return adDebug; } var adDebugContent = function(){ function render() { $("a").attr("href", "#"); // FEATURE var feature = '<article class="feature-area feature-style-wide"><div class="feature-content"><header><span class="byline" property="dc:creator">MIKE ROBINSON</span><h1 class="header header-60"><a href="#">ZOMBIES ATTACK!</a></h1><span class="subhead">Run for the hills!</span></header><p>The undead have risen from their graves and invaded large portions of the east coast. Driven only by an unsatiable desire for brains, there seems to be no stopping their ruthless push forward. Residents are advised to barricade themselves in their homes and wait for further instructions. Under no circumstances should the walking dead be allowed in your house.</p></div>' $(".feature").html(feature); // NEWSWEEK NOW $(".newsweek-now .par").html(""); var nowHtml = ""; var nowTemplate = '<div class="newsweeknow section"><article class="stream-item" class="stream-item article-item"><h2 class="header" property="dc:title"><a href="#">${title}</a></h2><div class="grid-5"><p class="text" property="dc:abstract">${description}<a rel="dcterm:source" href="#" class="more">More <span class="guillemets">&rsaquo;</span></a></p></div><aside class="grid-2 last"><a href="/search.html?q=tea+party" class="primary-tag" title="Primary Tag" property="dc:subject ctag:label foaf:primaryTopic" typeof="ctag:Tag" resource="/content/newsweek/tag/politics.html" rel="ctag:means">Zombies</a><span class="byline">by <span class="author"><a typeof="foaf:person" property="dc:creator" rel="foaf:publications">${author}</a></span></span><time property="dc:created" pubdate="true" datetime="2010-06-11">Jun 11, 2010</time></aside></article></div>'; for(var i = 0; i < content.now.length; i++){ var template = nowTemplate; var item = content.now[i]; template = template.replace("${title}", item.title); template = template.replace("${description}", item.description); template = template.replace("${author}", item.author); nowHtml += template; } $(".newsweek-now .par").html(nowHtml); // SPECTRUM $(".spectrum h2").html(content.spectrum.title); $(".spectrum a").attr("href", "#"); var spectrumItems = $(".spectrum ul.sidebar-content li"); var j = 0; for(var i = 0; i < spectrumItems.length; i++){ var element = spectrumItems[i]; if(j < content.spectrum.viewpoints.length){ var item = content.spectrum.viewpoints[j]; $(element).find("h3 a").text(item.title); $(element).find("q a").html(item.quote); $(element).find("span.source").text(item.source); $(element).find("cite.publication").hide(); j++; } else { $(".spectrum ul.sidebar-content li").eq(i).remove(); } } } var content = { "now":[ { "title":"The Zombie Invasion Timeline", "description":"It was just three months ago that patient zero, a former British citizen living in New York, was identified as the cause of the zombie invasion. While initially considered to be a bad sinus infection, the disease quickly spread after Patient Zero ate the brains of a attending neurosurgeon.", "author":"Steven Stone" }, { "title":"Fleeing the Zombie Horde: What Are Our Options?", "description":"With goverment barricades falling and traditional warfare tactics deemed ineffective, the local populace must now consider the option of fleeing as viable and advised. There are many options depending on an individuals geographical location, however most zombie experts expressly advise against running for the hills without proper preparation. One must take into consideration the hazardous effects natural elements such as rain and cold weather can have, especially in cold winter months.", "author":"Dan Alcalde" }, { "title":"No End in Sight for Undead Feast", "description":"The haunted continue to walk the streets, often heard moaning 'BRAAAAAIIIIIINS!' [paraphrased]. With their unstoppable quest for human brains the undead have shown no signs in slowing down their pursuit or consumption of our most precious organs. A noted chef suggests, 'While zombies will eat any organ, they most definitely have a preference for our soft cranial tissue. It is easily digestible, and once the tough outer skull is removed quite simple to recover.'", "author":"Roberto Gonzalez" }, { "title":"Go For the Head", "description":"Several close combat experts have reiterated how important it is to strike a zombie directly in the head with a large blunt weapon. Only by smashing their brains can you be certain the approaching undead will not rise again and feast on your exposed limbs.", "author":"Nicole Barth" }, { "title":"Zombies and You", "description":"Not everybody reacts the same to the undead. If you, or a loved one, has encountered a zombie please share your experiences in the comments.", "author":"Monica Parra" } ], "spectrum":{ "title":"Zombie Invasion Continues Unabated", "viewpoints":[ { "title":"SUSPICIOUS", "quote":"I don't see how every barricade could fail unless the government meant to let them through.", "source":"Tim Knight" }, { "title":"DECISIVE", "quote":"If we can't be protected then we'll just protect ourselves!", "source":"Mike Robinson" }, { "title":"FLEEING", "quote":"Save yourselves, run now", "source":"Mark Catalano" }, { "title":"HUNGRY", "quote":"Braaaaaains. Braains brains braaaaaaaaains...", "source":"Dan Alcalde" }, { "title":"BITTEN", "quote":"Wow those things bite hard. Oh, I feel funny...", "source":"Andrew Sprouse" } ] } } return { render: render } }();

Finally

In the case where this happened on ESPN the results were mostly harmless. As explained by developer Keith Lam, the incident was a prank, not an indication that someone hacked into the site (the developer was canned though). It will be interesting to see if Newsweek’s amusing defacement is the same situation.

If so, the only downside to the ESPN unicorns was that it exposed that there is little control over the production environment at ESPN, it was fairly easily for a developer to sneak something into production without anyone knowing about it. Unicorns are funny, a disgruntled person could come up with things to show on the web site that aren’t so funny.

But in both cases, these are harmless jokes, so no harm no foul for the most part.

Update – 6/15/10

According to a Newsweek spokesperson it was an internal developer: “It’s true that our programmers had a bit of fun and hid the Konami Easter egg in the site. It does not affect the rest of the site’s functionality. Now that we’ve all had a laugh, we will be removing it.”

Filed Under: Web Site Defacement

Tags:

Comments (9)

Trackback URL | Comments RSS Feed

  1. 0 Clue says:

    If you ask me, this makes for one helluva marketing gimmick. Wonder what its for.

  2. trickfred says:

    Did they remove it? It doesn’t work for me…

  3. Michael Robinson says:

    Nice digging – that’ll teach me to use obfuscation.

  4. LonerVamp says:

    Cool factor: 9 (konami code + zombies + easter egg means bonus points!)

    Security factor: 9 (while cool and hip if authorized, it does give a sobering reminder to the powers that be that a developer can do whatever the hell he wants with code if you don’t have controls to prevent it. I’d suggest most orgs do not have such controls at all.)

  5. iEdge says:

    HAHAHA So Awesome. Gamers are everywhere, in the code.

  6. [...] Voracious D on Jun.15, 2010, under News Apparently everyone is covering this Newsweek zombie article story. That unfortunately means that we should probably [...]

  7. [...] libraries used by the web site (http://www.newsweek.com/etc/designs/newsweek/lib.js). Within that file is a function that looks for the keyboard input mentioned above, and replaces content on the web [...]