<?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/"
	>

<channel>
	<title>ITSec Packets</title>
	<atom:link href="http://www.itsecpackets.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itsecpackets.com/blog</link>
	<description>A Progammer explores the IT Security field; offering packets of useful information he picks up along the way.</description>
	<pubDate>Mon, 06 Apr 2009 18:39:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8220;WarWalking&#8221;</title>
		<link>http://www.itsecpackets.com/blog/2009/04/06/warwalking/</link>
		<comments>http://www.itsecpackets.com/blog/2009/04/06/warwalking/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 18:38:40 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
		
		<category><![CDATA[Wireless Security]]></category>

		<guid isPermaLink="false">http://www.itsecpackets.com/blog/?p=114</guid>
		<description><![CDATA[I was outside yesterday enjoying the weather with my IPOD touch and decided to see what wireless networks were available to me.  I found an SSID with the name &#8220;Linksys&#8221; and connected to the network.  I then opened up the Safari mobile browser and went to http://192.168.1.1 which is how one configures a router. I [...]]]></description>
			<content:encoded><![CDATA[<p>I was outside yesterday enjoying the weather with my IPOD touch and decided to see what wireless networks were available to me.  I found an SSID with the name &#8220;Linksys&#8221; and connected to the network.  I then opened up the Safari mobile browser and went to http://192.168.1.1 which is how one configures a router. I was prompted for a Username and Password. The SSID of &#8220;Linksys&#8221; is the default SSID that is pre-programmed on all Linksys routers. This tells me that the person who hooked up this Linksys router most likely just took it out of the box and connected it to the Internet without changing the default settings.  One way to confirm that &#8230; back at the username/password screen I tried a username of &#8220;admin&#8221; and password of &#8220;secret&#8221; and I was in.  See screenshot below.</p>
<p><img class="aligncenter size-full wp-image-115" title="router_safari" src="http://www.itsecpackets.com/blog/wp-content/uploads/2009/04/router_safari.png" alt="router_safari" width="320" height="480" /></p>
<p>Ohhh man, the headaches I could have inflicted by changing some simple settings, not to mention the potentially dangerous security breaches I could have caused to anyone accessing the Internet connected to this router either wired or wirelessly.  It&#8217;s good for them that I&#8217;m a WhiteHat. Some people just have no clue!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2009/04/06/warwalking/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Security through Obscurity</title>
		<link>http://www.itsecpackets.com/blog/2009/03/30/security-through-obscurity/</link>
		<comments>http://www.itsecpackets.com/blog/2009/03/30/security-through-obscurity/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 01:59:01 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
		
		<category><![CDATA[InfoSec 101]]></category>

		<guid isPermaLink="false">http://www.itsecpackets.com/blog/?p=90</guid>
		<description><![CDATA[I came across an interesting blog post the other day that caught my attention.  The post contained a good, concrete example of an important security principle called, &#8220;Security through Obscurity&#8221;.  The example presented a case of Security through Obscurity that was used in code, which we&#8217;ll discuss shortly but first we need to explain what  [...]]]></description>
			<content:encoded><![CDATA[<p>I came across an interesting <a href="http://iphoneincubator.com/blog/security/security-by-obscurity" target="_blank">blog post</a> the other day that caught my attention.  The post contained a good, concrete example of an important security principle called, &#8220;Security through Obscurity&#8221;.  The example presented a case of Security through Obscurity that was used in code, which we&#8217;ll discuss shortly but first we need to explain what  exactly is STO (Security through Obscurity).  Here is a quote from Wikipedia on STO:</p>
<p>&#8220;In cryptography and computer security, Security through Obscurity (sometimes, Security by Obscurity) is a principle in security engineering, which attempts to use secrecy (of design, implementation, etc.) to provide security.  A system relying on security through obscurity may have theoretical or actual security vulnerabilities, but its owners or designers believe that the flaws are not known, and that attackers are unlikely to find them.&#8221;</p>
<p>In other words, STO is the attempt to strengthen security by adding in design complexity or making certain aspects of the system secret.  Here&#8217;s an example.  It is common practice for web-masters to modify the banner strings of their HTTP server.  The  banner tells the client which flavor and version of the Webserver that is running.  The Webserver flavor may be Apache, Lighttpd, or IIS, for example.  This information can be useful to an attacker and, therefore, it is recommended for banners to be silenced or even display incorrect information.  Now let&#8217;s take a look at this practice  of changing your banner on your Webserver. Does this make it less likely to be attacked?  Some folk might say yes, though everyone would agree that it doesn&#8217;t actually secure your Webserver in any way.  Perhaps an attacker is looking for a particularly vulnerable site and passes by yours since he can&#8217;t verify which Webserver and version you are running.  This is STO.  You obscured certain details of your system in an attempt to add in security; this is Security by Obscurity.</p>
<p>OK, now to the coding example I stumbled upon over at the <a href="http://iphoneincubator.com/blog/" target="_self">iPhone Development blog</a>.  Here is a snippet of code in the Objective-C programming language (the language used to create MAC and iPhone applications).</p>
<pre name="code" >
NSString *credentials = @"user:password";
</pre>
<p>In the line above the author defines an NSString Object called credentials that contains a user-name and password necessary for authentication at some other point in the program.  Now, once the program is compiled and ready to be deployed, the user-name/password text can be found fairly easily in the binary.  Here is how the author obscures this line of code:</p>
<pre name="code" >
NSString *credentials = [NSString stringWithFormat:@”%c%s%@%c%c%s%@”, ‘u’, “ser:”, @”pas”, ’s’, ‘w’, “ord”, @”@”];
</pre>
<p>In the above line,  the credentials NString has now obfuscated the user/password, which makes the user-name/password harder to find in the binary but not impossible.   A tenacious hacker with a lot of time on their hands  will figure it out eventually.  STO isn&#8217;t &#8220;real&#8221; security, but, depending upon your security requirements, STO might be all that is needed.  It certainly should not be confused with true information security.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2009/03/30/security-through-obscurity/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Hard Drive Failure</title>
		<link>http://www.itsecpackets.com/blog/2009/03/16/my-hard-drive-failure/</link>
		<comments>http://www.itsecpackets.com/blog/2009/03/16/my-hard-drive-failure/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 01:17:47 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
		
		<category><![CDATA[Backup]]></category>

		<guid isPermaLink="false">http://itsecpackets.com/blog/?p=86</guid>
		<description><![CDATA[I&#8217;m rewriting this post that I actually started writing a few weeks back about a data backup plan and how essential it is to backup your data.  Soon after I first started this post, towards the end of February I turned on our Mac one day and heard a loud clicking sound, and I thought [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m rewriting this post that I actually started writing a few weeks back about a data backup plan and how essential it is to backup your data.  Soon after I first started this post, towards the end of February I turned on our Mac one day and heard a loud clicking sound, and I thought that really doesn&#8217;t sound good!  It wasn&#8217;t good, our MAC couldn&#8217;t find it&#8217;s hard-drive and as a result couldn&#8217;t boot up.  Yup, we had a hard-drive failure.  I think some people actually have to experience a  hard-drive failure to start taking backup very seriously. Lucky for us we had a solution in place and were able to recover all our data.  This time it was Time Machine that saved us from sending our hard-drive to a data recovery center where people in white coats in a lab will try and retrieve your data for a mere 2,000+ dollars!!</p>
<p>How many of us actually backup our systems regularly?  Today, more than ever, in our ever-expanding digital world, having a proper backup solution is absolutely imperative!   We all have files we can&#8217;t afford to lose.  I was browsing through my vast library of photos I&#8217;ve taken over the years of the family, viewing precious pictures that cannot be replaced.  My wife, a freelance graphic designer, has a vast collection of files that she&#8217;s created throughout the years and files she&#8217;s been working on recently for various projects.  We also have financial data, music that we ripped and don&#8217;t have the CD&#8217;s, videos of our kids and other assorted types of files.  Apple recognized the need for a backup solution built into the OS and introduced Time Machine in OS X Leopard.  I upgraded our Mac to Leopard back in November of 2007 and have  been using Time Machine ever since.  Time Machine is an incredible solution for Mac users, and be ashamed if you&#8217;re running a Mac without Time Machine.  All you have to do is get an external hard drive, plug it in and Time Machine will ask you if you want to use this external drive as a Time Machine backup.  Click yes and your entire system starts backing up behind the scenes.  Apple made Time machine very easy to setup so it becomes a set-and-forget solution.  What&#8217;s really cool about Time Machine is that you can actually go back in time and retrieve previous versions of a file you were working on, or if you look in your documents folder and don&#8217;t see a file, you fire up Time Machine and view your documents folder back in time.  Then you will find the file that you accidentally deleted, click on it and put it back in your documents folder!  Check out the screen shot below:</p>
<p><img class="aligncenter size-medium wp-image-87" title="time_machine_1" src="http://itsecpackets.com/blog/wp-content/uploads/2009/03/time_machine_1-300x190.jpg" alt="Time Machine Backup" width="300" height="190" /></p>
<p>A Time Machine backup  or a similar Windows type of external hard drive backup solution is just not enough.  We need the second part of the two-part solution.  Unfortunately, our PC&#8217;s are vulnerable to theft, natural disasters, floods and on and on, Heaven forbid.   That&#8217;s why a  good backup plan should also include off-site storage.  That&#8217;s where <a href="http://www.jungledisk.com/">Jungle Disk</a> comes in.  <a href="http://aws.amazon.com/s3/">Amazon S3</a> (Simple Storage Service) is a service offered by Amazon.  It is also called &#8220;In The Cloud&#8221; storage, the &#8220;cloud&#8221; being out on the internet so the infrastructure is &#8220;cloud-like&#8221;.  Services such as these are becoming more and more popular.  Amazon S3 service is used primarily by businesses since it&#8217;s really wholesale storage and doesn&#8217;t offer any direct solutions for the home user.  Jungle disk is a nice program that you can download for just $20 and utilizes the Amazon S3 storage service.  You will need an Amazon S3 account where you provide a credit card so they can bill you monthly for the storage you use.  I&#8217;m using approximately 10 gigs of storage and I pay only $2 per month.  Pricing details can be found <a href="http://aws.amazon.com/s3/#pricing">here</a>. I use Jungle Disk as a worst-case-scenario, since you pay for the space, you may not want to put your entire hard-drive in the cloud. You can configure Jungle Disk to backup only certain folders and you can also include or exclude certain types of files.  Let&#8217;s say your backing up a folder with mostly pictures you might want to just backup *.jpg files or exclude *.mov files.   You can also schedule backups so they happen automatically say daily or weekly, whatever your needs require and what you feel comfortable with.  For now,  I chose a weekly backup of all our family&#8217;s pictures and all of my wife&#8217;s files, which total roughly 10 gigs.</p>
<p>When you run the Jungle Disk backup for the first time it will take a while, depending on your upload speeds, but subsequent backups will only upload files that you&#8217;ve changed or added.  Some people will ask, how can I trust Amazon S3 with my files.  The answer is you don&#8217;t have to trust anyone.  Jungle Disk gives you the option to encrypt your data locally (on your PC) prior to uploading your files so that anything stored on Amazon S3 is &#8220;gobbely-gook&#8221; to anyone without your pass code.</p>
<p>When you purchace a Jungle Disk license you can run the software on all the computers in your home.  Our Mac and Vista laptop have Jungle Disk running.  Now that I&#8217;ve shared my backup plan that saved our bacon, I would love to hear others share what their backup plans are.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2009/03/16/my-hard-drive-failure/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sandboxie</title>
		<link>http://www.itsecpackets.com/blog/2009/02/05/sandboxie/</link>
		<comments>http://www.itsecpackets.com/blog/2009/02/05/sandboxie/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 12:15:53 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
		
		<category><![CDATA[Internet security]]></category>

		<category><![CDATA[Virtual Machine]]></category>

		<guid isPermaLink="false">http://itsecpackets.com/blog/?p=71</guid>
		<description><![CDATA[I want to talk about this exciting program I&#8217;ve been using lately called Sandboxie. I was first introduced to Sandboxie on a SecurityNow prodcast a while back. Then recently, Leo and Steve did another podcast where they did a more in depth look at this now mature program. I even purchased a license which includes [...]]]></description>
			<content:encoded><![CDATA[<p>I want to talk about this exciting program I&#8217;ve been using lately called <a href="http://www.sandboxie.com/">Sandboxie</a>. I was first introduced to Sandboxie on a <a href="http://www.grc.com/securitynow.htm">SecurityNow prodcast</a> a while back. Then recently, Leo and Steve did another podcast where they did a more in depth look at this now mature program. I even purchased a license which includes all new upgrades to Sandboxie for life! What a great deal! The podcast on Sandboxie couldn&#8217;t have come at a more appropriate time for me. I had just purchased a new Dell laptop with Vista; yeah yeah I know I&#8217;m a big Apple/Mac fan-boy but I really couldn&#8217;t justify spending over my budget for a new Macbook. I ended my dilemma by settling for a bottom of the line Dell Inspiron with Vista. The truth is that I&#8217;m actually very happy with my Dell and I&#8217;m even happy - so far - with Vista. Everything works - so far so good. After I ordered my laptop I was thinking about how to keep my new system clean and free of anything malicious such as spyware, adware, etc. This happens to be more of a challenge in a Windows environment. Then I heard about Sandboxie.</p>
<p>So what is Sandboxie? A while back we talked a little bit about a Virtual Machine and how I was able to run Windows on my Mac using <a title="Parallels" href="http://www.itsecpackets.com/blog/2007/08/07/parallels-vm-software-for-the-mac/" target="_self">Parallels</a>. With Parallels you need to set aside memory and actually install the OS you want to run in the VM so that you essentially have two systems on one computer. Sandboxie is a &#8220;lightweight&#8221; VM that doesn&#8217;t actually need a separate OS to run; it runs as a program on Windows. Sandboxie allows you to run any program within a &#8220;contained environment&#8221;. Within that environment no permanent changes or modifications can be made to your system. So which programs do I run in Sandboxie? I have two programs that are the most likely vectors for something malicious getting into my system. These are my web-browser FireFox and my email client Thunderbird. I, therefore, ran these programs within Sandboxie before I wrote this post. They are running in their separate space and can&#8217;t harm my system. I&#8217;m a careful user of the Internet and follow some best practices, such as never downloading anything that is not reputable or clicking on a link in an email from someone I don&#8217;t know. However, even the most savvy user can be vulnerable; the bad guys are getting smarter and smarter. So what happens if I suspect I may have accidentally clicked on an unsavory link or downloaded a dangerous file? I wipe my sandbox clean and start fresh. Any malicious files or potential mal-ware is contained in the sandbox never able to harm any part of my system outside of the sandbox. How cool is that? Keep in mind that you must start using Sandboxie on a computer that is in a healthy state, otherwise Sandboxie is useless and all bets are off. Reformat your hard drive and install Windows fresh or start with a new computer.</p>
<p>This is all nice and I can see how Sandboxie can be a very useful tool for running programs in isolation but there are times were I would need my program to make changes to my system. Here&#8217;s a good example. I&#8217;m browsing on the web using FireFox &#8220;sandboxed&#8221; and then I go to the popular networking site, Facebook, where there is a picture of me posted by a friend that I would like to download, save and share with others. So I click &#8220;save picture&#8221; and I proceed to save it to My documents and here is the pop-up that appears from Sandboxie:</p>
<p><a href="http://itsecpackets.com/blog/wp-content/uploads/2009/02/recover.bmp"><img class="aligncenter size-medium wp-image-72" title="recover" src="http://itsecpackets.com/blog/wp-content/uploads/2009/02/recover.bmp" alt="" /></a></p>
<p>What&#8217;s happening here is that your &#8220;sandboxed&#8221; Firefox wants to save a file to your documents folder, which is outside the sandbox. If you click &#8220;close&#8221; the file will be saved - actually saved - in a directory tree under Sandbox <code>C:\Sandbox\goodbin\DefaultBox </code>where &#8220;DefaultBox&#8221; is your default sandbox (Sandboxie allows you to create different Sandboxes that behave differently for different uses). If you click on the recover box then you are giving Sandboxie permission to save this file to your Documents folder. If you clicked on close and save the file to your &#8220;sandboxed&#8221; documents folder then you can open your Windows Explorer in &#8220;sandboxed&#8221; mode and you&#8217;ll see the files. See the screen shot below with 2 different Windows Explorers; one in &#8220;sandboxed&#8221; mode shows [#] the files while the Windows Explorer not &#8220;sandboxed&#8221; does not show the files</p>
<p><img class="alignnone size-full wp-image-78" title="Explorer window unsandboxed" src="http://itsecpackets.com/blog/wp-content/uploads/2009/02/explorers1.jpg" alt="" width="500" height="334" /></p>
<p><img class="alignnone size-full wp-image-84" title="Windows explorer \&quot;sandboxed\&quot;" src="http://itsecpackets.com/blog/wp-content/uploads/2009/02/explorers21.jpg" alt="" width="500" height="335" /></p>
<p>When you download in Sandboxie, it writes all those new files and system modifications (unless you say it&#8217;s OK to save outside the sandbox) into the sandbox &#8220;C: location&#8221; or <code>C:\Sandbox</code>. Remember, nothing changed outside the sandboxed environment.  That means if you downloaded some changes to your &#8220;money management&#8221; program using Sandbox, you will see those changes only if you run your money program from Sandbox.  If you run it from it&#8217;s regular icon, no changes will have taken effect.  For the more technical users this can come in handy if you want to see how a program behaves when it runs on your system.  You run the program sandboxed and then go into the C:\Sandbox directory to see which system files where changed or which new ones were created.  Perhaps you are auditing a program or are curious to see what the change is so that you can feel safe about modifying your system files &#8220;unsandboxed&#8221;. See the screenshot below showing <code>C:\Sandbox </code>tree.  Notice the different program directories for Thunderbird and Mozilla.</p>
<p><img class="alignnone size-full wp-image-85" title="Sandbox Directory tree" src="http://itsecpackets.com/blog/wp-content/uploads/2009/02/explorer_sandbox.jpg" alt="" width="500" height="428" /></p>
<p>So far, my experience with Sandboxie has been very positive. The interview on the Security Now podcast with the author of Sandboxie, Ronan Tzur from Israel, was very interesting. Sandboxie is a great addition to your security toolbox. Remember, there is no silver bullet security solution and depending on your level of paranoia is how often you clean out your sandbox.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2009/02/05/sandboxie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Clickjacking</title>
		<link>http://www.itsecpackets.com/blog/2008/12/30/clickjacking/</link>
		<comments>http://www.itsecpackets.com/blog/2008/12/30/clickjacking/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 04:10:51 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
		
		<category><![CDATA[Internet security]]></category>

		<category><![CDATA[Web App Security]]></category>

		<guid isPermaLink="false">http://itsecpackets.com/blog/?p=68</guid>
		<description><![CDATA[It&#8217;s been a while since I last posted, I do apologize; things have been heck-tick.  I hope to make it up to you with a post on a new web vulnerability called ClickJacking.  There has been a lot of buzz in  the security community around Clickjacking ever since Robert Hanson and Jeremiah Grossman decided to cancel their talk on a new exploit they [...]]]></description>
			<content:encoded><![CDATA[<div>It&#8217;s been a while since I last posted, I do apologize; things have been heck-tick.  I hope to make it up to you with a post on a new web vulnerability called ClickJacking.  There has been a lot of buzz in  the security community around Clickjacking ever since Robert Hanson and Jeremiah Grossman decided to cancel their talk on a new exploit they were going to introduce  at the OWASP conference which I attended back in September.  Adobe got wind of their talk and asked them to postpone &#8220;airing the issues&#8221; to give them time to put a fix out to their users.  Turns out that it&#8217;s really a browser flaw and not Adobe&#8217;s problem, though, we&#8217;ll get into that.</p>
<p>So what is Clickjacking?   Clickjacking is an interesting exploit since it is not a bug or defect in the browser software, but rather,  a design flaw which will get clearer as we go on. Clickjacking, as it&#8217;s name alludes to, is about getting a user to click on something they didn&#8217;t intend to click on and are not even aware they are clicking on it.  This is accomplished by loading a web page that has a hidden page or multiple pages behind the web page you are actually seeing.  The way this is done is by placing a &#8220;click here&#8221; button that looks perfectly fine but &#8220;underneath&#8221; the button is where a malicious site would place something that might be harmful.  There is a great demo <a href="http://www.planb-security.net/notclickjacking/iframetrick.html#really">here</a> on the topic of clickjacking where you can see the  hidden page behind the one with the buttons that say &#8220;click here&#8221;.  They say a picture is worth a thousand words - it&#8217;s one thing for me to explain it and another to actually see the hidden page appear.   </p>
<p>One of Robert and Jeremiah&#8217;s  examples to demonstrate Clickjacking used Adobe Flash player.  They showed how easy it was to have a user click on something benign that turned on your computers&#8217; video camera (if you had one).  It is a real scary thing for a malicious site to be able to turn on your video camera without your knowledge!  Robert and Jeremiah postponed their talk and Adobe has since taken responsibility and fixed the Clickjacking issue only when Flash-player is the avenue of a Clickjacking attack.  Clickjacking is an issue for all browsers with or without Javascript enabled, since Clickjacking can be accomplished with CSS and DHTML alone.  This exploit, however,  must be viewed within the larger picture.  It isn&#8217;t a flaw or a browser software bug but, rather, a complex vulnerability that became real due to the way we&#8217;ve evolved with the Internet.   Our browsers have become  more and more complex, which creates an environment where sophisticated exploits can breed and grow and become a reality.  It turns out that the concept behind this exploit was documented as far back as 2002.  However, back in 2002 the internet was a much simpler place and the idea of clickjacking wasn&#8217;t much of a threat.  We live in a much different 2.0 Internet world now. </p>
</div>
<div>Firefox users that have the &#8220;NoScript&#8221; plugin can go out and get an update that will protect them from Clickjacking.  The users on all other browsers will need to wait.  In the meantime, as usual, please be careful where you go out on the net.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2008/12/30/clickjacking/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 Tips to Secure Your Web App</title>
		<link>http://www.itsecpackets.com/blog/2008/12/05/5-tips-to-secure-your-web-app/</link>
		<comments>http://www.itsecpackets.com/blog/2008/12/05/5-tips-to-secure-your-web-app/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 12:08:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://itsecpackets.com/blog/?p=67</guid>
		<description><![CDATA[Given the increased shift from packaged software to cloud computing, a growing number of applications are web-based. Both the business models of software-as-a-service, as well as the real-time distribution modelmake Web Apps the ideal platform for new projects.  While web distribution has a number of upsides, in order to effectively scale applications,it&#8217;s crucial to [...]]]></description>
			<content:encoded><![CDATA[<p>Given the increased shift from packaged software to cloud computing, a growing number of applications are web-based. Both the business models of software-as-a-service, as well as the real-time distribution modelmake Web Apps the ideal platform for new projects.  While web distribution has a number of upsides, in order to effectively scale applications,it&#8217;s crucial to implement best practices to safeguard data.  Any database or code that remains in a cloud is potentially vulnerable to attack.  We consulted with leading web application security specialists for their top security tips:</p>
<p>• <strong>Understand the Potential Sources of Vulnerability</strong><br />
Many developers assume that all attacks will come from outside of a network firewall, but this leaves open a potential attack from inside.  Make sure that all data is guarded from unauthorized access by several layers of security,ensuring that lower-level employees, and others who might work in the office,do not have access to valuable code data.  Internal attacks can come in any forms, all of which can be avoided by working to secure all levels of the application.</p>
<p>• <strong>Utilize Multiple Layers of Security for Your Application</strong>.<br />
Often times, IT professionals will rely solely upon an external firewall in order to protect a web application. In order to truly get a high level of security,however, one must cover all the bases. In practice, this means having an effective network virus scanner that operates in real time as well as a comprehensive network traffic tool to keep up with data movement across the network and potential breaches.</p>
<p>• <strong>Integrate Security Concerns Into Your Development Cycle</strong><br />
When planning out the stages of development,whether you work on an agile process or a standard model, you&#8217;ll need to consider the security implications of each part of your application.  Starting from the earliest conversations about requirements and design all the way to the final testing phase,security concerns should be at the forefront of your thought process from the very beginning.  In particular, security testing should be as important as usability testing.</p>
<p>• <strong>Be aware of the security implications of your coding conventions</strong><br />
Even simple coding conventions such as file locations can have large implications in terms of the security of a given file. While you attempt to create a stable code base by integrating standard practices such as basic password protection,make sure that you block all routes to sensitive files,not just standard ones.</p>
<p>• <strong>Test for major, known sources of hacking</strong><br />
While there will always be unknown vulnerabilities that will require major testing and upgrades, you should always protect against the well-know, major holes that often arise in web applications,In particular,design your application to withstand SQL injections, remote code  calls, format string weaknesses as well as XSS (Cross Site Scripting.)</p>
<p>This post was written by Maya Richard, who primarily writes about <a href="http://www.cablemodemhelp.com"> high speed internet deals </a>.  She can be reached with feedback by combining her name and gmail.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2008/12/05/5-tips-to-secure-your-web-app/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Get your kicks with PCI 6.6</title>
		<link>http://www.itsecpackets.com/blog/2008/10/29/get-your-kicks-with-pci-66/</link>
		<comments>http://www.itsecpackets.com/blog/2008/10/29/get-your-kicks-with-pci-66/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 12:19:40 +0000</pubDate>
		<dc:creator>brothke</dc:creator>
		
		<category><![CDATA[Web App Security]]></category>

		<category><![CDATA[PCI 6.6 Rothke security]]></category>

		<guid isPermaLink="false">http://itsecpackets.com/blog/?p=66</guid>
		<description><![CDATA[Get Your Kicks on Route 66 was a popular song and rhythm and blues standard from the 1940’s. For those in the application security space, their idea of kicks on 66 may be found in the PCI DSS requirement for code reviews and application firewalls, specifically DSS requirement 6.6. PCI 6.6 is significant in that [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="justify;"><!--[if gte mso 9]&amp;gt;  Normal 0     false false false  EN-US X-NONE X-NONE              MicrosoftInternetExplorer4              &amp;lt;![endif]--><!--[if gte mso 9]&amp;gt;                                                                                                                                            &amp;lt;![endif]--><em><span style="115%;">Get Your Kicks on Route 66</span></em><span style="115%;"> was a popular song and rhythm and blues standard from the 1940’s.<span> </span>For those in the application security space, their idea of kicks on 66 may be found in the </span><a href="https://www.pcisecuritystandards.org/"><span style="115%;">PCI DSS</span></a><span style="115%;"> requirement for code reviews and application firewalls, specifically </span><a href="https://www.pcisecuritystandards.org/pdfs/infosupp_6_6_applicationfirewalls_codereviews.pdf"><span style="115%;">DSS requirement 6.6.</span></a><span style="115%;"><span> </span>PCI 6.6 is significant in that it, combined with </span><a href="http://www.owasp.org/index.php/Main_Page"><span style="115%;">OWASP</span></a><span style="115%;"> may be the biggest forces to advance application security in recent memory.</span></p>
<p class="MsoNormal" style="justify;"><span style="115%;">Application security is a big deal and that is why it is at the heart of the </span><a href="https://www.pcisecuritystandards.org/"><span style="115%;">Payment Card Industry (PCI)</span></a><span style="115%;"> security standards and requirements.<span> </span></span></p>
<p class="MsoNormal" style="justify;"><span style="115%;">Requirement 6.6 became mandatory in June and requires the validated security of web-based applications.<span> </span>Requirement 6.6 requires organizations that process credit card transactions to address the security of web applications, either via manual or automated source code reviews or vulnerability scans, or via the installation of a web application firewall between a client and application.<span> </span><span> </span>In the US alone, there are a huge amount of merchants that not must deal with application security, something many of them have never thought of until PCI made them wake up from their slumber.</span></p>
<p class="MsoNormal" style="justify;"><span style="115%;">There is a plethora of information available on the web regarding 6.6, so it is not necessary to fully repeat that here.<span> </span>But in a nutshell, the application code review requirement mandates organizations to meet this requirement 6.6 via an application code review or automated vulnerability scanning tool to identify application security issues.</span></p>
<p class="MsoNormal" style="justify;"><span style="115%;">The requirement to have a web application firewalls in front of web applications are to ensure that attacks can be blocked before credit card data is compromised.<span> </span>A web application firewall can also mitigate the risk of an insure application, in that it can detect and block attacks before an attack can occur.</span></p>
<p class="MsoNormal" style="justify;"><span style="115%;">Its been known for decades that the basis of nearly every software vulnerability is insecure or poorly written code.<span> </span>Yet for decades, application security has been ignored.<span> </span>PCI 6.6 is the long-awaited wake-up call for application security. Go get your kicks.</span></p>
<p class="MsoNormal" style="justify;"><span style="115%;"> </span></p>
<p class="MsoNormal" style="justify;"><span style="115%;"> </span></p>
<p class="MsoNormal" style="justify;"><span style="115%;">Ben Rothke is a security consultant and author of </span><a href="http://www.amazon.com/dp/0072262826?tag=benrothkswebp-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=0072262826&amp;adid=1J568GC6NDN92JTGVDP3&amp;"><span style="115%;">Computer Security: 20 Things Every Employee Should Know</span></a><span style="115%;">.</span></p>
<p class="MsoNormal" style="justify;"><span style="115%;"> </span></p>
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2008/10/29/get-your-kicks-with-pci-66/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OWASP 2008 and Fortify</title>
		<link>http://www.itsecpackets.com/blog/2008/10/06/owasp-2008-and-fortify/</link>
		<comments>http://www.itsecpackets.com/blog/2008/10/06/owasp-2008-and-fortify/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 13:26:17 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
		
		<category><![CDATA[On the Job]]></category>

		<category><![CDATA[Web App Security]]></category>

		<guid isPermaLink="false">http://itsecpackets.com/blog/?p=59</guid>
		<description><![CDATA[I was fortunate to attend this year&#8217;s OWASP  Web Application Security conference in New York city.   It was a fantastic experience where  I networked with some really interesting and nice people, participated in intriguing talks about application security and was introduced to some security vendors who captured my attention.  I chatted with Jeremiah Grossman from [...]]]></description>
			<content:encoded><![CDATA[<p>I was fortunate to attend this year&#8217;s OWASP  Web Application Security <a href="http://www.owasp.org/index.php/OWASP_NYC_AppSec_2008_Conference" target="_blank">conference</a> in New York city.   It was a fantastic experience where  I networked with some really interesting and nice people, participated in intriguing talks about application security and was introduced to some security vendors who captured my attention.  I chatted with Jeremiah Grossman from Whitehat security.  Jeremiah has contributed greatly to the world of web application security and is well known in the community.  You can visit his blog <a href="http://jeremiahgrossman.blogspot.com/" target="_blank">here</a>.  <a href="http://www.owasp.org/index.php/Main_Page" target="_blank">OWASP</a>, which stands for Open Web Application Security Projects, is an outstanding organization whose mission is to educate organizations and individuals around the world about Web application security through various means including articles, methodologies and tools.  OWASP set an industry standard with their <a href="http://www.owasp.org/index.php/OWASP_Top_Ten_Project" target="_blank">OWASP Top 10</a> Web application security vulnerabilities.  In a previous post I talked about <a href="http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project" target="_blank">WebGoat </a>which is created and maintained by OWASP.   In that post I discussed <a href="http://itsecpackets.com/blog/2008/07/13/webgoat/" target="_blank">SQL injection</a>, which is one the of the OWASP top ten &#8220;vulns&#8221; (vulnerabilities).</p>
<p><a href="http://www.fortify.com/" target="_blank">Fortify</a> was one of the vendors I met.  I had a nice talk with Erik about Fortify and the solutions they offer companies.  As it turns out, unbeknown to me, my company has an enterprise site license from Fortify.  The suite of products is called <a href="http://www.fortify.com/products/" target="_blank">Fortify 360</a> and one of the features allows organizations to conduct static analysis of an application’s source code.  Later in the conference I met someone from my organization who also mentioned that we have a site license and told me how to go about getting the Fortify source code analyzer installed on my machine at work.  He also gave me a demo of the product.  I really appreciate his involvement in assisting me with Fortify.  Getting my security fix at work is a big milestone for me.</p>
<p>I wanted to share my initial experience with Fortify&#8217;s audit workbench (code scanning product).  My first code scan using this product was WebGoat application.  What better way to prove that a code analyzer is up to snuff than to use it on a web application replete with known vulnerabilities.  It turns out WebGoat is a demo application included with the Fortify product.  I pointed the Audit Workbench to the directory where the WebGoat source code resided on my PC and it started it&#8217;s thing.   Below is a screen shot as the scan is taking place:</p>
<p><a href="http://itsecpackets.com/blog/wp-content/uploads/2008/10/fortify_scan.jpg"><img class="aligncenter size-medium wp-image-60" title="Fortify Scanning" src="http://itsecpackets.com/blog/wp-content/uploads/2008/10/fortify_scan-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>Ok , here is the summary of issues that Fortify found after the scan completed.</p>
<p><a href="http://itsecpackets.com/blog/wp-content/uploads/2008/10/fortify_summary.jpg"><img class="aligncenter size-medium wp-image-61" title="fortify issues summary" src="http://itsecpackets.com/blog/wp-content/uploads/2008/10/fortify_summary-300x240.jpg" alt="" width="300" height="240" /></a></p>
<p>Notice how the issues are broken down by Hot, Warning and Info.  The Hot issues are known vulnerabilities that are considered critical and can be exploited.  You can see the different classes in the left upper corner; Command Injection, Cross-Site Scripting etc.  We discussed SQL injection in the WebGoat application on a previous post so I thought it would be cool to show you what Fortify found for this class of vulnerablity.  I  drilled down into the SQL Injection section and whala! take a look at this!!</p>
<p><a href="http://itsecpackets.com/blog/wp-content/uploads/2008/10/fortify_sql_injection.jpg"><img class="aligncenter size-medium wp-image-62" title="fortify sql injection" src="http://itsecpackets.com/blog/wp-content/uploads/2008/10/fortify_sql_injection-300x205.jpg" alt="" width="300" height="205" /></a></p>
<p>Remember that I wrote, &#8220;SQL injection vulnerabilities are remedied by sanitizing the user supplied input. &#8220;  Fortify found that exact problem in the code; sanitizing user  input was not occurring.  Just in case you can&#8217;t read it in the Details section,  it says, &#8220;On line 166 of Login.java, the method login_BACKUP() invokes a SQL query build using unvalidated input. This call could allow an attacker to modify the statement&#8217;s meaning or to execute  arbitrary SQL commands&#8221;.  Exactly what we demonstrated in the SQL Injection post was possible!</p>
<p>Here is another &#8220;Hot&#8221; issue that Fortify uncovered that I want to share.  Take a look at the  screen shot below:</p>
<p><a href="http://itsecpackets.com/blog/wp-content/uploads/2008/10/fortify_hardcoded_config.jpg"><img class="aligncenter size-medium wp-image-65" title="fortify hardcoded config" src="http://itsecpackets.com/blog/wp-content/uploads/2008/10/fortify_hardcoded_config-300x205.jpg" alt="" width="300" height="205" /></a></p>
<p>This is more stupidity than an explicit vulnerability.  In the highlighted  line of code there is a Database connection being made and the username/password is hardcoded.   The reason why this isn&#8217;t smart is that usernames/passwords can change often and each time changed would necessitate a programming modification.   I know from experience as a Developer that where, applicable, one should always put config values like these username/passwords in config files.</p>
<p>So far, my experience with the Fortify product has been very positive.  I plan in the future to use the analyzer against my own code to ascertain the vulnerabilities in the code that I write.  As a developer, it is a challenge to meet deadlines and write securely by thinking like an attacker.  Fortify is a good tool to make this possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2008/10/06/owasp-2008-and-fortify/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ShieldsUp</title>
		<link>http://www.itsecpackets.com/blog/2008/08/24/shieldsup/</link>
		<comments>http://www.itsecpackets.com/blog/2008/08/24/shieldsup/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 01:40:04 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
		
		<category><![CDATA[Internet security]]></category>

		<guid isPermaLink="false">http://itsecpackets.com/blog/?p=55</guid>
		<description><![CDATA[Steve Gibson from GRC.com provides a free port scanning tool called ShieldsUp that I was playing with the other day.  You can perform the scan of your network here Before doing the scan, make sure you have permission from your network administrator since  ShieldsUp will probe ports of the IP address that your browser made [...]]]></description>
			<content:encoded><![CDATA[<p>Steve Gibson from GRC.com provides a free port scanning tool called ShieldsUp that I was playing with the other day.  You can perform the scan of your network <a href="https://www.grc.com/x/ne.dll?bh0bkyd2" target="_blank">here</a> Before doing the scan, make sure you have permission from your network administrator since  ShieldsUp will probe ports of the IP address that your browser made the connection from and therefore,  can trip your company&#8217;s IDS.  Of course, if you&#8217;re doing this from home you will not have to concern yourself with this; just click on the link and proceed with the firewall check.  It&#8217;s good to know that this service cannot be used as a hacking tool like <a href="http://itsecpackets.com/blog/2007/07/09/nmap-reconnaissance/">NMAP</a> since one cannot scan a specified IP address. <br id="wp_l" /><br id="f6x:11" />We talked about egress filtering in a prior post - you can refer to that <a href="http://itsecpackets.com/blog/2007/08/01/egress-filtering-keeping-the-bad-guys-in/">here</a> as a refresher.  A port, also referred to as a software port, is a logical point on the computer where a remote connection takes place.   A popular port number is port 80, where you would typically run the webserver service.  As you read this page, your computer connected to this blog&#8217;s Webserver on port 80.  Once the connection on a port is made between a remote computer and the host computer communication can be begin between the two endpoints.  Besides a Webserver, there are other legitimate situations where a service would run on a computer and listen on a port for a client to connect.  For example, the programs like Remote Acess and Filesharing, as well as others, will need to listen for incoming requests.  In order for a remote machine to make a connection on your computer they would need a port or a &#8220;window&#8221; to get in.  It becomes essential to be aware if such a window to your computer exists and if it&#8217;s open and not needed, then it should be closed immediately.  <br id="f6x:27" /><br id="f6x:28" />Most of us home users use some sort of router.  A router allows us to share connections between multiple computers either wired or wireless, which comes in handy these days where it&#8217;s quite typical to find more than one computer in today&#8217;s homes.  Another feature of the router is that it acts as a firewall between the internet and your computers on your network.  Found this definition of a firewall at GRC.com: <br id="f6x:34" /><br id="f6x:35" />&#8220;A firewall ABSOLUTELY ISOLATES your computer from the Internet using a &#8220;wall of code&#8221; that inspects each individual &#8220;packet&#8221; of data as it arrives at either side of the firewall - inbound to or outbound from your computer - to determine whether it should be allowed to pass or be blocked. &#8220;<br id="f6x:40" /><br id="f6x:41" />So I recently switched my internet service from FIOS to Cablevision.  Cablevison installed the cable and connected our MAC to the Internet without supplying a router.  I didn&#8217;t have a chance to get a router yet and our Mac is now directly connected to the Internet.  I&#8217;m not worried since our  MAC has a built in software firewall, more on that soon.   So I decided to run ShieldsUp to see the status of my ports prior to hooking up my router.</p>
<p><img class="alignnone size-full wp-image-57" title="ShieldsUp screen shot" src="http://itsecpackets.com/blog/wp-content/uploads/2008/08/picture-11.png" alt="" width="500" height="308" /></p>
<p><br id="f6x:49" />The test checked all the service ports 0 - 1055.  As you can see in the screenshot,  I recieved almost all blue boxes (representing ports)  with a few green and a &#8220;FAILED&#8221; rating.  What do the colors blue, green and red mean ?  OK, red means the port is open and listening for incoming connections and ready to serve, which, remember isn&#8217;t a bad thing necessarily, it&#8217;s only  bad if you aren&#8217;t aware of any services that should be running.  Blue means that the port is actually closed and no service is running on that port, which means that no connections can be made. That&#8217;s good.  Green is &#8220;stealth&#8221;, a term Steve Gibson coined.  A port is &#8220;stealthed&#8221; if, when probing the port  on the remote computer or router, there is no response at all. There  is complete silence on the wire.  There is  a debate in the TCP/IP Internet world regarding the notion of &#8220;stealth&#8221; vs. closed ports.  Steve felt that a TCP/IP port shouldn&#8217;t respond but rather drop the request completely.  In his opinion a &#8220;Stealthed&#8221; port is better than a closed port.  If a port responds that it is closed that, in itself, tells the remote machine that there was a system on the other end that exists and is &#8220;out there&#8221;.   If your system is completely &#8220;Stealthed&#8221; a hacker wouldn&#8217;t  even know if your system was actually connected to the Internet.  Steve feels that this added layer of privacy makes it more secure.  The &#8220;FAILED&#8221; message that I received is indicative to Gibson&#8217;s &#8220;True Stealth Analysis&#8221; which is why I recieved a failed rating from this tool.  <br id="f6x:71" /><br id="f6x:72" />I did some further reading into the MAC firewall and was surprised to learn that the Leopard OS firewall is turned off by default.  Again, if you&#8217;re behind a Router (which I was before Cablevision),  there is no need for concern since the router is a firewall.  However, if you have a laptop and connect to the internet in potentially hostile environments it would be a wise thing to turn on your MAC firewall.  It is surprising that Apple, of all companies who toot their horns about security, would ship Leopard&#8217;s firewall off by default.  So, the analysis done in the screen shot above is  my MAC connected directly to the internet with no firewall running.  If there were any services running on my computer the ports would have displayed red for open.  Why the few green &#8220;Stealthed&#8221; ports?  Good question.  It turns out that these ports are actually shut down (&#8221;Stealthed&#8221;)  by my cable provider Cablevision and one of the ports is 80  - yup, I can&#8217;t run a Webserver on my MAC unless I use a router and go through some hoops to properly configure it.</p>
<p>Here is a screen shot of the ShieldsUp test performed on  my Ipod touch mobile browser after configuring my router.  Now, with a router in between the Internet and my the computers on my network I&#8217;m fully &#8220;Stealthed&#8221;.</p>
<p><img class="alignnone size-full wp-image-58" title="img_0001" src="http://itsecpackets.com/blog/wp-content/uploads/2008/08/img_0001.png" alt="" width="320" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2008/08/24/shieldsup/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WebGoat</title>
		<link>http://www.itsecpackets.com/blog/2008/07/13/webgoat/</link>
		<comments>http://www.itsecpackets.com/blog/2008/07/13/webgoat/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 22:49:07 +0000</pubDate>
		<dc:creator>Ron</dc:creator>
		
		<category><![CDATA[Web App Security]]></category>

		<guid isPermaLink="false">http://itsecpackets.com/blog/?p=50</guid>
		<description><![CDATA[I came across the perfect hands on learning tool that teaches about the common web application vulnerabilities. It&#8217;s called WebGoat, an open source J2EE insecure web application created by OWASP. The purpose of WebGoat is to educate people and organizations on the various risks that are, unfortunately, plaguing our websites. What better way to learn [...]]]></description>
			<content:encoded><![CDATA[<p>I came across the perfect hands on learning tool that teaches about the common web application vulnerabilities. It&#8217;s called <a href="http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project">WebGoat</a>, an open source J2EE insecure web application created by <a href="http://www.owasp.org/" target="_blank">OWASP</a>. The purpose of WebGoat is to educate people and organizations on the various risks that are, unfortunately, plaguing our websites. What better way to learn about website hacking than to hack an insecure website with different known exploits. WebGoat has different lessons and some hints that guide the student. It&#8217;s a great, fun way to learn web application security. You can be up and running with WebGoat in no time by downloading a zip file that contains the WebGoat code, the Java run time environment and a configured Tomcat 5.5 server. <a href="http://tomcat.apache.org/">Tomcat </a>is a free Servlet container that implements Java Servlets/Jsp specification. Tomcat also contains a Java webserver. I chose to download the war file and import it into my Java IDE, called <a href="http://www.eclipse.org/">Eclipse</a>, so I can analyze the source code. I put my Mac to the challenge; running Eclipse and Tomcat. Using the Mac turned out to be such a pleasure since everything installed and ran smoothly. After installing and configuring everything, I was able to start the Tomcat server from Eclipse and then point my Firefox browser to http://localhost:8080/WebGoat/attack and run the WebGoat application.</p>
<p><span style="text-decoration: underline;"><a href="http://itsecpackets.com/blog/wp-content/uploads/2008/07/picture-5.png"></a><a href="http://itsecpackets.com/blog/wp-content/uploads/2008/07/picture-7.png"><img class="aligncenter size-medium wp-image-52" title="picture-7" src="http://itsecpackets.com/blog/wp-content/uploads/2008/07/picture-7-300x177.png" alt="Eclipse running WebGoat" width="300" height="177" /></a><br />
</span></p>
<p>Databases are typically used as the back end to web applications. SQL is a query language that is used to interact with the database. SQL Injection is a common web application &#8220;vulnerability&#8221; that allows an attacker to send data to the back end database. This &#8220;string&#8221; is then inserted into an SQL query within the application code and executed in the database. If an SQL injection vulnerability exists, then the application may be severely compromised. In some cases an SQL Injection flaw may even allow an attacker to bypass authentication schemes.  In the below WebGoat lesson the student, acting as the attacker, needs to craft some &#8220;string&#8221; that, when submitted as the “password”, allows access.</p>
<p><a href="http://itsecpackets.com/blog/wp-content/uploads/2008/07/picture-6.png"><img class="aligncenter size-medium wp-image-53" title="Logon screen" src="http://itsecpackets.com/blog/wp-content/uploads/2008/07/picture-6-300x256.png" alt="" width="300" height="256" /></a></p>
<p> In order to proceed with the hack we will need to alter the HTML or submit the form and intercept the request in order to modify the password field. We can alter the HTML file locally on our computer and then modify the HTML code. We will change the password field to type=&#8217;text&#8217; in order for us to see what we type. We will also change the size of the input field (currently it&#8217;s only allows 8 characters). A quicker way I found to do this was to use an awesome &#8220;Plugin&#8221; to Firefox called <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug </a>that allowed me to modify the HTML on the fly. The other way to proceed with the hack would be to use a tool called WebScarab to manipulate the data passed back to the server. Notice in the screen shot below that you can now see what I typed in the password field instead of asterisks. Also, my password field now allows 30 characters. </p>
<div><a href="http://itsecpackets.com/blog/wp-content/uploads/2008/07/picture-5.png"><img class="aligncenter size-medium wp-image-51" title="WebGoat with firebug plugin" src="http://itsecpackets.com/blog/wp-content/uploads/2008/07/picture-5-300x192.png" alt="" width="300" height="192" /></a></div>
<p> </p>
<p>Here is the altered HTML in case you can&#8217;t see it :</p>
<p><span id="jk0c23"><span><span><span style="font-family: Tahoma;">&lt;input type=&#8221;</span></span></span><span><span style="font-family: Tahoma;">text</span></span></span><span id="jk0c25"><span><span><span style="font-family: Tahoma;">&#8221; maxlength=&#8221;</span></span></span><span><span style="font-family: Tahoma;">30</span></span></span><span id="jk0c27"><span><span><span style="font-family: Tahoma;">&#8221; size=&#8221;</span></span></span><span><span style="font-family: Tahoma;">30</span></span></span><span id="jk0c29"><span><span><span style="font-family: Tahoma;">&#8221; name=&#8221;password&#8221;/&gt;.</span></span></span></span></p>
<p>Why did the &#8220;password&#8221; I used admin or &#8216;1&#8242;=&#8217;1 allow me to logon and bypass the authentication? We need a little background first on basic authentication for websites. The “password” supplied by the user needs to be verified that. indeed, it is the correct password for this user and whoever is logging on is who they say they are. This is done by querying the database and passing the supplied “password” as a parameter to the query. Here is a simple SQL statement that might be constructed in a web application:</p>
<p>SELECT * FROM user_data WHERE password = &#8216;?&#8217; and username=&#8217;admin&#8217;</p>
<p>If the query returns the record from the user_data table then we have a match on the user&#8217;s supplied password. If there is no match, then the authentication should fail and a message should be sent back to the user as &#8220;Login Failed&#8221;.</p>
<p>Now let&#8217;s substitute the “password” I supplied into the query:</p>
<p>SELECT * FROM user_data WHERE password = &#8216;admin&#8217; or &#8216;1&#8242;=&#8217;1&#8242; and username=&#8217;admin&#8217;</p>
<p>The or &#8216;1&#8242; = &#8216;1&#8242; makes the entire query true, which returns the user admin record and bypasses the logon scheme. With this crafty string we have successfully exploited the SQL injection vulnerability. SQL injection vulnerabilities are remedied by sanitizing the user supplied input. In the above example, if the server side code had some kind of logic to reject the single quote, our method of attack would have been foiled. In fact, there should be a series of validations for the characters that are white-listed versus those that are not allowed and in this way, an invalid character would be stripped out. The fundamental concept here is that only server side code can thwart attacks such as the SQL injection since, as we demonstrated, the client side code can be easily modified. That’s why it is essential that all input validation is performed on the server side. With some knowledge of these types of attacks and diligence at the development phase, SQL injection vulnerabilities can be avoided.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsecpackets.com/blog/2008/07/13/webgoat/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
