How to deactivate a system hide share

Source: Internet
Author: User
Tags resource

In order to facilitate the management system, Windows 2000/xp/2003 and other systems after the successful startup, often will automatically enable the hidden shares of some special resources, such as C $, d$, ipc$, admin$, and so on, these hidden shared resources do not require user-created, users in the "My Computer" Windows cannot directly view their shared state. If a user knows the IP address of the local system and the system administrator account, he or she can remotely access the special shared resources in the local system through the "IP address sharing" approach, while having full control over these special resources; however, when a hidden shared resource is secretly exploited by an illegal user, The security of your local system can be a major threat. In order to keep the local system away from security attacks, we can use a variety of methods to help you automatically deactivate some hidden shared resources after each successful login to the system.

Task Planning Act

We know that the Windows system comes with a Task Scheduler feature that enables us to develop a task schedule that automatically deletes hidden shares when the system starts successfully, thereby automatically disabling hidden shares after the system startup succeeds. Before making this plan, we need to create a batch file that deactivates the shared resources on the local system, and then let the task plan to execute the target batch file at the moment when the system started successfully, so that the purpose of automatic deactivation can be achieved.

When you create a batch file that disables hidden shared resources, you can first open a text editor like WordPad and enter the following command-line code in the text editing interface:

@echo off
net share c$Content$nbsp;/delete
net share d$Content$nbsp;/delete
net share admin$Content$nbsp;/delete
net share ipc$Content$nbsp;/delete
……

Where net share is the management command for shared resources, C $, d$, ipc$, admin$, and so on are the targets that need to be deactivated. Hidden shared resources, the "/delete" parameter is used to remove the specified hidden shared resource, and then click the File/Save command after confirming that the above code is correct To store the contents as a batch file, assuming that we name the batch file "Delshare.bat" here;

In order for the local computer system to automatically execute the "Delshare.bat" file at the start of the success, we can create a new execution plan through the "Scheduled Tasks" feature, in which case we can open the Start menu in the Local system and select "Programs", "attachments," from the first. , System Tools, scheduled Tasks options, in the Task Scheduler List window that appears, double-click the Add Task Scheduler option icon, a Task Plan Creation wizard dialog box appears on the System screen, click Next in the dialog box, and then click the Browse button in the following interface. Select and import a previously generated "delshare.bat" file;

After that, enter the Setup dialog as shown in Figure 1, select the Log on option, and set the name of the scheduled task, by default, the window system takes the name of the target batch file as the name of the scheduled task, and then correctly enters the account information for the login local computer system and clicks "Finish". button to save the setup action above, so that the task plan for automatically deactivating the system for hidden shares was created successfully.

In the future, whenever we successfully log into the local computer system, Windows automatically executes the target batch file "Delshare.bat" to deactivate the specified hidden shared resource on the local computer, so that an illegal attacker cannot illegally attack the local system by hiding shares.

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.