I'll explain in brief about few security issues arising in Shared Web Hosting environment..
It is a common practice for owners of sites to rent disk space belonging to hosting companies. A hosting company is a company that hosts & supports sites on its servers. As a result, a hosting server can hold tens & even hundreds of sites.
Naturally, security issues are urgent for systems on hosting servers. As a rule, the owners of a resource located on a hosting server protect their files well enough.
Most hosting companies offer access to their clients' files using FTP. An FTP server on a hosting server is configured so that authentication & authorization are required. An authorized user can access only his or her home directory for reading & writing. Clients cannot read & especially cannot change files outside their directories.
The root Web directory of a site is often a subdirectory of the site owner's home directory. This allows the user to have files & directories that are available only to him or her for reading & that are inaccessible using HTTP. A list of files in a user's home directory can be as shown in the next example
SSh :
In general, this solution proves to be good. In some cases, access for reading & writing (changing attributes) to files belonging to the user is insufficient for setting the system. For example, he or she might need access to certain server commands such as setting the cron daemon so that certain commands execute according to a certain schedule. For another example, the user might need to install specific software. When this is required, access using the secure shell (SSH) protocol is arranged. Giving users additional rights such as a right to execute any command can weaken both the security of the hosting server & the security of the sites it hosts.
Although server security is a concern of the hosting administrator, the security of a particular site is a concern of its owner. As a result, it is common that one of the hosting company's clients can read & sometimes execute files belonging to another user. If this situation is likely in your hosting company, you should develop your system or site with the assumption that the code of your scripts can be disclosed.
A hosting server can be configured so that it is difficult for users to access files belonging to other users. This can be done by restricting options of the command line. Depending on a particular implementation, the host can use various methods to protect the users of a system from the users of other systems.
You might now think that reliable protection against unauthorized access to files could be achieved by allowing only the owner of the files to access them for reading & writing. However, for normal functioning of an HTTP server, files accessible from the Web must be accessible for reading to the user who started the HTTP server. Sometimes, scripts (executed as CGI applications) require the user who started the HTTP server to have the right to execute these scripts.
Imagine a situation, in which the owners of a site can access only their files. In addition, suppose the hosting company allows its clients to place only static pages on their sites. Any dynamic content (except, perhaps, server-side include) is not supported. In this situation, it is impossible to access files on one site from the context of another site.
As always, the most secure configuration is one that uses only static documents that don't respond to changes in external conditions. However, systems & sites with only static content cannot satisfy their users nowadays. Therefore, hosting companies that allow their clients to put only static HTML pages wouldn't be competitive against companies that support dynamic content. So, you can be sure that any hosting company will host sites with dynamic content.
The source code of scripts is private information that shouldn't be available to a third party. At the same time, as I mentioned earlier, it should be available for reading to the user who started the HTTP server. In most configurations, the scripts are executed with the access rights of this user. Therefore, you should remember the following warning. In some cases, a user able to execute any script in the context of a site can access any script on another site physically located on the same server.
This fact is the most important for the security of systems on hosting servers. By executing malicious scripts, an attacker can obtain the source code of scripts on another site physically located on the same server. In addition, the attacker sometimes can read other system files (e.g., HTTP server settings or system configuration files) even though he or she shouldn't.
More to be added tomorrow.. my fingers ache now
It is a common practice for owners of sites to rent disk space belonging to hosting companies. A hosting company is a company that hosts & supports sites on its servers. As a result, a hosting server can hold tens & even hundreds of sites.
Naturally, security issues are urgent for systems on hosting servers. As a rule, the owners of a resource located on a hosting server protect their files well enough.
Most hosting companies offer access to their clients' files using FTP. An FTP server on a hosting server is configured so that authentication & authorization are required. An authorized user can access only his or her home directory for reading & writing. Clients cannot read & especially cannot change files outside their directories.
The root Web directory of a site is often a subdirectory of the site owner's home directory. This allows the user to have files & directories that are available only to him or her for reading & that are inaccessible using HTTP. A list of files in a user's home directory can be as shown in the next example
SSh :
[user:~]$ cd ~
[user:~]$ ls -la
total 512
drwxr-xr-x 25 user user 512 Aug 24 18:23 .
drwxr-xr-x 20 root wheel 512 Nov 18 14:28 ..
-rw------- 1 user user 7219 Dec 10 21:12 .bash history
-rw-r--r-- 1 user user 771 May 27 2010 .cshrc
-rw-r--r-- 1 user user 248 May 23 2010 .login
-rw-r--r-- 1 user user 158 May 23 2010 .login_conf
-rw------- 1 user user 276 May 23 2010 .rhosts
-rw-r--r-- 1 user user 975 May 27 2010 .shrc
drwxr-xr-x 6 user apache 512 May 1 2010 httpd
drwxr-xr-x 3 user user 512 May 23 2010 mail
drwxrwxrwx 13 user user 512 May 28 2010 share
[user:~]$ ls -la
total 512
drwxr-xr-x 25 user user 512 Aug 24 18:23 .
drwxr-xr-x 20 root wheel 512 Nov 18 14:28 ..
-rw------- 1 user user 7219 Dec 10 21:12 .bash history
-rw-r--r-- 1 user user 771 May 27 2010 .cshrc
-rw-r--r-- 1 user user 248 May 23 2010 .login
-rw-r--r-- 1 user user 158 May 23 2010 .login_conf
-rw------- 1 user user 276 May 23 2010 .rhosts
-rw-r--r-- 1 user user 975 May 27 2010 .shrc
drwxr-xr-x 6 user apache 512 May 1 2010 httpd
drwxr-xr-x 3 user user 512 May 23 2010 mail
drwxrwxrwx 13 user user 512 May 28 2010 share
Although server security is a concern of the hosting administrator, the security of a particular site is a concern of its owner. As a result, it is common that one of the hosting company's clients can read & sometimes execute files belonging to another user. If this situation is likely in your hosting company, you should develop your system or site with the assumption that the code of your scripts can be disclosed.
A hosting server can be configured so that it is difficult for users to access files belonging to other users. This can be done by restricting options of the command line. Depending on a particular implementation, the host can use various methods to protect the users of a system from the users of other systems.
You might now think that reliable protection against unauthorized access to files could be achieved by allowing only the owner of the files to access them for reading & writing. However, for normal functioning of an HTTP server, files accessible from the Web must be accessible for reading to the user who started the HTTP server. Sometimes, scripts (executed as CGI applications) require the user who started the HTTP server to have the right to execute these scripts.
Imagine a situation, in which the owners of a site can access only their files. In addition, suppose the hosting company allows its clients to place only static pages on their sites. Any dynamic content (except, perhaps, server-side include) is not supported. In this situation, it is impossible to access files on one site from the context of another site.
As always, the most secure configuration is one that uses only static documents that don't respond to changes in external conditions. However, systems & sites with only static content cannot satisfy their users nowadays. Therefore, hosting companies that allow their clients to put only static HTML pages wouldn't be competitive against companies that support dynamic content. So, you can be sure that any hosting company will host sites with dynamic content.
The source code of scripts is private information that shouldn't be available to a third party. At the same time, as I mentioned earlier, it should be available for reading to the user who started the HTTP server. In most configurations, the scripts are executed with the access rights of this user. Therefore, you should remember the following warning. In some cases, a user able to execute any script in the context of a site can access any script on another site physically located on the same server.
This fact is the most important for the security of systems on hosting servers. By executing malicious scripts, an attacker can obtain the source code of scripts on another site physically located on the same server. In addition, the attacker sometimes can read other system files (e.g., HTTP server settings or system configuration files) even though he or she shouldn't.
More to be added tomorrow.. my fingers ache now

Comment