<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Security Advancements at the Monastery &#187; Web Application</title>
	<atom:link href="http://blog.securitymonks.com/category/web-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.securitymonks.com</link>
	<description>Information about developments at the Monastery</description>
	<lastBuildDate>Fri, 03 Sep 2010 05:41:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Learning By Doing: Challenges, Data Sets, and Practice Sites</title>
		<link>http://blog.securitymonks.com/2009/08/23/learning-by-doing-hacker-challenges-and-practice-sites/</link>
		<comments>http://blog.securitymonks.com/2009/08/23/learning-by-doing-hacker-challenges-and-practice-sites/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 15:30:18 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Badstone]]></category>
		<category><![CDATA[Bright Shadows]]></category>
		<category><![CDATA[Challenges]]></category>
		<category><![CDATA[DVL]]></category>
		<category><![CDATA[DVWA]]></category>
		<category><![CDATA[Date Sets]]></category>
		<category><![CDATA[De-ICE]]></category>
		<category><![CDATA[Enigma]]></category>
		<category><![CDATA[Forensics]]></category>
		<category><![CDATA[HBH]]></category>
		<category><![CDATA[HTS]]></category>
		<category><![CDATA[Hackerdemia]]></category>
		<category><![CDATA[ISC]]></category>
		<category><![CDATA[Moth]]></category>
		<category><![CDATA[Mutillidae]]></category>
		<category><![CDATA[Network Warfare]]></category>
		<category><![CDATA[OWASP]]></category>
		<category><![CDATA[OpenPacket.org]]></category>
		<category><![CDATA[OverTheWire]]></category>
		<category><![CDATA[StS]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[Wargames]]></category>
		<category><![CDATA[Web Application]]></category>
		<category><![CDATA[WebGoat]]></category>
		<category><![CDATA[pWnOS]]></category>
		<category><![CDATA[pcapr]]></category>
		<category><![CDATA[w3af]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=1320</guid>
		<description><![CDATA[Security training is very important for any organization. When developing a training program, do not forget about the security staff. I am all for sending people to SANS and other company&#8217;s security courses. Once your people come back, how will they practice what they have learned? Hopefully, everyday at work does not involve tracking inventive [...]]]></description>
			<content:encoded><![CDATA[<p><font color="white"><img src="http://blog.securitymonks.com/wp-content/uploads/2009/08/hacking_28.jpg" align="left" border="10" height="143" width="146" /></font>Security training is very important for any organization. When developing a training program, do not forget about the security staff. I am all for sending people to <a href="http://www.sans.org/">SANS</a> and other company&#8217;s security courses. Once your people come back, how will they practice what they have learned? Hopefully, everyday at work does not involve tracking inventive hackers through your network. Hands-on security is the best way to develop skills and stay sharp. This is where security challenges, practice sites, and examining attack data can be fun and of great benefit. It all provides an opportunity to test one&#8217;s knowledge along with the security tools used for discovering vulnerabilities and defending your organization.</p>
<h3>Challenges</h3>
<p><a href="http://jhamcorp.com/">Johnathan Ham</a> and Sherri Davidoff from SANS Internet Storm Center (ISC) and <a href="http://www.raulsiles.com/">Raul Siles</a> from <a href="http://www.inguardians.com/">InGuardians</a> have created two recent, still open, security challenges.  Sherri, co-author with Jonathan of the <a href="http://www.sans.org/training/description.php?mid=1227">SANS&#8217; Network Forensics course</a>, has posted &#8220;<a href="http://philosecurity.org/2009/08/14/network-forensics-puzzle-contest">Network Forensics Puzzle Contest!</a>&#8221; (8-14-2009). The most elegant solution wins a free SANS On-Demand class (worth up to $3500 depending on the course). Raul wrote a new hacking challenge on the Ethical Hacker Network site, titled &#8220;<a href="http://www.ethicalhacker.net/content/view/268/2/">Prison Break &#8211; Breaking, Entering &amp; Decoding</a>&#8221; (7-27-2009).  Three winners will be selected based on: the best technical answer, creativity (while also technically correct), and a random drawing. Winners will receive signed copies of Ed&#8217;s book, &#8220;Counter Hack Reloaded.&#8221;</p>
<p>
Ed Skoudis, of <strong></strong> <a target="_blank" href="http://www.amazon.com/exec/obidos/ASIN/0131481045/thedigitalcon-20?creative=327641&amp;camp=14573&amp;adid=0W0TMYWJ6BXR5RPTG9N8&amp;link_code=as1" class="undefined">Counter Hack Reloaded</a> fame along with various SAN&#8217;s hacking and penetration testing courses (see Ed in Virginia Beach teaching &#8220;<a href="https://www.sans.org/vabeach09/description.php?cid=5337">Network Penetration Testing: Planning, Scoping, and Recon</a>&#8221; August 30th &#8211; September 4th), is the host bringing monthly new challenges created and managed by the fine folks of InGuardians. The great thing about <a href="http://www.ethicalhacker.net/content/category/2/12/2/">past challenges</a> is that they allow you to try the problems and check your solutions immediately. Check out Ed&#8217;s <a href="http://www.counterhack.net/Counter_Hack/Challenges.html">Counter Hack Reloaded site</a> for a few additional, older challenges.
</p>
<p>
<font color="red">UPDATE:</font> For a challenge in the forensic&#8217;s realm, check out the <a href="https://blogs.sans.org/computer-forensics?s=FAT+trustedsignal&#038;searchsubmit=Find">series of posts</a> by <b>Dave Hull</b> (<a href="http://trustedsignal.com/">trustedsignal</a>) on the <a href="https://blogs.sans.org/computer-forensics">SANS Forensics Blog</a>.  This series discusses the FAT file system.  Dave provided the following description: &#8220;I&#8217;ve provided a copy of the disk image used during the series and have ended almost every post with a challenge question and have been giving away a forensics related title from the Syngress Publishing group. We&#8217;ve had a great time and the series is in the archives for anyone who wants to check it out.&#8221;  Dave is working on a series for NTFS, which he should start posting in the next few weeks.  The series is very informative and a great hands-on way to learn.
</p>
<h3>Data Sets</h3>
<p><a href="http://www.rumint.org/gregconti">Greg Conti</a>, author of <a href="http://nostarch.com/securityvisualization.htm">Security Data Visualization</a>, co-authored the paper, &#8220;<a href="http://www.usenix.org/events/cset09/tech/full_papers/sangster.pdf">Toward Instrumenting Network Warfare Competitions to Generate Labeled Datasets</a>.&#8221;  The paper was done for the <a href="http://www.usenix.org/event/cset09/tech">CSET &#8216;09</a> Worksop on Cyber Security Experimentation and Test. The authors demonstrates how the network warfare competitions can be instrumented to generate modern labeled data sets. They have made available the <a href="http://www.itoc.usma.edu/research/dataset/index.html">archived data capture and log files</a> from the <b>2009 Inter-Service Academy Cyber Defense Competition</b>. The annual competition pits the service academies, including West Point, against an actual National Security Agency Red Team. There is a great deal to be learned by examining this data. A <a href="http://datasetsfortheresearchcommunity.blogspot.com/">blog</a> has been setup to discuss the data.  They are hoping to do a few data captures of network warfare games, as well as, data captures of red-on-blue events at the US Military Academy at West Point.</p>
<p>
There are a few additional sites where you can obtain data captures.  JJC, from the &#8220;<a href="http://global-security.blogspot.com/2009/03/openpacketorg.html">Security &#8211; The Global Perspective</a>&#8221; blog, manages the <a href="https://www.openpacket.org/"><b>OpenPacket.org</b></a> site. The site&#8217;s mission is to &#8220;provide quality network traffic traces to researchers, analysts, and other members of the digital security community.&#8221;  The site <a href="http://www.pcapr.net"><b>pcapr</b></a>, powered by Mu Dynamics, calls itself a &#8220;social nOtworking site.&#8221; Go to the site to learn about networks and protocols from packet captures.
</p>
<p>
<font color="red">UPDATE:</font> The folks from pcapr wrote in and pointed out that they just made available the &#8220;<a href="http://www.pcapr.net/forensics">Collaborative Network Forensics</a>&#8221; area where they &#8220;took the recently published ITOC dataset and the CCTF captures from the Shmoo group, indexed them for real-time browsing and contextual search/extract.&#8221;  As they point out, &#8220;with over 15.0 GBytes and 26.3 million packets, this now represents the largest collection of indexed pcaps online.&#8221;  Really nice.
</p>
<p>
The VizSEC site maintains links to various <a href="http://www.vizsec.org/datasets">repositories of data sets</a>.  SourceForge, as part of the <a href="http://sourceforge.net/projects/networkminer/">NetworkMiner tool</a>, has links to <a href="http://sourceforge.net/apps/mediawiki/networkminer/index.php?title=Publicly_available_PCAP_files">publically available PCAP files</a>.  The wireshark site also has a few links and <a href="http://wiki.wireshark.org/SampleCaptures">sample PCAP files</a>.
</p>
<h3>Practicing</h3>
<p>Practice can be done by installing software, using disk images, or by going to sites/training grounds. Installing software will create a vulnerable site.  Make sure to do it onto a local machine inside your LAN which is used solely for testing.  For ISO images, make sure you set the VM to use the IP addresses that are only  available from the local host OS (NAT or Host-only). If you go to a site, take caution and remember the site could be hostile.  In other words, be properly paranoid. </p>
<h4><b>Software</b></h4>
<p>In my post &#8220;<a href="http://blog.securitymonks.com/2009/01/10/webgoat-lua-and-modsecurity-verses-password-guessing/" rel="bookmark" title="Permanent Link to WebGoat, Lua, and ModSecurity verses Password Guessing">WebGoat, Lua, and ModSecurity verses Password Guessing</a>,&#8221; I go through the steps of setting up <b>WebGoat</b>. <a href="http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project">WebGoat</a> is a deliberately insecure J2EE web application maintained by OWASP and is intended to teach a structured approach to test and exploiting vulnerabilities within an application security assessment. WebGoat is written in Java and installs on any platform with a Java virtual machine. The <a href="http://yehg.org/">YGN Ethical Hacker Group</a> has made available a series of video on walking through WebGoat v5.2. There are currently over 30 lessons.</p>
<p>
<a href="http://www.ethicalhack3r.co.uk/damn-vulnerable-web-app/">Damn Vulnerable Web App</a> (<b>DVWA</b>) is a PHP/MySQL Web application that is light weight, easy to use and full of vulnerabilities to exploit. <a href="http://www.ethicalhack3r.co.uk">Ryan Dewhurst</a>, developer of DVWA, created a video <span class="description">showing the installation process</span>:
</p>
</p>
<div class="youtube-video"><object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/GzIj07jt8rM&amp;hl=en&amp;fs=1&amp;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/GzIj07jt8rM&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"></embed></param></object></div>
<p>
If you prefer PHP scripts, <b>Mutillidae</b> is a set that implements the <a href="http://www.irongeek.com/i.php?page=security/mutillidae-deliberately-vulnerable-php-owasp-top-10">OWASP Top 10</a> vulnerabilities. Adrian Crenshaw posted the presentation he gave to the Louisville Chapter of  OWASP about the Mutillidae project titled &#8220;<a href="http://www.irongeek.com/i.php?page=videos/owasp-top-5-louisville">OWASP  Top 5 and Mutillidae: Intro to common web vulnerabilities like Cross Site  Scripting (XSS), SQL/Command Injection Flaws, Malicious File Execution/RFI,  Insecure Direct Object Reference and Cross Site Request Forgery (CSRF/XSRF)</a>.&#8221;
</p>
<p>
<object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5238124&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5238124&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object></p>
<p><a href="http://vimeo.com/5238124">Owasp Louisville 2nd Meeting</a> from <a href="http://vimeo.com/user729137">Adrian Crenshaw</a> on <a href="http://vimeo.com">Vimeo</a>.
</p>
<h4><b>ISO Disk Images</b></h4>
<p>On the ISO disk image side, there are few interesting options. <a href="http://www.badstore.net"><b>Badstore</b></a> demo helps in the understanding of Web application vulnerabilities and shows how to reduce exposure. </p>
<p>
For full scaled lesson based environment, there is the Linux-based distribution <a href="http://www.damnvulnerablelinux.org">Damn Vulnerable Linux</a> (<b>DVL</b>). <a href="http://geekybodhi.net/" target="_blank">Mayank Sharma</a> writes in the article &#8220;<a href="http://www.linux.com/archive/articles/60267" target="_blank">Securing Linux by breaking it with Damn Vulnerable Linux</a>:&#8221;</p>
<blockquote><p>&#8220;<a href="http://www.damnvulnerablelinux.org/" target="_blank">Damn Vulnerable Linux</a> (DVL) is everything a good Linux distribution isn&#8217;t. Its developers have spent hours stuffing it with broken, ill-configured, outdated, and exploitable software that makes it vulnerable to attacks. DVL isn&#8217;t built to run on your desktop &#8212; it&#8217;s a learning tool for security students.&#8221;&nbsp; &#8220;The one thing that sets DVL apart the most,&#8221; Josh Sweeney says, &#8220;is the focus on buffer overflows and disassembly.&#8221; Disassembly, he says, is often talked about in conjunction with buffer overflows and reverse engineering. &#8220;Disassembling is when someone breaks down a program into the assembly language for further analysis. By doing this, users can analyze code at a very low level and look for security issues. There have been many excellent papers on the subject over the years, but these generally don&#8217;t come with learning tools in a self-contained, easy-to-use environment.&#8221;</p></blockquote>
<p><a href="http://www.de-ice.net/">Thomas Wilhelm</a> is the author of &#8220;<a href="http://www.elsevier.com/wps/find/bookdescription.cws_home/718483/description#description">Professional Penetration Testing: Creating and Operating a Formal Hacking Lab</a>&#8221; and the creator of both the <a href="http://heorot.net/hackerdemia/"><b>Hackerdemia</b> project</a> and the <a href="http://de-ice.hackerdemia.com/doku.php"><b>De-ICE.net</b> Pentest LiveCDs</a> project.  Hackerdemia is a LiveCD that containing several vulnerabilities, including un-patched software, mis-configured services, default passwords and a few other surprises. Paul Asadoorian posted &#8220;<a href="http://blog.tenablesecurity.com/2009/03/scanning-vulnerable-linux-distributions-with-nessus.html">Scanning Vulnerable Linux Distributions With Nessus</a>&#8221; where he walks through using Nessus to determine the vulnerabilities within Hackerdemia.  The De-ICE.net Pentest LiveCDs are disk images that are fully-functioning server.  The Security Aegis site has an <a href="http://www.securityaegis.com/?page_id=339">interview with Thomas</a> where he discusses these projects along with the Heorot.net pentest video training and his recently published book.
</p>
<p>
One more Linux VM intentionally configured with exploitable services <a href="http://code.google.com/p/pwnos/"><b>pWnOS</b></a>. It was created by Brady Bloxham, a.ka bond00.  Below is a nice introduction video.
</p>
<p><div class="youtube-video"><object id="veohFlashPlayer" name="veohFlashPlayer" height="341" width="410"><param name="movie" value="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.2.23.1011&amp;permalinkId=v15119345SN6ax252&amp;player=videodetailsembedded&amp;videoAutoPlay=0&amp;id=anonymous"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"><embed src="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.2.23.1011&amp;permalinkId=v15119345SN6ax252&amp;player=videodetailsembedded&amp;videoAutoPlay=0&amp;id=anonymous" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" id="veohFlashPlayerEmbed" name="veohFlashPlayerEmbed" height="341" width="410"></embed></param></object></div>
</p>
<p>The Web Application Attack and Audit Framework (<b>w3af</b>) project has created a VMware image, called <a href="http://www.bonsai-sec.com/blog/index.php/moth-vulnerable-vmware-image"><b>Moth</b></a>, which is a set of vulnerable Web Applications and scripts.  The w3af core and it&#8217;s plugins are fully written in Python, has more than 130 plugins checking for SQL injection, cross site scripting (xss), local and remote file inclusion, etc.  What is really interesting about Moth is that it allows for testing of web application scanners and learning how web application firewalls work by providing a way access web applications and vulnerable scripts directly, through mod_security, and through PHP-IDS. </p>
<p>On the system side, <b>LAMPSecurity</b> has been creating a series of capture the flag exercise that uses a full Linux virtual machine that is vulnerable to remote root compromise due to a number of vulnerabilities.  The most recent exercise is <a href="http://lampsecurity.org/capture-the-flag-6">Capture the Flag 6</a> and was released 7/17/2009.  The documentation will take you through the steps of the exercise.  </p>
<h4><b>Training Ground</b></h4>
<p>The <b>Mighty Seek Podcast</b> did a <a href="http://www.mightyseek.com/category/podcasts/hands-on-series/" target="_blank">Hands On Series</a> and setup the <a href="http://hackme.ntobjectives.com">NTO Hackme</a> Test site, which includes the podcasts with the opportunity to test what is discussed out. Dan Kuykendall did two episodes: &#8220;<a href="http://www.mightyseek.com/podcasts/hands-on-series-sql-injection">Episode #01 &#8211; SQL Injection Part 1 [Intro]</a>&#8221; and &#8220;<a href="http://www.mightyseek.com/podcasts/hands-on-series-cross-site-scripting-xss-part-1">Episode #02 &#8211; Cross Site Scripting (XSS) Part 1 [Intro]</a>.&#8221;</p>
<p>
<a href="http://www.hackthissite.org">Hack This Site</a> (<b>HTS</b>) is a website to test and expand one&#8217;s hacking skills. You will need to register with the site to access the hacker challenges.&nbsp; There are various lessons and missions.&nbsp; User cwade12c has posted the several video tutorial covering missions. Below is &#8220;<a href="http://www.youtube.com/watch?v=iTnTzc23SRQ">Hack This Site &#8211; Basic 1 Tutorial</a>&#8221; to give you an feel for the simplest of challenges:
</p>
<p><div class="youtube-video"><object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/iTnTzc23SRQ&amp;hl=en&amp;fs=1&amp;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/iTnTzc23SRQ&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"></embed></param></object></div>
</p>
<p>
<a href="http://www.hellboundhackers.org">HellBound Hackers</a> (<b>HBH</b>) is another site offering a large resource consisting of challenges, articles, forums, etc.  The LifeofaHacker site has published some challenge <a href="http://www.lifeofahacker.org/hbhandhtsguides.htm">tutorials/walkthrough guides</a> for both Hack This Site (HTS) and HBH.
</p>
<p>
<a href="http://www.enigmagroup.org"><b>Enigma Group</b></a> is similar to HTS and HBH in terms of tutorials, articles, and hacker challenges.  There are some education and humorous short tutorial videos.
</p>
<p>
<a href="http://www.bright-shadows.net/"><b>The Bright Shadows site</b></a> also offers challenges on JavaScript, cyptography, cracking, steganography, Flash, Java, various programming exploits, etc. Registration is required. The challenges get voted on by the members in terms of difficulty, creativity, education, and presentation.
</p>
<p>
<a href="http://www.smashthestack.org">Smash The Stack (<b>StS</b>) Wargaming Network</a> has a progression of challenges where each challenge is dependent on the completion of the previous challenge.  The challenges are *nix based.  To get started you ssh into one one of the wargame servers on port 2224 using password &#8220;level1&#8243;, at which point you receive a message letting you know how to get started.  The password for the next level will be located in different placed, depending on the game.  Questions can be asked on their forums area.  <a href="http://www.overthewire.org/wargames/"><b>OverTheWire</b></a> offer similar wargame challenges.
</p>
<h3>A Few Final Thoughts</h3>
<p>The above list represents a few source I have experience with.  Duncan Alderson  on his site Webantix has done a great job of listing war games/hacking simulators in his post, “<a href="http://www.webantix.net/hacking/war-games-current-and-past-hacking-simulators-and-challanges/">War Games. Current and past hacking simulators and challenges.</a> The <a href="http://neworder.box.sk/link.php?currentgrp=38667">New Order site</a> also has a much more comprehensive list.</p>
<p>
Just remember, it is good to be paranoid. Even HTS, with a user base of over 1,300,000 can still have problems with disgruntled and past employees. We are talking very skilled, intelligent, and disgruntle employees.  In the last major attack, root-level access to the website was gained and HTS was taken down for months.
</p>
<p>
It is a dangerous world.  That is exactly why skilled ethical hackers are needed.  One of my college professors would always say, &#8220;Repetition is the key to learning.&#8221;  He repeated it so many time, I finally learned that lesson.  The above links help provide a challenging way to practice and learn.  Give them a try and have some fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2009/08/23/learning-by-doing-hacker-challenges-and-practice-sites/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>WebGoat, Lua, and ModSecurity verses Password Guessing</title>
		<link>http://blog.securitymonks.com/2009/01/10/webgoat-lua-and-modsecurity-verses-password-guessing/</link>
		<comments>http://blog.securitymonks.com/2009/01/10/webgoat-lua-and-modsecurity-verses-password-guessing/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 00:54:52 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Lua]]></category>
		<category><![CDATA[ModSecurity]]></category>
		<category><![CDATA[OWASP]]></category>
		<category><![CDATA[Vulnerability]]></category>
		<category><![CDATA[Web Application]]></category>
		<category><![CDATA[WebGoat]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=826</guid>
		<description><![CDATA[Happiness abandoned Twitter this week as it was revealed that an 18-year-old was able to use an automated password-guesser to break into an account.  Twitter allowed for an unlimited number of log-in attempts.  The hacker used a simple dictionary attack that revealed at 11:00am Monday the password of &#8220;happiness.&#8221;  Once the hacker [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sensitivitytothings.com/wp-content/uploads/2008/03/roller-coaster-monks.jpg" alt="" align="left" width=150 />Happiness abandoned <a href="http://twitter.com/">Twitter</a> this week as it was revealed that an 18-year-old was able to use an automated password-guesser to break into an account.  Twitter allowed for an unlimited number of log-in attempts.  The hacker used a simple <a href="http://en.wikipedia.org/wiki/Dictionary_attack">dictionary attack</a> that revealed at 11:00am Monday the password of &#8220;<strong>happiness</strong>.&#8221;  Once the hacker had the Twitter staffer&#8217;s password, through the administrative panel it was possible to change the email address of any Twitter account and reset the holder&#8217;s password.  See Tom&#8217;s post &#8220;<a href="http://spylogic.net/item/398">Summary of the Twitter Security Incidents</a>&#8221; for more details on the incident.</p>
<p>
To deal with administrative accounts at Twitter, Adam O&#8217;Donnell provides some great advices to corporate CSOs in his article, &#8220;<a href="http://blogs.zdnet.com/security/?p=2359">A roadmap for the Twitter CSO</a>.&#8221;  Dave Goldsmith post, &#8220;<a href="http://www.matasano.com/log/1342/my-pentest-secret-password-guessing/">My Pentest Secret: Password Guessing</a>,&#8221; provides more advice to mitigate risk of password guessing attacks.
</p>
<p>
Today&#8217;s post focuses on Dave&#8217;s point:<br />
<blockquote><strong>FAILED LOGIN DELAYS</strong>. What to do when someone is grinding passwords on the same account? Account lockout is pretty unpopular as it can lead to a denial of service attack. Doing nothing is pretty unpopular because attackers can grind forever. Enter the exponentially increasing login delay. Every failed login on an account causes the system to delay more and more on that account until a reset on that counter after a reasonable period of time or a valid login.</p></blockquote>
<p>The Open Web Application Security Project (<a href="http://www.owasp.org/index.php/Main_Page">OWASP</a>) has begun a podcast focused on web application security.  The podcast is hosted by <a href="http://www.linkedin.com/in/jmanico">Jim Manico</a>, a Web Application Architect and Security Engineer for Aspect Security.  In <a href="http://www.owasp.org/index.php/Podcast_2">Podcast #2</a>, Stephen Craig Evans, an independent software security consultant, talks about <a href="http://www.lua.org/">Lua</a> and the OWASP Summer of Code project wiki, <a href="http://www.owasp.org/index.php/OWASP_Securing_WebGoat_using_ModSecurity_Project">Securing WebGoat using ModSecurity</a>.  The project  goes through the steps involved in securing WebGoat using the combination of ModSecurity and Lua.  To quote <a href="http://blog.modsecurity.org/2008/10/securing-webgoat-using-modsecurity.html">Ivan Ristic</a>, creator of ModSecurity, the project &#8220;stretched the boundaries of what ModSecurity could do.&#8221;
</p>
<p>
<center><a href="http://www.owasp.org/index.php/Image:WebGoat-Bypass-Access-Control-Lesson.JPG"><img src="https://www.owasp.org/images/thumb/f/f3/WebGoat-Bypass-Access-Control-Lesson.JPG/300px-WebGoat-Bypass-Access-Control-Lesson.JPG" /></a></center>
</p>
<p>
To help address the problem of dictionary attacks against your web server, today&#8217;s post will be using ModSecurity with the scripting language Lua.  First, let&#8217;s setup WebGoat for testing purposes.  </p>
<h2>WebGoat</h2>
<p>For those unfamiliar with <a href="http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project">OWASP WebGoat project</a>, WebGoat is:<br />
<blockquote>WebGoat is a deliberately insecure J2EE web application maintained by OWASP designed to teach web application security lessons. In each lesson, users must demonstrate their understanding of a security issue by exploiting a real vulnerability in the WebGoat application. For example, in one of the lessons the user must use SQL injection to steal fake credit card numbers. The application is a realistic teaching environment, providing users with hints and code to further explain the lesson.</p>
<p>Why the name &#8220;WebGoat&#8221;? Developers should not feel bad about not knowing security. Even the best programmers make security errors. What they need is a scapegoat, right? Just blame it on the &#8216;Goat!</p></blockquote>
<p>WebGoat is intended to teach a structured approach to test and exploiting vulnerabilities within an application security assessment.  Also being developed is the <a href="http://www.owasp.org/index.php/OWASP_Testing_Project">OWASP Testing Project</a>, which provides a full application security assessment testing methodology.  Through WebGoat, companies have a way to teach web application security lessons to their developers.  There are over 30 lessons dealing with such issues as:
</p>
<table>
<tr>
<td valign="top">
<ul>
<li> <a href="http://blog.securitymonks.com/index.php/Cross-site_Scripting_%28XSS%29" title="Cross-site Scripting (XSS)">Cross-site Scripting (XSS)</a>
</li>
<li> Access Control
</li>
<li> <a href="http://blog.securitymonks.com/index.php/Race_condition_within_a_thread" title="Race condition within a thread">Thread Safety</a>
</li>
<li> <a href="http://blog.securitymonks.com/index.php/Unvalidated_Input" title="Unvalidated Input">Hidden Form Field Manipulation</a>
</li>
<li> Parameter Manipulation
</li>
<li> <a href="http://blog.securitymonks.com/index.php/Session_Management#Weak_Session_Cryptographic_Algorithms" title="Session Management">Weak Session Cookies</a>
</li>
<li> Blind <a href="http://blog.securitymonks.com/index.php/SQL_injection" title="SQL injection">SQL Injection</a>
</li>
</ul>
</td>
<td valign="top">
<ul>
<li> Numeric SQL Injection
</li>
<li> String SQL Injection
</li>
<li> <a href="http://blog.securitymonks.com/index.php/Web_Services" title="Web Services">Web Services</a>
</li>
<li> <a href="http://blog.securitymonks.com/index.php/Improper_Error_Handling" title="Improper Error Handling">Fail Open Authentication</a>
</li>
<li> Dangers of HTML Comments
</li>
<li> &#8230; and many more!
</li>
</ul>
</td>
</tr>
</table>
<p>
The <a href="http://yehg.org/">YGN Ethical Hacker Group</a> has made available a series of video on walking through WebGoat v5.2.  The videos consist of:</p>
<table>
<tr>
<td>
<ul>
<li><a href="http://yehg.org/lab/pr0js/files.php/webgoat_simulation_general.zip">General</a> </li>
<li><a href="http://yehg.org/lab/pr0js/files.php/webgoat_simulation_codequality.zip">Code Quality</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/files.php/webgoat_simulation_concurrency.zip">Concurrency</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/files.php/webgoat_simulation_unvalidatedparams.zip">Unvalidated Parameters</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/training/webgoat.php#">Access Control Flaws</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/training/webgoat.php#">Authentication Flaws</a>  </li>
<li>Session Management Flaws  </li>
<li><a href="http://yehg.org/lab/pr0js/training/webgoat.php#">Cross-Site Scripting (XSS)</a>  </li>
</ul>
</td>
<td>
<ul>
<li><a href="http://yehg.org/lab/pr0js/training/webgoat.php#">Buffer Overflows</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/training/webgoat.php#">Injection Flaws</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/files.php/webgoat_simulation_impropererrorhandling.zip">Improper Error Handling</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/files.php/webgoat_simulation_insecurestorage_encoding_basics.zip">Insecure Storage</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/files.php/webgoat_simulation_dos.zip">Denial of Service (DOS)</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/files.php/webgoat_simulation_insecurecofig.zip">Insecure Configuration</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/training/webgoat.php#">Web Services</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/training/webgoat.php#">AJAX Security</a>  </li>
<li><a href="http://yehg.org/lab/pr0js/training/webgoat.php#">Challenge</a>  </li>
</ul>
</td>
</tr>
</table>
<p>Please recognize that WebGoat is a vulnerable server and therefor you will want to set it up so no one but you can access the WebGoat server.  By default WebGoat only listens on the loopback address.  Below are the steps to pull down WebGoat and install it on a Linux server.  Since this is not a production system, we will be installing the WebGoat developer release.
</p>
<p><h2>Installing JDK</h2>
<p>WebGoat will require Sun JDK 6 to be installed.  Get the Sun JDK 6 from <a href="http://java.sun.com/javase/downloads/index.jsp">Sun&#8217;s website</a>.  Sun requires you to agree to terms, so you&#8217;ll need to go there and agree.  Run the installer which gets downloaded.  Agree again to the terms.  The installer will install a few rpms and jars.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# /bin/sh jdk-6u11-linux-i586-rpm.bin
root# ls -la /usr/java
default  jdk1.5.0_17  jdk1.6.0_11  latest
root# declare -x JAVA_HOME="/usr/java/latest"
root# declare -x PATH="${JAVA_HOME}/bin:${PATH}
root# java -version
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)
</pre>
</td>
</table>
<p></p>
<h2>Running WebGoat Standard Release</h2>
<p>While the documentation for WebGoat says to install Tomcat, the WebGoat zip file will come with its own version of Tomcat.  Running WebGoat in this manner can prove to be the easiest path allowing the avoidence of Java software version problems.  We will go through both deployments.  First, installing WebGoat with Tomcat.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# cd /usr/local/src
/usr/local/src root# wget \

http://webgoat.googlecode.com/files/WebGoat-OWASP_Standard-5.2.zip

/usr/local/src root# /usr/bin/openssl sha1 WebGoat-OWASP_Standard-5.2.zip
SHA1(WebGoat-OWASP_Standard-5.2.zip)=
1e8950d8af0a1726ee1c4509cb64ee4ee6da7584
/usr/local/src root# unzip WebGoat-OWASP_Standard-5.2.zip
/usr/local/src root# cd WebGoat-5.2
</pre>
</td>
</table>
<p>
At this point, a slight modification needs to be made to webgoat.sh.  It checks if the java version is 1.5.  This is an odd check, since WebGoat was compiled under 1.6 and will not run under 1.5.  Find where <strong>webgoat.sh</strong> has <strong>grep &#8216;version \&#8221;1.5&#8242;</strong> and change 1.5 to 1.6.  At that point, you are read to start WebGoat.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/WebGoat-5.2 root# /bin/sh webgoat.sh start8080
Using CATALINA_BASE:   ./tomcat
Using CATALINA_HOME:   ./tomcat
Using CATALINA_TMPDIR: ./tomcat/temp
Using JAVA_HOME:       /usr/java/latest

  Open http://127.0.0.1:8080/WebGoat/attack
  Username: guest
  Password: guest
  Or try http://guest:guest@127.0.0.1:8080/WebGoat/attack
</pre>
</td>
</table>
<p>
This is running WebGoat accessible only to 127.0.0.1.  From your web browser, go to http://127.0.0.1:8080/WebGoat/attack and log in with username guest and password guest.  At this point, WebGoat is running and you are set to start going through the lesson plans and exercise.</p>
<h2>Installing WebGoat.war</h2>
<p>If you have Tomcat on your server, you will want to install only the WebGoat.war file.  I am going to make this a little more complicated by going through the steps to install Tomcat.  In previous posts, I have stepped through installation of Apache and ModSecurity.  Walking through the installation of Tomcat will help get us on the same page as far as configuration and installation.
</p>
<p>
There is a known issue with the latest stable release of Tomcat, 6.0.18.  It requires <strong>JDK 5</strong> at the moment, due to incompatibilities introduced by Sun JDK 6.  Sun changed the JDBC spec in an incompatible fashion that was discovered after Tomcat 6 went out.  There are changes in the trunk to replace the DB connection pooling mechanism with one that isn&#8217;t impacted by the 1.6 change.  Unfortunately, WebGoat required JDK 6.  To get a round this problem, we will use the subversion release of Tomcat.
</p>
<p>
We first need to install <strong>Apache Ant</strong>, which is a software tool for automating software build processes.  It is similar to make but is implemented using the Java language.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /usr/local/src/
/usr/local/src root# wget http://www.uniontransit.com/apache/ant/binaries/apache-ant-1.7.1-bin.tar.gz
/usr/local/src root# md5sum apache-ant-1.7.1-bin.tar.gz
cc5777c57c4e8269be5f3d1dc515301c  apache-ant-1.7.1-bin.tar.gz
/usr/local/src root# tar xzf apache-ant-1.7.1-bin.tar.gz
/usr/local/src root# mv apache-ant-1.7.1 /work/software
/usr/local/src root# cd  /work/software
/work/software root# ln -s apache-ant-1.7.1 ant
/work/software root# declare -x ANT_HOME="/work/software/ant"
/work/software root# declare -x PATH="${PATH}:${ANT_HOME}/bin"
/work/software root# ant
Buildfile: build.xml does not exist!
Build failed
</pre>
</td>
</table>
<p>
</p>
<p>
The error above indicate that ant command is recognized by shell but it did not find build.xml file that needed to compile ant projects. So, it’s absolutely normal and the installation was successful.
</p>
<p>
We are now ready to download and build <strong>Tomcat</strong>.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /usr/local/src/
/usr/local/src root# svn checkout \
http://svn.apache.org/repos/asf/tomcat/trunk tomcat-7
/usr/local/src root# cd tomcat-7
/usr/local/src/tomcat-7 root# ant download
/usr/local/src/tomcat-7 root# ant
/usr/local/src/tomcat-7 root# cd output
/usr/local/src/tomcat-7/output root# mv build \
/work/software/tomcat-7
/usr/local/src/tomcat-7 root# cd /work/software/
/work/software root# ln -s tomcat-7 tomcat
/work/software root# declare -x CATALINA_HOME="/work/software/tomcat"
/work/software root# chmod u+x $CATALINA_HOME/bin/*
/work/software root# mkdir $CATALINA_HOME/logs
</pre>
</td>
</table>
<p></p>
<h2>Configuring and Using Tomcat</h2>
<p>The following modifications can be done to configuration Tomcat files that came down as part of WebGoat or the latest version from the Tomcat site.  If you make the modifications to the Tomcat under Webgoat, keep in mind:</p>
<ol>
<li>Set $CATALINA_HOME appropriately</li>
<li>Modify webgoat.sh, removing the line &#8220;cp -f $CATALINA_HOME/conf/server_8080.xml $CATALINA_HOME/conf/server.xml&#8221;.</li>
<li>Adjust paths based on where WebGoat is installed.</li>
<li>Add to the $CATALINA_HOME/conf/tomcat-users.xml file.  Do not replace content.</li>
<li>You can use $CATALINA_HOME/bin/shutdown.sh to shutdown Tomcat.</li>
<li>You can start with $CATALINA_HOME/bin/startup.sh instead of webgoat.sh, provided you have $PATH, $JAVA_HOME, and $CATALINA_HOME set.
</li>
</ol>
<p>Before starting, create a manager username and password.  This is set in the $CATALINA_HOME/conf/tomcat-users.xml file.  The following is an example only:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/work/software root# vi $CATALINA_HOME/conf/tomcat-users.xml
&lt;?xml version='1.0' encoding='utf-8'?&gt;
&lt;tomcat-users&gt;
  &lt;role rolename="tomcat"/&gt;
  &lt;role rolename="manager"/&gt;
  &lt;user username="jerry" password="mousepower" roles="tomcat"/&gt;
  &lt;user username="tom" password="catpower" roles="manager"/&gt;
&lt;/tomcat-users&gt;
</pre>
</td>
</table>
<p>
We can setup secure web authentication through the use of digital certificates using SSL.  First step is to use the <a href="http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html">keytool utility</a>, which is included in the Sun Java Standard Edition JDK, to create a keystore file.  Use &#8220;changeit&#8221; as the password. (If you don&#8217;t use &#8220;<strong>changeit</strong>&#8221; you will have to state the password in with the keystorePass setting in server.xml).  For example:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/work/software root# mkdir /work/software/tomcat/keystore
/work/software root# cd /work/software/tomcat/keystore
/work/software/tomcat/keystore root# keytool -genkey -alias tomcat \
-keyalg RSA -keysize 2048 -keystore /work/software/tomcat/keystore/keystore
Enter keystore password:  <strong>changeit</strong>
What is your first and last name?
  [Unknown]:  John Gerber
What is the name of your organizational unit?
  [Unknown]:  SecurityMonks
What is the name of your organization?
  [Unknown]:  OrderOfUnix
What is the name of your City or Locality?
  [Unknown]:  Knoxville
What is the name of your State or Province?
  [Unknown]:  TN
What is the two-letter country code for this unit?
  [Unknown]:  US
Is CN=John Gerber, OU=SecurityMonks, O=OrderOfUnix, L=Knoxville, ST=TN, C=US correct?
  [no]:  yes

Enter key password for <tomcat>
        (RETURN if same as keystore password):
/work/software/tomcat/keystore root# ls  /work/software/tomcat/keystore
/work/software/tomcat/keystore root# keytool -list -keystore keystore
</tomcat></pre>
</td>
</table>
<p>
The keystore created will not be trusted by JVM until the certificate is imported into JVM’s trusted certificate keystore.  We will export the SSL certificate we just generated and import it into the JVM&#8217;s keystore.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/work/software/tomcat/keystore root# keytool -export \
-alias tomcat -keystore keystore -file tomcat.cer
/work/software/tomcat/keystore root# keytool -import \
-trustcacerts -keystore /usr/java/jdk1.5.0_17/jre/lib/security/cacerts  \
-alias tomcat -file /work/software/tomcat/keystore/tomcat.cer
/work/software/tomcat/keystore root# keytool -list -alias tomcat \
-keystore /usr/java/jdk1.5.0_17/jre/lib/security/cacerts
</pre>
</td>
</table>
<p>
Modify the <strong>$CATALINA_HOME/conf/server.xml</strong> section which defines a SSL HTTP/1.1 Connector on port 8443. It should go with the other connectors in the Service section and looks something like this: </p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
    &lt;Connector port="8443" minSpareThreads="5" maxSpareThreads="75"
           enableLookups="true" disableUploadTimeout="true"
           acceptCount="100"  maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           keystore="/work/software/tomcat/keystore/keystore"  keypass="changeit"
           clientAuth="false" sslProtocol="TLS" /&gt;
</pre>
</td>
</table>
<p>
In order to require SSL on a specific site configure a security constrant for that app.  Do this by editing the <strong>$CATALINA_HOME/conf/web.xml</strong> file and adding the following section just before the ending &lt;/web-app&gt; tag:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
    &lt;security-constraint&gt;
    &lt;web-resource-collection&gt;
    &lt;web-resource-name&gt;Automatic SSL Forwarding&lt;/web-resource-name&gt;
    &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/web-resource-collection&gt;
    &lt;user-data-constraint&gt;
    &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;
    &lt;/user-data-constraint&gt;
    &lt;/security-constraint&gt;
</pre>
</td>
</table>
<p>
Now startup Tomcat.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/work/software root# $CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE:   /work/software/tomcat
Using CATALINA_HOME:   /work/software/tomcat
Using CATALINA_TMPDIR: /work/software/tomcat/temp
Using JRE_HOME:       /usr/java/jdk1.5.0_17
/work/software root# ps awx | grep tomcat
  783 pts/14   Sl     0:04 /usr/java/jdk1.5.0_17/bin/java
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/work/software/tomcat/conf/logging.properties
-Djava.endorsed.dirs=/work/software/tomcat/endorsed
-classpath :/work/software/tomcat/bin/bootstrap.jar
-Dcatalina.base=/work/software/tomcat
-Dcatalina.home=/work/software/tomcat
-Djava.io.tmpdir=/work/software/tomcat/temp org.apache.catalina.startup.Bootstrap start
/work/software root# /usr/sbin/lsof -iTCP -n -P | grep java
java      6175   root   10u  IPv6 327556       TCP *:8080 (LISTEN)
java      6175   root   12u  IPv6 327557       TCP *:8443 (LISTEN)
java      6175   root   21u  IPv6 327562       TCP *:8009 (LISTEN)
java      6175   root   22u  IPv6 327565       TCP 127.0.0.1:8005 (LISTEN)
</pre>
</td>
</table>
<p>
Tomcat is now built and running.  You can access it by going to:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">

http://localhost:8080
</pre>
</td>
</table>
<p>
which will redirect you to:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">

https://localhost:8443
</pre>
</td>
</table>
<p>
When you goto https://localhost:8443 you will be asked to accept the certificate.  If you have problems, make sure to clear you browser&#8217;s cache.  Now that we have Tomcat server running, we are ready to download and setup our WebGoat server.  </p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# $CATALINA_HOME/bin/shutdown.sh
 root# cd /usr/local/src
/usr/local/src root# wget http://webgoat.googlecode.com/files/WebGoat-5.2.war
/usr/local/src root# /usr/bin/openssl sha1 WebGoat-5.2.war
SHA1(WebGoat-5.2.war)= c5aab7c5496625777a3b9e21b9888cddee5b649c
/usr/local/src root# mv WebGoat-5.2.war /work/software/tomcat/webapps/WebGoat.war
/usr/local/src root# $CATALINA_HOME/bin/startup.sh
/usr/local/src root# ls -la /work/software/tomcat/webapps/WebGoat
/usr/local/src root# ls -la /work/software/tomcat/conf/tomcat-users.xml
</pre>
</td>
</table>
<p>
Add WebGoat users and roles to <strong>$CATALINA_HOME/conf/tomcat-users.xml</strong> file.  Start Tomcat back up.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
 root# $CATALINA_HOME/bin/shutdown.sh
 root# vi $CATALINA_HOME/conf/tomcat-users.xml
    &lt;tomcat-users&gt;
      &lt;role rolename=&quot;webgoat_basic&quot;/&gt;
      &lt;role rolename=&quot;webgoat_admin&quot;/&gt;
      &lt;role rolename=&quot;webgoat_user&quot;/&gt;
      &lt;role rolename=&quot;tomcat&quot;/&gt;
      &lt;user password=&quot;webgoat&quot; roles=&quot;webgoat_admin&quot; username=&quot;webgoat&quot;/&gt;
      &lt;user password=&quot;basic&quot; roles=&quot;webgoat_user,webgoat_basic&quot; username=&quot;basic&quot;/&gt;
      &lt;user password=&quot;tomcat&quot; roles=&quot;tomcat&quot; username=&quot;tomcat&quot;/&gt;
      &lt;user password=&quot;guest&quot; roles=&quot;webgoat_user&quot; username=&quot;guest&quot;/&gt;
    &lt;/tomcat-users&gt;
 root# $CATALINA_HOME/bin/startup.sh
</pre>
</td>
</table>
<p>
At this point, WebGoat should be running.  Pretend you are an 18-year hacker, and use your penetration skills to break into one of the accounts.  Check out the Access Control Flaws material and the Remote Admin Access section.  Being aware of what is possible, and that the threats are real, helps motivate a person to defend against them.
</p>
<p>
Now it is time to examine the work of OWASP Summer of Code project wiki, <a href="http://www.owasp.org/index.php/OWASP_Securing_WebGoat_using_ModSecurity_Project">Securing WebGoat using ModSecurity</a>.  With a vulnerable server to test out the vulnerabilities against, we will move on to the required software that will help defend against brute force password attacks.  First step, install Lua to use with ModSecurity.</p>
<h2>Lua</h2>
<p>The <a href="http://www.lua.org/">Lua</a> language combines &#8220;simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.&#8221;
</p>
<p>
For a complete discussion of the benefits of Lua, Soumya has written an article &#8220;<a href="http://blog.taragana.com/index.php/archive/10-reasons-why-you-should-make-lua-a-new-programming-language-your-coding-friend-a-detailed-review/">10 Reasons Why You Should Make Lua (A New Programming Language) Your Coding Friend &#8211; A Detailed Review</a>.&#8221;  Erik Wrenholt has also done an <a href="http://www.timestretch.com/FractalBenchmark.html">interesting benchmark</a> again popular languages to compute the Mandelbrot.  We are focusing on Lua is because it can be used with ModSecurity.  Plus, we want to take advantage of the work done by Stephen Craig Evans and others who worked on securing web applications.
</p>
<p>
To install Lua on a linux server by source:
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /usr/local/src/
/usr/local/src root# wget http://www.lua.org/ftp/lua-5.1.4.tar.gz
/usr/local/src root# md5sum lua-5.1.4.tar.gz
d0870f2de55d59c1c8419f36e8fac150  lua-5.1.4.tar.gz
/usr/local/src root#tar xzf  lua-5.1.4.tar.gz
/usr/local/src root# cd lua-5.1.4
/usr/local/src/lua-5.1.4 root# make linux
/usr/local/src/lua-5.1.4 root# make install
/usr/local/src/lua-5.1.4 root# cd /usr/local/lib
/usr/local/lib root# gcc -shared -o liblua.5.1.4.so /usr/local/lib/liblua.a
/usr/local/lib root# ln -s liblua.5.1.4.so liblua.so
</pre>
</td>
</table>
<p>
</p>
<p><h2>ModSecurity</h2>
<p>If you are running a version of ModSecurity older than version 2.5, you will need to upgrade.  As of ModSecurity 2.5, Lua can be used:<br />
<blockquote>The new SecRuleScript directive allows for the execution of Lua scripts which provide an even more flexible and powerful interface into ModSecurity. When is Lua needed? ModSecurity chained rules can easily implement AND logic to create complex rules that evaluate that specific variables are present and have certain data, however they can not easily create proper OR logic. This is where Lua can help.</p></blockquote>
<p>A previous blog post, &#8220;<a href="http://blog.securitymonks.com/2008/07/31/implementing-a-web-application-firewall-with-modsecurity/">Implementing a Web Application Firewall with ModSecurity</a>,&#8221; goes through the step of installing ModSecurity with an Apache Web Server.  Following that post, your Apache httpd.conf configuration files should load the mod_security2.so module and include the modsecurity.conf file.  It is the <strong>modsecurity.conf</strong> file where the additional rules will be added.</p>
<h2>Problem with Usernames and Passwords</h2>
<p>WebGoat demonstrates a few security issues that need to be addressed.  From OWASP&#8217;s &#8220;<a href="http://www.owasp.org/index.php/OWASP_ModSecurity_Securing_WebGoat_Section4_Sublesson_04.2">OWASP ModSecurity Securing WebGoat Section4 Sublesson 04.2</a>&#8221; Forgot Password section, the following points are made:</p>
<ul>
<li>Attackers who are attempting to enumerate valid usernames. If you submit an invalid one the html response text includes info stating as such. We can track this.</li>
<li>Once a specific valid username is identified, the attacker then starts a targeted attack to guess answers to the password hint (favorite color).</li>
<li>Attackers can initiate reverse brute force attacks – this is when an attacker cycles through different valid user accounts and submits the same common answer to the question (submitting Blue as the answer to different usernames).</li>
</ul>
<p>The OWASP ModSecurity Securing WebGoat document does such a good job outlining the security issues along with possible solutions, I am going to leave it to the reader to decide what solutions are appropriate for their systems.  If I continued stepping through to a more secure implementation, I would end up copying everything in the document.  Playing around with the rules, testing the results, is great fun in a geeky security kind of way.  Do drop down and read the reviewer&#8217;s comments.  A very good job by Stephen Craig Evans and all who worked on OWASP Summer of Code project.  Of course, a special thank to Ivan Ristic, who gave us ModSecurity.
</p>
<p>
Recently, I listened to a<a href="http://itc.conversationsnetwork.org/shows/detail3776.html"> IT Conversation podcast</a>, from the O&#8217;Reilly Media Emerging Technology Conference.  Tim O&#8217;Reilly spoke about hackers.  Not the black hatters, but those folks who work tirelessly to bring about the kind of software and services that make the Internet possible.  While the Internet may be at times a dangerous place, thanks to the efforts of these hackers who work out of love for the challenge, often with little regard to financial factors, we have these great tools that go a long way towards helping people secure their applications.
</p>
<h2>Final Thoughts</h2>
<p><a href="http://despair.com/mis24x30prin.html"><img src="http://images.despair.com/products/demotivators/mistakes.jpg" alt="" width=300 align="right" /></a>In today&#8217;s post we examined a security breach that occurred involving a major player in the Internet community.  To help understand that problem, and others, we setup WebGoat.  Sun Tzu wrote in <a href="http://en.wikipedia.org/wiki/The_Art_of_War">The Art of War</a>, &#8220;So it is said that if you know your enemies and know yourself, you will fight without danger in battles.  If you only know yourself, but not your opponent, you may win or may lose.  If you know neither yourself nor your enemy, you will always endanger yourself.&#8221;  WebGoat helps us understand the attack vectors against web applications a little better.  Once identifying a possible problems, we walked through a solution that can help reduce the risk.</p>
<p>
It is easy to find humor in an employee with administrative access using the password &#8220;happiness.&#8221;  The reaction from the Internet community to Twitter&#8217;s problems might be a little schadenfreude at play.  <a href="http://plato.stanford.edu/entries/adorno/">Theodor Adorno</a>, philosopher and sociologist, defined <strong>schadenfreude</strong> as largely unanticipated delight in the suffering of another which is cognized as trivial and/or appropriate.  Or, maybe it is more like <a href="http://www.phrases.org.uk/bulletin_board/32/messages/352.html">whistling past the graveyard</a>, where folks are a bit cheerful or joyful in the face of a situation that doesn&#8217;t warrant it.
</p>
<p>
When very public security incidents occur, companies need to take a little stock.  Not all employees will take training seriously nor follow all policies.  That includes people with important roles.  Employees make mistakes and it is difficult to guard against every possible mistake that could occur.  That is why a layered approach to security is constantly preached.  While each layer cost money, security groups at organizations are in a constant battle to monitor and prevent intrusions in a cost effective way.  Fortunately, we have the work of many hackers (the good kind), helping us develop solutions to deal with daily new challenges.  There are no guarantees.  As Albert Einstein once said, &#8220;Anyone who has never made a mistake has never tried anything new.&#8221;  Wisdom comes when we learn from these mistakes.  CIOs need to ask themselves, &#8220;how safe is my company from being next week&#8217;s security headline?&#8221;  Security groups within an organization must be able to learn and adapt.  At the end of the day, the question is how different is your company from Twitter?  Insanity is doing the same thing and expecting different results.  I&#8217;ll close this post with the wise words of <a href="http://en.wikipedia.org/wiki/Sam_Levenson">Sam Levenson</a>, “You must learn from the mistakes of others. You can’t possibly live long enough to make them all yourself.”</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2009/01/10/webgoat-lua-and-modsecurity-verses-password-guessing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>News Flash: NoScripts Helps Fight Clickjacking 0-Day</title>
		<link>http://blog.securitymonks.com/2008/09/26/news-flash-noscripts-helps-fight-clickjacking-0-day/</link>
		<comments>http://blog.securitymonks.com/2008/09/26/news-flash-noscripts-helps-fight-clickjacking-0-day/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 22:56:27 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Clickjacking]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[NoScript]]></category>
		<category><![CDATA[OWASP]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=491</guid>
		<description><![CDATA[Robert “RSnake” Hansen and Jeremiah Grossman were to present at OWASP AppSec NY 2008.  Unfortunately, their presentation involving clickjacking was effectively canceled at the request of the vendor Adobe.  In addition to Adobe, RSnake and Grossman have discussed the vulnerability with Microsoft and Mozilla.  OWASP ended up having a clickjacking 20-Questions session [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://mcchen.blog.friendster.com/files/news_flash.gif" alt="" align="left"  width=120 /><a href="http://ha.ckers.org/">Robert “RSnake” Hansen</a> and <a href="http://jeremiahgrossman.blogspot.com/">Jeremiah Grossman</a> were to present at <a href="http://www.owasp.org/index.php/OWASP_NYC_AppSec_2008_Conference">OWASP AppSec NY 2008</a>.  Unfortunately, their presentation involving clickjacking was effectively canceled at the request of the vendor Adobe.  In addition to Adobe, RSnake and Grossman have discussed the vulnerability with Microsoft and Mozilla.  OWASP ended up having a clickjacking 20-Questions session which basically outlined the timeline of events and high level concepts of what was going on.</p>
<p>
<strong>Clickjacking</strong>, as described Grossman, is a browser vulnerability exploitation that gives &#8220;an attacker the ability to trick a user into clicking on something only barely or momentarily noticeable.&#8221;  <a href="http://seclists.org/dailydave/2008/q3/0248.html">Dave Aitel</a> adds a little more detail when he wrote to insecure.org:<br />
<blockquote>Essentially if your web page is in the same frame as another page you can slide them under your buttons/URLS using DHTML such that when the user is clicking on your link, they instead really are clicking on some random place on a web page of your choice. This process is essentially invisible to the end user. </p></blockquote>
<p>Clickjacking is a well-known issue and isn&#8217;t really anything new.  The decision to do a presentation came about because RSnake and Grossman felt clickjacking was severely under appreciated and largely undefended.  They had hoped they could begin to change that perception.  The presentation was to consist of demonstrating the potential attacks along with some proof of concept (PoC) code and real working exploits.  The problem was, to quote RSnake, &#8220;None of the issues we found relating to the browser were particularly easy to fix, it turns out.&#8221;  Please read RSnake&#8217;s post, &#8220;<a href="http://ha.ckers.org/blog/20080915/clickjacking/">Clickjacking</a>&#8221; and Gossman&#8217;s post &#8220;<a href="http://jeremiahgrossman.blogspot.com/2008/09/cancelled-clickjacking-owasp-appsec.html">(Cancelled) / Clickjacking &#8211; OWASP AppSec Talk</a>.&#8221;  The posts outline their decision to cancel along with additional details.  <u>Editorial Note:</u> If you are interested at all in security, start reading both RSnake&#8217;s and Grossman&#8217;s blogs.  Their posts are always very informative.
</p>
<p>
Ryan Naraine of ZDNet posted &#8220;<a href="http://blogs.zdnet.com/security/?p=1972">Clickjacking: Researchers raise alert for scary new cross-browser exploit</a>&#8221; and included this great quote:<br />
<blockquote>I also received private confirmation from a high-level source at an affected vendor about the true severity of this issue.  In a nutshell, I was told that it’s indeed “<strong>very, freaking scary</strong>” and “<strong>near impossible</strong>” to fix properly.</p></blockquote>
<p>
The news about clickjacking is not a news flash.  Even news about the cancellation, RSnake and Grossman posted over ten days ago.  The OWASP NYC AppSec 2008 Conference ended yesterday having run from from Sept 22nd &#8211; 25th 2008.  What is new is that <a href="http://hackademix.net/">Giorgio Maone</a> wrote Ryan Naraine concerning <a href="http://blogs.zdnet.com/security/?p=1973">how NoScript can help</a>.  Clickjacking being “very, freaking scary” and “near impossible” to fix properly, sounds like another problem getting a bit more press in the US right now.  All the more reason that while waiting for a patch, folks need a solution today.  <a href="http://noscript.net/">NoScript</a> has can help.  To quote Maone:<br />
<blockquote>I had access to detailed information about how this attack works and I can tell you the following:
<ol>
<li>It’s really scary</li>
<li> NoScript in its default configuration can defeat most of the possible attack scenarios (i.e. the most practical, effective and dangerous) — see this comment by Jeremiah Grossman himself.</li>
<li>For 100% protection by NoScript, you need to check the “Plugins|Forbid &lt;iframe&gt;” option.</li>
</ol>
</blockquote>
<p>Finally, some good news.  And that, my friend, is what makes it a news flash.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2008/09/26/news-flash-noscripts-helps-fight-clickjacking-0-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Risk Assessment: A Starting Point</title>
		<link>http://blog.securitymonks.com/2008/09/22/risk-assessment-a-starting-point/</link>
		<comments>http://blog.securitymonks.com/2008/09/22/risk-assessment-a-starting-point/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 06:10:51 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[COBIT]]></category>
		<category><![CDATA[ISACA]]></category>
		<category><![CDATA[Mind Maps]]></category>
		<category><![CDATA[NIST]]></category>
		<category><![CDATA[Risk]]></category>
		<category><![CDATA[Security Catalyst]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=439</guid>
		<description><![CDATA[Recently I was asked if I could provide a few pointers to help in developing a risk assessment process for an organization.  I thought I would share my response.  First, I would like to draw your attention to the mind map image over to the left of this text.  The mind map [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikiversity.org/wiki/Project_management/Risk_assessment"><img src="http://upload.wikimedia.org/wikiversity/en/thumb/0/01/170_PM_Risk_Assessment.png/800px-170_PM_Risk_Assessment.png" align="left" width=200/></a>Recently I was asked if I could provide a few pointers to help in developing a risk assessment process for an organization.  I thought I would share my response.  First, I would like to draw your attention to the <a href="http://en.wikipedia.org/wiki/Mind_map">mind map</a> image over to the left of this text.  The mind map represents a basic risk management methodology and is provided by <a href="http://en.wikiversity.org/wiki/Wikiversity:Welcome">Wikiversity</a>.  If you are unfamiliar with Wikiversity, it is an interesting project which is &#8220;devoted to learning resources and learning projects for all levels, types, and styles of education from pre-school to university, including professional training and informal learning.&#8221;  It is a very interesting project and I applaud their efforts.  </p>
<h3>Basic Terminology</h3>
<p>A good starting point in developing a risk assessment process is <a href="http://csrc.nist.gov/publications/nistpubs/800-30/sp800-30.pdf">NIST SP 800-30, &#8220;Risk Management Guide for Information Technology Systems.&#8221;</a>  The document provides the following definition:<br />
<blockquote>Risk assessment is the first process in the risk management methodology. Organizations use risk assessment to determine the extent of the potential threat and the risk associated with an IT system throughout its <a href="http://en.wikipedia.org/wiki/Systems_Development_Life_Cycle">SDLC</a>. The output of this process helps to identify appropriate controls for reducing or eliminating risk during the risk mitigation process.</p></blockquote>
<p>Frequently <strong>risk</strong> will be defined as a function of the <u>likelihood</u> of a given threat-source’s exercising a particular potential <u>vulnerability</u>.  What should also be included is the resulting <u>impact</u> of that adverse event on the organization.  </p>
<p>
NIST SP 800-30 contains information on risk assessment and management.  Recently, NIST released <a href="http://csrc.nist.gov/publications/PubsDrafts.html#SP-800-39">NIST SP 800-39</a>, &#8220;DRAFT Managing Risk from Information Systems: An Organizational Perspective,&#8221; which contains a references to NIST SP 800-30 Revision 1, &#8220;Guide for Conducting Risk Assessments.&#8221;  NIST SP 800-30 Revision 1, when it is released, will be the document for risk assessment while NIST SP 800-39 is for risk management.
</p>
<p>
Michael Smith, the Guerilla CISO, had a posting &#8220;<a href="http://www.guerilla-ciso.com/archives/406">An Open Letter to NIST About SP 800-30</a>&#8220;.  Michael writes &#8220;The best thing that you have given us is not the <a href="http://csrc.nist.gov/groups/SMA/fisma/framework.html">risk management framework</a>, it was SP 800-30, &#8216;Risk Management Guide for Information Systems&#8217;.  It’s small, to-the-point, and scalable from a single server to an entire IT enterprise.&#8221;  I&#8217;ll leave it to the reader to view the rest of the post.  The point is, NIST SP 800-30 currently is the best document to start with when talking about risk assessment.
</p>
<p>
The nine primary steps in the risk assessment methodology:
<ol>
<li>System Characterization</li>
<li>Threat Identification</li>
<li>Vulnerability Identification</li>
<li>Control Analysis</li>
<li>Likelihood Determination</li>
<li>Impact Analysis</li>
<li>Risk Determination</li>
<li>Control Recommendations</li>
<li>Results Documentation</li>
</ol>
<p>
Now that risk assessment is defined along with which NIST documents contains what, let us talk about risk management.  Risk management is the process of identifying risk, assessing risk, and taking steps to <strong>reduce risk to an acceptable level</strong>.  The risk management process is meant to protect an organization and its ability to perform its mission.  It is not just just a technical function carried out by the IT experts to protect IT assets.  It is an essential <strong>management function</strong> of the organization.  </p>
<h3>Framework</h3>
<p>Awhile back, I did a post &#8220;<a href="http://blog.securitymonks.com/2008/07/04/intense-simplicities/">Intense Simplicities</a>&#8221; which discussed the risk-based protection model verses the policy based compliance model.  Several frameworks were discussed and a &#8220;<a href="http://blog.securitymonks.com/security-mappings/">Security Mappings</a>&#8221; page was developed.  Examine the frameworks discussed in the previous post and notice that basically the primary steps in risk assessment can be mapped back into the frameworks.  Before developing a risk assessment methodology, consider its place in the whole risk management methodology and the framework of the organization.  This allows you to utilize what has already been developed.
</p>
<p>
IT Governance Institute® (ITGI™) is also developing the IT Risk Management Framework.  To quote from Urs Fischer article, &#8220;The framework aims to fill the gap between generic risk management frameworks such as the Committee of Sponsoring Organisations of the Treadway Commission (COSO)&#8217;s Enterprise Risk Management (<a href="http://www.coso.org/documents/COSO_ERM_ExecutiveSummary.pdf">ERM</a>) and Australia/New Zealand AS/NZ 4360, and detailed (mostly security-related) IT risk management frameworks. Indeed, the goal of this framework is to allow organisations to understand and manage all IT-related risks (beyond security) and to address all aspects (beyond operational management of IT) when managing risk.</p>
<h3>Information Sources</h3>
<p>ISACA has made available a great deal of information that can be used in developing a risk assessment process.  The following documents are bit older, but open to the world.  </p>
<ul>
<li><a href="http://itcinstitute.com/display.aspx?id=3689">Framing Your Choices: Weighing Three Risk Management Frameworks by</a> Linda L. Briggs</li>
<p> &#8211; offers the conclusion that newer frameworks such as AS/NZS 4360 or M_o_R offer a solid route to first understanding and then controlling business risk.</p>
<li><a href="http://www.isaca.org/Content/ContentGroups/Journal1/20033/Risk_Assessment_Tools_A_Primer.htm">Risk Assessment Tools: A Primer</a> &#8211; the article looks at risk assessment tools, in order to creates a framework of understanding and provides insight into the world of automated risk analysis.</li>
<li><a href="http://www.isaca.org/Content/ContentGroups/CoBIT2/Whats_New/Risk_Without_Remorse1.htm">Risk Without Remorse</a> &#8211; the article makes the argument that &#8220;by implementing COBIT risk management, the CIO should expect better portfolio management decisions and improved risk-reward communications intra- and interdepartmentwide, as well as a better ROA.&#8221;</li>
<li><a href="http://www.isaca.org/Content/ContentGroups/Journal1/20012/Risk_and_Control_Self-Assessment_%28RCSA%29.htm">Risk and Control Self-Assessment (RCSA)</a> &#8211; the article makes the argument that risk and control self-assessment (RCSA) is &#8220;a great asset in several phases of the audit process, starting with the risk assessment and development of the annual audit plan or individual audit plans of the area being reviewed.&#8221;</li>
<li><a href="http://www.isaca.org/Content/ContentGroups/Standards2/Standards,_Guidelines,_Procedures_for_IS_Auditing/IS_Auditing_Procedure_P1_IS_Risk_Assessment_Measurement1.htm">IS Auditing Procedure: P1 IS Risk Assessment Measurement</a></li>
<li><a href="http://www.isaca.org/Content/ContentGroups/Standards2/Standards,_Guidelines,_Procedures_for_IS_Auditing/IS_Auditing_Guideline_G13_Use_of_Risk_Assessment_in_Audit_Planning1.htm">IS Auditing Guideline: G13 Use of Risk Assessment in Audit Planning</a></li>
<li><a href="http://www.isaca.org/Content/ContentGroups/Standards2/Standards,_Guidelines,_Procedures_for_IS_Auditing/Standard_for_IS_Auditing_S11_Use_of_Risk_Assessment_in_Audit_Planning1.htm">Standard for IS Auditing: S11 Use of Risk Assessment in Audit Planing</a></li>
</ul>
<p>If you become a member of ISACA, you can access more recent documents involving risk assessment and management.  These include:</p>
<ul>
<li>A Comprehensive Method for Assessment of Operational Risk in E-banking by George Tanampasidis, CISA, PMP</li>
<li>Risk Management Standards: The Bigger Picture by David Ramirez, CISA, CISM, CISSP, BS 7799 LA, MCSE, QSA</li>
<li>Automating Security Policy and Procedures With Workflow: How to Improve the Effectiveness of Risk Management Solutions by Michael Godfrey</li>
<li>New Framework for Enterprise Risk Management in IT by Urs Fischer, CISA, CIA, CPA Swiss</li>
</ul>
<p>CERT just recently produced a podcast, &#8220;<a href="http://www.cert.org/podcast/show/20080916young.html">Security Risk Assessment Using OCTAVE® Allegro</a>.&#8221;  OCTAVE Allegro provides a streamlined assessment method that focuses on risks to information used by critical business services.  The authors of the blog site, the RiskAnalys.is, are big advocates of the <a href="http://fairwiki.riskmanagementinsight.com/">Factor Analysis of Information Risk (FAIR) Framework</a>.  FAIR is meant to provide a framework for understanding, analyzing, and measuring information risk.
</p>
<p>
<strong>Update:</strong><a href="http://alexhutton.com/">Alex Hutton</a> provided some important clarification on  FAIR.  Alex points out, &#8220;FAIR is actually more concerned with the creation of accurate probabilities than how you go about _doing_ an enterprise risk assessment (because there are plenty of cookbooks for that).  So FAIR isn&#8217;t actually incongruous with use in OCTAVE or 800-30 or any other assessment methodology with a &#8217;scan/prioritize/fix/repeat/&#8217; Deming cycle at it&#8217;s core.&#8221;  Alex also provides a great pointer to the <a href="http://www.enisa.europa.eu/rmra/comparison.html">ENISA&#8217;s website</a> which includes a comparison of the 18 different Risk Assessment Methodologies.  Alex writes, &#8220;They are a little obtuse on their definitions of risk and how the 18 ass.meth.&#8217;s address their specific world view, but it is an interesting comparison document.  I got a big kick out of the monster diagram that was their review decision tree.&#8221;
</p>
<p>
The <a href="http://www.iso27001security.com">ISO 27001 Security</a> site has compiled a very nice listing with brief outlines of information security risk analysis methods, standards, and tools.  <a href="http://www.isect.com/">IsecT Ltd.</a>, home of the <a href="http://www.noticebored.com/">NoticeBored security awareness service</a>, voluntarily maintains the site as a &#8220;not-for-profit labour-of-love activity.&#8221;  They have done a great job of keeping the site up-to-date.  The site also makes available a <a href="http://www.iso27001security.com/html/iso27k_toolkit.html">free ISO27k toolkit</a>.  The toolkit consists of &#8220;a collection of papers contributed by members of the ISO27k Implementers’ Forum, either individually or through collaborative working groups organized on the Forum.&#8221;  Three documents of particular interest are &#8220;<a href="http://www.iso27001security.com/ISO27k_RA_spreadsheet_version_2.xls">Information security risk analysis spreadsheet</a>,&#8221; &#8220;<a href="http://www.iso27001security.com/ISO27k_FMEA_spreadsheet.xls">FMEA risk analysis spreadsheet</a>&#8220;, and &#8220;<a href="http://www.iso27001security.com/ISO27k_Risk_Register.xlt">Information security risk register</a>.&#8221;
</p>
<p>
I tend to like information sources that are available to the public at no cost.  Alex pointed out that Microsoft has put out the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=c782b6d3-28c5-4dda-a168-3e4422645459&#038;displaylang=en">The Security Risk Management Guide</a>.  Microsoft describes the guide as helping explain &#8220;how to conduct each phase of a security risk management project and create an ongoing process that drives the organization towards the most useful and cost-effective controls to mitigate security risks. It incorporates real-world experiences from Microsoft IT and also includes input from Microsoft customers and partners.&#8221;
</p>
<p>
After mentioning Microsoft, I feel compelled to point out an open source project.  The <a href="http://somap.org/">Security Officers Management and Analysis Project (SOMAP)</a> is a project with the goal to &#8220;develop and maintain Open Source Information Security Risk Management tools and utilities.&#8221;  SOMAP operates on the belief that &#8220;Information Security is not a competitive issue and only freely available and cooperatively developed risk management utilities and tools can potentially lead to a better security management and to further development of the whole risk management field.&#8221;  They have created the &#8220;<a href="http://somap.org/handbook/default.html">Risk Management Handbook</a>,&#8221; &#8220;<a href="http://somap.org/guide/default.html">Risk Assessment Guide</a>,&#8221; &#8220;Security Officers Best Friend (<a href="http://somap.org/sobf/default.html">SOBF Tool</a>),&#8221; and &#8220;Open Risk Model Repository (<a href="http://somap.org/repository/default.html">ORIMOR</a>).&#8221;  See their site for additional details. </p>
<h3>Blogs</h3>
<p>A few blog sites where information can be obtained, and questions posted, are:</p>
<ul>
<li><a href="http://thurston.halfcat.org/blog/">Not Bad For a Cubicle</a>: Risk Management made interesting.</li>
<li><a href="http://risktical.com/">Risktical Ramblings</a>:  Assessing, Articulating &#038; Quantifying Information Security Risk by Chris Hayes.</li>
<li><a href="http://srmsblog.burtongroup.com/">Security and Risk Management Strategies Blog</a>:  Burton Group.</li>
<li><a href="http://www.realtime-itcompliance.com/index.html">RealTime IT Compliance</a>:  This is Rebecca Herold&#8217;s site who specializes in risk assessment, gap analysis, policy content development, awareness training, strategy development and implementation.  The few times I have talked with her, she has been real friendly and helpful.</li>
</ul>
<h3>Recent Blog Posts</h3>
<p>Below are a few recent blog postings that maybe of interest.  The posts were pulled from Google Reader with accompanying blurbs of text.   </p>
<ul>
<li>Risktical Ramblings: <a href="http://risktical.com/?s=CVSS">Risk and CVSS</a> &#8230; I would encourage anyone reading this to perform their own review of <a href="http://nvd.nist.gov/cvss.cfm">CVSS</a> and how it can possibly augment their own risk assessments efforts. In my opinion, there are some really useful “metric vectors” that provide a simple yet powerful way to analyze a vulnerability.. &#8230;</li>
<li>The Security Catalyst: <a href="http://www.securitycatalyst.com/blog/2008/09/refreshing-reloading-refueling/">Refreshing, Reloading, Refueling</a> &#8230; My goal in writing the book was simple: present enough information to create a shift in thinking. Beyond that, a keynote, executive seminar and guided system has been developed, tested and refined to further expand on the information in the book, bring it to life and drive results. Part of our journey will be working with organizations (small and large) to implement the tenets outlined in Into the Breach to improve revenue, complete a successful risk assessment, build an awareness program that works or influence a positive change in how people, information and risk are managed &#8230;</li>
<li>(ISC)2 Blog: <a href="http://blog.isc2.org/isc2_blog/2008/08/proving-the-val.html">Proving the Value of Qualitative Risk Assessments</a> &#8230; Qualitative risk assessments are a cornerstone security management tool.  This type of assessment process is characterized by estimates of asset values, threats, vulnerabilities, and costs from anticipated exposures.  Risk management frameworks are a way for managers to determine where to allocate resources when risk is at an unacceptable level &#8230;.</li>
<li>RiskAnalys.is: <a href="http://riskmanagementinsight.com/riskanalysis/?p=393">Relentless Reflection &#8211; What it Means in Risk Management</a> &#8230; Picking up from yesterday, Today I’d like to talk about: HANSEI &#8211; WHAT IS “RELENTLESS REFLECTION?” &#8211; And why we’re talking about it in the context of Risk Analysis. Recall from yesterday’s post about how I got to thinking about the concept of Hansei-Kaizen, “relentless reflection” and “continuous improvement” and how we might apply that to risk man &#8230;</li>
<li>bsi: <a href="https://buildsecurityin.us-cert.gov/daisy/bsi/articles/best-practices/deployment/582-BSI.html">Navigating the Security Practice Landscape</a> &#8230; RA risk assessment (5) SA system and services acquisition (11) SC system and communications protection (23) SI system and information integrity (SI) Mappings to Other Standards Appendix G Security Control Mappings provides a detailed mapping of 800-53 controls to ISO 17799 paragraphs. Appendix H Standards and Guidance Mappings provide &#8230;</li>
<li>RiskAnalys.is: <a href="http://riskmanagementinsight.com/riskanalysis/?p=381">UPDATES GALORE! or, THE PRONOUN “WE” MEANS YOU AND ME!</a> &#8230;a Good Risk Assessment Methodology” &#8211; written by yours truly and Jack.  It’s a very high-level document, and serves two purposes: For novices it helps parse out what is important in any undertaking to understand corporate risk (the repeated discussions on the ISO 27001 mailing list make me think it would be a place ripe for such a document). &#8230; </li>
</ul>
<p>Build Security In (bsi) is maintained for DHS.  It contains documents that are continuously being updated.  The &#8220;<a href="https://buildsecurityin.us-cert.gov/daisy/bsi/articles/best-practices/risk.html">Risk Management</a>&#8221; area provides a framework for identifying, tracking, and managing software risks. </p>
<h3>Only a Starting Point</h3>
<p>Overcoming Bias, a great thought provoking blog, recently posted, &#8220;<a href="http://www.overcomingbias.com/2008/09/say-it-loud.html">Say It Loud</a>.&#8221;  The author, Eliezer Yudkowsky, quotes <a href="http://en.wikipedia.org/wiki/William_Strunk,_Jr.">Will Strunk</a>: &#8220;If you don&#8217;t know how to pronounce a word, say it loud! If you don&#8217;t know how to pronounce a word, say it loud!&#8221;  Eliezer goes on to say, &#8220;This comical piece of advice struck me as sound at the time, and I still respect it. Why compound ignorance with inaudibility?  Why run and hide?&#8221;  This corresponds with one of my favorite graphics created by the <a href="http://headrush.typepad.com">Creating Passionate Users blog</a>:
</p>
<p>
<img src="/images/smartbutnot.jpg"  />
</p>
<p>
Eliezer makes a very valid point.  To those who &#8220;sounds clueless, but isn&#8217;t,&#8221; you need to speak up.  Otherwise, you are helping the &#8220;sounds smart, but isn&#8217;t&#8221; promote their cluelessness throughout the organization.
</p>
<p>
With that in mind, let me state this loudly: the above sources will provide a very useful starting point in developing a risk assessment process.  NIST SP 800-30 is the best place to start.  Also check out NIST SP 800-39.  The IT Governance Institute has been talking about the IT Risk Management Framework for awhile now.  It should be great when it comes out, but the last I heard there was no release date set.  CERT OCTAVE is freely available, so that makes it a good resource.  I am less familiar with FAIR, though it looks very interesting.  I tend to use COBIT when dealing with business processes as a checklist of controls to have in place.  Members of ISACA should look in the journal&#8217;s archive area.  The last issue was focused on risk and contained a couple of articles that would be helpful.  The articles that are open to the public are somewhat dated.  The blog sites will be helpful once you start narrowing in and know what you are interested in doing.  In the end, this post is meant only as a starting point.  It is not a complete list; not even close. While there may be a great deal more work to do, your journey has begun.  Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2008/09/22/risk-assessment-a-starting-point/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Implementing a Web Application Firewall with ModSecurity</title>
		<link>http://blog.securitymonks.com/2008/07/31/implementing-a-web-application-firewall-with-modsecurity/</link>
		<comments>http://blog.securitymonks.com/2008/07/31/implementing-a-web-application-firewall-with-modsecurity/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 04:02:27 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[Defense in Depth]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[ModSecurity]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=169</guid>
		<description><![CDATA[There are a few topics I have meant to do a post on for awhile.  Sometimes having too much interest and information on a topic can be a bad thing.  Wanting to pull various postings and articles along with implementation instructions can be a bit time consuming.  Plus, in order to demonstrate [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/modsecurity.gif" alt="ModSecurity Image" align="left"/>There are a few topics I have meant to do a post on for awhile.  Sometimes having too much interest and information on a topic can be a bad thing.  Wanting to pull various postings and articles along with implementation instructions can be a bit time consuming.  Plus, in order to demonstrate why someone might be interested in implementing a web application firewall (<a href="http://www.owasp.org/index.php/Web_Application_Firewall">WAF</a>), I envisioned a post discussing the collapse of the perimeter and addressing points made by the <a href="http://www.opengroup.org/jericho/">Jericho Forum</a> (see the <a href="http://www.securitycatalyst.com/blog/2008/06/security-roundtable-for-june-2008-clarion-call-of-the-jericho-forum/">Security Roundtable</a> podcast for June 2008 for a good discussion on the topic).  <a href="http://raffy.ch/blog/">Raffael Marty</a> makes excellent points in his soon to be released book, &#8220;<a href="http://www.amazon.com/Applied-Security-Visualization-Raffael-Marty/dp/0321510100">Applied Security Visualization</a>&#8220;:</p>
<blockquote><p>The crime landscape is shifting.  Attacks are moving up the network stack.  Network-based attacks are not the prime source of security problems anymore.  The attacks today are moving into the application layer: Web 2.0, instant messenger attacks, fraud, information theft, and crime-ware are just some examples of new types of attacks that generate a load of data to be collected and analyzed.  Beware!  Applications are really chatty and generate alot of data.</p></blockquote>
<p>While my current post is not about security visualization (see earlier post &#8220;<a href="http://blog.securitymonks.com/2007/10/20/security-data-visualization/">Security Data Visualization</a>&#8220;), I would like to point out that <a href="http://davix.secviz.org">DAVIX</a>, a live CD for data analysis and visualization, is expected to be released August 6th.  That should be really cool and fun.</p>
<p>
Since application security is a topic of interest for me, I ran into the problem of having too many topics I wanted to discuss when I started trying to write a post on <a href="http://www.modsecurity.org/">ModSecurity</a>, an open source, free WAF Apache module.  Today, rather than waiting for me to integrate the information, I decided to move ahead and do the post while limiting myself to only pointing out the various sources.  The reader can follow the links for a more in-depth discussion and understanding on the topic.</p>
<h3>Why You Should Care</h3>
<p>The <a href="http://itradio.com.au/security/">Risky Business</a> podcast has come to be one of my favorite podcasts.  The host, <a href="http://itradio.com.au/security/?page_id=2">Patrick Gray</a> and regular guest <a href="http://www.zdnet.com.au/tag/munir_kotadia.htm">Munir Kotadia</a>, just cracks me up.  Plus the show is informative and features great guests.  This week&#8217;s show had an interview with <a href="http://itradio.com.au/security/?p=85">H D Moore talking about the DNS bug</a>.  Timely and informative; what else can one ask for?  The <a href="http://itradio.com.au/security/?p=81">68th episode</a>, done at the beginning of this month, had an interview with <a href="http://jeremiahgrossman.blogspot.com/">Jeremiah Grossman</a> concerning web application firewalls.  As Patrick writes in the show notes, &#8220;<em>it takes typical organizations around <strong>130 days to fix sequel injection bugs</strong> in code.  But you can mitigate these sorts of things with a Web app firewall, and you won’t even have to deal with the development team! Hooray!</em>.&#8221;
</p>
<p>
In Grossman&#8217;s blog post &#8220;<a href="http://jeremiahgrossman.blogspot.com/2008/06/can-wafs-protect-against-business-logic.html">Can WAFs protect against business logic flaws?</a>&#8220;, he pointed out that &#8220;<em>WAFs don&#8217;t defend against every logic flaw, or even every crazy form of SQLi or XSS. Just as white/black box scanners can&#8217;t identify every vulnerability and neither can expert pen-testers or source code auditors</em>.&#8221;  Stuart King, in his article, &#8220;<a href="http://www.computerweekly.com/blogs/stuart_king/2008/07/more-wafs.html">Larry David and Web Application Firewalls</a>&#8220;, builds upon this idea when he wrote:</p>
<blockquote><p>Back to the <a href="http://www.csoonline.com/article/412163/Industry_View_Web_Application_Security_Today_Are_We_All_Insane_/1">CSO article</a> where the point is made that we are sitting on a huge legacy of insecure code and that &#8220;we can&#8217;t rewrite history.&#8221; So, the argument is that a web application firewall mitigates the risk &#8211; note: does not solve the problem &#8211; until the code can be replaced.</p>
<p>How much of the risk is mitigated is open to debate, but there are lots of other things to consider too. For instance the cost of redeveloping code against the cost of purchasing and supporting a WAF. We also need to consider the value and risk profile of the product. </p></blockquote>
<p>Today&#8217;s world consist of attackers adjusting focus from network-based attacks to the application layer.  Grossman in his post &#8220;<a href="http://jeremiahgrossman.blogspot.com/2008/03/website-security-strategies-that-work.html">Website Security Strategies that Work</a>&#8221; makes the claim that &#8220;<em><strong>9 out of 10 (or more) websites have vulnerabilities</strong> as a result of being built by those who didn’t know or appreciate the severity of today’s attacks</em>.&#8221;  There is no arguing that many organizations are sitting on a huge legacy of insecure code, much of which may have been written before the discovery of prevalent vulnerabilities such as <a href="http://ha.ckers.org/xss.html">XSS</a>, <a href="http://ha.ckers.org/sqlinjection/">SQL Injection</a>, <a href="http://ha.ckers.org/blog/20080202/csrf-yup-its-real-folks/">CSRF</a>, etc.  Even worse, organization often have their security groups focused on network or system security, leaving application level security to developers.  Unfortunately, these developers are receiving little or no training, while remaining under pressure to produce code under short deadlines.
</p>
<p>
Andre Gironda series, starting with &#8220;<a href="http://www.tssci-security.com/archives/2008/06/23/week-of-war-on-wafs-day-1-top-ten-reasons-to-wait-on-wafs/">Week of War on WAF’s: Day 1 — Top ten reasons to wait on WAF’s,</a>&#8221; provides important reasons why WAFs should not be viewed as a silver bullet solution.  Rich Mogull in his post &#8220;<a href="http://securosis.com/2008/06/02/web-application-security-we-need-web-application-firewalls-to-work-better/">Web Application Security: We Need Web Application Firewalls To Work. Better</a>&#8221; makes the important point:<br />
<blockquote>With old school vulnerabilities we know the details of the specific vulnerability and (usually) exploit mechanism. With WAFs, we are trying to block vulnerability classes instead of specific vulnerabilities. This is a HUGE difference. The WAF doesn’t know the details of the application or any application-specific vulnerabilities, and thus is much more limited in what it can block.</p></blockquote>
<p>Mogull goes on to state that WAFs can:<br />
<blockquote>no longer be merely external boxes protecting against generic vulnerabilities; they need tighter integration into our applications. In the long term, I’ve branded this Application and Database Monitoring and Protection (<a href="http://securosis.com/2007/12/17/definitions-content-monitoring-and-protection-and-application-and-database-monitoring-and-protection/">ADMP</a>) as we create a dedicated application and database security stack that links from the browser on the front end, to the DB server on the back.</p></blockquote>
<p>ADMPs, or if you prefer WAFs + Database Activity Monitoring (WAFs+DAM),  would be another step in the evolution of WAFs.  As <a href="http://www.ivanristic.com/">Ivan Ristic</a>, creator of ModSecurity, points out in his blog post &#8220;<a href="http://blog.modsecurity.org/2008/05/whats-the-score.html">What&#8217;s the Score of the Game?</a>&#8220;:<br />
<blockquote>I feel that one of areas where organizations are failing, with regards to web application security, is that there is a lack of communication between the following three groups: Development teams (who are running source code reviews), InfoSec teams (who are running vulnerability scans) and Operational Security teams (who are running web application firewalls).  These three teams each have unique perspectives on the vulnerabilities of the webapps and they should share their data with each other.</p></blockquote>
<p>Nicely stated.  No one is arguing that writing secure code is not the answer.  If organization began adapting secure systems development lifecycle (<a href="https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/sdlc/326-BSI.html">SDLC</a>) models into their business operation, many security problems would go away.  Building secure software will require changes in the current development culture, which will include people, processes, and technology.  No small task.
</p>
<p>
Gunnar Peterson has a nice post, &#8220;<a href="http://1raindrop.typepad.com/1_raindrop/2006/09/waf_and_xsg_ris.html">WAF and XSG Risk and Effectiveness at 20,000 feet</a>&#8221; where he discusses modeling of combination of risk and effectiveness to identify areas of focus.  As Peterson <a href="http://1raindrop.typepad.com/1_raindrop/2006/01/defense_in_dept.html">points out in another post</a>, &#8220;<em>WAFs are not as static as network firewalls&#8230;Instead WAFs collaborate much more directly with development, which is another growth opportunity for security industry</em>.&#8221;
</p>
<p>
This post is going to stay focused on WAFs.  With it taking on average 130 days to fix sequel injection bugs, organizations need something they can implement today.  WAFs have an important role to play in adding a layer of security and monitoring to a <a href="https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/principles/347-BSI.html">defense in depth security approach</a>.  WAFs will evolve.  They are in the process of evolving now.  Understanding the fundamental ideas and going through the implementation of an open source solution starts us on the path of better understanding of future technologies.</p>
<h3>An Implementation Using ModSecurity</h3>
<p>Building on previous posts concerning &#8220;<a href="http://blog.securitymonks.com/2008/04/14/an-apache-implementation/">An Apache Implementation</a>&#8220;, &#8220;<a href="http://blog.securitymonks.com/2008/04/21/php-implementation/">PHP Implementation</a>&#8220;, and &#8220;<a href="http://blog.securitymonks.com/2008/04/24/apache-and-openssl/">Apache and OpenSSL</a>&#8220;, we have an Apache web server setup to build upon.  For additional details, please get Ivan Ristic&#8217;s book, &#8220;<a href="http://www.apachesecurity.net/">Apache Security</a>.&#8221;  It really is a must have book for anyone serious about running an Apache web server.   Ristic also maintains the ModSecurity <a href="http://www.modsecurity.org/">website</a> and <a href="http://blog.modsecurity.org/">blog</a>, which serves as a great source for up-to-date information on ModSecurity.
</p>
<p>
The Apache module <a href="http://httpd.apache.org/docs/2.2/mod/mod_unique_id.html">mod_unique_id</a> needs to be installed for  ModSecurity to work properly.  This module was not installed when we configured Apache.  At that time, we did not know we needed it.  While it can be somewhat inconvenient, for security reasons it is best not to install modules not needed.</p>
<h4><strong>1.  Stop Apache Server.</strong></h4>
</p>
<p><table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
# /usr/local/apache/bin/apachectl stop
</pre>
</td>
</table>
<p></p>
<h4><strong>2.  Install mod_unique_id Module.</strong></h4>
<p>For non Mac OS X, do the following:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd /usr/local/src/httpd-2.2.8
/usr/local/src/httpd-2.2.8 root# make clean
/usr/local/src/httpd-2.2.8 root# CC=gcc \
CFLAGS="-O3 -fno-omit-frame-pointer" \
./configure --prefix=/usr/local/apache \
--enable-rewrite \
--enable-so \
--disable-imap \
--disable-userdir --with-mpm=worker --enable-ssl --enable-unique-id --enable-unique-id
/usr/local/src/httpd-2.2.8 root# make
/usr/local/src/httpd-2.2.8 root# make install
</pre>
</td>
</table>
<p> <br />
For Mac OS X, please do:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd /usr/local/src/httpd-2.2.8
/usr/local/src/httpd-2.2.8 root# make clean
/usr/local/src/httpd-2.2.8 root# CC=gcc \
CFLAGS="-O3 -fno-omit-frame-pointer" \
LDFLAGS="-L/opt/local/lib -L/usr/lib" \
./configure --prefix=/usr/local/apache --enable-rewrite \
--enable-so --disable-imap --disable-userdir \
--with-mpm=worker --enable-ssl --enable-unique-id
/usr/local/src/httpd-2.2.8 root# make
/usr/local/src/httpd-2.2.8 root# make install
</pre>
</td>
</table>
<p>   </p>
<h4><strong>3.  Install <a href="http://www.pcre.org/">PCRE</a>.</strong></h4>
<p>Only under Mac OS X did I have to install Perl Compatible Regular Expressions (PCRE).  You may be able to skip this step, depending on your OS.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd /usr/local/src
/usr/local/src root# wget http://downloads.sourceforge.net/pcre/pcre-7.7.tar.gz
/usr/local/src root# tar xzf pcre-7.7.tar.gz
/usr/local/src root# cd pcre-7.7
/usr/local/src/pcre-7.7 root# CC=gcc \
CFLAGS="-O3 -fno-omit-frame-pointer" \
LDFLAGS="-L/opt/local/lib -L/usr/lib" \
./configure
/usr/local/src/pcre-7.7 root# make
/usr/local/src/pcre-7.7 root# make test
/usr/local/src/pcre-7.7 root# make install
</pre>
</td>
</table>
<p>   </p>
<h4><strong>4.  Install the latest version of <a href="http://xmlsoft.org/downloads.html">libxml2</a> or <a href="http://www.lua.org/download.html">Lua</a>.</strong></h4>
<p>To quote wikipedia, <a href="http://en.wikipedia.org/wiki/Libxml2">libxml</a> is &#8220;<em>a library for parsing XML documents</em>&#8221; and <a href="http://en.wikipedia.org/wiki/Lua_(programming_language)">Lua</a> is &#8220;<em>a lightweight, reflective, imperative and procedural programming language, designed as a scripting language with extensible semantics as a primary goal</em>.&#8221; ModSecurity requires dynamic libraries which are not built by default in the source distribution.  Binary distribution is recommended.
</p>
<p>
I will go through configuration and installation of libxml2 from source and the binary installation of lua under Mac OS X.   There is a good chance if you are running a different OS, the libraries will have already been installed. </p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /usr/local/src/
/usr/local/src root# wget ftp://xmlsoft.org/libxml2/libxml2-2.6.32.tar.gz
/usr/local/src root# tar xzf libxml2-2.6.32.tar.gz
/usr/local/src root# cd libxml2-2.6.32
/usr/local/src/cd libxml2-2.6.32 root#  CC=gcc \
CFLAGS="-O3 -fno-omit-frame-pointer" \
LDFLAGS="-L/opt/local/lib -L/usr/lib" \
/usr/local/src/cd libxml2-2.6.32 root# ./configure
/usr/local/src/cd libxml2-2.6.32 root# make
/usr/local/src/cd libxml2-2.6.32 root# make install
/usr/local/src/cd libxml2-2.6.32 root# cd ..
/usr/local/src root# wget http://luaforge.net/frs/download.php/3097/lua5_1_3_Darwin811x86_lib.tar.gz
/usr/local/src root# mkdir lua
/usr/local/src root# cd lua
/usr/local/src/lua root# tar xzf lua5_1_3_Darwin811x86_lib.tar.gz
/usr/local/src/lua root# cp liblua5.1.* /usr/local/lib
/usr/local/src/lua root# cp include/* /usr/local/include
</pre>
</td>
</table>
<p></p>
<h4><strong>5.  Download, unpack, configure, and compile <a href="http://www.modsecurity.org/download/direct.html">ModSecurity</a>.</strong></h4>
<p>If you are interested in connecting a ModSecurity sensor to the central audit log repository, you will want to build the ModSecurity Log Collector below with the command &#8220;make mlogc&#8221;.  Install instructions can be found under apache2/mlogc-src directory.  That step will not be included below.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
root# cd  /usr/local/src/
/usr/local/src root# wget http://www.modsecurity.org/download/modsecurity-apache_2.5.5.tar.gz
/usr/local/src root# tar xzf modsecurity-apache_2.5.5.tar.gz
/usr/local/src root# cd modsecurity-apache_2.5.5
/usr/local/src/modsecurity-apache_2.5.5 root# cd apache2
</pre>
</td>
</table>
<p>
For non Mac OS X, configure with the command:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5/apache2 root# ./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-apr=/usr/local/apache/bin \
--with-apu=/usr/local/apache/bin
</pre>
</td>
</table>
<p>
For Mac OS X, use the command:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5/apache2 root# CC=gcc \
CFLAGS="-O3 -fno-omit-frame-pointer" \
LDFLAGS="-L/opt/local/lib -L/usr/lib" \
./configure --with-apxs=/usr/local/apache/bin/apxs
</pre>
</td>
</table>
<p>
Continue to compile and install with the commands:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5/apache2 root# make
/usr/local/src/modsecurity-apache_2.5.5/apache2 root# make test
/usr/local/src/modsecurity-apache_2.5.5/apache2 root# make install
/usr/local/src/modsecurity-apache_2.5.5/apache2 root# ls -la /usr/local/apache/modules
</pre>
</td>
</table>
<p></p>
<h4><strong>6.  Configure Apache and ModSecurity.</strong></h4>
<p>We must now edit the httpd.conf file in order to load libxml2 or lua5.1 modules before the ModSecurity module.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5/apache2 root# vi /usr/local/apache/conf/httpd.conf
</pre>
</td>
</table>
<p>
Add the lines for non Mac OS X:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
#
LoadFile /usr/lib/libxml2.so
LoadFile /usr/lib/liblua5.1.so
#
LoadModule security2_module modules/mod_security2.so
</pre>
</td>
</table>
<p>
For Mac OS X, add the lines:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
#
LoadFile /usr/local/lib/libxml2.2.dylib
LoadFile /usr/local/lib/liblua5.1.so
#
LoadModule security2_module modules/mod_security2.so
</pre>
</td>
</table>
<p>
Create the ModSecurity configuration file.  There is a file modsecurity.conf-minimal present in the /usr/local/src/modsecurity-apache_2.5.5 that can be used.  There is also a a Core Rule Set that was included in the /usr/local/src/modsecurity-apache_2.5.5/rules directory courtesy of Breach Security Inc.  To quote the README file, &#8220;<em>The Core Rule Set provides generic protection from unknown vulnerabilities often found in web application that are in most cases custom coded.  The Core Rule Set is heavily commented to allow it to be used as a step-by-step deployment guide for ModSecurity</em>.&#8221;  Under the rules subdirectory, there a directory &#8220;optional&#8221; which contains additional possible rules.  It is left to the reader which configuration files they may want to include, though it might be wise to start with the minimal and make sure the Apache runs without problems.  Then add configurations files as desired. </p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5/apache2 root# cd ..
/usr/local/src/modsecurity-apache_2.5.5 root# cp  modsecurity.conf-minimal /usr/local/apache/conf/modsecurity.conf
/usr/local/src/modsecurity-apache_2.5.5 root# cp  rules/*.conf /usr/local/apache/conf/
</pre>
</td>
</table>
<p>
Include the modsecurity.conf, and additional ModSecurity configurations file, in the Apache httpd.conf file.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5 root# vi /usr/local/apache/conf/httpd.conf
</pre>
</td>
</table>
<p>
Add the line:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
Include /usr/local/apache/conf/modsecurity.conf
#Include /usr/local/apache/conf/modsecurity_crs_10_config.conf
#Include /usr/local/apache/conf/modsecurity_crs_21_protocol_anomalies.conf
#Include /usr/local/apache/conf/modsecurity_crs_23_request_limits.conf
#Include /usr/local/apache/conf/modsecurity_crs_30_http_policy.conf
#Include /usr/local/apache/conf/modsecurity_crs_35_bad_robots.conf
#Include /usr/local/apache/conf/modsecurity_crs_40_generic_attacks.conf
#Include /usr/local/apache/conf/modsecurity_crs_45_trojans.conf
#Include /usr/local/apache/conf/modsecurity_crs_50_outbound.conf
</pre>
</td>
</table>
<p>
Edit /usr/local/apache/conf/modsecurity.conf.  The modifications will be very dependent on your environment.  See resources listed in the Additional Information section to help with configuration.  The default configuration saves the log files relative to the configuration file directory.  Change this to where the apache logs are currently being saved. </p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5 root# vi /usr/local/apache/conf/modsecurity.conf
</pre>
</td>
</table>
<p>
Change the values to:</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
SecAuditLog /var/www/logs/modsec_audit.log
SecDebugLog /var/www/logs/modsec_debug.log
</pre>
</td>
</table>
<p>
Let&#8217;s create null files with the correct permissions for Apache.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5 root# touch  /var/www/logs/modsec_audit.log
/usr/local/src/modsecurity-apache_2.5.5 root# chown httpd.httpd /var/www/logs/modsec_audit.log
/usr/local/src/modsecurity-apache_2.5.5 root# touch  /var/www/logs/modsec_debug.log
/usr/local/src/modsecurity-apache_2.5.5 root# chown httpd.httpd /var/www/logs/modsec_debug.log
</pre>
</td>
</table>
<p></p>
<h4><strong>7.  Start Apache.</strong></h4>
<p>Check that the configuration file is correct and start up Apache.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5 root# /usr/local/apache/bin/apachectl configtest
Syntax OK
/usr/local/src/modsecurity-apache_2.5.5 root# /usr/local/apache/bin/apachectl start
</pre>
</td>
</table>
<p>
Check if ModSecurity if configured into running Apache server.</p>
<table width="100%" cellpadding="0" cellspacing="1" border="1">
<td class="code-outline" BGCOLOR="#F5F5F5">
<pre class="displaycode">
/usr/local/src/modsecurity-apache_2.5.5 root# cat /var/www/logs/error_log | grep ModSecurity
[Thu Jul 31 18:24:59 2008] [notice] ModSecurity for Apache/2.5.5 (http://www.modsecurity.org/) configured.
</pre>
</td>
</table>
<p></p>
<h3>Additional Information</h3>
<p>This post is only to get the basics down.  The above information was taken from the <a href="http://www.modsecurity.org/documentation/modsecurity-apache/2.5.5/modsecurity2-apache-reference.html#installation">ModSecurity documentation</a> install section for version 2.5.5.  A great deal more information is available at the <a href="http://blog.modsecurity.org/">ModSecurity blog site</a> and in the book &#8220;<a href="http://www.apachesecurity.net">Apache Security</a>&#8220;.  </p>
<h3>Concluding Remarks</h3>
<p>Ivan Ristic and <a href="http://blog.shezaf.com/">Ofer Shezaf</a> are working on an interesting paper, &#8220;<a href="http://blog.modsecurity.org/files/enough_with_default_allow_r2_draft.pdf">Enough With Default Allow in Web Applications!</a>&#8221;  This paper demonstrates how WAFs are evolving.  To quote the paper:</p>
<blockquote><p>The default allow deployment model, which is commonly used to implement and deploy web applications, is the cause of numerous security problems. We propose a method of modeling web applications in a platform-agnostic way to adopt a default deny model instead, removing several classes of vulnerability altogether and significantly reducing the attack surface of many others. Our approach is best adopted during development, but can be nearly as efficient as an afterthought, or when used at deployment time.  What they are looking to do is create a protection layer between the web servers and applications which would increase security and turn applications into verifiable components with external contracts that can be enforced.</p></blockquote>
<p>Ristic mentions in his post the planned release of &#8220;<em>an open source profiling tool (which I will announce next week) to help with the third use case and automate the creation of positive security models (also known as the learning feature of web application firewalls)</em>.&#8221;  Breach Security has also <a href="http://www.breach.com/news-events/press-releases/whitehat-security-and-breach-security-team-to-offer-powerful-web-application-security.html">teamed up with WhiteHat Security</a> to add the ability to their Sentinel scanning service to automatically create custom ModSecurity rules for certain classes of vulnerabilities that are found in your web applications.  This is the kind of evolution that is required in security and makes ModSecurity such an interesting software package.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2008/07/31/implementing-a-web-application-firewall-with-modsecurity/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Securing Apache: References</title>
		<link>http://blog.securitymonks.com/2008/02/24/securing-apache-references/</link>
		<comments>http://blog.securitymonks.com/2008/02/24/securing-apache-references/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 02:18:03 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[References]]></category>
		<category><![CDATA[Web Application]]></category>
		<category><![CDATA[connective intelligence]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/2008/02/24/securing-apache-references/</guid>
		<description><![CDATA[Before beginning any project, I start by researching the topic and pulling documents.  I do have my favorite spots to look, such as O&#8217;Reilly, NIST, the Center for Internet Security Benchmarks, Safari Books Online, ISACA, SANS, OWASP, Build Security In, a few choice blogs, etc.  While preparing to write an upcoming post on [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blogs.sun.com/portal/resource/info.jpg" alt="Secure Apache" align="left" width=100 />Before beginning any project, I start by researching the topic and pulling documents.  I do have my favorite spots to look, such as <a href="http://www.oreillynet.com/">O&#8217;Reilly</a>, <a href="http://csrc.nist.gov/publications/PubsSPs.html">NIST</a>, the <a href="http://www.cisecurity.org/">Center for Internet Security Benchmarks</a>, <a href="http://safari5.bvdep.com/">Safari Books Online</a>, <a href="http://www.isaca.org">ISACA</a>, <a href="http://www.sans.org/reading_room">SANS</a>, <a href="http://www.owasp.org">OWASP</a>, <a href="https://buildsecurityin.us-cert.gov/">Build Security In</a>, a few <a href="http://www.google.com/reader/shared/04444925558149080505">choice blogs</a>, etc.  While preparing to write an upcoming post on setting up a secure Apache web server, I found several great references.  Now, you do not need to read all these documents to implement a secure web server.  But, considering how a web server is the gateway from which the outside world connects to your organization, you might want to.  Here are a few documents of interest:
<ul>
<li><a href="http://www.apachesecurity.net/">Apache Security</a> by Ivan Ristic
	</li>
<li><a href="http://www.securityfocus.com/infocus/1786">Securing Apache 2: Step-by-Step</a> by Ivan Ristic</li>
<li>Apache HTTP Server Version 2.2: <a href="http://httpd.apache.org/docs/2.2/install.html">Compiling and Installing</a></li>
<li>Apache HTTP Server Version 2.2: <a href="http://httpd.apache.org/docs/2.2/misc/security_tips.html">Security Tips</a></li>
<li>Center for Internet Security Benchmarks for<a href="http://www.cisecurity.org/bench_apache.html"> Apache Web Server v2.1</a> by Ryan Barnett</li>
<li><a href="http://www.cgisecurity.com/lib/ryan_barnett_gcux_practical.html">Securing Apache Step by Step</a> by Ryan C. Barnett</li>
<li><a href="http://www.modsecurity.org/documentation/modsecurity-apache/2.5.0/modsecurity2-apache-reference.pdf">ModSecurity Reference Manual</a></li>
<li><a href="http://csrc.nist.gov/publications/nistpubs/800-44-ver2/SP800-44v2.pdf">NIST SP 800-44 v2: Guidelines on Securing Public Web Server</a> by Miles Tracy, Wayne Jansen, Karen Scarfone, and Theodore Winograd</li>
<li><a href="http://csrc.nist.gov/publications/nistpubs/800-95/SP800-95.pdf">NIST SP 800-95: Guide to Secure Web Services</a> by Anoop Singhal, Theodore Winograd, and Karen Scarfone</li>
<li>OWASP <a href="http://www.owasp.org/index.php/Category:OWASP_WeBekci_Project">WeBekci Project</a>, a web based ModSecurity 2.x management tool.</li>
<li><a href="http://remo.netnea.com/">REMO</a>, a project to build a graphical rule editor for ModSecurity with a positive/whitelist approach.</li>
<li><a href="http://www.gotroot.com/tiki-index.php?page=mod_security+rules">Got Root</a>, the Internets largest source of intrusion prevention signatures and comment spam blacklists for webservers, over 13,000 signatures.</li>
</ul>
<p>There are two freely available tools for helping with the security of your Apache configuration:
<ul>
<li><a href="http://www.cisecurity.org/sub_form.html">The CIS Scoring Tool for Apache</a></li>
<li><a href="http://www.apachesecurity.net/download/snapshot/apache_tools-snapshot.tar.gz">Apache httpd Tools</a></li>
</ul>
<p>A coworker was complaining that the majority of information he was finding in blogs was junk.  I asked him how was he finding his information.  He was doing a regular Google search; not even a <a href="http://blogsearch.google.com/">Google Blog Search</a>.  I understood his pain.  <a href="http://www.connectivism.ca/blog/">George Siemens</a> makes a very interesting distinction between collective intelligence and connective intelligence.  <strong><a href="http://en.wikipedia.org/wiki/Collective_intelligence"></a><a href="http://connectivism.ca/blog/2008/02/collective_or_connective_intel.html">Collective intelligence</a></strong> is &#8220;<em>a form of intelligence that emerges from the collaboration and competition of many individuals</em>&#8220;.  George defines <strong>connective intelligence</strong> as &#8220;<em>individual creation of information, ideas, and concepts which are then shared with others, connected, and re-created and extended based on the interaction</em>.&#8221;  </p>
<p>
George goes on to state, &#8220;<em>simply, collective means blending together. Connective means connecting while retaining the original (though others may build on it in their own spaces)</em>.&#8221;  Put another way, &#8220;<em>the collective presents a melting pot of ideas. The connective represents a mosaic of ideas.</em>&#8221;  People are surprised when I tell them that I do not read blogs. I read Ivan Ristic, Jeremiah Grossman, Gunnar Peterson, Ryan Barnett, Dafydd Stuttard, etc.  My coworker&#8217;s problem is that he&#8217;s drowning in the melting pot of information provided by collective intelligence.  When I read an author I like or come across software I find really useful, I look to see if the authors have a blog.  I will then <a href="http://www.google.com/help/reader/tour.html">subscribe</a> to their RSS feed, allowing me to make use of connective intelligence.
</p>
<p>
A few blogs of interest for web application security:
<ul>
<li><a href="http://blog.ivanristic.com/">Ivan Ristic</a>, author of &#8220;Apache Security&#8221; and principal author of <a href="http://www.modsecurity.org/projects/modsecurity/apache/index.html">ModSecurity</a>, the open source web application firewall.</li>
<li><a href="http://jeremiahgrossman.blogspot.com/">Jeremiah Grossman</a>, author of the CIS Scoring Tool for Apache and founder and Chief Technology Officer of WhiteHat Security.</li>
<li><a href="http://www.modsecurity.org/blog/">Ryan Barnett</a>, author of &#8220;<a href="http://www.amazon.com/Preventing-Attacks-Apache-Ryan-Barnett/dp/0321321286">Preventing Web Attacks With Apache</a>&#8220;, and Director of Application Security Training for Breach Security.</li>
<li><a href="http://blog.portswigger.net/">Dafydd &#8220;PortSwigger&#8221; Stuttard</a>, co-authof of &#8220;<a href="http://www.portswigger.net/wahh/">The Web Application Hacker&#8217;s Handbook</a>&#8221; and Principal Security Consultant at NGS Software.</li>
<li><a href="http://1raindrop.typepad.com">Gunnar Peterson</a>, Software Security Architect and CTO at Arctec Group.</li>
<li><a href="http://ha.ckers.org/blog/">Robert &#8220;RSnake&#8221; Hansen</a>, CEO SecTheory.</li>
<li><a href="http://shreeraj.blogspot.com">Shreeraj Shah</a>, founder of <a href="http://www.blueinfy.com/knowledge.html">Blueinfy</a>, a company that provides application security services.</li>
<li><a href="http://www.memestreams.net/users/acidus">Billy Hoffman</a>, co-author of &#8220;<a href="http://www.amazon.com/Ajax-Security-Billy-Hoffman/dp/0321491939">Ajax Security</a>&#8221; and lead research engineer with Atlanta-based SPI Dynamics Inc.</li>
<li><a href="http://blogs.msdn.com/sdl/default.aspx">Bryan Sullivan</a>, co-author of &#8220;<a href="http://www.amazon.com/Ajax-Security-Billy-Hoffman/dp/0321491939">Ajax Security</a>&#8221; and developer and security researcher at SPI Dynamics, Microsoft.</li>
<li><a href="http://shiflett.org/">Chris Shiflett</a>, author and speaker who leads the web application security practice at <a href="http://omniti.com/">OmniTI</a>.</li>
<li><a href="http://blog.watchfire.com/">Ory Segal</a>, Security Products Architect, Rational, Application Security (Watchfire), IBM.</li>
<li><a href="http://myappsecurity.blogspot.com/">Anurag Agarwal</a>, is a senior application security consultant providing expertise on secure development lifecycle and vulnerability assessment. He also manages www.attacklabs.com and www.myappsecurity.com.</li>
</ul>
<p>I wanted to mention that I started off with the names of several web application professionals.  I wanted to include links to their names in this post.  As I searched out their names to add a little background blurb, I kept coming across postings from Anurag Agarwal.  He has done a great job profiling many of the leaders in web application security.   The above list is missing many people and that is entirely my fault.  As I stated, the list is of people that I am familiar with and is not meant to be a complete list of web application security professionals.
</p>
<p>
With these resources at our disposal, we are well positioned to start our quest to secure Apache.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2008/02/24/securing-apache-references/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ajax Security</title>
		<link>http://blog.securitymonks.com/2008/01/30/ajax-security/</link>
		<comments>http://blog.securitymonks.com/2008/01/30/ajax-security/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 02:06:19 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[Podcast]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/2008/01/30/ajax-security/</guid>
		<description><![CDATA[“Change is the constant, the signal for rebirth, the egg of the phoenix” &#8212; Christina Baldwin

Many of the security issues we are beginning to see with Web applications are issues that we have seen in some form with traditional client/server applications.  Unlike the Phoenix, the Web application security issues are not rising from the [...]]]></description>
			<content:encoded><![CDATA[<p>“<a href="http://www.quotationspage.com/quote/1494.html"><em>Change is the constant, the signal for rebirth, the egg of the phoenix</em></a>” &#8212; <strong><a href="http://books.google.com/books?as_auth=Christina+Baldwin">Christina Baldwin</a></strong></p>
<p>
<a href="http://www.marvel.com/universe/Phoenix_Force"><img src="http://www.marvel.com/universe3zx/images/thumb/a/a5/Phoenix_force.jpg/440px-Phoenix_force.jpg" alt="Phoenix" align="left" width=100 /></a>Many of the security issues we are beginning to see with Web applications are issues that we have seen in some form with traditional client/server applications.  Unlike the <a href="http://en.wikipedia.org/wiki/Phoenix_(mythology)">Phoenix</a>, the Web application security issues are not rising from the ashes of traditional client/server applications.  Client/server security is still very much alive.  The Phoenix just provides better imagery then the <a href="http://en.wikipedia.org/wiki/Lernaean_Hydra">Hydra</a>, where if you cut the head off the Hydra two came back in its place.  In the old days of the Internet (a few years ago), everything was done on the server.  When you think about vulnerabilities in ftp, mail, and Web servers, it was the infrastructure groups responsibility for fixing it.  Fixes were done by doing such things as setting up firewall rules, patching systems, upgrading server software, etc.  With Web 1.0, the intelligence was pretty much on the Web server.  Your Web browser would simply talk to your server where the applications resided.
</p>
<p>
Asynchronous JavaScript and XML (Ajax) changes the traditional model by having the application running on the browser where more of the work is done.  The JavaScript engine runs on the browser, talking to the server and third party sources on your behalf.  This is not unique to Ajax.  Anywhere you have <a href="http://en.wikipedia.org/wiki/Rich_Internet_application">Rich Internet Applications</a> (RIA), there will be this interplay between the server, third party sources, and the client.  State information has to be shared between the client and server.  Unfortunately, one of the lessons we have learned over the years is that you cannot trust the client.  Outside of client side certificates, there really is no way for the server to know who is talking to it.
</p>
<p>
<a href="http://shreeraj.blogspot.com/">Shreeraj Shah</a>, the author of <a href="http://www.blueinfy.com/web2book.html">Web 2.0 Security &#8211; Defending Ajax, RIA and SOA</a>; <a href="http://www.amazon.com/Web-Hacking-Attacks-Stuart-McClure/dp/02017617">Web Hacking</a> (Stuart McClure and Saumil Shah co-authors); and <a href="http://www.amazon.com/Hacking-Services-Internet-Shreeraj-Shah/dp/1584504803/">Hacking Web Services</a>, did a presentation at the HITB Security Conference titled &#8220;<a href="http://conference.hitb.org/hitbsecconf2007kl/materials/D2T1%20-%20Shreeraj%20Shah%20-%20%20Hacking%20Ajax%20and%20Web%20Services%20%e2%80%93%20Next%20Generation%20Web%20Attacks%20on%20the%20Rise.pdf">Web 2.0 hacking, keeping focus on Ajax and Web Services</a>.&#8221;   In the presentation, Shreeraj discusses the vectors of change between Web 1.0 and Web 2.0.  In Web 1.0, the entry points were structured, there were limited dependencies, the vulnerabilities were on the server side (typically through injections), and there were server side exploitations.  In Web 2.0, everything changes.  You have scattered and multiple entry points.  There are dependencies on multiple technologies, information sources, and protocols.  Vulnerabilities can be exploited on Web services through payloads and on the client side through such exploits as <a href="http://ha.ckers.org/xss.html">XSS</a> and <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">XSRF</a>.  Exploits exist for both server and client.
</p>
<p>
More worrisome is that in many organizations, security remains solely network focused while developers are left untrained and unaware.  Up until now, developers have not had to deal seriously with security problems.  Add to this changing environment, pressure on developers to meet deadlines and develop code quickly.  Some developers main goal is simply getting their application not to crash.  It is easy to understand how due to lack of exposure and the need for quick code turn around, developers can fail to put security measures in place sufficient for a Web 2.0 world.  <a href="http://www.lightbluetouchpaper.org/">Ross Anderson</a> and <a href="http://www.cl.cam.ac.uk/~twm29/">Tyler Moore</a> add some great insight into the software development environment in their paper, &#8220;<a href="http://www.cl.cam.ac.uk/~rja14/Papers/econ_crypto.pdf">Information Security Economics &#8211; and Beyond.</a>&#8221;   Ross and Tyler wrote:</p>
<blockquote><p>In many markets, the attitude of ‘ship it Tuesday and get it right by version 3’ is perfectly rational behaviour. Many software markets have dominant firms thanks to the combination of high fixed and low marginal costs, network externalities and client lock-in noted above, so winning market races is all-important. In such races, competitors must appeal to complementers, such as application developers, for whom security gets in the way; and security tends to be a lemons market anyway. So platform vendors start off with too little security, and such as they provide tends to be designed so that the compliance costs are dumped on the end users. Once a dominant position has been established, the vendor may add more security than is needed, but engineered in such a way as to maximise customer lock-in.</p>
<p>In some cases, security is even worse than a lemons market: even the vendor does not know how secure its software is. So buyers have no reason to pay more for protection, and vendors are disinclined to invest in it.</p></blockquote>
<p>Another outstanding article is by <a href="http://www.cs.dartmouth.edu/~sergey/">Sergey Bratus</a> in the July/August 2007 IEEE Security and Privacy magazine titled &#8220;<a href="http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/mags/sp/&#038;toc=comp/mags/sp/2007/04/j4toc.xml&#038;DOI=10.1109/MSP.2007.101">What Hackers Learn that the Rest of Us Don&#8217;t: Notes on Hacker Curriculum</a>.&#8221; Sergey makes the following comparisons between developers in the academic programs to those in the hacking community:
<ul>
<li>Developers are under pressue to follow standard solutions, or the path of least resistance to &#8220;just making it work.&#8221;</li>
<li>Developers tend to be implicity trained away from exploring underlying APIs because the extra time investment rarely pays off.</li>
<li>Developers often receive a limited view of the API, with few or hardly any details about its implementation.</li>
<li>Developers are de facto trained to ignore or avoid infrequent border cases and might not understand their effects.</li>
<li>Developers might receive explicit directions to ignore specific problems as being in other developers&#8217; domains.</li>
<li>Developers often lack tools for examining the full state of the system, let alone changing it outside of the limited API.</li>
</ul>
<p>No one said it was going to be easy.  The first step is to recognize that there is a problem.  Actually, there are multiple issues to deal with when getting into application security.  Just keep reminding yourself, one step at a time.  The second step is to reach out and seek help.  To help us on our road to security recover, <a href="http://www.memestreams.net/users/acidus/">Billy Hoffman</a> and Bryan Sullivan have written the book <a href="http://www.amazon.com/Ajax-Security-Billy-Hoffman/dp/0321491939/ref=cm_cr-mr-title">Ajax Security</a>.  Billy has an interview on IT Conversations Technometria titled &#8220;<a href="http://itc.conversationsnetwork.org/shows/detail3516.html">Ajax Security</a>&#8221; where he talks about Ajax in general and reviews some of the specific security issues most likely to occur. He also gives a number of examples of where security is likely to be a problem.
</p>
<p>
<a href="TaoSecurity.com">Richard Bejtlich</a> provided the following very favorable <a href="http://taosecurity.blogspot.com/2007/12/last-book-reviews-of-2007-posted.html">review</a> of &#8220;Ajax Security:&#8221;</p>
<blockquote><p>
Ajax Security was the last book I read and reviewed in 2007. However, it was the best book I read all year. The book is absolutely compelling and every security professional and Web developer should read it. It&#8217;s really as simple as that.</p>
<p>I am not a Web developer. I was not very familiar with Ajax (beyond its buzzword status and a vague notion of functionality) when I started reading Ajax Security. I attended the authors&#8217; Black Hat 2007 talk and was thoroughly impressed and disturbed by the security implications they presented. I expected Ajax Security to be a good book, but one can never be sure if talented hackers and presenters can transfer their skills to the written word. Ajax Security gets the job done.</p></blockquote>
<p>This is extremely high praise considering Richard&#8217;s background and the number of books <a href="http://www.amazon.com/gp/cdp/member-reviews/A2ZVOU9X5W2S47/ref=cm_pdp_reviews_see_all?ie=UTF8&#038;sort%5Fby=MostRecentReview">Richard reviews</a>.
</p>
<p>
Billy has done some outstanding presentations at Black Hat.  In 2006, he presented <a href="www.blackhat.com/presentations/bh-usa-06/BH-US-06-Hoffman.pdf">Ajax (in)security</a>.  In 2007, Bryan Sullivan and Billy Hoffman presented &#8220;<a href="https://www.blackhat.com/presentations/bh-usa-07/Sullivan_and_Hoffman/Whitepaper/bh-usa-07-sullivan_and_hoffman-WP.pdf">Premature Ajax-ulation</a>&#8220;.  If video is more to your liking, Bill presented &#8220;<a href="https://www123.livemeeting.com/cc/microsoft/viewReg?role=&#038;cn=bhoffman&#038;pw=&#038;id=BQB2HZ&#038;email=foo%40bar.com&#038;company=abc">0wn3d: How AJAX Makes Web Hacking Easier</a>.&#8221;  In the <a href="http://blog.securitymonks.com/presentations/">presentation area</a> of this site, there are a couple very interesting talks on Ajax:
<ul>
<li><a href="https://owasp.org/images/0/0d/OWASPAppSec2006Seattle_Why_AJAX_Applications_More_Likely_Insecure.ppt">Why AJAX Applications Are Far More Likely To Be Insecure (And What To Do About It)</a> by <a href="http://www.linkedin.com/pub/dir/?first=Dave&#038;last=Wichers&#038;search=Search">Dave Wichers</a></li>
<li><a href="http://www.owasp.org/images/f/f9/OWASPAppSecEU2006_AJAX_Security.ppt">Ajax Security</a> by <a href="http://www.greebo.net/">Andrew van der Stock</a></li>
<li><a href="http://www.owasp.org/images/6/6a/KC_Dec2006_Ajax_Security_Concerns.pdf">Ajax Security Concerns</a> by <a href="http://www.owasp.org/index.php/Category:OWASP_AJAX_Security_Project">Rohini Sulatycki</a></li>
<li><a href="http://conference.hitb.org/hitbsecconf2007kl/materials/D2T1%20-%20Shreeraj%20Shah%20-%20%20Hacking%20Ajax%20and%20Web%20Services%20%e2%80%93%20Next%20Generation%20Web%20Attacks%20on%20the%20Rise.pdf">Hacking Ajax and Web Services: Next Generation Web Attacks on the Rise</a> by <a href="http://shreeraj.blogspot.com/">Shreeraj Shah</a></li>
</ul>
<p>Borrowing from Dave Wicher&#8217;s presentation, security issues that need to be dealt with include secure communications, authentication and sessions, access control, data protection, input validation and output encoding, error handling, logging &#038; intrusion detection, availability, and concurrency.  Not a simple task.  Is Ajax applications less secure then other Web applications?  Ajax, in and of itself, is neither secure nor insecure.  The <a href="http://www.owasp.org/index.php/OWASP_Guide_Project">OWASP 3.0 Guide</a> chapter on <a href="http://www.owasp.org/index.php/Guide_Table_of_Contents#Ajax_and_Other_.22Rich.22_Interface_Technologies">Ajax and &#8220;Other&#8221; Rich Interface Technologies</a> states, &#8220;<em>AJAX applications face exactly the same security issues as all other Web applications, plus they add their own particular set of risks that must be correctly managed.  By their complex, bidirectional, and asynchronous nature, AJAX applications increase attack surface area.</em>&#8221;  Because of the increase attack surface area of Ajax applications, one can argue these applications  are less secure.  The truth is that other Rich Internet Applications, such as  Flash, Java applets, and Active X controls can be just as insecure.
</p>
<p>
How do you go about securing Ajax applications?  Borrowing from Rohini Sulatycki presentation, you need to validate all inputs, all client side validation must be backed up by server side validation, do not implement business logic validation client side, implement whitelist validation, do not trust third party source (filter it out), identify valid data and reject everything else, no direct cross domain call back, and encode all outputs.  Do not cripple Web development in the name of security.  Instead, organizations need to make sure developers know the security issues.  Get security involved on the application side.
</p>
<p>
Expanding from securing Ajax applications to moving your organizations toward software security and application security, Gary McGraw wrote a nice concise article titled &#8220;<a href="http://www.darkreading.com/document.asp?doc_id=142829">Four ways to kick off your organization&#8217;s software security initiative in the New Year</a>.&#8221;  Read the article along with everything Gary writes.  To summarize the four methods:
<ul>
<li> A top-down framework approach&#8230;perform a gap analysis between where you are and where you want to be from a software security perspective. Then build a plan to address the gaps&#8230;.</li>
<li> The portfolio risk method takes a more business-oriented approach to the software security problem. The idea here is to assess the entire application portfolio according to some risk criteria agreed on in advance. &#8230;</li>
<li>The training first approach to software security is more grounded in the technical world. This approach helps developers who love to do the right thing but just don’t know what the right thing is when it comes to security. &#8230;</li>
<li>The lead with a tool approach, meanwhile, makes sense for an organization that has already purchased and attempted to roll out a security analysis tool&#8230;.</li>
</ul>
<p>Gary also does the Silver Bullet Security Podcast, where on broadcast titled &#8220;<a href="http://www.cigital.com/silverbullet/show-021/">Show 021 &#8211; A Panel Discussion with Cigital’s Principals</a>&#8220;, the principals at Cigital discuss the best ways for large companies to get started with software security.
</p>
<p>
Gunnar Peterson is his post titled &#8220;<a href="http://1raindrop.typepad.com/1_raindrop/2008/01/go-wide-and-dee.html">Go Wide and Deep, Incrementally</a>&#8221; makes the point that the best method for an organizations depends on &#8220;<em>what you are trying to do, your company culture, and the people&#8217;s skills who are working on software security.</em>&#8221;  Gunnar suggest a fifth method, &#8220;namely decentralized specialized teams, or centers of excellence in <a href="http://en.wikipedia.org/wiki/Pointy_Haired_Boss">PHB</a> speak.&#8221;  He makes the important point that &#8220;<em>to deploy any of the current cutting edge stuff in software security at scale, requires technical depth and deployment width. This automatically limits your resource pool of who can deliver this stuff</em>.&#8221;
</p>
<p>
Gunnar offers additional advice in his post titled &#8220;<a href="http://1raindrop.typepad.com/1_raindrop/2006/01/phasing_securit.html">Phasing Security into the SDLC &#8211; A Comparison of Approaches</a>.&#8221;  He suggest four main ways to get started: top down, testing and validation, start in the middle, and training.  Gary and Gunnar favor a mix approach of top down and bottom up, &#8220;<em>that approach often leads with the creation of a special ops execution team that becomes the software security group. By far, this is the most impressive approach in terms of results and the one that is the most effective in well-run enterprises</em>&#8221; (Gary quote).  They will not get any arguments from me.
</p>
<p>
Moving an organization towards an environment where secure code can be produced, let it be Ajax or any RIA, is not an easy endeavor.  Like the software development life cycle, an iterative, incremental delivery is the way to go.  You do what you can.  You work the program, one day at a time.  This way, you take the needed steps to a secure recovery.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2008/01/30/ajax-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Risks and Rewards</title>
		<link>http://blog.securitymonks.com/2007/05/27/risks-and-rewards/</link>
		<comments>http://blog.securitymonks.com/2007/05/27/risks-and-rewards/#comments</comments>
		<pubDate>Mon, 28 May 2007 02:26:07 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Forensics]]></category>
		<category><![CDATA[To Do]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=35</guid>
		<description><![CDATA[&#8220;Far better is it to dare mighty things, to win glorious triumphs even though checkered by failure than to take rank with those poor spirits who neither enjoy much nor suffer much because they live in the grey twilight that knows neither victory nor defeat.&#8221; &#8212; Theodore Roosevelt


I am, and will always be, an O&#8217;Reilly [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;<a href="http://www.quotedb.com/quotes/1228"><em>Far better is it to dare mighty things, to win glorious triumphs even though checkered by failure than to take rank with those poor spirits who neither enjoy much nor suffer much because they live in the grey twilight that knows neither victory nor defeat.</em></a>&#8221; &#8212; <strong><a href="http://en.wikipedia.org/wiki/Theodore_Roosevelt">Theodore Roosevelt</a></strong><br />
<a href="http://www.webliminal.com/gopher2.gif"><img src="/images/gopher2.gif" alt="A tribute to the old Gopher protocol" align="top" width=500/></a></p>
<hr />
I am, and will always be, an <a href="http://www.oreilly.com/">O&#8217;Reilly Media, Inc.</a> fan.  The Camel Book for Perl 4 was my introduction to Perl.  I was working as a graduate student in my university&#8217;s Research Services department.  We were receiving professor&#8217;s vitas, putting them into RTF format, and looking for a way to parse through them.  The ultimate goal was to automate the matching of their work against research grants.  This was back before the web, in the time of <a href="http://en.wikipedia.org/wiki/Gopher_(protocol)">Gopher</a>.  I took home the Perl 4 book that Friday and by Monday morning I had a program to parse through the RTFs.  </p>
<p>
One of the things that I think frequently about as I listen to folks talk about security is that many people forget the fact that information technology exist to help us do something.  Security&#8217;s job is to figure out how to allow the task to be done while minimizing risk.  If implementing security only results in a company unable to advance, security has failed the company.  It is like the old analogy about security being the brakes to the corporate car.  To quote Ron Woerner of the <a href="http://www.securitycatalyst.com/2006/07/07/security-brake/">Security Catalyst</a>:</p>
<blockquote><p>
Brakes allow the driver to go faster, have more control and go where they want to go safely. While brakes are an inhibitor, they actually allow the driver to reach their destination in a safe, yet quick manner.</p>
<p>Imagine driving without them. You’d be a nervous wreck. (Okay, maybe not you, but most of us would be.) You’d go really slow; be afraid of changing directions; and feel stressed. Think: the only way to stop is to crash into something.</p>
<p>In the paragraphs above, replace brakes with security (meaning security controls and processes) and driver with your organization’s name. Isn’t the concept the same? Security allows the user (driver) to reach their goal (destination) in a safe, yet quick manner. If you (security professionals) and your customers (users) are doing it right, security should allow the business to go faster, have control, and reach their goals safely without crashing.
</p></blockquote>
<p>Don Ulsch, technology risk management director in the Boston office of Jefferson Wells, told security executives during a lunchtime presentation that “many people blog from work and mobile platforms and that’s very bad.” He went on to categories blogs as one of the bad guys’ tools.  <a href="http://www.stillsecureafteralltheseyears.com/about.html">Alan Shimel</a>, chief strategy officer for StillSecure, addresses Don&#8217;s statement in his blog, &#8220;<a href="http://www.stillsecureafteralltheseyears.com/ashimmy/2007/05/don_ulsch_keep_.html">Don Ulsch, keep the FUD to yourself</a>.&#8221;  Don&#8217;s job is to see emerging threats and he makes the point that blogs represent a possible source of data leakage.  This is a case where risk needs to be weighed against reward.  That is Alan&#8217;s point.  I listen to the &#8220;<a href="http://www.stillsecureafteralltheseyears.com/ashimmy/podcasting/index.html">StillSecure, After All These Years</a>&#8221; podcast and I read Alan&#8217;s blog.  I am aware of his company <a href="http://www.stillsecure.com/">StillSecure</a>, and I have respect for the people he works with.  I think Alan has demonstrated how useful the latest technology can be if you do not allow risk to stop your company from utilizing such technology.  Sure, you want to minimize risk, but it is about balance.  You cannot allow just the existence of risk to stop you from doing your business efficiently.
</p>
<p>
For this reason, I feel that one of the most important quality in a security professional is their ability to keep up with the latest technologies.  We need to know the tools our organizations will be using in order to understand the risks involved.  I am thankful to O&#8217;Reilly for helping me do my best to stay up on developments in IT.  I read daily the <a href="http://radar.oreilly.com/">O&#8217;Reilly Radar</a> blog.  I listen to the <a href="http://www.oreillynet.com/future/">Distributing the Future</a> podcast.  Finally, I am subscriber to <a href="http://safari.oreilly.com/">Safari Books Online</a>.  When <a href="http://radar.oreilly.com/tim/">Tim O&#8217;Reilly</a> speaks, I listen.  </p>
<p>
I have a confession and I hope Tim does not feel I am stepping out on him.  Occasionally, I will check out what books <a href="http://www.pragmaticprogrammer.com/">the Pragmatic Programmers, LLC</a> might have.  Awhile back, I brought the online version of the book by Dave Thomas and David Heinemeier Hansson, &#8220;<a href="http://www.pragmaticprogrammer.com/titles/rails2/">Agile Web Development with Rails, Second Edition</a>.&#8221;  I found the web site to be very profession and well done.  This is what you want to see in a publisher that sells books on web development.  They have continued to provide free updates to the book.  Considering the changing nature of agile web development, I have been very appreciate of that.
</p>
<p>
I also recently purchased the electronic version of Harlan Carvey&#8217;s book, &#8220;<a href="http://www.syngress.com/catalog/?pid=4230">Windows Forensic Analysis DVD Toolkit</a>.&#8221;  It is a great book.  Syngress&#8217; site is not as slick as the Pragmatic Programmer site.  I purchased from Syngress only because Harlan has produced such a great book.  If you want to get a feel for Harlan technical and writing capability, check out his blog, the <a href="http://windowsir.blogspot.com/">Windows Incident Response</a>.</p>
<p>
Right now, I am sitting at work finishing up the printing of some documents.  While it might be nice to have documents in PDF format for searching and convenience in carrying around on a USB stick, I like to read hardcopy.  While printing, I also have my MP3 player.  I was listening to podcasts until I figured I would post a blog while waiting for my documents to finish printing.  My phone and MP3 player are capable of making voice recording, which I occasionally use to record notes to myself.  I don&#8217;t think Don would approve.  The questions is how much safer would the company be verses how less productive would I be if these technologies were eliminated?
</p>
<p>
Here are a few other documents I am printing:</p>
<ul>
<li><a href="http://www.oceg.org/view/Foundation">OCEG Foundation Guidelines Red Book</a></li>
<li><a href="http://csrc.nist.gov/publications/CSD_DocsGuide.pdf">Guide to NIST Information Security Documents</a></li>
<li><a href="http://www.isaca.org/Content/NavigationMenu/Members_and_Leaders/COBIT6/Obtain_COBIT/Obtain_COBIT.htm">COBIT 4.1</a></li>
<li><a href="http://www.isaca.org/Template.cfm?Section=search&#038;template=/Ecommerce/ProductDisplay.cfm&#038;ProductID=769">IT Governance Implementation Guide</a></li>
<li><a href="http://www.isaca.org/Template.cfm?Section=Home&#038;Template=/ContentManagement/ContentDisplay.cfm&#038;ContentID=32289">IT Assurance Guide</a></li>
<li><a href="http://svnbook.red-bean.com/">Version Control with Subversion</a></li>
</ul>
<p>What a way to spend Sunday.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2007/05/27/risks-and-rewards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source and Service-Orientated Architecture</title>
		<link>http://blog.securitymonks.com/2007/01/28/open-source-and-service-orientated-architecture/</link>
		<comments>http://blog.securitymonks.com/2007/01/28/open-source-and-service-orientated-architecture/#comments</comments>
		<pubDate>Mon, 29 Jan 2007 05:48:36 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=24</guid>
		<description><![CDATA[&#8220;These blind men, every one honest in his contentions and certain of having the truth, formed schools and sects and factions&#8230;&#8221; &#8212; Buddha

&#8220;The Blind Men and the Elephant&#8221; is a classic fable.  As the world of IT becomes more complex, the people in IT become more specialized.  People become so focused in their [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;<em>These blind men, every one honest in his contentions and certain of having the truth, formed schools and sects and factions&#8230;</em>&#8221; &#8212; <b>Buddha</b>
<p>
<a href="http://www.plumdigital.com/0_general/blindman.html"><img src="/images/blindmen.jpg" align=left width=250 alt="Blind Men and the Elephant" /></a>&#8220;<em>The Blind Men and the Elephant&#8221; is a classic fable.  As the world of IT becomes more complex, the people in IT become more specialized.  People become so focused in their areas, they lose the ability to see the big picture.  Life becomes the fable.  The fable is about a group of blind men who came upon an elephant. The first man, feeling the enormous leg, said, &#8216;This thing is very much like a tree.&#8217; The second, standing near its ear, reached up and said, &#8216;This is a winnowing fan!&#8217; &#8216;No,&#8217; said a third as he grasped the moving trunk. &#8216;Be careful. This creature is a serpent.&#8217; &#8216;I disagree,&#8217; said a voice at the other end. &#8216;It is only a frayed piece of rope&#8217;. The last man commented, &#8216;You are all wrong. I have felt this thing on both sides and it is just a wall.&#8217;</em>&#8221;
</p>
<p>
Let&#8217;s talk about two parts of the elephant, open source software (OSS) and service-orientated architecture (SOA).  John Grimes, assistant secretary of Defense for networks and information integration/chief information officer, told the Network Centric Warfare conference in Washington, D.C., on Jan. 23, “As we go to SOA architecture, we keep the applications behind and share the data on the network, and it becomes very critical that data is understood by everyone.”
</p>
<p>“It just eats our lunch every time we get into a proprietary situation, because it’s noncompetitive,” Grimes stated explaining that DOD will increasingly move to SOA because it benefits information sharing and acquisitions.   Federal Computing Weekly has an article, &#8220;<a href="http://www.fcw.com/article97468-01-24-07-Web">DOD&#8217;s Grimes: Our focus is on data</a>&#8221; by Josh Rogin.  In another article in FCW, Bob Brewinn wrote an article, &#8220;<a href="http://www.fcw.com/article96586-10-25-06-Web">DISA Buying into SOA &#8216;Big Time&#8217;</a>.&#8221;  John Grimes is quoted as stating, &#8220;DOD spends too much time and money acquiring individual, highly-tailored systems.&#8221;  He continues, stating, &#8220;It&#8217;s time for the department to stop buying things and start buying services.”</p>
<p>
In an article in the Linux Insider title &#8220;<a href="http://www.linuxinsider.com/story/54546.html">Iona Tightens Open Source, SOA Bond</a>,&#8221; Dana Gardner writes:
</p>
<blockquote><p>Open source and SOA are increasingly joined at the hip. These twins are developing in tandem, not sequentially, which is giving CIOs and architects a variety of choices for picking and choosing the projects and products that make up their SOAs.</p></blockquote>
<p>Darryl K. Taft writes an article for eWeek title, &#8220;<a href="http://www.eweek.com/article2/0,1759,1932297,00.asp">Web Services, SOA, and Open Source Converge</a>.&#8221;  Hub Vandervoort, chief technology officer at Sonic Software Corp., Bedford, Mass., was on a panel of heavy hitters at the Web Services/SOA on Wall Street conference on Feb. 27.  Vandervoort makes the point that, &#8220;SOA as a concept will challenge the whole concept of one throat to choke. SOA means federation and is built from federated components that are boundless.&#8221;
</p>
<p>
Han Zaunere, president of New York PHP, an organization for the Apache, MySQL and PHP community in New York, stated, &#8220;&#8221;In the long run, as far as looking at what you get, I think open source is more valuable.&#8221;  He points out, &#8220;If I download [licensed] software and in two years it&#8217;s obsolete, I have no return on that. When you buy open-source support, the software is secondary.&#8221;  Hiram Chirino, co-founder and director of architecture at LogicBlaze Inc., of Marina del Ray, Calif., believes that open-source software allows users to scale their systems more easily and cheaply because they can simply add more servers without having to worry about licensing costs.
</p>
<p>
Bob Sutor has written, and podcasted, extensively on the topic of open source.  His four part series, is very interesting.  I would recommend folks take a few moment to read it, paying particular attention to part 4, &#8220;The SOA Connection.&#8221;  He covers:</p>
<ul>
<li><a href="http://www.sutor.com/newsite/blog-open/?p=130">Part 1: Standards</a></li>
<li><a href="http://www.sutor.com/newsite/blog-open/?p=199">Part 2: Software</a></li>
<li><a href="http://www.sutor.com/newsite/blog-open/?p=276">Part 3: Open Source Software</a></li>
<li><a href="http://www.sutor.com/newsite/blog-open/?p=677">Part 4: The SOA Connection</a></li>
</ul>
<p>Analyst at Forrester have written a report, &#8220;The Future of Enterprise Software.&#8221;  Andy McCue has written the article &#8220;<a href="http://software.silicon.com/applications/0,39024653,39160119,00.htm?r=2">Open Source and SOA to Redefine Software Landscape</a>&#8221; where he summarizes the report.  The report stated: &#8220;Too many IT pros today reject the new ideas behind the four horsemen as &#8216;not ready for prime time&#8217;. Blanket dismissals of new ideas are defensive; IT executives should be looking instead for ways that the four horsemen can drive productive changes for business. These forces will define the future of enterprise software.&#8221;  The &#8220;four horsemen&#8221; of commoditization are service oriented architecture (SOA), open source, software as a service and offshoring.  Forrester predicts the four horsemen will lead to cheaper prices and a radical change in enterprise software landscape of the future.
</p>
<p>
SOA is ultimately about integration.  It can be integration of open or closed source software packages.  SOA brings agility to an enterprise.  CEO and CIO are beginning to question the wisdom of getting locked into a software solution.  When you take a solution, such as SAP, it is a solution that matches a complex problem with a complex solution.  Annrai O&#8217;Tool, CEO of Cape Clear, tells the following story on <a href="http://briefingsdirect.blogspot.com/2007/01/transcript-of-webinar-on-soa-trends.html">Dana Gardner&#8217;s SOA trends webinar</a>:</p>
<blockquote><p>We have a couple of ex-PeopleSoft people working with us at Cape Clear, and they tell a great story about how they used to do sales pitches against SAP. They went to the customer with a small cup of quick-drying cement and poured it into a mold. By the time they finished the presentation, the cement is set and it has SAP written on it.  They then say, “There you go, that’s the deal with SAP.” It is easy to design, but once you get your business process done, it is embedded in cement.</p></blockquote>
<p>O&#8217;Tool points out that for many businesses, the business process is very difficult to change. He goes on to say, &#8220;SOA is all about how to use that application in new and more transparent ways that are easier to change and that deliver agility.&#8221;</p>
<p>
Commercial solutions can have high up cost and high continuous operation costs.  Even changing out hardware can end up costing a business significantly due to software licenses.  In this rapidly changing IT environment, a company can easily find itself with a solution that no longer fits its business need, but it has too much invested to change course.  Even worse, in time their software solution might no longer be actively developed as software companies change directions or go out of business.  OSS helps reduce some of these risks.  While there are costs, more of the expenditures goes into the companies own people.  This helps create a work force better adapted to face a changing IT environment.  Hub Vandervoort said it best when he stated &#8220;when you buy a software license you are paying for past innovation; when you buy open source, you&#8217;re investing in future innovation.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2007/01/28/open-source-and-service-orientated-architecture/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>COBIT in 2007</title>
		<link>http://blog.securitymonks.com/2007/01/20/cobit-in-2007/</link>
		<comments>http://blog.securitymonks.com/2007/01/20/cobit-in-2007/#comments</comments>
		<pubDate>Sun, 21 Jan 2007 05:59:09 +0000</pubDate>
		<dc:creator>John Gerber</dc:creator>
				<category><![CDATA[COBIT]]></category>
		<category><![CDATA[OWASP]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://blog.securitymonks.com/?p=19</guid>
		<description><![CDATA[
Next to my bed, I have the book, &#8220;Time Management for System Administrators&#8221; by Thomas A. Limoncelli.  I highly recommend the book. I have to confess, I have not gotten very for into the book.  I just have not had much time.  I know, it sounds like a punch line.  Well, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.glasbergen.com/images/g218.gif"><img title="Time Management" alt="Time Management" src="/images/timemenagement.gif" width=300 /></a></p>
<p>Next to my bed, I have the book, &#8220;<a href="http://www.oreilly.com/catalog/timemgmt/">Time Management for System Administrators</a>&#8221; by Thomas A. Limoncelli.  I highly recommend the book. I have to confess, I have not gotten very for into the book.  I just have not had much time.  I know, it sounds like a punch line.  Well, as I write, it is past midnight Sunday morning, and I am going to have to get up in a few hours.</p>
<p>Life in IT can be complicated.  There is alot of issues to deal with.  This seems especially true in Security.  Security is all about layers.  There is no silver bullet.  If there was, you would still have to layer it.</p>
<p>This is why, I find COBIT interesting.  First, it provides structure.  This helps organize and ensure that different areas of security and IT operations are addressed.  It is too easy to focus on the immediate problem and because of time constraint miss other problems.  It is the classic scene from a movie where the person being chased secures the front door while forgetting that the windows are wide open.  COBIT basically provides the forest view.  Second, along those lines, it helps align the work to business objectives and auditing requirements.  That saves time both with the auditors and with management.  As life becomes more complicated, it is important to get people on the same page.</p>
<p>I find it interesting when I see COBIT gaining recognition in various projects and press.  In the Open Web Application Security Project (OWASP) documentation, &#8220;<a title="Web Applications" href="http://owasp.cvs.sourceforge.net/*checkout*/owasp/guide/current%20draft.pdf">A Guide to Building Secure Web Applications and Web Services</a>&#8221; most sections have a subsection, &#8220;Relevant COBIT Topics.&#8221;   It is looking like OWASP is embracing  COBIT.  The <a href="http://www.isaca.org">ISACA site</a>, has a section for <a href="http://www.isaca.org/Content/NavigationMenu/Members_and_Leaders/COBIT6/COBIT_Mapping1/COBIT_Mapping.htm">COBIT mapping documents</a>.  It provides good information on how these different standards relate to COBIT.  Unfortunately, some documents do require membership to ISACA.  There is a good deal of interesting information available from ISACA.  If you are interested in <a href="http://www.isaca.org/Template.cfm?Section=Membership&#038;Template=/TaggedPage/TaggedPageDisplay.cfm&#038;TPLID=15&#038;ContentID=7510">membership</a>,  information is available at their site.  ISACA maps COBIT against the following standards:
</p>
<p>No Login Required: <img alt="Image" src="http://www.isaca.org/Images/key-green.gif" border="0"/>     Login Required: <img alt="Image" src="http://www.isaca.org/Images/key-yellow.gif" border="0"/>     Member Only: <img alt="Image" src="http://www.isaca.org/Images/key-red.gif" border="0"/> </p>
<ul>
<li><a href="http://www.isaca.org/Template.cfm?Section=COBIT_Mapping1&#038;Template=/MembersOnly.cfm&#038;ContentFileID=12791" target="_blank">C<small>OBI</small>T Mapping: Mapping of ITIL With C<small>OBI</small>T 4.0</a>  (PDF, 553K) Jan 2007 <img alt="Image" src="http://www.isaca.org/Images/key-red.gif" border="0"/>
</li>
<li><a href="http://www.isaca.org/Template.cfm?Section=COBIT_Mapping1&#038;Template=/MembersOnly.cfm&#038;ContentFileID=12792" target="_blank">C<small>OBI</small>T Mapping: Mapping of PRINCE2 With C<small>OBI</small>T 4.0</a>  (PDF, 582K) Jan 2007 <img alt="Image" src="http://www.isaca.org/Images/key-red.gif" border="0"/>
</li>
<li><a href="http://www.isaca.org/Template.cfm?Section=COBIT_Mapping1&#038;Template=/MembersOnly.cfm&#038;ContentFileID=12717" target="_blank">C<small>OBI</small>T Mapping: Mapping of ISO/IEC 17799: 2005 With C<small>OBI</small>T 4.0</a>  (PDF, 544K) Dec 2006<img alt="Image" src="http://www.isaca.org/Images/key-red.gif" border="0"/>
</li>
<li><a href="http://www.isaca.org/ContentManagement/ContentDisplay.cfm?ContentID=26745" target="_blank">C<small>OBI</small>T Mapping: Mapping PMBOK to C<small>OBI</small>T 4.0</a> (PDF, 669K) Aug 2006 <img alt="Image" src="http://www.isaca.org/Images/key-red.gif" border="0"/>
</li>
<li><a href="http://www.isaca.org/ContentManagement/ContentDisplay.cfm?ContentID=26746" target="_blank">C<small>OBI</small>T Mapping: Mapping SEI&#8217;s CMM for Software to C<small>OBI</small>T 4.0</a> (PDF, 590K) Aug 2006 <img alt="Image" src="http://www.isaca.org/Images/key-red.gif" border="0"/>
</li>
<li><a href="http://www.isaca.org/ContentManagement/ContentDisplay.cfm?ContentID=25381" target="_blank">C<small>OBI</small>T Mapping to ISO/IEC 17799 :2000 With C<small>OBI</small>T, 2nd Edition</a> (PDF, 570K) May 2006 <img alt="Image" src="http://www.isaca.org/Images/key-red.gif" border="0"/>
</li>
<li><a href="http://www.isaca.org/AMTemplate.cfm?Section=Deliverables&#038;Template=/ContentManagement/ContentDisplay.cfm&#038;ContentID=24759" target="_blank">C<small>OBI</small>T Mapping Overview of International IT Guidance 2nd Edition</a> (PDF, 444K) Apr 2006 <img alt="Image" src="http://www.isaca.org/Images/key-green.gif" border="0"/>
</li>
<li><a href="http://www.isaca.org/Template.cfm?Section=COBIT_Mapping1&#038;template=/ContentManagement/ContentDisplay.cfm&#038;ContentID=22490" target="_blank">Aligning C<small>OBI</small>T, ITIL and ISO 17799 for Business Benefit</a> (PDF, 255K) Nov 2005 <img alt="Image" src="http://www.isaca.org/Images/key-green.gif" border="0"/>
</li>
</ul>
<p>
The article, &#8220;<a href="http://www.networkworld.com/columnists/2007/011707miliefsky.html?nlhtsec=0115securityalert4&#038;company=BMC">The 7 Best Practices for Network Security in 2007</a>&#8221; from <a href="http://www.networkworld.com">NetworkWorld</a>, has the following statement:</p>
<blockquote>
<p>If you don&#8217;t already have corporate security policies, now is the time. There are some excellent models out there for free                         or for a minimal charge. My favorites are the powerful <a href="http://www.isaca.org/">COBIT model</a>, the e-tail/retail-oriented PCI model from the <a href="https://www.pcisecuritystandards.org/">PCI Security Standards Council</a> and an extremely comprehensive international model called <a href="http://www.iso.org/">ISO 27001/17799</a>.</p>
</blockquote>
<p>COBIT helps provide the high level view. This is complimented with the material from NIST and SANS, which helps with the trees.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.securitymonks.com/2007/01/20/cobit-in-2007/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

