<?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>The cPanel Admin &#187; security</title>
	<atom:link href="http://www.thecpaneladmin.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thecpaneladmin.com</link>
	<description>We know stuff about cPanel.</description>
	<lastBuildDate>Mon, 21 Nov 2011 19:50:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Upgrading OpenSSH on CentOS 5</title>
		<link>http://www.thecpaneladmin.com/upgrading-openssh-on-centos-5/</link>
		<comments>http://www.thecpaneladmin.com/upgrading-openssh-on-centos-5/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 00:57:14 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=795</guid>
		<description><![CDATA[If you&#8217;ve taken a peek at your PCI scan results lately, you may have noticed that your scan provider is now requiring OpenSSH 4.5 or higher &#8211; a version that is not currently available in the CentOS 5 repositories.  A Yum update isn&#8217;t going to help you much there. You can, however, easily compile your [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/cpanel-updates-redhat-9-break-stuff/' rel='bookmark' title='cPanel Updates on Redhat 9 Can Break Stuff'>cPanel Updates on Redhat 9 Can Break Stuff</a></li>
<li><a href='http://www.thecpaneladmin.com/manually-upgrading-mysql/' rel='bookmark' title='Manually Upgrading MySQL'>Manually Upgrading MySQL</a></li>
<li><a href='http://www.thecpaneladmin.com/upgrading-downgrading-mysql/' rel='bookmark' title='Upgrading or Downgrading MySQL'>Upgrading or Downgrading MySQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve taken a peek at your PCI scan results lately, you may have noticed that your scan provider is now requiring OpenSSH 4.5 or higher &#8211; a version that is not currently available in the CentOS 5 repositories.  A Yum update isn&#8217;t going to help you much there.</p>
<p>You can, however, easily compile your own RPM and manually upgrade OpenSSH.  The commands below are the ones I used to install version 5.8 (the latest stable at the time of this post), but can essentially be used for any compatible version.</p>
<p>First, download the OpenSSH source tarball from the vendor and unpack it. You can find the tarballs at <a href="http://www.openssh.com/portable.html" target="_blank">http://www.openssh.com/portable.html</a></p>
<blockquote><p>wget http://mirror.mcs.anl.gov/openssh/portable/openssh-5.8p1.tar.gz</p>
<p>tar -xvzf openssh-5.8p1.tar.gz</p></blockquote>
<p>Copy the spec file and tarball:</p>
<blockquote><p>cp ./openssh-5.8p1/contrib/redhat/openssh.spec /usr/src/redhat/SPECS/</p>
<p>cp openssh-5.8p1.tar.gz /usr/src/redhat/SOURCES/</p></blockquote>
<p>Do a little magic:</p>
<blockquote><p>cd /usr/src/redhat/SPECS</p>
<p>perl -i.bak -pe &#8216;s/^(%define no_(gnome|x11)_askpass)\s+0$/$1 1/&#8217; openssh.spec</p></blockquote>
<p>&#8230;and build your RPM:</p>
<blockquote><p>rpmbuild -bb openssh.spec</p></blockquote>
<p>Now if you go back into /usr/src/redhat/RPMS/&lt;arch&gt; , you should see three RPMs. Go ahead and install them:</p>
<blockquote><p>rpm -Uvh *.rpm</p></blockquote>
<p>To verify the installed version, just type &#8216;ssh -v localhost&#8217; and you should see the banner come up, indicating the new version.</p>
<p>&nbsp;</p>
<p><map name='google_ad_map_795_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/795?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_795_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=795&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fupgrading-openssh-on-centos-5%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=795&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/cpanel-updates-redhat-9-break-stuff/' rel='bookmark' title='cPanel Updates on Redhat 9 Can Break Stuff'>cPanel Updates on Redhat 9 Can Break Stuff</a></li>
<li><a href='http://www.thecpaneladmin.com/manually-upgrading-mysql/' rel='bookmark' title='Manually Upgrading MySQL'>Manually Upgrading MySQL</a></li>
<li><a href='http://www.thecpaneladmin.com/upgrading-downgrading-mysql/' rel='bookmark' title='Upgrading or Downgrading MySQL'>Upgrading or Downgrading MySQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/upgrading-openssh-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Exim Privilege Escalation in 4.69-23</title>
		<link>http://www.thecpaneladmin.com/exim-privilege-escalation-in-4-69-23/</link>
		<comments>http://www.thecpaneladmin.com/exim-privilege-escalation-in-4-69-23/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 18:10:24 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=691</guid>
		<description><![CDATA[The cPanel security team found an issue in Exim that can potentially allow a user on the system to potentially run commands as the root user. Luckily, cPanel has already released a patch which is available for immediate download via their Exim upgrade script. If your system is set to update cPanel automatically, you may [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/custom-rbls-exim-cpanel/' rel='bookmark' title='Using Custom RBL&#8217;s with Exim and cPanel'>Using Custom RBL&#8217;s with Exim and cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/changing-exims-sending-ip/' rel='bookmark' title='Changing Exim&#8217;s Sending IP'>Changing Exim&#8217;s Sending IP</a></li>
<li><a href='http://www.thecpaneladmin.com/exim-acl-ratelimit-database-not-available/' rel='bookmark' title='Exim ACL Ratelimit Database Not Available'>Exim ACL Ratelimit Database Not Available</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The cPanel security team found an issue in Exim that can potentially allow a user on the system to potentially run commands as the root user. Luckily, cPanel has already released a patch which is available for immediate download via their Exim upgrade script. If your system is set to update cPanel automatically, you may already have the patch. To verify, run:</p>
<blockquote><p>rpm -qa |grep -i exim</p></blockquote>
<p>The version should be 4.69-25 &#8211; if it&#8217;s not, you need to upgrade. You can simply run:</p>
<blockquote><p>/scripts/eximup</p></blockquote>
<p>Click the link below to read cPanel&#8217;s advisory:</p>
<p><a href="http://mail.cpanel.net/pipermail/news_cpanel.net/2010-December/000060.html" target="_blank">http://mail.cpanel.net/pipermail/news_cpanel.net/2010-December/000060.html</a></p>
<p><map name='google_ad_map_691_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/691?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_691_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=691&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fexim-privilege-escalation-in-4-69-23%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=691&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/custom-rbls-exim-cpanel/' rel='bookmark' title='Using Custom RBL&#8217;s with Exim and cPanel'>Using Custom RBL&#8217;s with Exim and cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/changing-exims-sending-ip/' rel='bookmark' title='Changing Exim&#8217;s Sending IP'>Changing Exim&#8217;s Sending IP</a></li>
<li><a href='http://www.thecpaneladmin.com/exim-acl-ratelimit-database-not-available/' rel='bookmark' title='Exim ACL Ratelimit Database Not Available'>Exim ACL Ratelimit Database Not Available</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/exim-privilege-escalation-in-4-69-23/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nasty Kernel Exploit in the Wild</title>
		<link>http://www.thecpaneladmin.com/nasty-kernel-exploit-in-the-wild/</link>
		<comments>http://www.thecpaneladmin.com/nasty-kernel-exploit-in-the-wild/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 02:41:00 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=639</guid>
		<description><![CDATA[I love waking up in on a nice Saturday morning to find out that one of my servers was rooted. A two-year-old kernel issue in Redhat distributions has surfaced in the form of a nasty exploit byAc1db1tch3z.  Basically, a 32-bit binary is compiled and loaded to the server, and when run by any users (even [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/exim-privilege-escalation-in-4-69-23/' rel='bookmark' title='Exim Privilege Escalation in 4.69-23'>Exim Privilege Escalation in 4.69-23</a></li>
<li><a href='http://www.thecpaneladmin.com/upgrading-openssh-on-centos-5/' rel='bookmark' title='Upgrading OpenSSH on CentOS 5'>Upgrading OpenSSH on CentOS 5</a></li>
<li><a href='http://www.thecpaneladmin.com/cpanel-updates-redhat-9-break-stuff/' rel='bookmark' title='cPanel Updates on Redhat 9 Can Break Stuff'>cPanel Updates on Redhat 9 Can Break Stuff</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I love waking up in on a nice Saturday morning to find out that one of my servers was rooted.</p>
<p>A two-year-old kernel issue in Redhat distributions has surfaced <a href="https://access.redhat.com/kb/docs/DOC-40265" target="_blank">in the form of a nasty exploit</a> byAc1db1tch3z.  Basically, a 32-bit binary is compiled and loaded to the server, and when run by any users (even non-root users), it uses a bug in the 32/64-bit compatibility layer to open a root shell.  Here&#8217;s a copy and paste of one that I ran on a test server:</p>
<p><code>user1@server [~]# ./badscript<br />
Ac1dB1tCh3z VS Linux kernel 2.6 kernel 0d4y<br />
$$$ Kallsyms +r<br />
$$$ K3rn3l r3l3as3: 2.6.18-194.11.3.el5<br />
??? Trying the F0PPPPPPPPPPPPPPPPpppppppppp_____ m3th34d<br />
$$$ L00k1ng f0r kn0wn t4rg3tz..<br />
$$$ c0mput3r 1z aqu1r1ng n3w t4rg3t...<br />
$$$ selinux_ops-&gt;ffffffff80327ac0<br />
$$$ dummy_security_ops-&gt;ffffffff804b9540<br />
$$$ capability_ops-&gt;ffffffff80329380<br />
$$$ selinux_enforcing-&gt;ffffffff804bc2a0<br />
$$$ audit_enabled-&gt;ffffffff804a7124<br />
$$$ Bu1ld1ng r1ngzer0c00l sh3llc0d3 - F0PZzzZzZZ/LSD(M) m3th34d<br />
$$$ Prepare: m0rn1ng w0rk0ut b1tch3z<br />
$$$ Us1ng st4nd4rd s3ash3llz<br />
$$$ 0p3n1ng th3 m4giq p0rt4l<br />
$$$ bl1ng bl1ng n1gg4 :PppPpPPpPPPpP<br />
<strong># whoami<br />
root</strong></code></p>
<p>Scary, eh?  And to think, Redhat has still not released a fix for this, and it&#8217;s been <em>two days</em>.  Therefore, if you&#8217;re running a 64-bit CentOS or RHEL 5 server, you may be a sitting duck. All it takes is one site on your server to be prone to remote file injection, and the hack is in.</p>
<p>No reason to fret, though, you have a couple options.</p>
<ol>
<li>Download a working patch from <a href="http://linuxsoft.cern.ch/cern/slc5X/x86_64/updates/testing/RPMS" target="_blank">here</a>, and install the kernel, kernel-devel, and kernel-headers RPMs, then reboot</li>
<li>Ksplice really came through on this one, and by nature, provided an update that does not require a reboot. Take a look at their post <a href="http://blog.ksplice.com/2010/09/cve-2010-3081/" target="_blank">here</a>, and download their <a href="https://www.ksplice.com/uptrack/cve-2010-3081" target="_blank">diagnostic tool</a> to any of your 64-bit servers running CentOS or RHEL 5, to make sure they haven&#8217;t been compromised. They are also offering a 30-day trial so you can secure your servers.  $4/mo is a worthy investment, and I&#8217;m 100% sure that you&#8217;ll be happy with your results.</li>
</ol>
<p><strong>Update</strong>: on 9/12, Redhat released a patch for 64-bit RHEL systems:<a href="https://rhn.redhat.com/errata/RHSA-2010-0704.html" target="_blank"> https://rhn.redhat.com/errata/RHSA-2010-0704.html</a>, and a similar one exists now for CentOS: <a href="http://bugs.centos.org/view.php?id=4518" target="_blank">http://bugs.centos.org/view.php?id=4518</a></p>
<p><map name='google_ad_map_639_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/639?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_639_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=639&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fnasty-kernel-exploit-in-the-wild%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=639&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/exim-privilege-escalation-in-4-69-23/' rel='bookmark' title='Exim Privilege Escalation in 4.69-23'>Exim Privilege Escalation in 4.69-23</a></li>
<li><a href='http://www.thecpaneladmin.com/upgrading-openssh-on-centos-5/' rel='bookmark' title='Upgrading OpenSSH on CentOS 5'>Upgrading OpenSSH on CentOS 5</a></li>
<li><a href='http://www.thecpaneladmin.com/cpanel-updates-redhat-9-break-stuff/' rel='bookmark' title='cPanel Updates on Redhat 9 Can Break Stuff'>cPanel Updates on Redhat 9 Can Break Stuff</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/nasty-kernel-exploit-in-the-wild/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing ClamAV on a cPanel Server</title>
		<link>http://www.thecpaneladmin.com/installing-clamav-on-a-cpanel-server/</link>
		<comments>http://www.thecpaneladmin.com/installing-clamav-on-a-cpanel-server/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 19:54:19 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=616</guid>
		<description><![CDATA[ClamAV is an popular open source anti-virus toolkit for *nix, and while many people don&#8217;t find much value in using antivirus software on Unix, it is very useful for email scanning.  cPanel&#8217;s implementation allows end users to run scans on their home folders, public FTP folders, mail, and public_html. It&#8217;s really hard to install ClamAV [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/securing-ftp-access-on-cpanel-server/' rel='bookmark' title='Securing FTP Access on a cPanel Server'>Securing FTP Access on a cPanel Server</a></li>
<li><a href='http://www.thecpaneladmin.com/fixing-quotas-on-a-cpanel-server/' rel='bookmark' title='Fixing Quotas on a cPanel Server'>Fixing Quotas on a cPanel Server</a></li>
<li><a href='http://www.thecpaneladmin.com/11-ways-to-free-up-disk-space-on-a-cpanel-server/' rel='bookmark' title='11 Ways to Free Up Disk Space on a cPanel Server'>11 Ways to Free Up Disk Space on a cPanel Server</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>ClamAV is an popular open source anti-virus toolkit for *nix, and while many people don&#8217;t find much value in using antivirus software on Unix, it is very useful for email scanning.  cPanel&#8217;s implementation allows end users to run scans on their home folders, public FTP folders, mail, and public_html.</p>
<p>It&#8217;s really hard to install ClamAV on cPanel &#8211; if you&#8217;re too lazy to click a couple buttons.  Simply go to <strong>WHM</strong> &gt; <strong>Manage Plugins</strong> and enable the ClamAV Connector, and you&#8217;re good to go.</p>
<p><a href="http://www.thecpaneladmin.com/wp-content/uploads/2010/08/1.png"><img class="aligncenter size-medium wp-image-618" title="clamAV" src="http://www.thecpaneladmin.com/wp-content/uploads/2010/08/1-300x86.png" alt="" width="300" height="86" /></a></p>
<p>After this is done, you can go to <strong>WHM</strong> &gt; <strong>Configure ClamAV Scanner</strong> and set scanning options for the entire server or specific users:</p>
<p><a href="http://www.thecpaneladmin.com/wp-content/uploads/2010/08/2.png"><img class="aligncenter size-medium wp-image-619" title="ClamAV" src="http://www.thecpaneladmin.com/wp-content/uploads/2010/08/2-300x218.png" alt="" width="300" height="218" /></a></p>
<p>You should now see a Virus Scanner option in cPanel. If you don&#8217;t, you may need to enable it in Feature Manager.</p>
<p><a href="http://www.thecpaneladmin.com/wp-content/uploads/2010/08/31.png"><img class="aligncenter size-full wp-image-622" title="ClamAV" src="http://www.thecpaneladmin.com/wp-content/uploads/2010/08/31.png" alt="" width="180" height="144" /></a></p>
<p>From here, cPanel users can run scans on any permitted items.</p>
<p>For administrators, here are a few quick commands that may be useful:</p>
<p>Update antivirus database:</p>
<blockquote><p>freshclam</p></blockquote>
<p>Scan a directory and print out infected files:</p>
<blockquote><p>clamav -ri /home</p></blockquote>
<p>Scan a directly and remove infected files and emails:</p>
<blockquote><p>clamav -ri &#8211;remove /home</p></blockquote>
<p><map name='google_ad_map_616_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/616?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_616_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=616&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Finstalling-clamav-on-a-cpanel-server%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=616&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/securing-ftp-access-on-cpanel-server/' rel='bookmark' title='Securing FTP Access on a cPanel Server'>Securing FTP Access on a cPanel Server</a></li>
<li><a href='http://www.thecpaneladmin.com/fixing-quotas-on-a-cpanel-server/' rel='bookmark' title='Fixing Quotas on a cPanel Server'>Fixing Quotas on a cPanel Server</a></li>
<li><a href='http://www.thecpaneladmin.com/11-ways-to-free-up-disk-space-on-a-cpanel-server/' rel='bookmark' title='11 Ways to Free Up Disk Space on a cPanel Server'>11 Ways to Free Up Disk Space on a cPanel Server</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/installing-clamav-on-a-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dealing With Hacked Sites</title>
		<link>http://www.thecpaneladmin.com/dealing-with-hacked-sites/</link>
		<comments>http://www.thecpaneladmin.com/dealing-with-hacked-sites/#comments</comments>
		<pubDate>Thu, 27 May 2010 20:10:55 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=122</guid>
		<description><![CDATA[This article will not go into detailed technicalities on identifying, troubleshooting, tracing, and fixing hacks. These topics are far too broad to cover in a single article, and is outside the scope of this article&#8217;s intent. This guide is to help you, the system admin, come up with a plan to handle situations involving breached [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/securing-ftp-access-on-cpanel-server/' rel='bookmark' title='Securing FTP Access on a cPanel Server'>Securing FTP Access on a cPanel Server</a></li>
<li><a href='http://www.thecpaneladmin.com/reduce-customer-support-costs/' rel='bookmark' title='Tips to Reduce Your Customer Support Costs'>Tips to Reduce Your Customer Support Costs</a></li>
<li><a href='http://www.thecpaneladmin.com/change-ftp-port/' rel='bookmark' title='How to Change Your FTP Port'>How to Change Your FTP Port</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This article will not go into detailed technicalities on identifying, troubleshooting, tracing, and fixing hacks. These topics are far too broad to cover in a single article, and is outside the scope of this article&#8217;s intent. This guide is to help you, the system admin, come up with a plan to handle situations involving breached security.</p>
<p><span id="more-122"></span></p>
<p><strong>FTP Attacks on the Rise</strong></p>
<p>A lot of hosts have reported continual issues with FTP hacks, where hackers are logging into FTP accounts with the user&#8217;s credentials and uploading malicious or &#8220;spammy&#8221; code. Here are a few examples:</p>
<p><a href="http://support.inmotionhosting.com/ftp_exploits.html" target="_blank">http://support.inmotionhosting.com/ftp_exploits.html</a><br />
<a href="http://mediumcube.com/mctalk/tag/ftp-password-hack/" target="_blank"> http://mediumcube.com/mctalk/tag/ftp-password-hack/</a><br />
<a href="http://www.34sp.com/blog/official-news/ftp-exploits-and-account-hacks/" target="_blank"> http://www.34sp.com/blog/official-news/ftp-exploits-and-account-hacks/</a></p>
<p>No one seems to have identified the exact cause of the hacks, other than that they originate from the client&#8217;s computer. Originally this was attributed to viruses like <a href="http://en.wikipedia.org/wiki/Gumblar" target="_blank">Gumblar</a>, but it&#8217;s hard to grasp that thousands of users all had the same problem &#8211; many of which had antivirus software capable of detecting the virus, or that were running various operating systems that didn&#8217;t have Adobe products installed. All we know is that someone hackers were accessing user login information from end users.</p>
<p>After a bit of research, it was found out that many popular FTP clients, like FileZilla, don&#8217;t encrypt the  passwords when they&#8217;re stored, so it was recommended by security professionals to avoid storing passwords in FTP clients and browsers.</p>
<p>Need help on this? See: <a href="http://www.thecpaneladmin.com/securing-ftp-access-on-cpanel-server/" target="_blank">Securing FTP Access on a cPanel Server</a></p>
<p><strong>Verifying the Extent of Damage</strong></p>
<p>Most hosting providers are lucky to have never really had to deal with a major security breach. Most hacked site reports I&#8217;ve gotten in the last three years were standalone attacks or attacks targeted to vulnerabilities in specific software. Then there&#8217;s the few actual server issues that you have to take a look at&#8230;the ones involving root exploits and destroyed servers. Your job is to take that hacked site report and determine whether it&#8217;s an application issue, a server issue, or a client issue.</p>
<p><strong>The Script Kiddie Attacks (Application Issues)</strong></p>
<p>I categorize any targeted attack to a specific type of software, a script kiddie attack. In this situation, a software (usually open-source) has a discovered vulnerability that is posted on an advisory site, with a full synopsis of how the attack is performed. Then, an ignorant self-proclaimed &#8220;hacker&#8221; uses something like Google code search to look for sites running the vulnerable software, sometimes only targeting a specific server, and launches the attack against them.</p>
<p>These tend to be easier to handle since they&#8217;re easier to track. When someone comes to me about their hacked OsCommerce site, the first thing I know to check is the version, the security advisory for that software, and Google for similar attacks. Outdated software is the #1 factor in hacked sites nowadays, and they are also the easiest to deal with. Your action in this case only really needs to be as far as recommending to the user to keep their software up to date.</p>
<p><strong>The Server Issue</strong></p>
<p>You know something was out of place when you saw those suspicious processes running from /tmp on your server. You already traced it, and you may or may now know where it came from. That doesn&#8217;t mean your server was rooted, but don&#8217;t quite rule it out. If you see any malicious processes running as root on your server, you should assume that your server was rooted. And based on what you know about the powers of the root user, you probably already know that you need evacuate the users from the machine and reinstall the OS. Don&#8217;t take a chance by not doing this &#8211; you have no idea what the hacker could have done to your server, and it&#8217;s a lot less painful to suck up a few hours of moving data than having something ten times worse happen the second time around. Hopefully you already have a failover or backup plan in place to do emergency migrations in situations of a security breach or server failure.</p>
<p><strong>The Initial Reaction / A Little Bit of Background</strong></p>
<p>Quite honestly, I get really tired of the typical customer reaction when their site gets hacked. Since you&#8217;re the hosting provider, the customer almost always assumes that it&#8217;s your fault. &#8220;What can you do to protect my site&#8221; or &#8220;Did you fix the problem with your server&#8221; or &#8220;How did you let this happen&#8221;.</p>
<p>While you&#8217;d be doing your customers an excellent service to come up with ways to counteract attacks, it&#8217;s an unrealistic expectation that any hosting provider can prevent and/or detect every possible attack that can occur, <em>especially when a majority of them are at the fault of the user</em>.  What does this mean? Well, let&#8217;s look at some simply statistics shall we? Out of 1,890 hacked sites (from various hosting providers) we studied in 2009 (not specific to a certain hosting provider):</p>
<ul>
<li>31% were affected by the Gumblar virus or its variants (586 total)</li>
<li>42% were running severely outdated open-source software (794 total)</li>
<li>23% were running custom or unidentified applications that were exploited due to insecure coding (435 total)</li>
<li>4% were affected by a script executed on the server itself, or a server-side exploit (75 total)</li>
</ul>
<p>Even in the 7% category, where the problem on the server end resulted in a hacked site, 52 out of the 75 users were using self-managed hosting services and [after a little prodding] self-admittedly failed to secure their server properly. The others in this category were determined as residing on a shared hosting server that was not secured properly to prevent rogue scripts in a common folder (like /tmp) from executing against everyone else on the server. Even then, this seemed to only affect servers running PHP as an Apache module, where there existed a ton of files owned by the webserver user or set to 777 permissions.</p>
<p><strong>Dealing with your customers</strong></p>
<p>If you&#8217;re part of a larger hosting organization you probably have a department that deals with these kinds of things.  How far you need to go into communication depends on the particular issue, but here&#8217;s a metric that I feel is appropriate:</p>
<ul>
<li>If single, unrelated sites are hacked, deal with them separately</li>
<li>If multiple sites running the same kind of software are getting similar attacks, consider adding a security advisory to your support center to notify users of a potential exploit</li>
<li>If a server is hacked but only a handful of sites are hacked, deal with those users only, and keep it under wraps assuming you are able to fix the problem or seamlessly move everyone to another server</li>
<li>If there&#8217;s a major issue going around, consider sending your customer base a notification, or making an official statement in your support center, blog, or mailing list</li>
</ul>
<p>Basically, the key is communication, but you also don&#8217;t want to overshare. Be informative but brief. Those of you who have dealt with things like this before know that there&#8217;s really only three things the the customer wants to know:</p>
<ul>
<li>How did it happen</li>
<li>Who did it</li>
<li>How do we prevent this in the future</li>
</ul>
<p>Whether you&#8217;re dealing with one customer or 50,000, you want to  be able to answer those questions. Here is an excellent example:</p>
<p><a href="http://www.34sp.com/blog/official-news/ftp-exploits-and-account-hacks/" target="_blank">http://www.34sp.com/blog/official-news/ftp-exploits-and-account-hacks/</a></p>
<p>Put simply, you have to assume that most of your customers are going to be <span style="text-decoration: line-through;">idiots</span> less knowledgeable, and realize that when they don&#8217;t know what&#8217;s going one, they either pretend like they know everything, or blame someone else. And while us hot-headed sysadmins just love to break down the ego of a know-it-all, the last thing you want to do is provoke a rash response. However, you also don&#8217;t want to beat around the bush.</p>
<p><map name='google_ad_map_122_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/122?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_122_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=122&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fdealing-with-hacked-sites%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=122&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/securing-ftp-access-on-cpanel-server/' rel='bookmark' title='Securing FTP Access on a cPanel Server'>Securing FTP Access on a cPanel Server</a></li>
<li><a href='http://www.thecpaneladmin.com/reduce-customer-support-costs/' rel='bookmark' title='Tips to Reduce Your Customer Support Costs'>Tips to Reduce Your Customer Support Costs</a></li>
<li><a href='http://www.thecpaneladmin.com/change-ftp-port/' rel='bookmark' title='How to Change Your FTP Port'>How to Change Your FTP Port</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/dealing-with-hacked-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing FTP Access on a cPanel Server</title>
		<link>http://www.thecpaneladmin.com/securing-ftp-access-on-cpanel-server/</link>
		<comments>http://www.thecpaneladmin.com/securing-ftp-access-on-cpanel-server/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 16:50:50 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=227</guid>
		<description><![CDATA[FTP hacks seem to be on the rise nowadays, with viruses like Gumblar stealing FTP passwords and farming them out to hackers so they can upload malicious code into user files. What you end up with is a flood of complaints from users about errors on their site and being flagged by Google for malicious [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/dealing-with-hacked-sites/' rel='bookmark' title='Dealing With Hacked Sites'>Dealing With Hacked Sites</a></li>
<li><a href='http://www.thecpaneladmin.com/11-ways-to-free-up-disk-space-on-a-cpanel-server/' rel='bookmark' title='11 Ways to Free Up Disk Space on a cPanel Server'>11 Ways to Free Up Disk Space on a cPanel Server</a></li>
<li><a href='http://www.thecpaneladmin.com/installing-clamav-on-a-cpanel-server/' rel='bookmark' title='Installing ClamAV on a cPanel Server'>Installing ClamAV on a cPanel Server</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>FTP hacks seem to be <a href="http://news.cnet.com/8301-1009_3-10244529-83.html" target="_blank">on the rise nowadays</a>, with viruses like <a href="http://en.wikipedia.org/wiki/Gumblar" target="_blank">Gumblar</a> stealing FTP passwords and farming them out to hackers so they can <a href="http://blog.unmaskparasites.com/2009/05/07/gumblar-cn-exploit-12-facts-about-this-injected-script/" target="_blank">upload malicious code</a> into user files. What you end up with is a flood of complaints from users about errors on their site and being flagged by Google for malicious content.  And as you know, when  things like this happen the first person the customer tends to blame is the hosting provider.</p>
<p>While it&#8217;s really not something you as the hosting provider can control, there are measures you can take to secure your server against FTP hacks.</p>
<p><span id="more-227"></span></p>
<p><strong>The Things You Probably Noticed</strong></p>
<p>You probably started thinking about FTP security when you started getting complaints about hacked sites. After looking into it further, you notice that the hack on most all the sites are very similar, and that all the hack files were uploaded via FTP by someone that is not the actual user of the account.  When this happens to a bunch of users on the same server, the first inclination is&#8230;Ok, wow, the server got hacked.</p>
<p>That&#8217;s what I initially thought, but it became very obvious that someone was out there, spreading passwords around like wildfire. I still don&#8217;t actually know where the password were obtained from, but the most common theory out there is that a security hole in Adobe software, named &#8220;The Gumblar Virus&#8221; used the plain-text storage mechanisms of common FTP clients (like Filezilla, CuteFTP, etc) to capture passwords and send them to hackers.  These hackers then used scripts to automatically download files from a user&#8217;s account, modify them, and re-upload them.</p>
<p>To make matters worse, the hack eventually evolved to where other servers were hacking other servers using this attack method.  One of our sysadmins once found a file uploaded to a compromised account that had a list of over 100 usernames, password, and server combinations, that was clearly used to automate attacks to other servers.</p>
<p><strong>Enforcing Encrypted Logins</strong></p>
<p>You can force your users to use encrypted connections in order to connect via FTP to the server. To do this, go to <strong>WHM &gt; FTP Server Configuration</strong> and set the option for TLS Encryption Support to <em>Required</em>.  The cipher suite should also be set to something like:</p>
<p><code>ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM:!SSLv2</code></p>
<p>Note that this is for FTP over TLS, which is the general preference since SFTP requires enabling port 22 and SSH access, which most hosting providers tends to swing against in a shared hosting environment. After enabling TLS, you can install a SSL certificate for FTP in <strong>WHM &gt; Manage Service SSL Certificates,</strong> which is the hostname that your users should connect to over Passive/Explicity TLS in their FTP clients. By requiring SSL your customers are less likely to have their password sniffed out by network packet sniffers.</p>
<p><strong>FTP Upload Scanning</strong></p>
<p>One thing I noticed is that most hosting providers are reacting to the malicious file uploads by enabling upload scanning to catch certain strings within the files.  In the situation with IMH (as released in our official statement about the FTP hack problem), if our scanner detects a user uploading malicious files, the scanner will block that person&#8217;s IP, change the password for the user, and automatically email the customer to let them know what&#8217;s up.  While our solution is custom-written to allow for complete control and customization, there are other options out there for those of you that are less programming-savvy or just don&#8217;t have the time to deal with it:</p>
<p><a href="http://www.configserver.com/cp/cxs.html" target="_blank">http://www.configserver.com/cp/cxs.html</a></p>
<p><a href="http://www.serverprogress.com/upload_guardian.php" target="_blank">http://www.serverprogress.com/upload_guardian.php</a></p>
<p><strong>Changing the FTP Port</strong></p>
<p>You may want to consider running FTP on a different port which can create a deference for automated scripts. Instructions for doing this can be found <a href="http://www.thecpaneladmin.com/change-ftp-port/" target="_blank">here</a>.</p>
<p><strong>Enforcing Password Policies</strong></p>
<p>Later versions of cPanel 11.25 allow you to enforce password policies for your customers, including password strength and timeouts, requiring users to select secure passwords and change them at intervals you specify. You can find this option in <strong>WHM &gt; Security Center</strong> . The password life settings are not enabled until 11.25.1.</p>
<p><strong>Brute-Force Detection</strong></p>
<p>Keep in mind that the recent issues with FTP hacks in 2009 and 2010 were from Gumblar-related attacks, where the hacker obtained or sniffed out FTP passwords from a combination of exploitable software on the client&#8217;s PC. Therefore, brute-force protection isn&#8217;t going to help you here since the attacker already had the FTP login credentials before they even reached your server.  However, in general it&#8217;s advisable to monitor any authenticated service for excessive login failures to prevent password guessing and accounts being compromised as a result. cPanel has built-in brute-force detection in a service called cpHulkd, which you can enable in <strong>WHM &gt; Security Center</strong>. Or you can use <a href="http://www.rfxn.com/projects/brute-force-detection/" target="_blank">BFD</a>, which is an optional addon to <a href="http://www.rfxn.com/projects/advanced-policy-firewall/" target="_blank">APF</a>.</p>
<p><strong>Educating Your Customers</strong></p>
<p>Most importantly, you need to be upfront with your customers about what&#8217;s going on.  If you&#8217;re running a couple single small servers you can probably address this behind the scenes, but if you&#8217;re a larger hosting provider you might as well not even try to hide it. All this is going to do is prompt a lot of chatter that can damage your business&#8217;s reputation and generate more support contact from your customers.</p>
<p>Make sure your customers know what&#8217;s going on, and what you&#8217;re doing to help the situation. Even though most FTP hacks are probably not your fault, most of your customers probably don&#8217;t even care &#8211; all they want to know is what you are doing to protect their accounts. You also want to educate them on common security practices when it comes to managing their accounts.  Here are some examples of hosting providers that promptly identified an issue with FTP security and notified their customers accordingly:</p>
<p><a href="http://support.inmotionhosting.com/ftp_exploits.html" target="_blank">http://support.inmotionhosting.com/ftp_exploits.html</a></p>
<p><a href="http://www.34sp.com/blog/official-news/ftp-exploits-and-account-hacks/" target="_blank">http://www.34sp.com/blog/official-news/ftp-exploits-and-account-hacks/</a></p>
<p><a href="http://weblog.mediatemple.net/weblog/category/system-incidents/1026-gs-security-advisory/" target="_blank">http://weblog.mediatemple.net/weblog/category/system-incidents/1026-gs-security-advisory/</a></p>
<p>Hopefully this helps you in securing your FTP services.  With a combined effort, the use of common security practices can help keep the widespread FTP hacks at bay, and make all our jobs easier.</p>
<p><map name='google_ad_map_227_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/227?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_227_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=227&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fsecuring-ftp-access-on-cpanel-server%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=227&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/dealing-with-hacked-sites/' rel='bookmark' title='Dealing With Hacked Sites'>Dealing With Hacked Sites</a></li>
<li><a href='http://www.thecpaneladmin.com/11-ways-to-free-up-disk-space-on-a-cpanel-server/' rel='bookmark' title='11 Ways to Free Up Disk Space on a cPanel Server'>11 Ways to Free Up Disk Space on a cPanel Server</a></li>
<li><a href='http://www.thecpaneladmin.com/installing-clamav-on-a-cpanel-server/' rel='bookmark' title='Installing ClamAV on a cPanel Server'>Installing ClamAV on a cPanel Server</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/securing-ftp-access-on-cpanel-server/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to Change Your FTP Port</title>
		<link>http://www.thecpaneladmin.com/change-ftp-port/</link>
		<comments>http://www.thecpaneladmin.com/change-ftp-port/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 00:51:55 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=120</guid>
		<description><![CDATA[Lately FTP has been a problem for a lot of hosting providers. Especially since the recent influx of Gumblar-related attacks and FTP exploits, some hosting providers are now considering changing their FTP ports as an added measure of security. If you&#8217;re on a cPanel server you have a couple extra steps to go through, but [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/enable-passive-ftp/' rel='bookmark' title='How to Enable Passive FTP'>How to Enable Passive FTP</a></li>
<li><a href='http://www.thecpaneladmin.com/opening-additional-exim-port/' rel='bookmark' title='Opening an Additional Exim Port'>Opening an Additional Exim Port</a></li>
<li><a href='http://www.thecpaneladmin.com/adding-services-to-chksrvd-for-monitoring/' rel='bookmark' title='Adding Services to Chksrvd for Monitoring'>Adding Services to Chksrvd for Monitoring</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Lately FTP has been a problem for a lot of hosting providers. Especially since the recent influx of <a href="http://en.wikipedia.org/wiki/Gumblar" target="_blank">Gumblar</a>-related attacks and FTP exploits, some hosting providers are now considering changing their FTP ports as an added measure of security. If you&#8217;re on a cPanel server you have a couple extra steps to go through, but it&#8217;s a rather easy change.</p>
<h2>Pure-FTP</h2>
<p>1) Edit /etc/pure-ftpd.conf and look for the following line:</p>
<p><code>Bind &lt;addr&gt; &lt;port&gt;</code></p>
<p>Where &lt;addr&gt; is a publically routable IP.  The default example, 127.0.0.1, will cause the socket to bind locally but then this connection won&#8217;t serve externally. &lt;port&gt; is the new port you wish to put the service on.</p>
<p>2) If necessary, add the new FTP port to your server&#8217;s firewall</p>
<p>3) Edit <strong>/etc/chkserv.d/ftpd</strong> and change the port, which is the first comma-separated entry to the right of &#8216;=&#8217; on the line in the file, to match the port you put the service on.</p>
<p>Finally:</p>
<blockquote><p>/etc/init.d/pure-ftpd restart<br />
/etc/init.d/cpanel restart (restarts tailwatchd/chkservd)</p></blockquote>
<h2>ProFTP</h2>
<p>Edit /etc/proftpd.conf and change:</p>
<p><code>Port 21</code></p>
<p>Then make sure to test to make sure FTP is working before notifying your users!</p>
<p><map name='google_ad_map_120_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/120?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_120_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=120&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Fchange-ftp-port%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=120&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/enable-passive-ftp/' rel='bookmark' title='How to Enable Passive FTP'>How to Enable Passive FTP</a></li>
<li><a href='http://www.thecpaneladmin.com/opening-additional-exim-port/' rel='bookmark' title='Opening an Additional Exim Port'>Opening an Additional Exim Port</a></li>
<li><a href='http://www.thecpaneladmin.com/adding-services-to-chksrvd-for-monitoring/' rel='bookmark' title='Adding Services to Chksrvd for Monitoring'>Adding Services to Chksrvd for Monitoring</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/change-ftp-port/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing DomainKeys and SPF Records</title>
		<link>http://www.thecpaneladmin.com/installing-domainkeys-spf-records/</link>
		<comments>http://www.thecpaneladmin.com/installing-domainkeys-spf-records/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 06:43:30 +0000</pubDate>
		<dc:creator>Vanessa</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.thecpaneladmin.com/?p=55</guid>
		<description><![CDATA[DomainKeys (DKIM) and SPF records are becoming a common, and annoying, demand among email providers, mainly Yahoo and Hotmail. In short, both are methods of email authentication designed to verify email integrity, by linking a sender to a specific server or hostname. In other words, DomainKeys and SPF records specify what servers can send email [...]


Related posts:<ol><li><a href='http://www.thecpaneladmin.com/using-dkim-with-exim-and-cpanel/' rel='bookmark' title='Using DKIM with Exim and cPanel'>Using DKIM with Exim and cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/improving-email-delivery/' rel='bookmark' title='10 Tips for Improving Email Delivery'>10 Tips for Improving Email Delivery</a></li>
<li><a href='http://www.thecpaneladmin.com/installing-ssl-certificate-mysql/' rel='bookmark' title='Installing an SSL Certificate for MySQL'>Installing an SSL Certificate for MySQL</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>DomainKeys (DKIM) and SPF records are becoming a common, and annoying, demand among email providers, mainly Yahoo and Hotmail. In short, both are methods of email authentication designed to verify email integrity, by linking a sender to a specific server or hostname. In other words, DomainKeys and SPF records specify what servers can send email on behalf of a domain name.</p>
<p>You&#8217;ll want DomainKeys and SPF records if your users have trouble sending email to certain providers, or they are having issues with spoofed (forged) email. CPanel currently allows two easy ways for you or your users to set up email verification. This is supported at least from cPanel 11.18 onward.</p>
<p><span id="more-55"></span></p>
<p><strong>User-Level:</strong></p>
<p>You can enable the &#8220;Email Authentication&#8221; feature in WHM ~&gt; Feature Manager, which will enable the Email Authentication icon in the users&#8217; cPanels where they can create DomainKeys and SPF records for their domain(s).</p>
<p><strong>Root-level:</strong></p>
<p>There are scripts in /usr/local/cpanel/bin that can install these on a per-user basis:</p>
<blockquote><p>/usr/local/cpanel/bin/domain_keys_installer $user</p>
<p>/usr/local/cpanel/bin/spf_installer $user</p></blockquote>
<p>(and corresponding scripts to remove, like spf_uninstaller and domain_keys_uninstaller)</p>
<p>If you want to hit up everyone on the server, you can run my for loop one-liner:</p>
<p><code>for user in `ls -A /var/cpanel/users` ; do /usr/local/cpanel/bin/domain_keys_installer $user &amp;&amp; /usr/local/cpanel/bin/spf_installer $user ; done</code></p>
<p>Now what about new users? cPanel already though of that, and has options to create hooks for when after an account is created. To set up the server to automatically create an SPF record and DomainKey for new accounts, edit <strong>/scripts/postwwwacct </strong>and paste in the following code:</p>
<p><code>#!/usr/bin/perl</code></p>
<p><code>my %OPTS = @ARGV;<br />
$ENV{USER} = “$OPTS{‘user’}”;<br />
system q(/usr/local/cpanel/bin/domain_keys_installer $USER);<br />
system q(/usr/local/cpanel/bin/spf_installer $USER);</code></p>
<p>To verify an SPF record and/or DomainKey, you can run a DNS check:</p>
<blockquote><p>dig default._domainkey.$domain TXT</p>
<p>dig $domain TXT</p></blockquote>
<p>A technical note about DKIM:</p>
<p>You might know that DKIM is actually a generated key pair, similar to an SSH or SSL Certificate&#8217;s RSA key. CPanel stores these files in <strong>/var/cpanel/domain_keys</strong>, where the <em>public</em> folder contains the key reflected in the DNS zone, and the <em>private</em> folder contains the private key. You may have users that actually authenticate via DKIM in their mail clients, in which case you may need to provide them with the private key in order for them to sent email.</p>
<p><map name='google_ad_map_55_78e79355861d63ba'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/55?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_55_78e79355861d63ba' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=55&amp;url= http%3A%2F%2Fwww.thecpaneladmin.com%2Finstalling-domainkeys-spf-records%2F' /></p><img src="http://www.thecpaneladmin.com/?ak_action=api_record_view&id=55&type=feed" alt="" />

<p>Related posts:<ol><li><a href='http://www.thecpaneladmin.com/using-dkim-with-exim-and-cpanel/' rel='bookmark' title='Using DKIM with Exim and cPanel'>Using DKIM with Exim and cPanel</a></li>
<li><a href='http://www.thecpaneladmin.com/improving-email-delivery/' rel='bookmark' title='10 Tips for Improving Email Delivery'>10 Tips for Improving Email Delivery</a></li>
<li><a href='http://www.thecpaneladmin.com/installing-ssl-certificate-mysql/' rel='bookmark' title='Installing an SSL Certificate for MySQL'>Installing an SSL Certificate for MySQL</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.thecpaneladmin.com/installing-domainkeys-spf-records/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

