<?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>Rogierm&#039;s Blog &#187; Security</title>
	<atom:link href="http://rogierm.redbee.nl/blog/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://rogierm.redbee.nl/blog</link>
	<description>Just another blog with technical stuff</description>
	<lastBuildDate>Mon, 28 Jun 2010 21:04:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to access libvirtd from remote server</title>
		<link>http://rogierm.redbee.nl/blog/2010/03/02/access-libvirtd-from-remote-server/</link>
		<comments>http://rogierm.redbee.nl/blog/2010/03/02/access-libvirtd-from-remote-server/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 23:42:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[libvirtd]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[tls]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=125</guid>
		<description><![CDATA[Libvirt is a toolkit to interact with several virtualization platform from a single interface. Considering you can stop and start virtual machines through this API, security is quite important. Libvirt offers several options to give authenticated access from remote machines. By default most distributions disable remote network access for libvirtd. However, I would like to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.libvirt.org/">Libvirt</a> is a toolkit to interact with several virtualization platform from a single interface. Considering you can stop and start virtual machines through this API, security is quite important. Libvirt offers several options to give authenticated access from remote machines. By default most distributions disable remote network access for libvirtd. However, I would like to access libvirtd on some of my KVM servers from a single management host to gather some information. The documentation on how to set this up is not too good, so I decided to write up a  short how-to. </p>
<p><strong>Step 1: Enable network access for libvirtd</strong><br />
First enable network access for libvirtd on the KVM server(s). On CentOS/RHEL this is done by uncommenting or adding the following line in /etc/sysconfig/libvirtd:<br />
<code><br />
LIBVIRTD_ARGS="--listen"<br />
</code></p>
<p><strong>Step 2: Install a CA on the management server</strong><br />
Install the Perl certificate tools:<br />
<code><br />
yum install openssl-perl<br />
</code><br />
Create Certificate authority:<br />
<code><br />
cd /etc/pki/tls/misc/<br />
./CA.pl -newca<br />
</code><br />
Example output:<br />
<code><br />
 ./CA.pl -newca<br />
CA certificate filename (or enter to create)</p>
<p>Making CA certificate ...<br />
Generating a 1024 bit RSA private key<br />
..........++++++<br />
.............++++++<br />
writing new private key to '../../CA/private/cakey.pem'<br />
Enter PEM pass phrase:<br />
Verifying - Enter PEM pass phrase:<br />
-----<br />
You are about to be asked to enter information that will be incorporated<br />
into your certificate request.<br />
What you are about to enter is what is called a Distinguished Name or a DN.<br />
There are quite a few fields but you can leave some blank<br />
For some fields there will be a default value,<br />
If you enter '.', the field will be left blank.<br />
-----<br />
Country Name (2 letter code) [GB]:XX<br />
State or Province Name (full name) [Berkshire]:XX<br />
Locality Name (eg, city) [Newbury]:XXXXX<br />
Organization Name (eg, company) [My Company Ltd]:XXXXX<br />
Organizational Unit Name (eg, section) []:XXXX<br />
Common Name (eg, your name or your server's hostname) []:CA XXX XXX<br />
Email Address []:XXX</p>
<p>Please enter the following 'extra' attributes<br />
to be sent with your certificate request<br />
A challenge password []:<br />
An optional company name []:<br />
Using configuration from /etc/pki/tls/openssl.cnf<br />
Enter pass phrase for ../../CA/private/cakey.pem:<br />
Check that the request matches the signature<br />
Signature ok<br />
Certificate Details:<br />
        Serial Number:<br />
            d8:95:24:xx:xx:xx:13:9b<br />
        Validity<br />
            Not Before: Feb 25 23:14:08 2010 GMT<br />
            Not After : Feb 24 23:14:08 2013 GMT<br />
        Subject:<br />
            countryName               = XX<br />
            stateOrProvinceName       = XX<br />
            organizationName          = XXXX<br />
            organizationalUnitName    = XXXX<br />
            commonName                = CA XXX XXX<br />
            emailAddress              = XXXXX<br />
        X509v3 extensions:<br />
            X509v3 Subject Key Identifier:<br />
                XXX<br />
            X509v3 Authority Key Identifier:<br />
                keyid:XXXX<br />
                DirName:/C=XX/ST=XX/O=XXX/OU=XXXX/CN=CA XXX XXX/emailAddress=XXX<br />
                serial:XXX</p>
<p>            X509v3 Basic Constraints:<br />
                CA:TRUE<br />
Certificate is to be certified until Feb 24 23:14:08 2013 GMT (1095 days)</p>
<p>Write out database with 1 new entries<br />
Data Base Updated<br />
</code></p>
<p><strong>Step 3: Create CSR&#8217;s</strong><br />
<code><br />
openssl genrsa -des3 -out kvm-server1.tmp<br />
openssl rsa -in kvm-server1.tmp -out kvm-server1.key<br />
openssl genrsa -des3 -out mgmt-host.tmp<br />
openssl rsa -in mgmt-host.tmp -out mgmt-host.key<br />
openssl req -new -key kvm-server1.key -out kvm-server1.csr<br />
openssl req -new -key mgmt-host.key -out mgmt-host.csr<br />
</code></p>
<p><strong>Step 4: Sign the certificates</strong><br />
<code><br />
 openssl ca -config /etc/pki/tls/openssl.cnf -policy policy_anything -out /root/mgmt-host.crt -infiles /root/mgmt-host.csr<br />
 openssl ca -config /etc/pki/tls/openssl.cnf -policy policy_anything -out /root/kvm-server1.crt -infiles /root/kvm-server1.csr<br />
</code><br />
Example output:<br />
<code><br />
Using configuration from /etc/pki/tls/openssl.cnf<br />
Enter pass phrase for /etc/pki/CA/private/cakey.pem:<br />
Check that the request matches the signature<br />
Signature ok<br />
Certificate Details:<br />
        Serial Number:<br />
            d8:95:24:4b:4e:b1:13:9c<br />
        Validity<br />
            Not Before: Feb 25 23:31:40 2010 GMT<br />
            Not After : Feb 25 23:31:40 2011 GMT<br />
        Subject:<br />
            countryName               = XX<br />
            stateOrProvinceName       = XX<br />
            localityName              = XX<br />
            organizationName          = XX<br />
            organizationalUnitName    = XX<br />
            commonName                = mgmt-host.xxx.nl<br />
            emailAddress              = xxxxx<br />
        X509v3 extensions:<br />
            X509v3 Basic Constraints:<br />
                CA:FALSE<br />
            Netscape Comment:<br />
                OpenSSL Generated Certificate<br />
            X509v3 Subject Key Identifier:<br />
                6C:EA:8B:C1:D6:XX:B6:6B:5B:18:02<br />
            X509v3 Authority Key Identifier:<br />
                keyid:C9:36:4A:XXXX:6F:FD:2E:86</p>
<p>Certificate is to be certified until Feb 25 23:31:40 2011 GMT (365 days)<br />
Sign the certificate? [y/n]:y</p>
<p>1 out of 1 certificate requests certified, commit? [y/n]y<br />
Write out database with 1 new entries<br />
Data Base Updated</p>
<p></code></p>
<p><strong>Step 5: Copy over the certificates to the correct location</strong><br />
On the management host (mgmt-host):<br />
<code><br />
mkdir /etc/pki/libvirt<br />
mkdir /etc/pki/libvirt/private<br />
mkdir /etc/pki/libvirt-vnc</p>
<p>cp /root/mgmt-host.key /etc/pki/libvirt/private/clientkey.pem<br />
cp /root/mgmt-host.key /etc/pki/libvirt-vnc/clientkey.pem<br />
cp /root/mgmt-host.crt /etc/pki/libvirt/clientcert.pem<br />
cp /root/mgmt-host.crt /etc/pki/libvirt-vnc/clientcert.pem<br />
</code></p>
<p>Transfer the key and certificate files to the KVM server (kvm-server1). Ideally, you create the key and CSR on the host itself, so you only have to transfer the certificate. Then, copy the certificates and CA to the correct location on the KVM (libvirtd) server:</p>
<p><code><br />
mkdir /etc/pki/libvirt<br />
mkdir /etc/pki/libvirt/private<br />
mkdir /etc/pki/libvirt-vnc</p>
<p>cp kvm-server1.key /etc/pki/libvirt/private/serverkey.pem<br />
cp kvm-server1.key /etc/pki/libvirt-vnc/server-key.pem</p>
<p>cp kvm-server1.crt /etc/pki//libvirt/servercert.pem<br />
cp kvm-server1.crt /etc/pki/libvirt-vnc/server-cert.pem<br />
</code></p>
<p>Make sure the CA generated on the management server is available on the KVM server in the following file:<br />
/etc/pki/CA/cacert.pem</p>
<p><strong>Step 6: Reload libvirtd</strong><br />
<code><br />
/etc/init.d/libvirtd reload<br />
</code></p>
<p><strong>Step 7: Test</strong><br />
With these certificates setup, you should be able to access libvirtd on kvm-server1 from mgmt-host. Use the following command to test:<br />
<code><br />
virsh -c qemu://kvm-server1.xxxx.nl/system<br />
Welcome to virsh, the virtualization interactive terminal.</p>
<p>Type:  'help' for help with commands<br />
       'quit' to quit</p>
<p>virsh #<br />
</code><br />
Use the list command to see a list of running guests on the server. This only works if these guests have also been created via libvirtd. Manually started KVM guests will not show up in this list. </p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2010/03/02/access-libvirtd-from-remote-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco ASA and tacacs enable fails</title>
		<link>http://rogierm.redbee.nl/blog/2010/01/14/cisco-asa-and-tacacs-enable-fails/</link>
		<comments>http://rogierm.redbee.nl/blog/2010/01/14/cisco-asa-and-tacacs-enable-fails/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:34:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[asa]]></category>
		<category><![CDATA[enable]]></category>
		<category><![CDATA[tacacs]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=106</guid>
		<description><![CDATA[While migrating the authentication of our ASA firewalls to tacacs, we enabled &#8216;enable&#8217; authentication to tacacs and tried to switch to enable mode on the console. This did not work, and caused the following message in the tacacs log file: Wed Jan 13 17:07:42 2010 [25444]: enable query for 'username' 13 from 10.x.x.x rejected To [...]]]></description>
			<content:encoded><![CDATA[<p>While migrating the authentication of our ASA firewalls to tacacs, we enabled &#8216;enable&#8217; authentication to tacacs and tried to switch to enable mode on the console. This did not work, and caused the following message in the tacacs log file:<br />
<code><br />
Wed Jan 13 17:07:42 2010 [25444]: enable query for 'username' 13 from 10.x.x.x rejected<br />
</code><br />
To fix this problem the tacacs configuration for the user needs to include the enable password in the profile, as shown below:<br />
<code><br />
user = username {<br />
        login = des "XXXXXXX"<br />
        member = admin<br />
        acl = mgmt_devices<br />
        service = shell {<br />
                priv-lvl = 15<br />
        }<br />
        enable = des "XXXXXXX"<br />
}<br />
</code><br />
We use the following configuration on the ASA to enable AAA to tacacs.<br />
<code><br />
aaa-server tacacs protocol tacacs+<br />
aaa-server tacacs (outside) host 1.1.1.1<br />
 key TACACSKEY<br />
aaa-server tacacs (outside) host 2.2.2.2<br />
 key TACACSKEY<br />
aaa authentication ssh console tacacs LOCAL<br />
aaa authentication telnet console tacacs LOCAL<br />
aaa authentication serial console tacacs LOCAL<br />
aaa authentication enable console tacacs LOCAL<br />
aaa authentication http console tacacs LOCAL<br />
aaa authorization command tacacs LOCAL<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2010/01/14/cisco-asa-and-tacacs-enable-fails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco switch and Tacacs</title>
		<link>http://rogierm.redbee.nl/blog/2010/01/14/cisco-switch-and-tacacs/</link>
		<comments>http://rogierm.redbee.nl/blog/2010/01/14/cisco-switch-and-tacacs/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:12:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[aaa]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[tacacs]]></category>
		<category><![CDATA[tac_plus]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=103</guid>
		<description><![CDATA[Tacacs is a great way to centralize user authentication, authorization and accounting. While tacacs originally is a Cisco thing, there is an open source server version available, tac_plus (http://www.gazi.edu.tr/tacacs/index.php?page=download). Installing the tacacs server is quite straight forward. Configuring the switch is not difficult either, as long as you think about possible failures. You don&#8217;t want [...]]]></description>
			<content:encoded><![CDATA[<p>Tacacs is a great way to centralize user authentication, authorization and accounting. While tacacs originally is a Cisco thing, there is an open source server version available, tac_plus (http://www.gazi.edu.tr/tacacs/index.php?page=download). Installing the tacacs server is quite straight forward. Configuring the switch is not difficult either, as long as you think about possible failures. You don&#8217;t want to be locked out of your switches when your tacacs server is not available. I use the following configuration that uses two tacacs servers and asks for the enable password when neither of the tacacs servers is available. To enter &#8216;enable&#8217; mode, the configured enable password suffices. Use the following Cisco configuration for a save AAA authentication. </p>
<p><strong>NOTE:</strong> Always be careful when changing authentication and authorization configuration, as this might lock you out of the device. The savest way is to do this on the console of the machine. </p>
<p><code><br />
aaa new-model<br />
aaa authentication login default group tacacs+ enable<br />
aaa authentication enable default enable<br />
aaa authorization exec default group tacacs+ if-authenticated<br />
aaa authorization commands 15 default group tacacs+ if-authenticated<br />
aaa authorization network default group tacacs+ if-authenticated<br />
aaa accounting exec default start-stop group tacacs+<br />
aaa accounting commands 15 default start-stop group tacacs+<br />
aaa accounting system default start-stop group tacacs+<br />
aaa session-id common<br />
tacacs-server host 1.1.1.1 single-connection<br />
tacacs-server host 2.2.2.2 single-connection<br />
tacacs-server key TACACSKEY<br />
tacacs-server directed-request<br />
</code><br />
To restrict access to specific devices, you can configure an ACL in the tacacs configuration on the server (tac_plus.conf). See the example below.</p>
<p><code><br />
user = username {<br />
        login = des "XXXX"<br />
        member = admin<br />
        acl = mgmt_devices<br />
        service = shell {<br />
                priv-lvl = 15<br />
        }<br />
}<br />
group = admin {<br />
        default service = permit<br />
        service = exec {<br />
        priv-lvl = 15<br />
        }<br />
}<br />
# acl's</p>
<p>acl = mgmt_devices {<br />
        permit = 12.12.12.12<br />
        permit = 13.13.13.13<br />
        }<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2010/01/14/cisco-switch-and-tacacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ten-thousands credit cards blocked</title>
		<link>http://rogierm.redbee.nl/blog/2009/10/21/ten-thousands-credit-cards-blocked-after-card-numbers-were-compromised/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/10/21/ten-thousands-credit-cards-blocked-after-card-numbers-were-compromised/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 15:49:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[creditcard]]></category>
		<category><![CDATA[PCI]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=90</guid>
		<description><![CDATA[Ten-thousands Belgian credit cards were blocked because hackers copied cardnumbers. This was published by Febelfin (the Federation of the Belgian finance sector) on tuesday October 20th 2009. It was stated that the criminals copied the numbers after they gained access to computer files. The hackers did not succeed in retrieving the pincodes. I find it [...]]]></description>
			<content:encoded><![CDATA[<p>Ten-thousands Belgian credit cards were blocked because hackers copied cardnumbers. This was published by Febelfin (the Federation of the Belgian finance sector) on tuesday October 20th 2009. It was stated that the criminals copied the numbers after they gained access to computer files. The hackers did not succeed in retrieving the pincodes. </p>
<p>I find it very strange that hackers were able to retrieve creditcard numbers from computer files. Specifically since PCI puts great restrictions on storing this stuff:</p>
<ol>
<li>PCI 3.1 &#8211; Keep cardholder data storage to a minimum</li>
<li>PCI 3.2 &#8211; Do not store sensitive authentication data after authorization</li>
<li>PCI 3.4 &#8211; Render PAN (PAN == cc-number), at minimum unreadable anywhere it is stored by using one of the following: one-way hash, truncation, strong cryptography with associated key-management processes and procedures</li>
<li>PCI 3.4.1 &#8211; If dis encryption is used rather then file or database encryption, logical access must be managed independently of native OS access control</li>
</ol>
<p>There are other requirements but the above give a good idea of the caution you must take when deciding to store this data. The full list of requirements can be downloaded from https://www.pcisecuritystandards.org/security_standards/pci_dss_download.html</p>
<p>Personally, I think these news items should contain more information, or should be evaluated somewhere so people can learn from the mistakes made by others. By being open on the causes of these problems people can easily prevent the holes that others left open. I know, this will probably not happen any time soon&#8230; <img src='http://rogierm.redbee.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Link to original story: http://www.elsevier.nl/web/Nieuws/Internet-Gadgets/248802/Duizenden-creditcards-geblokkeerd-na-aanval-hackers.htm#</p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/10/21/ten-thousands-credit-cards-blocked-after-card-numbers-were-compromised/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iSCSI security, how to secure your LUN?</title>
		<link>http://rogierm.redbee.nl/blog/2009/08/13/iscsi-security-how-to-secure-your-lun-best/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/08/13/iscsi-security-how-to-secure-your-lun-best/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 01:15:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[san]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=49</guid>
		<description><![CDATA[A SAN is often implemented as a dedicated network that is considered to be a secure network. However, the nature of a SAN is that it is a shared network. This involves some serious security risks, that should be evaluated when using an iSCSI based SAN. Some vendors consider an iSCSI network save when it [...]]]></description>
			<content:encoded><![CDATA[<p>A SAN is often implemented as a dedicated network that is considered to be a secure network. However, the nature of a SAN is that it is a shared network. This involves some serious security risks, that should be evaluated when using an iSCSI based SAN. Some vendors consider an iSCSI network save when it is implemented as a dedicated switches network (Dell EqualLogic. Securing storage area networks with iSCSI. EqualLogic Inc., 2008.). They consider it virtually impossible to snoop or inject packets in a switched network. We all know this is not the case. If this is true, why do we use firewalls, ids and tons of other security measures? Even if iSCSI runs on an isolated network, and only the management interface of the storage devices are connected to a shared/general-purpose network, security is just as good as the hosts that are connected to the dedicated network. A single compromised host connected to the dedicated iSCSI network can attack the storage devices to get access to LUNs for other hosts.</p>
<p>When implementing an iSCSI network you should be aware of the security risks that this imposes on the environment. To estimate the risk, awareness of the methods that can be used to secure iSCSI is paramount. The iSCSI protocol allows for the following security measures to prevent unintended or unauthorized access to storage resources:</p>
<ul>
<li>Authorization</li>
<li>Authentication</li>
<li>Encryption</li>
</ul>
<p>Because iSCSI setups are generally shared environments access to the storage elements (LUNs) by unauthorized initiators should be blocked. Authorization is implemented by means of the iQN. The iQN is the initiator node name (iSCSI Qualified Name), this can be seen as a mac-address. During an audit, storage systems must demonstrate controls to ensure that a server under one regime cannot access the storage assets of a server under another.<br />
Typically, iSCSI storage arrays explicitly map initiators to specific target LUNs; an initiator authenticates not to the storage array, but to the specific storage asset it intends to use.</p>
<p>As an added security method, the iSCSI protocol allows initiators and targets to use CHAP to authenticate each other.  This prevents simple access by spoofing the iQN. And last, because iSCSI runs on IP, IPSec can be used to secure and encrypt the data flowing between the client (initiator) and the storage server (target).</p>
<p>Now that we know there are multiple ways to secure access to the storage resouces, you might conclude that iSCSI must be safe and secure to use. Unfortunately this is not evident. There are several flaws in the iSCSI security design:</p>
<ul>
<li>iQN&#8217;s are trusted, but are easy to spoof, sniff and guessed</li>
<li>iSCSI authorization is the only required security method, and this uses only the iQN</li>
<li>Authentication is disabled by default</li>
<li>Authentication is (mostly) only implemented as CHAP</li>
<li>IPSec is difficult to implement</li>
</ul>
<p>Because iQN&#8217;s are manually configured in the iSCSI driver on the client, it is easy to change them. To get access to a LUN that is only protected by a iQN restriction, you can sniff the communication to get the iQN, or guess the iQN as it is often a default string (eg.: iqn.1991-05.com.microsoft.hostname), configure the iscsi driver to use this name and get access to the LUN.</p>
<p>The CHAP protocol is basically the only authentication mechanism that is supported by iSCSI vendors. The protocol allows for other mechanisms like Kerberos. The CHAP protocol is not a protocol know for its strong security on shared networks. The CHAP protocol is vulnerable to dictionary attacks, spoofing, or reflection attacks. Because the security issues with CHAP are well known, the RFC even mentions ways to deal with the limitations of CHAP (<a href="http://tools.ietf.org/html/rfc3720#section-8.2.1">http://tools.ietf.org/html/rfc3720#section-8.2.1</a>).</p>
<p>While IPSec could stop or reduce most of the security issues outlined above, it is hard to implement and manage. Therefor not many administrators will feel the need to use it. It should not only be possible to make a secure network, it should also be made easy.</p>
<p>To reduce the risk, and make your iSCSI network as safe as possible, you should do the following:</p>
<ul>
<li>Enable mutual (incoming/outgoing) authentication</li>
<li>Follow <a href="http://tools.ietf.org/html/rfc3720#section-8.2.1">advice</a> to secure CHAP</li>
<li>Enable CRC checksums</li>
<li>Do not only rely on iQN for authorization</li>
<li>Enable IPSec (if performance allows it)</li>
</ul>
<p>Also vendors/distributors should enable authentication by default, and add other authentication mechanisms to the iSCSI target and initiator software.</p>
<p>References:<br />
<a href="http://www.blackhat.com/presentations/bh-usa-05/bh-us-05-Dwivedi-update.pdf "> http://www.blackhat.com/presentations/bh-usa-05/bh-us-05-Dwivedi-update.pdf</a><br />
<a href="http://en.wikipedia.org/wiki/ISCSI#Authentication"> http://en.wikipedia.org/wiki/ISCSI#Authentication</a><br />
<a href="http://weird-hobbes.nl/reports/iSCSI%20security/"> http://weird-hobbes.nl/reports/iSCSI%20security/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/08/13/iscsi-security-how-to-secure-your-lun-best/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>disable password aging</title>
		<link>http://rogierm.redbee.nl/blog/2009/08/04/disable-password-aging/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/08/04/disable-password-aging/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 21:26:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=45</guid>
		<description><![CDATA[In general it is a good idea to configure password aging as part of your password/security policy. In some cases however, this might cause unexpected problems. I&#8217;ve seen cases where an expired password prevented a machine from booting. In this specific case this was caused by a service that ran as the user with the [...]]]></description>
			<content:encoded><![CDATA[<p>In general it is a good idea to configure password aging as part of your password/security policy. In some cases however, this might cause unexpected problems. I&#8217;ve seen cases where an expired password prevented a machine from booting. In this specific case this was caused by a service that ran as the user with the expired password. In general you should not run services as a normal user account, but sometimes you just have to deal with things you can&#8217;t change. Generally the documentation states that to disable password aging you have to edit the /etc/shadow file, and remove the part where the password age is stored. This is quite error prone. If you do it this way, be sure to use <code>vipw</code> to prevent errors in this critical file. To disable password aging I recommend just using the command to enable it as well:<br />
<code><br />
# chage -m 0 -M 99999 -E -1 username<br />
</code><br />
Check the before and after:<br />
<code><br />
# chage -l username<br />
Minimum:	7<br />
Maximum:	90<br />
Warning:	7<br />
Inactive:	-1<br />
Last Change:		Jun 26, 2009<br />
Password Expires:	Sep 24, 2009<br />
Password Inactive:	Never<br />
Account Expires:	Never<br />
</code><br />
After disabling password aging:<br />
<code><br />
# chage -l username<br />
Minimum:	0<br />
Maximum:	99999<br />
Warning:	7<br />
Inactive:	-1<br />
Last Change:		Jun 26, 2009<br />
Password Expires:	Never<br />
Password Inactive:	Never<br />
Account Expires:	Never<br />
</code></p>
<p>As a note, please only disable password aging when there is no other way to fix the problem. </p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/08/04/disable-password-aging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creditcard data stolen at Network Solutions</title>
		<link>http://rogierm.redbee.nl/blog/2009/07/28/creditcard-data-stolen-at-network-solutions/</link>
		<comments>http://rogierm.redbee.nl/blog/2009/07/28/creditcard-data-stolen-at-network-solutions/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 00:35:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[creditcard]]></category>
		<category><![CDATA[incident]]></category>
		<category><![CDATA[PCI]]></category>

		<guid isPermaLink="false">http://rogierm.redbee.nl/blog/?p=28</guid>
		<description><![CDATA[Yesterday I read an article in the Washington Post about a big security breach at Network Solutions where &#62;500.000 credit and debit cards are stolen. Network Solutions acknowledge this security incident on their site. They claim the cause of this incident was malicious code that was uploaded to a platform supporting their merchants sites. How [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I read an article in the Washington Post about a <a href="http://www.washingtonpost.com/wp-dyn/content/article/2009/07/24/AR2009072403527.html?hpid=moreheadlines">big security breach at Network Solutions</a> where &gt;500.000 credit and debit cards are stolen. Network Solutions <a href="http://about.networksolutions.com/site/data-security-alert-problem-fix-and-customers-notified/">acknowledge this security incident</a> on their site. They claim the cause of this incident was malicious code that was uploaded to a platform supporting their merchants sites. How this was possible and how this could lead to the possible theft of half a million credit card numbers is unclear.</p>
<p>I&#8217;ve been involved in several <a href="https://www.pcisecuritystandards.org/">PCI</a> projects to help our customers become PCI compliant as required by the credit card issuing companies. While the need for most of the procedures and measures required by PCI is clear, some seem useless, costly and/or superfluous to implement. But after incidents like these, it is a lot easier to explain customers the point of the <a href="https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml">measures PCI requires</a> of <a href="http://www.pcicomplianceguide.org/pcifaqs.php#5">companies handling credit card data</a>. Basically everything is aimed at protecting the creditcard data, and making sure in case of a security incident all needed audit trails are available to investigate the cause and source of the attack. At least that is how I look at it.</p>
<p>For instance, PCI requires you to audit the integrity of the files present on the system. This should not only include OS files, but also the (web) application code. It is premature to speculate if this &#8216;malicious code&#8217; could have been detected by running a properly configured host-based IDS on the platform, such as Tripwire or Samhain.</p>
<p>Secondly, PCI requires you to establish roles that have access to a production platform to upload code. Staff members should be part of a role that authorizes them for the access they need to do their job. Access should be restricted to allow only this traffic. Not only should access be locked, but audit trails of all activity should be available upon request. These audit trails not only include who logged in to the systems, but should also include network IDS logs (eg. SNORT), commands that are executed (eg. sudo), output of these commands (eg. rootsh) and the reports of host-based IDS&#8217;s. Together these tools should give an auditor a good insight in the activity on a (compromised) server. Also SElinux could be a big help in restricting access. Strangely PCI does not require or advise the use of SElinux, while it does require the use of application level firewalls (eg. mod_security in Apache). But this is a different discussion <img src='http://rogierm.redbee.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To secure the creditcard data itself, PCI requires that all creditcards should be stored in encrypted from. Manual access to keys to decrypt this data should not be possible. Based on this you can infer that the creditcard data is compromised by some sort of &#8216;man-in-the-middle&#8217; attack. The malicious code could have intercepted the data after it was decrypted in the webserver, leaving the SSL tunnel, and before it was encrypted and stored in the database. But this is just speculating of course&#8230;</p>
<p>I&#8217;m looking forward to more details on this incident. I hope this is made publicly available so we can learn from the mistakes that were made.</p>
]]></content:encoded>
			<wfw:commentRss>http://rogierm.redbee.nl/blog/2009/07/28/creditcard-data-stolen-at-network-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
