Security issues in ASP components (turn)

Source: Internet
Author: User
Microsoft's ASP (Active Server Page) is popular with users and most network administrators for its simplicity, ease of use, functionality and scalability, and is a great substitute for CGI.   But I would like to say to you, if the use of ASP, your network security also greatly reduced! Before I go on, please complete the following steps:
1. Download this file "Http://home.gbsource.net/xuankong/dll.zip", unzip the Test.dll file to copy to "C:windowssystem" (if you are using NT, please copy to the corresponding directory );
2. Next Open "Start/Run" menu to enter "regsvr32 test.dll" command;
3. Copy uncompressed package of the index.asp to your server directory (if you are using PWS ' Personal Web Server ' debug can copy to "C:inetpubwwwroot", NT please copy to the corresponding directory);
4. For a machine to browse index.asp files with IE to see (you see the error code, but in fact, the program has been running), you return to your machine to look at C: under a more than a file?! A file called "Xuankong.dat" (in fact, if I wish, your C:autoexec.bat file can be opened by me and written to some of the "format C:/q/y" or "deltree *.*/y" commands, and the next time you restart the machine. Hey...... )。
Let's see what's going on. The DLL files you just copied are actually a component I developed using Visul Basic 5.0:
1. Open VB5.0 Create a new "ActiveX dll" file and enter the following code.
Private Declare Function ExitWindowsEx lib″user32″_
(ByVal uflags as Long, ByVal dwreserved as Long) _
As Long Sub Xuankong () Please don't add ″private″
a$ = InputBox (″ Please enter your name, if your input is ″xuankong″″+ Chr (10) CHR will generate a +″ file in your system ″xuankong.dat″ ″+ (a) + CHR (13) Chr otherwise Your machine may reboot ″,″ Please enter ″,″xuankong″)
If a$ =″xuankong″then open″c:xuankong.dat″for Append as # Write #1,″ My friend, this is a test program for an ASP component ″write #1,″hello Worl D! This is a test″write #1,″ if you see this file indicates that the test was successful!!! ″else exitwindowsex &h43, 0′ use API functions to reboot machine end If Close # end Sub
2. Change the project name to a DLL, change the class module to test, and then generate the DLL file into the C:windowssystem directory below the project.
3. Create a new index.asp file to enter the following code.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.