<?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>Mon, 20 May 2013 04:30:16 -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[DevShed: Hackers Compromise PHP Sites to Launch Attacks]]></title>
      <guid>http://www.phpdeveloper.org/news/18911</guid>
      <link>http://www.phpdeveloper.org/news/18911</link>
      <description><![CDATA[<p>
According to <a href="http://www.devshed.com/c/a/PHP/Hackers-Compromise-PHP-Sites-to-Launch-Attacks-93656/">this new post</a> on DevShed, there have been several targeted attacks against U.S. bank websites (DDoS), some of which involved the compromise of PHP-based applications.
</p>
<blockquote>
Once the hackers got into the PHP-based websites, they inserted toolkits to turn them into launch pads for their distributed denial-of-service attacks. Hackers then launched the attacks on banks by connecting directly to the compromised PHP-based websites and sending them commands, or took advantage of intermediate servers, proxies or scripts to make the websites do their bidding. InformationWeek lists three attack tools used by the hackers: KamiKaze, AMOS, and the "itsokaynoproblembro" toolkit, also known as Brobot.
</blockquote>
<p>
Several major banks have been targeted including Bank of America, JP Morgan/Chase, HSBC and Well Fargo. The main problem was out-of-date software running on the site containing known security issues the attackers could exploit to install their own software.
</p>
<blockquote>
If a hacker can break into a PHP-based website to use it as a staging area for an attack on a different website, they can also use that website to store stolen information. InformationWeek cited the example of the Eurograbber attack campaign, revealed earlier this month. The gang involved in that campaign stole $47 million from more than 30,000 corporate and private banking customers - and used PHP-based websites into which they hacked to store stolen information.
</blockquote>]]></description>
      <pubDate>Tue, 18 Dec 2012 12:07:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Anson Cheung: Top 6 security attacks in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18341</guid>
      <link>http://www.phpdeveloper.org/news/18341</link>
      <description><![CDATA[<p>
<i>Anson Cheung</i> has <a href="http://www.ansoncheunghk.info/article/top-6-security-attacks-php">posted about some security attacks</a> (six of them) that you need to watch out for when developing your apps.
</p>
<blockquote>
Be aware of the most common security threats to PHP applications is the important step to secure your PHP scripts may not be immune.  Here, the article is going to go over top 6 common security threads in PHP scripts. You may familiar with this, if not, this is a good time for you to read and keep in mind.
</blockquote>
<p>The top six on his list are:</p>
<ul>
<li>SQL Injection
<li>Cross-Site Scripting (XSS)
<li>Session fixation
<li>Session capturing/hijacking
<li>Cross-Site Request Forgeries (CSRF)
<li>Code Injection
</ul>
<p>
For each item, he includes a bit of explanation as to what the issue is and a common solution as to how to prevent it.
</p>]]></description>
      <pubDate>Thu, 09 Aug 2012 17:03:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Reddit.com: Protecting against attack?]]></title>
      <guid>http://www.phpdeveloper.org/news/17978</guid>
      <link>http://www.phpdeveloper.org/news/17978</link>
      <description><![CDATA[<p>
In <a href="http://www.reddit.com/r/PHP/comments/tnval/protecting_against_attack/">this recent post</a> to Reddit.com, the question of application security is asked - the poster wants recommendations on how he should keep his app safe from would-be attackers:
</p>
<blockquote>
I can code fairly well in PHP these days, but my security isn't so hot. Is there a tutorial or plugin you guys can recommend as to how I should be protecting my php pages/inputs? I want to avoid common attacks like XSS, inputs with NULL or DROP TABLE etc?
</blockquote>
<p>
Responses <a href="http://www.reddit.com/r/PHP/comments/tnval/protecting_against_attack/">on the post</a> include recommendations related to:
</p>
<ul>
<li>Using the <a href="https://chorizo-scanner.com/">Chorizo scanner</a> to find common issues in your code
<li>Using PDO for database connections (with bound parameters)
<li>Not trusting "$_SERVER" 
<li>Data sanitization
</ul>
<p>
There's also links to <a href="http://phpmaster.com/php-security-cross-site-scripting-attacks-xss/">a few</a> <a href="https://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API">other</a> <a href="http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454">resources</a> with more details.
</p>]]></description>
      <pubDate>Fri, 18 May 2012 10:19:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP.net: PHP 5.4.3 and PHP 5.3.13 Released!]]></title>
      <guid>http://www.phpdeveloper.org/news/17932</guid>
      <link>http://www.phpdeveloper.org/news/17932</link>
      <description><![CDATA[<p>
The PHP project has released another update to both the 5.3.x and 5.4 revisions of the language <a href="http://www.php.net/archive/2012.php#id2012-05-08-1">correcting the bug</a> that was found dealing with a flaw in CGI-based setups.
</p>
<blockquote>
The PHP development team would like to announce the immediate availability of PHP 5.4.3 and PHP 5.3.13. All users are encouraged to upgrade to PHP 5.4.3 or PHP 5.3.13 The releases complete a fix for a <a href="http://www.php.net/archive/2012.php#id2012-05-03-1">vulnerability</a> in CGI-based setups (CVE-2012-2311). Note: mod_php and php-fpm are not vulnerable to this attack. PHP 5.4.3 fixes a buffer overflow vulnerability in the <a href="http://php.net/manual/function.apache-request-headers.php">apache_request_headers()</a> (CVE-2012-2329). The PHP 5.3 series is not vulnerable to this issue.
</blockquote>
<p>
Users are encouraged to upgrade their applications, especially those using CGI-based setups. You can find the latest source on <a href="http://www.php.net/downloads.php">the downloads page</a> and the Windows binaries on <a href="http://windows.php.net/download/">windows.php.net</a>.
</p>]]></description>
      <pubDate>Wed, 09 May 2012 07:10:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Reinheimer's Blog: Cookies don't replace Sessions]]></title>
      <guid>http://www.phpdeveloper.org/news/17438</guid>
      <link>http://www.phpdeveloper.org/news/17438</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Paul Reinheimer</i> talks about <a href="http://blog.preinheimer.com/index.php?/archives/373-Cookies-dont-replace-Sessions.html">replacing sessions with cookies</a> and some of the (security) pitfalls that can come with it.
</p>
<blockquote>
I've seen several instances where people have demonstrated the ease with which encrypted cookies can replace sessions within PHP. Michael Nitschinger <a href="http://nitschinger.at/Session-Encryption-with-Lithium">wrote a piece</a> recently demonstrating the switch with Lithium, while CodeIgniter does this <a href="http://codeigniter.com/user_guide/libraries/sessions.html">by default</a> (optionally encrypting). The problem is that while replacing sessions with cookies works, it introduces a few risks not present with native session support, and these risks tend to be under documented.
</blockquote>
<p>
He gives an illustration of an attacker who sits between Amazon and one of their warehouses. Despite encrypting their order details, all it would take is the attacker to grab an order and copy it and resend (a "replay attack"). He's created <a href="http://betting-example.orchestra.io/">an example application</a> to illustrate the point (<a href="https://github.com/preinheimer/Betting-Example">source on github</a>). The attacker doesn't even have to know what the encrypted information contains - they only have to replicate it.
</p>]]></description>
      <pubDate>Tue, 24 Jan 2012 09:26:20 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Freek Lijten's Blog: The real problem of the hash table dos attack]]></title>
      <guid>http://www.phpdeveloper.org/news/17328</guid>
      <link>http://www.phpdeveloper.org/news/17328</link>
      <description><![CDATA[<p>
In response to some of the comments being made about the hash table Denial of Service attack <a href="http://phpdeveloper.org/news/17322">recently posted</a> <i>Freek Lijten</i> has <a href="http://www.freeklijten.nl/home/2011/12/29/The-real-problem-of-the-hash-table-dos-attack">posted his thoughts</a> about the real problem with the whole situation - how it was handled by the communities involved.
</p>
<blockquote>
Interesting they may be, but I want to address what in my opinion is the real problem: The way the communication around it was handled by different projects and the fact that the exploit could still exist at all. [...] In the presentation <a href="https://twitter.com/#!/zeri42">W&auml;lde</a> and <a href="https://twitter.com/#!/alech">Klink</a> talk about their disclosure process. The PHP project had them wait 3 weeks for a first response while this is obviously a serious matter.
</blockquote>
<p>
He argues that things like a commit message mentioning a DoS prevention fix instead of just mentioning the fix have the potential to do more harm than good. He also points out that other communities were notified of the problem (like Python) and some still haven't responded to the issue.
</p>
<blockquote>
This attack was the result of good research and it is important that it is disclosed. More importantly however is the fact that organisation got by with years of not noticing it and even worse, reacted very poor after being informed. I can't say I have a ready solution to avoid these kind of things in the future, perhaps that will prove to be an interesting discussion.
</blockquote>]]></description>
      <pubDate>Fri, 30 Dec 2011 12:53:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Drive Blog: How to Prevent a SQL Injection Attack]]></title>
      <guid>http://www.phpdeveloper.org/news/16994</guid>
      <link>http://www.phpdeveloper.org/news/16994</link>
      <description><![CDATA[<p>
From the Developer Drive blog there's a recent post with some suggestions on how you can help to <a href="http://www.developerdrive.com/2011/10/how-to-prevent-a-sql-injection-attack/">prevent SQL injections</a> in your PHP application and make it that much harder for would-be attackers to do what they shouldn't.
</p>
<blockquote>
Why do SQL injections happen so often?
The shortest answer is that SQL injections are so popular because of poor programming. Hackers know about the potential of a successful SQL injection attack and they search for vulnerabilities. Unfortunately, very often they don't have to search hard - vulnerabilities pop right in their face. [...] The good news is that fortunately, SQL injections are also relatively easy to prevent.
</blockquote>
<p>They list nine easy things you can do to help prevent the attacks:</p>
<ul>
<li>Patch your SQL server regularly
<li>Limit the use of dynamic queries
<li>Escape user input
<li>Store database credentials in a separate file
<li>Use the principle of least privilege
<li>Turn magic quotes off
<li>Disable shells
<li>Disable any other DB functionality you don't need
<li>Test your code
</ul>]]></description>
      <pubDate>Fri, 14 Oct 2011 09:25:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Artur Ejsmont's Blog: HTTP response splitting and mail headers splitting attacks ]]></title>
      <guid>http://www.phpdeveloper.org/news/15431</guid>
      <link>http://www.phpdeveloper.org/news/15431</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Artur Ejsmont</i> looks at an attack that could potentially leave a hole open in your PHP-based application for a cross-site scripting (XSS) attack - <a href="http://artur.ejsmont.org/blog/content/http-response-splitting-and-mail-headers-splitting-risk">HTTP response splitting</a> (mail headers too). 
</p>
<blockquote>
There are two similar security issues both taken care of by Suhosin patch and strict escaping/encoding rules. They both relate to injecting new lines into headers of network protocols. They are not very well known and i think its worth mentioning it. HTTP response splitting is a web based attack where hacker manages to trick the server into injecting new lines into response headers along with arbitrary code. If you use GET/POST parameters in the headers like cookie or location, then someone could provide new lines with XSS attack.
</blockquote>
<p>
He gives some examples of how it might work via the <a href="http://php.net/header">header</a> function so that superglobals might be abused (like adding information on the URL to inject into $_GET). To prevent the attack, you just have to ensure that no special characters make it into the headers or cookies. He also mentions that the <a href="http://www.hardened-php.net/suhosin/">Suhosin</a> patch takes care of the issue automatically.
</p>]]></description>
      <pubDate>Mon, 15 Nov 2010 10:57:16 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Padraic Brady's Blog: Nanosecond Scale Remote Timing Attacks On PHP Apps: Take Them Seriously?]]></title>
      <guid>http://www.phpdeveloper.org/news/15313</guid>
      <link>http://www.phpdeveloper.org/news/15313</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Padraic Brady</i> takes a look at remote timing attacks that <a href="http://blog.astrumfutura.com/2010/10/nanosecond-scale-remote-timing-attacks-on-php-applications-time-to-take-them-seriously/">happen on a nanosecond scale</a> and whether or not we, as application developers, should take them seriously. Timing attacks involve gleaning information off of systems based on the response and execution time.
</p>
<blockquote>
I've been following the progress of Remote Timing Attacks with a lot of interest over the years, during which time there has been an obvious trend in improving the technique. The most recent reported cases of Remote Timing Attack vulnerabilities, for example, were against the OpenID and OAuth protocols when it was reported in July 2010 that numerous open source implementations of these protocols did not prevent the disclosure of timing information that could enable a Remote Timing Attack. It is important to note that, as with many potential attacks, the protocols themselves contain no vulnerability. This is strictly a potential vulnerability contingent on the method of implementation.
</blockquote>
<p>
He starts off by defining timing attacks in a bit more detail, including an example of how an attacker could determine the validity of a username based on the response time of how its handled. He continues on talking about how important the nanosecond is to attacks like this (might as well be minutes) and how things like the C function <i>memcmp</i> can be used to catch these tiny time differences. There's plenty more detail in between, but he finishes the post off with a look at what you can do to help prevent this type of attack from being useful on your applications.
</p>]]></description>
      <pubDate>Thu, 21 Oct 2010 09:42:58 -0500</pubDate>
    </item>
  </channel>
</rss>
