<?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>Sun Solaris System Admin &#187; security</title>
	<atom:link href="http://www.sunsolarisadmin.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sunsolarisadmin.com</link>
	<description>Sun Solaris HowTo's Tips Tricks Tutorials</description>
	<lastBuildDate>Wed, 16 Jun 2010 21:07:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<image>
<link>http://www.sunsolarisadmin.com</link>
<url>http://www.sunsolarisadmin.com/wp-content/mbp-favicon/favicon.ico</url>
<title>Sun Solaris System Admin</title>
</image>
		<item>
		<title>PCP script to find open TCP ports and PIDs related in Solaris</title>
		<link>http://www.sunsolarisadmin.com/solaris-8/pcp-script-to-find-open-tcp-ports-and-pids-related-in-solaris/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-8/pcp-script-to-find-open-tcp-ports-and-pids-related-in-solaris/#comments</comments>
		<pubDate>Tue, 12 May 2009 22:35:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[pcp]]></category>
		<category><![CDATA[PID]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[TCP port]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/?p=69</guid>
		<description><![CDATA[PCP is a very useful security and adminitration script that can help you quickly find Processes (PIDs) having particular TCP Port(s) open, TCP ports open by specific PIDs or even list all the TCP Ports open by all PIDs running on your system. The PCP script works on Solaris 10/9/8 and can be downloaded from [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense-->PCP is a very useful security and adminitration script that can help you quickly find Processes (PIDs) having particular TCP Port(s) open, TCP ports open by specific PIDs or even list all the TCP Ports open by all PIDs running on your system.</p>
<p><span id="more-69"></span><br />
The PCP script works on Solaris 10/9/8 and can be downloaded from <a title="PCP Script download" href="http://www.unix.ms/pcp/pcp.txt" target="_blank">here</a>. Simply save the pcp.txt file to your Solaris Server as a Shell scripts (say pcp.sh) and change permissions to execute.</p>
<blockquote><p><strong># chmod 755 pcp.sh</strong></p></blockquote>
<p><span style="text-decoration: underline;"><strong>PIDs for TCP Port</strong></span></p>
<p>Run PCP with <strong>&#8220;-p&#8221;</strong> option to show the PIDs of processes having a TCP port (say Port 22)</p>
<p><img class="alignnone size-full wp-image-70" title="pcp1" src="http://www.sunsolarisadmin.com/wp-content/uploads/2009/05/pcp1.png" alt="pcp1" width="471" height="194" /></p>
<p>For instance, to find PIDs opening TCP port 22.</p>
<p><span style="text-decoration: underline;"><strong>TCP Ports open by PIDs</strong></span></p>
<p>Run PCP with <strong>&#8220;-P&#8221;</strong> option to show the TCP ports open by specific PID</p>
<p>For instance, here I try to find the TCP ports open by PID 18805</p>
<p><img class="alignnone size-full wp-image-72" title="pcp3" src="http://www.sunsolarisadmin.com/wp-content/uploads/2009/05/pcp3.png" alt="pcp3" width="468" height="223" /></p>
<p><span style="text-decoration: underline;"><strong>All PIDs for all open TCP Ports</strong></span></p>
<p>Use the <strong>&#8220;-a&#8221;</strong> option to list all TCP ports open with all the PIDs</p>
<p><img class="alignnone size-full wp-image-71" title="pcp2" src="http://www.sunsolarisadmin.com/wp-content/uploads/2009/05/pcp2.png" alt="pcp2" width="464" height="458" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-8/pcp-script-to-find-open-tcp-ports-and-pids-related-in-solaris/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Reduce ARP caching time in Sun Solaris using ndd</title>
		<link>http://www.sunsolarisadmin.com/security/reduce-arp-caching-time-in-sun-solaris-using-ndd/</link>
		<comments>http://www.sunsolarisadmin.com/security/reduce-arp-caching-time-in-sun-solaris-using-ndd/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 18:02:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ARP]]></category>
		<category><![CDATA[ARP-table]]></category>
		<category><![CDATA[attacks]]></category>
		<category><![CDATA[cache]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/security/reduce-arp-caching-time-in-sun-solaris-using-ndd/</guid>
		<description><![CDATA[ARP attacks are the easiest attacks that can be launched on a network or a Server causing a Denial of Service. One of those things that can be done on the Sun Solaris Operating System is to alter the caching time for the ARP cache whch reduces the time that a rogue ARP entry stays [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--><br />
ARP attacks are the easiest attacks that can be launched on a network or a Server causing a Denial of Service. One of those things that can be done on the Sun Solaris Operating System is to alter the caching time for the ARP cache whch reduces the time that a rogue ARP entry stays in the ARP table. While this is not fool proof but can certainly make it that extra difficult to the hacker.</p>
<p>The default time that ARP entries are cached in a Sun Solaris system is 5 mins.</p>
<p><span id="more-48"></span></p>
<p>However, this can be reduced to lower level (say 3mins). This means that the number of ARP requests and ARP replies to and from the server will increase as a result. So, before modifying the caching time, check if this can cause andy congestion on your network.</p>
<p>To set the ARP cache time period</p>
<blockquote><p><strong>solaris# ndd -set /dev/arp arp_cleanup_interval 180000</strong></p></blockquote>
<p>The above command sets the interval to 3 minutes (1min is equal to 60000ms). Now, all the ARP entries are flushed at a faster rate (every 3mins)</p>
<p>For this change to persist across reboots, add this command onto the init scripts in /etc/rc2.d directory for your network interface (where all the required ndd commands are run).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/security/reduce-arp-caching-time-in-sun-solaris-using-ndd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disable ICMP Redirect in Sun Solaris for Security</title>
		<link>http://www.sunsolarisadmin.com/security/disable-icmp-redirect-in-sun-solaris-for-security/</link>
		<comments>http://www.sunsolarisadmin.com/security/disable-icmp-redirect-in-sun-solaris-for-security/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 19:48:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[icmp-redirect]]></category>
		<category><![CDATA[ipv4]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[nddconfig]]></category>
		<category><![CDATA[routing-table]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun-solaris]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/security/disable-icmp-redirect-in-sun-solaris-for-security/</guid>
		<description><![CDATA[Solaris Operating Environment by default is configured to both accept and send  the ICMP Redirect messages. According to RFCs, only a router or a gateway device should send an ICMP Redirect message and any other hosts should only be able to receive the ICMP Redirects. If the Solaris server is not acting as a Router [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>Solaris Operating Environment by default is configured to both accept and send  the ICMP Redirect messages. According to RFCs, only a router or a gateway device should send an ICMP Redirect message and any other hosts should only be able to receive the ICMP Redirects. If the Solaris server is not acting as a Router or a Gateway then sending ICMP Redirect message should be disabled. The same applies to accepting ICMP Redirect messages if the solaris server is not required to receive ICMP Redirect messages (say a single Router/Gateway network/subnets scenario) as a malicous hacker could send fake ICMP redirect messages to modify the routing table on the host and potentialy cause a Denial of Service attack.</p>
<p><span id="more-35"></span></p>
<p><strong><u>Show and Disable ICMP Redirect message accept option</u></strong></p>
<p>To see if accepting ICMP Redirects are enabled in Solaris,</p>
<p>In <em>IPv4</em></p>
<p><strong>root@solaris# ndd -get /dev/ip ip_ignore_redirect<br />
0</strong></p>
<p>In <em>IPv6</em> then</p>
<p><strong>root@solaris# ndd -get /dev/ip ip6_ignore_redirect<br />
0</strong></p>
<p>The &#8220;0&#8243; indicates that the host is configured to accept ICMP Redirect messages and &#8220;1&#8243; indicates it is being disabled</p>
<p>To disable the ICMP Redirect accept option,</p>
<p><strong>In IPv4</strong></p>
<p><strong>root@solaris# ndd -set /dev/ip ip_ignore_redirect 1</strong></p>
<p>In <strong>IPv6</strong></p>
<p><strong>root@solaris# ndd -set /dev/ip ip6_ignore_redirect 1</strong></p>
<p><strong><u>Show and Disable ICMP Redirect message send option</u></strong></p>
<p>To see if sending ICMP Redirects are enabled in Solaris,</p>
<p>If you are using IPv4</p>
<p><strong>root@solaris# ndd -get /dev/ip ip_send_redirects<br />
1</strong></p>
<p>If you are using <strong>IPv6</strong> then</p>
<p><strong>root@solaris# ndd -get /dev/ip ip6_send_redirects<br />
1</strong></p>
<p>The &#8220;1&#8243; indicates that the host is configured to send ICMP Redirect messages and &#8220;0&#8243; indicates it is being disabled</p>
<p>To disable the option,</p>
<p><strong>In IPv4</strong></p>
<p><strong>root@solaris# ndd -set /dev/ip ip_send_redirects 0</strong></p>
<p>In IPv6</p>
<p><strong>root@solaris</strong><strong># ndd -set /dev/ip ip6_send_redirects 0</strong></p>
<p>The above ndd -set commands dynamically update the ICMP Redirect send/receive options on the host. However, to ensure that the settings are applied at the boot time (say the next time when the server reboots) then edit the startup script /etc/rc2.d/S69inet and modify values accordingly.</p>
<p>Alternatively, you can download the nddconfig script and install on your server. This script can be used to adjust most of the ndd parameters for security purpose.</p>
<p>The script can be downloaded here (need an Sunsolve account)</p>
<p><a href="http://www.sun.com/blueprints/tools/">http://www.sun.com/blueprints/tools/</a></p>
<p>To install the nddconfig script</p>
<p>Untar the downloaded nddconfig.tar file</p>
<p><strong>root@solaris# tar -xvf nddconfig.tar</strong></p>
<p>Copy the nddconfig file to /etc/init.d/ directory</p>
<p><strong>root@solaris# cp nddconfig /etc/init.d/nddconfig</strong></p>
<p>Change the file permissions to 744</p>
<p><strong>root@solaris</strong><strong># chmod 744 /etc/init.d/nddconfig</strong></p>
<p>Change the file ownership to root(user) and sys (grooup)</p>
<p><strong>root@solaris# chown root:sys /etc/init.d/nddconfig</strong></p>
<p>Create a hard link as follows:</p>
<p><strong>root@solaris</strong><strong># ln /etc/init.d/nddconfig /etc/rc2.d/S70nddconfig</strong></p>
<p>This should help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/security/disable-icmp-redirect-in-sun-solaris-for-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable IP Forwarding in Sun Solaris</title>
		<link>http://www.sunsolarisadmin.com/solaris-7/how-to-disable-ip-forwarding-in-sun-solaris/</link>
		<comments>http://www.sunsolarisadmin.com/solaris-7/how-to-disable-ip-forwarding-in-sun-solaris/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 19:36:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris 7]]></category>
		<category><![CDATA[Solaris 8]]></category>
		<category><![CDATA[Solaris 9]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[forwarding]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[ndd]]></category>
		<category><![CDATA[packet]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/solaris-7/how-to-disable-ip-forwarding-in-sun-solaris/</guid>
		<description><![CDATA[IP packet forwarding is the process of routing packets between network interfaces on one system. A packet arriving on one network interface and addressed to a host on a different network is forwarded to the appropriate interface. While this is a job for the network router, Servers with multiple interfaces connected to different network can [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>IP packet forwarding is the process of routing packets between network interfaces on one system. A packet arriving on one network interface and addressed to a host on a different network is forwarded to the appropriate interface. While this is a job for the network router, Servers with multiple interfaces connected to different network can perform this action as well. This behaviour as a router is a default in Sun Solaris Operating Systems.</p>
<p><span id="more-32"></span></p>
<p>If your Sun Solaris server has multiple interfaces and is not intended to route packets between the networks it is connected to, then it is advisable to disable this option. This can be a potential target for a malicious hacker as this can potentially allow the hacker access to the network at the other side.</p>
<p>To disable this packet forwarding in Solaris, simply create the file</p>
<p><strong>/etc/notrouter</strong></p>
<p>and reboot the server. However, if reboot is not an option at this time, then usee the NDD command to disble the option:</p>
<p>To display the current status</p>
<p><strong># ndd /dev/ip ip_forwarding<br />
1</strong></p>
<p><em>0 is Disabled<br />
1 is Enabled</em></p>
<p>To disable,</p>
<p><strong># ndd -set /dev/ip ip_forwarding 0</strong></p>
<p><strong>For IPv6</strong></p>
<p><strong># ndd -set /dev/ip6 ip6_forwarding 0</strong></p>
<p>This should disable. To confirm change,</p>
<p><strong><em># ndd /dev/ip ip_forwarding<br />
0</em></strong></p>
<p><strong><em># ndd /dev/ip6 ip6_forwarding<br />
0</em></strong></p>
<p>In Solaris 8 and later, IP forwarding can be enabled or disabled on a per interface basis. For example, if there are 3 hme NIC cards namely hme0,hme1,hme2 then assume, we allow IP Forwarding only from hme0 and disable on hme1 and hme2 then the following will help:</p>
<p><strong><em># ndd -set /dev/ip hme0:ip_forwarding 1<br />
# ndd -set /dev/ip hme1:ip_forwarding 0<br />
# ndd -set /dev/ip hme2:ip_forwarding 0</em></strong></p>
<p>This should help</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/solaris-7/how-to-disable-ip-forwarding-in-sun-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NFS Security &#8211; nfs_portmon to restrict client source port to privileged ports</title>
		<link>http://www.sunsolarisadmin.com/security/nfs-security-nfs_portmon-to-restrict-client-source-port-to-privileged-ports/</link>
		<comments>http://www.sunsolarisadmin.com/security/nfs-security-nfs_portmon-to-restrict-client-source-port-to-privileged-ports/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 22:52:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[network-file-system]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[nfs_portmon]]></category>
		<category><![CDATA[privileged-source-ports]]></category>

		<guid isPermaLink="false">http://www.sunsolarisadmin.com/security/nfs-security-nfs_portmon-to-restrict-client-source-port-to-privileged-ports/</guid>
		<description><![CDATA[Network File System (NFS) security in Sun Solaris can be enhanced by restricting the source ports for the client connections for NFS to be only privileged ports. The privileged port range is from 512 to 1023. Enabling this security feature for NFS in solaris, checks if the source ports from the clients from privilege ports. [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--></p>
<p>Network File System (NFS) security in Sun Solaris can be enhanced by restricting the source ports for the client connections for NFS to be only privileged ports. The privileged port range is from 512 to 1023. Enabling this security feature for NFS in solaris, checks if the source ports from the clients from privilege ports. This prevents malicious users from gaining access to files exported/shared by the NFS server by preventing custom RPC based scripts or applications being used on unprivileged ports.</p>
<p><span id="more-28"></span></p>
<p>In Sun Solaris 10 this is enabled by default. In Solaris 9 and earlier, this can be enabled by simply editing the /etc/system file and adding an entry for nfs_portmon.</p>
<p><strong><u>Edit the /etc/system file</u></strong></p>
<blockquote><p><strong>sunsolaris# vi /etc/system</strong></p></blockquote>
<p>Add the following line</p>
<blockquote><p><strong><em>set nfssrv:nfs_portmon = 1</em></strong></p></blockquote>
<p>If you by any chance run Solaris 2.5 or earlier then</p>
<p><strong><em>set nfs:nfs_portmon = 1</em></strong></p>
<p>This change requires a reboot of the server for it to take effect.</p>
<p><strong><u>Reboot the server</u></strong></p>
<blockquote>
<blockquote><p><strong>sunsolaris# init 6</strong></p></blockquote>
</blockquote>
<p>When the server reboots, the changes take effect.</p>
<p>In Solaris 8 and later, run the following to confirm the change:</p>
<blockquote><p><strong>sunsolaris# adb -k</strong></p>
<p><strong>nfs_portmon /D</strong></p></blockquote>
<p>If this returns <strong>&#8220;1&#8243;</strong> indicates nfs_portmon is enabled else if it returns <strong>&#8220;0&#8243;</strong> indicates nfs_portmon is not enabled.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunsolarisadmin.com/security/nfs-security-nfs_portmon-to-restrict-client-source-port-to-privileged-ports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
