<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 01:11:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Anthony Ferrara: Preventing CSRF Attacks]]></title>
      <guid>http://www.phpdeveloper.org/news/19207</guid>
      <link>http://www.phpdeveloper.org/news/19207</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has written up a new post to his site looking at <a href="http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html">efective use of CSRF tokens</a> and a few different strategies for generating them.
</p>
<blockquote>
There's been a bit of noise in the past week about the proper way to prevent Cross-Site-Request-Forgery (CSRF) attacks. It seemed to have started with this post. There's been discussion in the comments, and on Twitter about it, and there seems to be several opposing viewpoints on the matter. I want to start off by saying that I agree completely with the post in question. But I figured I'd write a post to explain WHY I agree with it.
</blockquote>
<p>
He starts with an overview of a few of the common types of request forgery including from a javascript injection, a Man-in-the-Middle attack and a replay attack. He then breaks up the "lines of defense" part of the post into three different sections - adding a hidden token field to forms, changing the token for each request and using <a href="http://blog.ircmaxell.com/2011/07/random-number-generation-in-php.html">random numbers</a> when regenrating them.
</p>]]></description>
      <pubDate>Wed, 20 Feb 2013 09:36:41 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Infosec Institute: SQL Injection through HTTP Headers]]></title>
      <guid>http://www.phpdeveloper.org/news/17775</guid>
      <link>http://www.phpdeveloper.org/news/17775</link>
      <description><![CDATA[<p>
While not specific to PHP, security is something that all developers need to think about in their applications. To that end, the Infosec Institute has <a href="http://resources.infosecinstitute.com/sql-injection-http-headers/">published this guide</a> to helping you prevent SQL injection attacks that could come in via the HTTP headers of requests to your site.
</p>
<blockquote>
During vulnerability assessment or penetration testing, identifying the input vectors of the target application is a primordial step. Sometimes, when dealing with Web application testing, verification routines related to SQL injection flaws discovery are restricted to the GET and POST variables as the unique inputs vectors ever. What about other HTTP header parameters? Aren't they potential input vectors for SQL injection attacks? How can one test all these HTTP parameters and which vulnerability scanners to use in order to avoid leaving vulnerabilities undiscovered in parts of the application?
</blockquote>
<p>
They start by describing the different kinds of headers that the attacks could come in on - GET, POST, cookies and the other HTTP headers. According to <a href="http://resources.infosecinstitute.com/wp-content/uploads/033012_1704_SQLInjectio1.png?d9c344">some results</a>, the HTTP headers option is the least protected in most common applications. He includes some good examples of headers that might contain malicious data such as:
</p>
<ul>
<li>X-Forwarded-For
<li>User-agent
<li>Referer
</ul>
<p>
Techniques are also included showing you tools and methods to help test your own applications including some in-browser tools and external applications (like Sqlmap, Nessus, WebInspect, SkipFish and Wapiti) with some <a href="http://resources.infosecinstitute.com/wp-content/uploads/033012_1704_SQLInjectio13.png?d9c344">average scores</a> from running them on various coverage scores.
</p>]]></description>
      <pubDate>Wed, 04 Apr 2012 10:17:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org: Lately in PHP Podcast Episode 21 - Is PHP Source Quality Really Good?]]></title>
      <guid>http://www.phpdeveloper.org/news/17610</guid>
      <link>http://www.phpdeveloper.org/news/17610</link>
      <description><![CDATA[<p>
On PHPClasses.org today they've posted their latest "Lately in PHP" podcast - episode 21, "<a href="http://www.phpclasses.org/blog/post/177-Is-PHP-Source-Quality-really-Good-or-is-it-still-Insecure--Lately-in-PHP-podcast-episode-21.html">Is PHP Source Quality really Good or is it still Insecure?</a>".
</p>
<blockquote>
A study from Coverity claims that the source code of Open Source projects such as PHP has a low defect rate. Meanwhile, a few weeks ago, the security expert Stefan Esser claims that PHP source security bug prevention has a lot to be desired because PHP core developers do not have the habit of using source code auditing tools to prevent security bugs. The matter of the PHP source code quality and security bug prevention was one of the main topics discussed by Manuel Lemos and Ernani Joppert in episode 21 of the Lately in PHP podcast.
</blockquote>
<p>
You can listen to this latest episode either via <a href="http://www.phpclasses.org/blog/post/177-Is-PHP-Source-Quality-really-Good-or-is-it-still-Insecure--Lately-in-PHP-podcast-episode-21.html">the in-page player</a> or by <a href="http://www.phpclasses.org/blog/post/177/file/109/name/Lately-In-PHP-21.mp3">downloading the mp3</a> directly. You can also <a href="http://www.phpclasses.org/blog/category/podcast/post/latest.rss">subscribe to their feed</a> to get this episode automatically (and past/future ones too).
</p>]]></description>
      <pubDate>Thu, 01 Mar 2012 10:17:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Dave Marshall's Blog: Defending against Cache Stampedes]]></title>
      <guid>http://www.phpdeveloper.org/news/17393</guid>
      <link>http://www.phpdeveloper.org/news/17393</link>
      <description><![CDATA[<p>
<i>Dave Marshall</i> has a new post to his blog showing one method for <a href="http://davedevelopment.co.uk/2012/01/13/defending-against-cache-stampedes.html">defending against cache stampedes</a> from assaulting your caching servers and (possibly) bringing them down.
</p>
<blockquote>
I've recently had a problem with a rather large operation (that could probably be optimised considerably, but nevermind), where by if the cached result of the operation expired, several web server threads would attempt the operation, causing some major headaches for our database and web servers. This is something I've come across before, and is commonly(?) known as a <a href="http://en.wikipedia.org/wiki/Cache_stampede">Cache Stampede</a>. This is bad, this post describes the basics of what I've done to deal with it.
</blockquote>
<p>
His example uses a Zend_Cache interface to Memecache, but it could be applied in other places too. His method uses a <a href="http://en.wikipedia.org/wiki/Semaphore_%28programming%29">binary semaphore</a> to check and see if there's a "lock" and sleep for a bit before checking again. Sample code is included showing how to create this system and how to refresh the data with a new expiration on a cache miss.
</p>]]></description>
      <pubDate>Fri, 13 Jan 2012 13:13:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Dublish.com: Captcha - Spam preventing images]]></title>
      <guid>http://www.phpdeveloper.org/news/5481</guid>
      <link>http://www.phpdeveloper.org/news/5481</link>
      <description><![CDATA[<p>
When it comes to limiting the spam that comes through on your site (usually on the open comments), a CAPTCHA can do some of the best work. It provides a good alternative to convoluted techniques for restricting the commenting system of your site, and does it in a simple, easy for a human to use, kind of system. Implementing them, however, can be a bit tricky, so <a href="http://www.dublish.com/articles/37.html">this new article</a> on Dublish.com is here to help.
</p>
<quote>
<i>
<p>
Captcha is the name for the images with random letters and some distortion that appears on each and every forum these days and even here on dublish. The purpose is to prevent the sites from spam.
</p>
<p>
Now I'm going to show you how to do this random picture generator in PHP. I assume that you have some basic PHP skillz before doing this. Before you start you need the GD library that allows you to create graphics in php.
</p>
</i>
</quote>
<p>
<a href="http://www.dublish.com/articles/37.html">The article</a> steps you through the creation of the single-script functionality to generate the image. It's an image with a series of random characters on a gradient background created with the GD libraries. The code used in the CAPTCHA is stored in a session variable for validation later. He adds a few graphical touches to make it look a bit nicer, and finishes off with an example of its use.
</p>]]></description>
      <pubDate>Wed, 31 May 2006 14:24:30 -0500</pubDate>
    </item>
  </channel>
</rss>
