<?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>upgrade &#8211; VeriTeknik</title>
	<atom:link href="https://www.veriteknik.net.tr/en/tag/upgrade/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.veriteknik.net.tr/en/</link>
	<description>VeriTeknik Bilişim &#124; VeriTeknik Bilişim</description>
	<lastBuildDate>Mon, 16 Apr 2012 22:20:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Web Hosting Security premier</title>
		<link>https://www.veriteknik.net.tr/en/web-hosting-security-premier/</link>
					<comments>https://www.veriteknik.net.tr/en/web-hosting-security-premier/#respond</comments>
		
		<dc:creator><![CDATA[ckaraca]]></dc:creator>
		<pubDate>Mon, 16 Apr 2012 22:20:07 +0000</pubDate>
				<category><![CDATA[Web Hosting Security]]></category>
		<category><![CDATA[directadmin]]></category>
		<category><![CDATA[repoforge]]></category>
		<category><![CDATA[rpmforge]]></category>
		<category><![CDATA[telnet]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[yum]]></category>
		<guid isPermaLink="false">http://www.plugged.in/?p=323</guid>

					<description><![CDATA[<p>IMPORTANT NOTE: Never assume the directory structures exist in your system as written in the document. Never blindly follow security instructions &#8212; read, review, compare, apply as it fits your system., Update your server as necessary As its nature, Linux is a multi-developer operating system and you might see an update on any package everyday, an updater like [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/web-hosting-security-premier/">Web Hosting Security premier</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>IMPORTANT NOTE:</strong></span> Never assume the directory structures exist in your system as written in the document. Never blindly follow security instructions &#8212; read, review, compare, apply as it fits your system.,</p>
<h3>Update your server as necessary</h3>
<p>As its nature, Linux is a multi-developer operating system and you might see an update on any package everyday, an updater like YUM if you don&#8217;t change it&#8217;s default behavior hosts the most recent stable versions of each package that you install on your server.</p>
<p>Compared to other operating systems, updating Linux is easy as writing a command to terminal, the rest will be automated by YUM. Yum can be extended by independent software repositories like Repoforge. RPMforge is a collaboration of Dag and other packagers. They provide over 5000 packages for CentOS, including wine, vlc, mplayer, xmms-mp3, and other popular media tools. It is not part of Red Hat or CentOS but is designed to work with those distributions.</p>
<p>To install Rpmforge, run;</p>
<blockquote><p> rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.rf.src.rpm</p></blockquote>
<p>If you get an error with the command, check the web site for a recent version. If you are using a control panel like Directadmin you better exclude the packages below from yum as they are maintained by the control panel updater;</p>
<blockquote><p>exclude=apache* httpd* mod_* mysql* MySQL* da_* *ftp* exim* sendmail* php* bind-chroot*</p></blockquote>
<p>and the last thing you should do is to type</p>
<blockquote><p>yum upgrade</p></blockquote>
<p>We suggest you to run the update at least every once a month.</p>
<h3>Disable Telnet</h3>
<hr style="width: 100%;" width="100%" />
<p>Nowadays, Telnet is mostly given its role to SSH; more secure remote shell client, because Telnet is sending the passwords in readable clear text. Also SSH have many abilities that you can use such as private-keys that you can use to log in to the server without writing down a password. Public key is mostly used when you need root access even you don&#8217;t know the root password (root password might be changed by the system administrator or by your client which you install the system for).</p>
<p>Connect to the server and edit<strong> /etc/xinetd.d/telnet</strong> by typing;</p>
<blockquote><p>vi /etc/xinetd.d/telnet</p></blockquote>
<p>if exists <strong>disable = no</strong> change to <strong>disable = yes</strong></p>
<p>save &amp; exit (SHIFT + ZZ)</p>
<h3>Restrict Access to applications that can directly connect to the Internet</h3>
<hr />
<p>Even an attacker leak into your server, it is better to give him no chance to download his applications to the server, don&#8217;t give run permission to following applications except root user by typing;</p>
<blockquote><p>chmod 700 /usr/bin/wget<br />
chmod 700 /usr/bin/telnet<br />
chmod 700 /usr/local/bin/lynx<br />
chmod 700 /usr/bin/links<br />
chmod 700 /usr/bin/bcc<br />
chmod 700 /usr/bin/byacc<br />
chmod 700 /usr/bin/cc<br />
chmod 700 /usr/bin/gcc<br />
chmod 700 /usr/bin/perlcc<br />
chmod 700 /usr/bin/yacc<br />
chmod 0700 /usr/bin/curl<br />
chmod 700 /usr/bin/lwp-*<br />
chmod 700 /usr/bin/*ncftp*</p></blockquote>
<p>Also please note that, if you are taking backups of your domains/dbs to the same server, be aware that a directory created without explicit permission will be readable by all users, to make the directory readable only by root, type;</p>
<blockquote><p>chmod 600 /backups</p></blockquote>
<h3>Restrict OS level function calling to PHP</h3>
<hr />
<p>In a shared hosting environment, even a customer of yours may try to explore your server. If you don&#8217;t have any reason to call the functions below, restrict them;</p>
<p>edit /etc/php.ini (or whereever it is, for directadmin you can check /usr/local/lib/php.ini) and find the line disable_functions and replace with the below line:</p>
<blockquote><p>disable_functions = apache_get_modules,apache_get_version,apache_getenv,apache_note, apache_setenv,disk_free_space,diskfreespace,dl, highlight_file,ini_alter,ini_restore,openlog,passthru,phpinfo, proc_nice,shell_exec,show_source,symlink,system, exec,popen,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_ put,fpassthru</p></blockquote>
<h3> Block executing commands on the /tmp Partition</h3>
<hr />
<p>Several script languages like PHP, holds temporary files like session,upload and cache on the /tmp partition on Linux systems. İf the attacker has an access to this folder then those scripts can be run from this point so with this way, all system files can be reached or accessed by root. To block running of files which are in the /tmp partition, it must not be given run permission while mounting /tmp partition.</p>
<p>To do this process, you have to choose /tmp partition as seperate partition while installaing the system. Enter this command in the command line to check this setting:</p>
<blockquote><p>df -h # or<br />
mount</p></blockquote>
<p>Enter this command:</p>
<blockquote>[root@xxx ~]# df -h<br />
Filesystem            Size  Used Avail Use% Mounted on<br />
/dev/mapper/VolGroup00-LogVol00 2.9G  820M  1.9G  30% /<br />
<strong>/dev/mapper/VolGroup00-LogVol02 2.9G  288M  2.4G  11% /tmp</strong><br />
/dev/mapper/VolGroup00-LogVol04 7.8G  3.8G  3.7G  51% /var<br />
/dev/mapper/VolGroup00-LogVol05 44G   35G  6.6G  85% /hsphere<br />
/dev/mapper/VolGroup00-LogVol03 4.8G  908M  3.6G  20% /usr<br />
/dev/sda1              99M   36M   58M  39% /boot<br />
tmpfs                 2.0G     0  2.0G   0% /dev/shm</p></blockquote>
<p>If you can not see a seperate  /tmp partition like in the example, create a new 3 GB /tmp partition by applying steps below. If there is a /tmp partition then follow with the step 2:</p>
<p><strong>Step 1:</strong></p>
<blockquote><p>cd /dev/<br />
dd if=/dev/zero of=Tmp bs=1024 count=3000000<br />
mkfs -t ext3 /dev/Tmp<br />
cd /<br />
cp -aR  /tmp  /tmp_backup<br />
mount  -o  loop,noexec,nosuid,rw  /dev/Tmp  /tmp<br />
cp -aR /tmp_backup/* /tmp/<br />
chmod 0777 /tmp<br />
chmod +t  /tmp</p></blockquote>
<p>Add information of the newly created partition into the /etc/fstab in order to make it available after next boot.</p>
<blockquote><p>/dev/Tmp          /tmp          ext3          loop,rw,nosuid,noexec     0 0</p></blockquote>
<p>If you already have  /tmp partition, please apply the below steps.</p>
<p><strong>Step 2:<br />
</strong></p>
<p>change &#8220;defaults&#8221; in the line starting with /tmp in /etc/fstab to restrict running applications such as</p>
<blockquote><p>/dev/VolGroup00/LogVol02 /tmp                    ext3    <strong>defaults </strong>1 2</p></blockquote>
<p>to</p>
<blockquote><p>/dev/VolGroup00/LogVol02 /tmp                    ext3     <strong>rw,nosuid,noexec</strong> 1 2</p></blockquote>
<p>Change defaults region as <strong>rw,nosuid,noexec </strong>then save and exit. Remount /tmp partition in order to make changes available immediately by typing;</p>
<blockquote><p>mount -oremount loop,rw,nosuid,noexec /tmp</p></blockquote>
<p>..</p>
<p>note: Some parts of this document inspired from the documentation of dynamicnet.net</p>
<p>The post <a rel="nofollow" href="https://www.veriteknik.net.tr/en/web-hosting-security-premier/">Web Hosting Security premier</a> appeared first on <a rel="nofollow" href="https://www.veriteknik.net.tr/en/">VeriTeknik</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.veriteknik.net.tr/en/web-hosting-security-premier/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">323</post-id>	</item>
	</channel>
</rss>
