<?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>Toby&#039;s Technical Ramblings &#187; Security</title> <atom:link href="http://tosbourn.com/category/security/feed/" rel="self" type="application/rss+xml" /><link>http://tosbourn.com</link> <description>A web development blog.</description> <lastBuildDate>Mon, 07 May 2012 10:47:42 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Would you hire someone from LulzSec?</title><link>http://tosbourn.com/2011/08/security/would-you-hire-someone-from-lulzsec/</link> <comments>http://tosbourn.com/2011/08/security/would-you-hire-someone-from-lulzsec/#comments</comments> <pubDate>Tue, 02 Aug 2011 21:56:22 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Security]]></category> <category><![CDATA[LulzSec]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=499</guid> <description><![CDATA[As more and more members of anon and it&#8217;s various security ventures are getting outted by various law enforcement agencies I would love to know if you think the members will be doing in 5 years time. It wouldn&#8217;t surprise me if at least some of them land some pretty good IT security jobs as a result. [...]]]></description> <content:encoded><![CDATA[<p>As more and more members of anon and it&#8217;s various security ventures are getting outted by various law enforcement agencies I would love to know if you think the members will be doing in 5 years time.</p><p>It wouldn&#8217;t surprise me if at least some of them land some pretty good IT security jobs as a result.</p><p>Would you hire someone from LulzSec? Answer in the comments please.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2011/08/security/would-you-hire-someone-from-lulzsec/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Hacked.</title><link>http://tosbourn.com/2011/07/security/hacked/</link> <comments>http://tosbourn.com/2011/07/security/hacked/#comments</comments> <pubDate>Thu, 07 Jul 2011 22:30:02 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Security]]></category> <category><![CDATA[Hacked]]></category> <category><![CDATA[Wordpress]]></category><guid
isPermaLink="false">http://tosbourn.com/?p=472</guid> <description><![CDATA[Some arse seemingly managed to get hold of my FTP password for this site and put some dodgy Javascript into the index.php file. I have completely re-installed WordPress (I had to do an update anyway) and have changed all my related credentials. My most sincere apologies to anyone who may have been sent somewhere as [...]]]></description> <content:encoded><![CDATA[<p>Some arse seemingly managed to get hold of my FTP password for this site and put some dodgy Javascript into the index.php file.  I have completely re-installed WordPress (I had to do an update anyway) and have changed all my related credentials.</p><p>My most sincere apologies to anyone who may have been sent somewhere as a result of visiting this site in the past few days and my genuine gratitude to the kind people who reported the issue.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2011/07/security/hacked/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>The importance of supporting OWASP</title><link>http://tosbourn.com/2011/03/security/the-importance-of-supporting-owasp/</link> <comments>http://tosbourn.com/2011/03/security/the-importance-of-supporting-owasp/#comments</comments> <pubDate>Mon, 21 Mar 2011 21:31:21 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Security]]></category> <category><![CDATA[OWASP]]></category><guid
isPermaLink="false">http://www.tosbourn.com/?p=412</guid> <description><![CDATA[The OWASP is a free and open security community based project that provides an absolute wealth of knowledge, tools and papers to help anyone involved in designing, developing, deploying or supporting a web application to insure security is built in from the ground up and that the overall product is as secure as it can [...]]]></description> <content:encoded><![CDATA[<p>The <abbr
title="Open Web Application Security Project">OWASP</abbr> is a free and open security community based project that provides an absolute wealth of knowledge, tools and papers to help anyone involved in designing, developing, deploying or supporting a web application to insure security is built in from the ground up and that the overall product is as secure as it can be.</p><p>Because it is so free and open you can <a
title="OWASP" href="http://www.owasp.org/" target="_blank">visit the site right now</a> and check out some of the really cool things like;</p><ul><li><a
title="PHP Security Library" href="http://www.owasp.org/index.php/Esapi#tab=PHP" target="_blank">A PHP security library</a>.</li><li><a
title="OWASP Top 10" href="http://www.owasp.org/index.php/Top_10" target="_blank">The OWASP top 10</a>.</li><li><a
title="Development Guide" href="http://www.owasp.org/index.php/Category:OWASP_Guide_Project" target="_blank">The Development Guide</a>.</li><li><a
title="Quick Reference Guide" href="http://www.owasp.org/index.php/OWASP_Secure_Coding_Practices_-_Quick_Reference_Guide" target="_blank">Secure Coding Practices</a>.</li><li><a
title="Loads of other things!" href="http://www.owasp.org/index.php/Category:OWASP_Project" target="_self">Loads more things</a>&#8230;</li></ul><p>All for free, literally thousands of hours worth of work from some of the top security professionals in the world, available completely for free.  It is brilliant, and why the internet is just a great place to work.</p><p>OWASP is split into <a
title="Local OWASP chapters" href="http://www.owasp.org/index.php/Category:OWASP_Chapter" target="_blank">localised chapters</a>, with new ones popping up all the time.  My local chapter would be the Dublin based one (so I use the term local very very loosely, I even have to take out crazy fake money when I go down there!).</p><p>Again, you can join chapters for free, this gives you access to mailing lists and free talks that get put on as regularly as can be organised.  In my opinion anyone who gives half a crap about the security of the web applications they are creating should be attending these talks as often as they can.  I mean it is free, you are getting free security advise from professionals who have proven their chops many times over.</p><p>The other thing you can do, and the real point of my post, is that you can <a
title="OWASP Paid Supporter" href="http://www.owasp.org/index.php/Membership#Categories_of_Membership_.26_Supporters" target="_blank">become a paid supporter</a>.  This costs a minimum of $50, which I think is more than fair for the amount of excellent information available on their site alone (ignoring the talks organised by chapters), in fact, I say more than fair &#8211; I have spent more on ale in an evening, and I am willing to bet you have chucked away more than $50 on lesser causes before.</p><p>By rights the $50 should just get you the nice feeling of knowing you have contributed to an excellent cause, but it doesn&#8217;t end there, OWASP is such an awesome project that occasionally there will be extra talks or training sessions put on for paid up members by way of a thank you.  That is just bloody awesome, to get to talk to some of the top security professionals in the world or to get trained by them, $50 is a steal.</p><p><a
title="Sign up for OWASP now." href="http://www.owasp.org/index.php/Membership#Categories_of_Membership_.26_Supporters" target="_blank">Sign up now</a>. (or do what I did and ask <a
title="Team Solutionz" href="http://teamsolutionz.com" target="_blank">your company</a> to sign you up!)</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2011/03/security/the-importance-of-supporting-owasp/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PHP Security &#8211; General PHP setup Gotchas</title><link>http://tosbourn.com/2010/09/php/php-security-general-php-setup-gotchas/</link> <comments>http://tosbourn.com/2010/09/php/php-security-general-php-setup-gotchas/#comments</comments> <pubDate>Thu, 23 Sep 2010 22:13:38 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[error_reporting]]></category> <category><![CDATA[register_globals]]></category><guid
isPermaLink="false">http://www.tosbourn.com/?p=306</guid> <description><![CDATA[This is my first in a series of 9 posts dealing with PHP Security, my plan is to cover some of the broad topics associated with certain aspects of developing secure PHP applications in plain English. Whilst I will be providing examples throughout I will not labour on certain points, I will however attempt to [...]]]></description> <content:encoded><![CDATA[<p>This is my first in a series of 9 posts dealing with PHP Security, my plan is to cover some of the broad topics associated with certain aspects of developing secure PHP applications in plain English.</p><p>Whilst I will be providing examples throughout I will not labour on certain points, I will however attempt to provide many sources that you can use to read up more on the various topics.</p><p>For this post I want to talk about some general PHP setup Gotchas that you might want to look out for.  There is a tendancy amongst some people (especially if they haven&#8217;t had to install PHP) to assume that the default setting that their hosts provided them is the most secure.  There are three things wrong with thinking like that.</p><ol><li>It is lazy (and worst of all, boring)</li><li>The standard settings may not be the most secure for your setup.</li><li>Who said they gave you the standard settings?</li></ol><p>You should <strong>always</strong> check out your Apache/MySQL/PHP settings on any new server.</p><h3>Register Globals</h3><p>The first setting you should be looking up in php.ini is <strong>register_globals</strong> and making sure it is set to <strong>0</strong>.  This is the default setting but it is worth having a quick look because this little blighter could get you into a world of trouble (if you are a bad coder).</p><p>The reason I say if you are a bad coder is because there is nothing inherently wrong with having it turned on but if your code isn&#8217;t tight enough then having register_globals on can let people type something like&#8230;</p><p><em><strong>http://yoursite.com/page.php?newVar=h@xx0r</strong></em></p><p>This <strong><em>newVar</em></strong> variable is now set in your code, it doesn&#8217;t take a security expert to realise what crap that could land you in.</p><p>If you don&#8217;t have access to the php.ini file on your server you can include that parameter in your .htaccess file that should be located in the root of your web folder. The line you would need to add is..</p><blockquote><p><strong>php_flag register_globals on</strong></p></blockquote><p>Whilst it is best practice to turn them off in order to try and keep your code a little less vulnerable you should really be turning on Error Reporting to point you in the right direction from time to time, which leads me very nicely onto my next heading&#8230;</p><h3>Error Reporting</h3><p>Error Reporting is concerned with what errors PHP will record, where it will store them, and if it will display them.  There are essentially four settings we should be concerning ourselves with, like with register_globals these can be set in php.ini, in a .htaccess file or in your php code.</p><ul><li><strong>error_reporting</strong> (Which I think should be set to <strong>E_ALL</strong> |<strong> E_STRICT</strong> *)</li><li><strong>display_errors</strong> (<strong>On</strong> for an internal DEV server or your home setup, <strong>Off</strong> for a client setup)</li><li><strong>log_errors</strong> (You should always have this set to <strong>On</strong>)</li><li><strong>error_log</strong> (You set this to where you want the logs to be stored eg <em>/location/to/log </em>**)</li></ul><p>*<strong>E_ALL</strong> in  basically means report everything, <strong>E_STRICT</strong> means be damned strict about it, errors and warnings alike will be picked up by PHP.</p><p>** Obviously your logs shouldn&#8217;t be anywhere close to being inside the www folder, error notifications could really help a potential hacker.</p><p>You can set up your own error handling within PHP, but my suggestion would be use a framework to do this for you, only roll your own if you are confident in your abilities because if there is an error in your error handler, well&#8230;</p><h3>Closing Up</h3><p>You could write a small book on how to securely set up a server, and of course by the time you have written it the tips will be obsolete.  I will leave this post here with those 2 categories for now because these are the main ones that keep cropping up when people mention PHP setup and Security.</p><p>When I start writing my next post (entitled Forms and Filtering) there will be a lot more content to get your teeth into, because if you can write bullet proof code your app should be able to stand up on all but the most flaky of server setups!</p><h3>Resources</h3><ul><li><a
href="http://blog.php-security.org/archives/3-register_globals-is-not-evil.html" target="_blank">Register Globals Is Not Evil</a></li><li><a
href="http://en.wikibooks.org/wiki/PHP_Programming/Register_Globals" target="_blank">More Information On Register Globals</a></li><li><a
href="http://php.net/manual/en/errorfunc.configuration.php" target="_blank">PHP&#8217;s Error Configuration</a></li></ul><p><em>If you thought this post was in any way useful, please share it amongst others who you think would also benifit.</em></p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2010/09/php/php-security-general-php-setup-gotchas/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Skipfish &#8211; No such file or directory.</title><link>http://tosbourn.com/2010/05/security/skipfish-no-such-file-or-directory/</link> <comments>http://tosbourn.com/2010/05/security/skipfish-no-such-file-or-directory/#comments</comments> <pubDate>Fri, 21 May 2010 21:57:59 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Security]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[Skipfish]]></category> <category><![CDATA[Ubuntu]]></category><guid
isPermaLink="false">http://www.tosbourn.com/?p=252</guid> <description><![CDATA[I wanted to play about with Google&#8217;s Skipfish to see if it could automate any of my security scans and grabbed the source code from the code library. When I tried to make the file whilst running Ubuntu 9.10 I was presented with the following error: cc -L/usr/local/lib/ -L/opt/local/lib skipfish.c -o skipfish -O3 -Wno-format -Wall [...]]]></description> <content:encoded><![CDATA[<p>I wanted to play about with Google&#8217;s <a
href="http://code.google.com/p/skipfish/">Skipfish</a> to see if it could automate any of my security scans and grabbed the source code from the code library.</p><p>When I tried to make the file whilst running Ubuntu 9.10 I was presented with the following error:</p><p><code>cc -L/usr/local/lib/ -L/opt/local/lib skipfish.c -o skipfish -O3 -Wno-format -Wall -funsigned-char -g -ggdb -I/usr/local/include/ -I/opt/local/include/  -D_FORTIFY_SOURCE=0 \<br
/> http_client.c database.c crawler.c analysis.c report.c -lcrypto -lssl -lidn -lz<br
/> In file included from crawler.h:26,<br
/> from skipfish.c:39:<br
/> http_client.h:26:25: error: openssl/ssl.h: No such file or directory<br
/> In file included from crawler.h:26,<br
/> from skipfish.c:39:<br
/> http_client.h:189: error: expected specifier-qualifier-list before ‘SSL_CTX’<br
/> skipfish.c: In function ‘main’:<br
/> skipfish.c:154: warning: implicit declaration of function ‘SSL_library_init’<br
/> http_client.c:37:25: error: openssl/ssl.h: No such file or directory<br
/> http_client.c:38:25: error: openssl/err.h: No such file or directory<br
/> http_client.c:39:18: error: idna.h: No such file or directory<br
/> http_client.c:40:18: error: zlib.h: No such file or directory<br
/> In file included from database.h:29,<br
/> from http_client.c:45:<br
/> http_client.h:189: error: expected specifier-qualifier-list before ‘SSL_CTX’<br
/> http_client.c: In function ‘parse_url’:<br
/> http_client.c:285: warning: implicit declaration of function ‘idna_to_ascii_8z’<br
/> http_client.c:285: error: ‘IDNA_SUCCESS’ undeclared (first use in this function)<br
/> http_client.c:285: error: (Each undeclared identifier is reported only once<br
/> http_client.c:285: error: for each function it appears in.)<br
/> http_client.c: In function ‘parse_response’:<br
/> http_client.c:1516: error: ‘z_stream’ undeclared (first use in this function)<br
/> http_client.c:1516: error: expected ‘;’ before ‘d’<br
/> http_client.c:1521: error: ‘d’ undeclared (first use in this function)<br
/> http_client.c:1531: warning: implicit declaration of function ‘inflateInit2’<br
/> http_client.c:1531: error: ‘Z_OK’ undeclared (first use in this function)<br
/> http_client.c:1532: warning: implicit declaration of function ‘inflateEnd’<br
/> http_client.c:1537: warning: implicit declaration of function ‘inflate’<br
/> http_client.c:1537: error: ‘Z_FINISH’ undeclared (first use in this function)<br
/> http_client.c:1540: error: ‘Z_BUF_ERROR’ undeclared (first use in this function)<br
/> http_client.c:1540: error: ‘Z_STREAM_END’ undeclared (first use in this function)<br
/> http_client.c: In function ‘destroy_unlink_conn’:<br
/> http_client.c:1636: error: ‘struct conn_entry’ has no member named ‘q’<br
/> .</code></p><p><code>.</code></p><p><code>. SNIP SNIP!</code></p><p><code>.</code></p><p><code><br
/> http_client.c:2188: error: ‘struct conn_entry’ has no member named ‘next’<br
/> http_client.c:2192: error: ‘struct conn_entry’ has no member named ‘q’<br
/> In file included from database.c:33:<br
/> http_client.h:26:25: error: openssl/ssl.h: No such file or directory<br
/> In file included from database.c:33:<br
/> http_client.h:189: error: expected specifier-qualifier-list before ‘SSL_CTX’<br
/> In file included from crawler.c:30:<br
/> http_client.h:26:25: error: openssl/ssl.h: No such file or directory<br
/> In file included from crawler.c:30:<br
/> http_client.h:189: error: expected specifier-qualifier-list before ‘SSL_CTX’<br
/> In file included from analysis.c:28:<br
/> http_client.h:26:25: error: openssl/ssl.h: No such file or directory<br
/> In file included from analysis.c:28:<br
/> http_client.h:189: error: expected specifier-qualifier-list before ‘SSL_CTX’<br
/> analysis.c: In function ‘maybe_xsrf’:<br
/> analysis.c:397: warning: implicit declaration of function ‘time’<br
/> In file included from report.c:33:<br
/> http_client.h:26:25: error: openssl/ssl.h: No such file or directory<br
/> In file included from report.c:33:<br
/> http_client.h:189: error: expected specifier-qualifier-list before ‘SSL_CTX’<br
/> make: *** [skipfish] Error 1<br
/> </code></p><p>Some digging about made me realise this is a fairly common problem even if your machine has a fairly good set of dependencies downloaded.</p><p>If you run the following command it should act as a catchall and set you up to be able to play with this tool.</p><p><code>sudo apt-get install libssl-dev build-essential zlibc zlib-bin libidn11-dev libidn11<br
/> </code></p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2010/05/security/skipfish-no-such-file-or-directory/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Useful Security Pages</title><link>http://tosbourn.com/2010/05/security/useful-security-pages/</link> <comments>http://tosbourn.com/2010/05/security/useful-security-pages/#comments</comments> <pubDate>Wed, 05 May 2010 08:43:00 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Security]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[PHP]]></category><guid
isPermaLink="false">http://www.tosbourn.com/?p=231</guid> <description><![CDATA[I have been doing some trawling for security checklists and other web app related security documents and I have come across some web pages that I have found fairly useful.  I will add to this list as and when I find more; Apache Securing Apache Checklist How to find out what user Apache is running [...]]]></description> <content:encoded><![CDATA[<p>I have been doing some trawling for security checklists and other web app related security documents and I have come across some web pages that I have found fairly useful.  I will add to this list as and when I find more;</p><h2>Apache</h2><ul><li><a
href="http://www.hermann-uwe.de/security/articles/securing-apache-checklist" target="_blank">Securing Apache Checklist</a></li><li><a
href="http://stackoverflow.com/questions/2509334/finding-out-what-user-apache-is-running-as" target="_blank">How to find out what user Apache is running as</a></li></ul><h2>PHP</h2><ul><li><a
href="http://www.jemjabella.co.uk/blog/php-security-checklist" target="_blank">Securing PHP</a></li><li><a
href="http://devlog.info/2010/02/04/why-php-request-array-is-dangerous/" target="_blank">Why $_REQUEST is dangerous</a></li><li><a
href="http://articles.sitepoint.com/article/php-security-blunders">7 PHP security blunders</a></li><li><a
href="http://www.kavoir.com/2010/03/php-security-checklist-for-websites-and-web-applications-bottom-line-for-every-good-php-developers.html" target="_blank">Web App security checklist</a></li><li><a
href="http://aymanh.com/checklist-for-securing-php-configuration" target="_blank">Hardening PHP</a></li></ul><h2>MySQL</h2><ul><li><a
href="http://www.kavoir.com/2010/03/just-hashing-is-far-from-enough-how-to-position-against-dictionary-and-rainbow-attacks.html">Hashing is not enough</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2010/05/security/useful-security-pages/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>My Security Adventure Begins</title><link>http://tosbourn.com/2010/04/security/my-security-adventure-begins/</link> <comments>http://tosbourn.com/2010/04/security/my-security-adventure-begins/#comments</comments> <pubDate>Fri, 16 Apr 2010 20:46:43 +0000</pubDate> <dc:creator>Toby</dc:creator> <category><![CDATA[Security]]></category> <category><![CDATA[Links]]></category><guid
isPermaLink="false">http://www.tosbourn.com/?p=221</guid> <description><![CDATA[I am starting to get into this security game and I figured I would blog about different things I have done to help tighten up security in all aspects of web app deployment. As the title of this post suggests, I am only beginning my journey and am pretty much assuming no prior knowledge and [...]]]></description> <content:encoded><![CDATA[<p>I am starting to get into this security game and I figured I would blog about different things I have done to help tighten up security in all aspects of web app deployment.</p><p>As the title of this post suggests, I am only beginning my journey and am pretty much assuming no prior knowledge and I am taking nothing for granted, with that in mind I figured the first thing I should be doing is getting me an education in web app security.  Obviously this is a huge sphere with many caveats and it would be impossible for me to become a security ninja in all aspects but I hope to be able to know my way around most of the major security concerns we face as an industry.</p><p>Like any self-respecting nerd the first thing I did was google &#8216;website security&#8217; from then on I started refining my search, following links, reading articles and setting myself up with a bit of a knowledge base, I thought I would share with you some really useful sites and stuff I have found.</p><p><a
href="http://blogs.sans.org/appsecstreetfighter/">App Sec Street Fighter</a><br
/> <a
href="http://taosecurity.blogspot.com/">Tao Security<br
/> </a><a
href="http://blog.mozilla.com/security/">Mozilla.com<br
/> </a><a
href="http://ha.ckers.org/">Ha.ckers</a><br
/> <a
href="http://www.mckeay.net/">McKeay</a></p><p>The most useful site I have found though has to be <a
href="http://www.owasp.org/">OWASP</a> it is absolutely jam packed with really excellent information about Web Application Security, I was able to join the mailing list for the Irish chapter (something I have yet to really start looking into but plan to get involved really soon).  They also have an excellent Podcast, well worth checking out.</p><p>If you are reading this and feel like helping me on my security adventures by recommending links or whatever please get in touch in the comments.</p> ]]></content:encoded> <wfw:commentRss>http://tosbourn.com/2010/04/security/my-security-adventure-begins/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: tosbourn.com @ 2012-05-20 04:12:50 by W3 Total Cache -->
