John Cox

Blogs · @wyome

Tagged security · everything

Chris Shiflett: Security Corner: Cross-Site Request Forgeries

This foundational 2004 article introduces cross-site request forgeries (CSRF) as a web security vulnerability where attackers exploit a website's trust in an authenticated user to perform unauthorized actions on their behalf, contrasting it with XSS which exploits a user's trust in a website. The piece explains how CSRF attacks work through simple mechanisms like image tags that trigger unintended requests, and establishes the CSRF token—a unique per-session identifier embedded in forms and verified server-side—as the standard defense that prevents attackers from forging valid requests. The article demonstrates implementation with PHP code examples and notes that while this defense was manual in 2004, modern frameworks now build CSRF protection into their core functionality.

Permalink

Hardened-PHP Project - PHP Security

PHP's popularity makes it a major target for hackers, requiring server-side hardening to protect against exploits that aren't prevented by default installations. The article explains how to locate and edit the PHP.ini configuration file depending on your hosting type—with shared hosting having limitations but VPS/dedicated servers offering full control through the Web Host Manager—and recommends using automated patching solutions like Suhosin, which provides comprehensive protection by patching the PHP core and running continuously as an extension to defend against vulnerabilities that manual editing alone cannot address.

Permalink

Using a Hosts File To Make The Internet Not Suck (as much)

This is a comprehensive hosts file designed to block known tracking, advertising, malware, and spyware domains by redirecting them to your local machine (127.0.0.1), preventing your browser from connecting to those servers. It includes categories for hijackers, analytics trackers, ad networks, phishing sites, and crypto-mining operations, with over thousands of domain entries maintained and updated by Dan Pollock to improve online privacy and security.

Permalink