2002-07-01 Qin Haipeng Yesky
Description: All programs in this article are compiled and run correctly on Windows Server Chinese + SP2
Development environment:. Net Framework 1.0 Version 1.0.3705
First, ASP. NET virtual host exists the significant hidden danger
I once applied for a free asp.net space in WWW.BRINKSTER.COM, uploaded two programs, one of which looked at the directory and file of the program to prove my judgment: ASP shared space server exists a security problem in asp+ A shared space server still exists and becomes more difficult to prevent! Through this program I can browse all the user's asp+ program, can view the server's system log ..., of course, if I want to delete anything, there is no problem. In order to get a clearer picture of the problem, it is necessary to briefly introduce the problem that already exists in ASP.
Standard components commonly used in asp: FileSystemObject, this component provides a powerful file system access to the ASP, you can read, write, delete, rename, and so on any directory and file with permissions on the server hard disk. The FSO object is from the Script Runtime library provided by Microsoft Scrrun.dll.
Use the following code to create an FSO object in asp:
Set fso = CreateObject ("Scripting.FileSystemObject")
We use the FSO object contains the properties and methods, such as drive, drives, Folder, floders, File, files, etc. to the server's disk, directories and files to read, write, delete and other operations. This powerful file system access capability poses a serious security problem for ASP space providers, and many of the administrators of ASP spaces Delete This component or rename it to avoid users using this standard component. Deleting a component or component renaming is indeed a simple and effective method, but it makes it impossible for the vast majority of users to use its powerful features. There is also a seemingly beautiful scenario on the Web that allows users to use the FileSystemObject component without affecting the security of the server, which means that each user is set to operate on a separate server user and a single directory. But there is a problem with this approach. Because the problems in this area are very similar between ASP and ASP.net, we will elaborate on the corresponding solutions in asp.net.
In asp.net we find that this problem still exists and becomes more difficult to solve. This is because. NET has become more powerful in the function of system IO operations, what makes this problem more serious is that ASP.net has a new function, this component does not need to use the regsvr32 as the ASP to register, just upload DLL class library file to the Bin directory can be used directly. This feature does bring great convenience to development asp.net, but it makes it more complicated to prevent this problem from being eliminated or renamed in ASP. Before we discuss the solution, let's take a look at how to implement the dangerous functionality described above.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service