http://fox.he100.com/showart.asp?art_id=122&cat_id=1
Preventing Web Shell (finishing text)
Preventing Web Shell (finishing text)
It has been a virtual host administrator for 1 year, and it is probably a certain understanding of the Web Shell of the Web Shell in NT. Now how to prevent WebShell by organizing some masters of articles. Common WebShell is also ASP, PHP, Perl, which is written by these scripts. The popular WebShell, which is more popular, is also the ASP Trojan 2005, Guilin veterans (I don't know if it is not WebShell, huh, blue screen ASP Trojan (seems to be a little over time), the PHPSPY2005 of the security angel, Coffee PHP Document Manager 1.6, cmd.cgi (I am not familiar with Perl, only knowing this). The purpose of this article is to prevent these WebShells. Prevent these WebShells, first of all, set the server's permissions, prohibiting them from accessing things. Server permission settings can refer to IIS FAQ (http://fox.he100.com/showart.asp?art_id=121&cat_id=1), I will directly reference the original content here.
9. How to make IIS's minimum NTFS permission to run? Do the following work: a. Choose the entire hard drive: system: Fully control Administrator: Full control (Allow can be propagated from the parent "to the object)
B./Program Files / Common Files: Everyone: Read and run list of file directory reads (allowed to transmit can be transmitted from the parent "C./inetpub/wwwroot: IUSR_MACHINENAME: Read and run list Document directory reading (allowing inheritance permissions from the parent to the object)
E./winnt/system32: Select all directories other than INETSRV and CENTSRV, removal "Allows the transfer of the successive permissions from the parent to the object" check box, copy. F./Winnt: Select all directory removal other than Downloaded Program Files, Help, IIS Temporary Compressed Files, Offline Web Pages, System32, Tasks, Temp, Web Allows to propagate to the object from the parent ,copy.
G./Winnt: Everyone: Read and run the list of file directory reads (allowed to transmit can be propagated to objects from the parent "H./Winnt/Temp: (Allow access to the database and display on the ASP page) Everyone : Modification (allowing inheritance permissions from the parent to the object)
The cmd.exe net.exe net1.exe ping.exe net1.exe ping.exe net1.exe ping.exe net1.exe ping is set to only allowed Administrators group access, so that you can prevent the local improved permission vulnerability through Serv-U These critical programs, then delete the cacls.exe program, prevent someone from modifying permissions through the command line, huh. Remove some of the components that some of the ASP Webshells need to use, these components are actually a common virtual host user. Many articles that prevent ASP Trojans will refer to the FileSystemObject component, but after deleting this component, many ASP programs may not run, in fact, as long as they do the previous work, FileSystemObject components can operate, can only be their own directory The next document will not be threatened! Now, there is a threatful component is the two components of shell.application and wscript.shell. Shell.Application can do some operations, but also execute the program, but not with parameters, and WScript.Shell can operate Registry and execute the dos command. Method for preventing WScript.Shell components: You can change this component by modifying the registry. HKEY_CLASS_ROOT / WScript.Shell / and HKEY_CLASSES_ROOT / WScript.Shell.1 / Remove Name, such as: Change to wscript.shell_changename or wscript.shell.1_changename When you call it, you can call this component normally. The value of HKEY_CLASSES_ROOT / WScript.Shell / CLSID / WScript.Shell.1 / CLSID / project can also be deleted to prevent this type of Trojan.
Way to prevent shell.application components: You can change this component by modifying the registry. HKEY_CLASESS_ROOT / shell.Application / and hkey_classes_root / shell.application.1 / renamed other names, such as transforming to shell.application_changename or shell.application.1_changename When you call it, you can call this component normally. Also do the CLSID value also change the value of hkey_classes_root / shell.application / clsid / project's value hkey_classes_root / shell.Application / CLSID / project can also be deleted to prevent the harm of such Trojans. Attached reference paper "Building from Fso threat Hosting" Author: Tao Heung lay
Most of the virtual hosts are now disabled: FileSystemObject, because this component provides powerful file system access capabilities for ASP, read, write, copy, delete, rename, etc. Operation (of course, this means to do it under Windows NT / 2000 using the default setting). But after prohibiting this component, the consequences caused by all ASPs that use this component will not be able to run, and cannot meet the needs of customers. How to allow both FileSystemObject components, do not affect the security of the server (ie: Different virtual host users can not use the component to read and write the files)? Here is a method that I have obtained in the experiment, which is described below with Windows 2000 Server as an example. Open the resource manager on the server, right-click the drive letter of each hard disk partition or volume, select "Properties" in the pop-up menu, select the Security tab, you can see which accounts can be accessed to access this partition Volumes and access rights. After the default installation, "Everyone" has full control. Add "Administrators", "Backup Operators", "Power Users", "Users", etc., and give "full control" or corresponding permissions, pay attention, do not give "Guests" group, "IUSR_ machine name" these accounts any permissions. Then, "Everyone" group is then deleted from the list, so that only authorized groups and users can access this hard disk partition, and when the ASP is executed, it is access to the hard disk as "IUSR_ machine name", this is not given here User account permissions, ASP can also read and write files on the hard disk. The following is to set a separate user account to each virtual host user, and then assign each account to a directory that allows its fully controlled. As shown in the figure below, open "Computer Management" → "Local User and Group" → "User", click the right mouse button in the right column, select "New User" in the pop-up menu: "New User" dialog box According to the actual needs, "User Name", "Full Name", "Description", "Password", "Confirm Password", and to change the "user next login, change the password", select "Users cannot Change password "and" password never expire ". This example is a built-in account "IUSR_VHOST1" that establishes an anonymous access Internet information service for the user of the first virtual host, ie: all clients use http: //xxx.xxx.xxxx/ to access this virtual host, Identity to access. Enter the completion of the "creation".
You can create multiple users according to actual needs. After the creation is complete, "Close": Now the newly established user has appeared in the account list, double-click the account in the list to further set: "IUSR_VHOST1" in the pop-up: That is, the new account that just created) Properties dialog box: Subordinate "tab: Just created account defaults belongs to the" User "group, select the group, click" Delete ": The present is as shown below, this Point "Add": Find "Guests" in the "Select Group" dialog box pop-up, click "Add", this group will appear in the following text box, then click "OK": The appearance is as follows The content shown, click "OK" to close this dialog: Open "Internet Information Service", start setting the virtual host, in this case, to explain the "first virtual host" setting as an example, right-click the host Name, select "Properties" in the pop-up menu: Pop up a "first virtual host property" dialog box, can see the "F: / Vhost1" folder from the dialog box: F: / vhost1 "folder: Temporarily, no matter what the "First Virtual Host Properties" dialog, switch to "F: / Vhost1" folder, right click, select the "Properties" → "Security" tab, at this time It can be seen that the default security setting of the folder is "Everyone" full control (depending on the content displayed by different situations), first "allowing the inheritance of the inheritance from the parent to the object" to the object ". Remove the log: At this time, "Security" warning as shown below is pop, click "Delete": All groups and users in the Security tab will be emptied (if not clear, please use "Delete" Clear), then click the "Add" button. Add "administrator" as shown in the figure, add the new account "IUSR_VHOST1" created in the previous, will give full control permissions, but also add other groups or users according to actual needs, but must not put "guests" group , "IUSR_ machine name" these anonymous access to the account added! Switch to the previously opened "First Virtual Host Properties" dialog, open "Directory Security" tab, "Edit" on the anonymous access and verification control: The "Verification Method" other box (below the figure below) Show), click "Edit": "Anonymous User Account", the default is "IUSR_ Machine Name", click "Browse": Find the new account "IUSR_VHOST1" created in the "Select User" dialog box, double click At this time, the anonymous username is changed. When entering the previous creation in the password box, the password set for the account: OK, then the password: OK, complete it, click OK to close these dialogs. After this setting, the "first virtual host" user uses the ASP's FileSystemObject component to access its own directory: F: / vhost1, when trying to access other content, there will be, such as "no permissions", "The hard disk is not ready", "500 server internal error" and other errors prompts. Another: If the user needs to read the partition capacity of the hard disk and the serial number of the hard disk, the setting will not be read.
If you want to read these and the entire partition related content, right click on the partition (volume) of the hard disk, select "Properties" → "Security", add this user's account to the list, and give at least "read "Permissions. Since the subdirectory under this volume has been set to "Prohibit the transfer of the inheritance rights from the parent to this object", the permission settings of the subdirectory below are not affected. Appendix: Reference article: "Construction from the FSO threat virtual host" http://fox.he100.com/showart.asp?art_id=106&cat_id=1iis faqhtp: //fox.he100.com/showart.asp? Art_ID = 121 & cat_id = 1 How to prevent ASP Trojans from running http://fox.he100.com/showart.asp?art_id=120&cat_id=1windows2000 virtual host basic permission settings incomplete version http://www.icylife.net/blog/show .php? id = 40
Postmarks nonsense: First finishing articles, halo, seem to be chaotic, will take a look --_-! By Blackfoxqq: 68588492/17/2005 10:16:31 PM