Windows Server: Cut off the default shared channel seven strokes

  
                  In the Windows server system, whenever the server is successfully booted, the system's C drive, D drive, etc. will be automatically set to hidden share, although these default shares can make server management and maintenance more convenient; but while enjoying convenience These default shares are often used by some illegal attackers, which can easily pose a security threat to the server. If you don't want the server to be vulnerable to illegal attacks, you must cut off the server's default shared "channel" in time. Below, this article recommends the following tips for everyone, so that you can easily disable the server's default share. Functional Configuration Method
This method uses the msconfig command in Windows XP or Windows 2003 to cut off the server's default shared "channel" purpose. When using this method, you can follow the steps below: Click the "Start" /"Run" command, in the system operation settings box that appears, enter the string command "msconfig", click the "OK" button, Open a settings window titled System Configuration Utility; click on the "Services" tab in the window, and in the option settings page shown in Figure 1 that opens, find the "Server" item and check Is there a tick in front of the project? If there is any, it must be canceled. Finally, click the “OK” button. When the server system is restarted later, the C disk and D disk of the server will not be automatically set to Shared by default. Tip: Although the Windows 2000 server system does not have the system configuration utility function, considering that the kernel of the system is close to the Windows 2003 system kernel, you can copy the msconfig.exe file and the msconfig.chm file directly on the Windows 2003 system. In the Windows 2000 system directory, you can also directly start the system configuration utility function in the running dialog of the system. If you encounter an error prompt window popping up during the startup of this function, you can ignore it and click the "Cancel" button to see the system configuration utility settings window. "Forced" stop method
The so-called "forced" stop method, in fact, is to use the computer management function of the Windows server to "force" the sharing command to the shared default folder, so that it can share the status Cancel, while ensuring that these folders cannot be automatically set to share next time. When "Forcibly" stops the sharing state of the default shared folder, you can follow the steps below: Click the "Start" /"Run" command, in the open system run settings box, enter the string command "compmgmt" .msc", after clicking the "OK" button, open the "Computer Management" interface of the Windows server system; in the list area on the left side of the interface, use the mouse to expand "System Tools", "Shared Folder", " Share the folder, in the sub-window to the right of the corresponding "Share" folder, you will find that all the shared file folders in the server system are automatically displayed, and the share name is followed by the "$" symbol. The shared folder is the default shared folder automatically generated by the server; to cancel the shared state of these shared folders, you can select them one by one with the mouse, and then right click on them, in the shortcut menu that opens later. , select the "Stop Sharing" option, then a dialog box like the one shown in Figure 2 will open on the screen, asking you to confirm that it is Do you really want to stop the shared share you have selected? At this point, you click the "Yes" button again, and the shared flags of all selected default shared folders will automatically disappear, indicating that their share status has been "forced" to stop. After that, even if the server system is restarted, the C drive and D drive of the server will not be automatically set to the default share. Deleting the method one by one
The so-called "one by one deletion method" is actually using the "net share" command built into the Windows server to delete the default shared folders that are already in the shared state one by one (of course here Delete, just means to delete the shared state of the default shared folder, instead of deleting the contents of the default folder), but this method has a fatal flaw, that is, the "do it once and for all" deletion effect can not be achieved, as long as the server system is restarted, The default shared folder is automatically generated again. When using this method to delete the shared state of the default shared folder, you can refer to the following steps: First, in the system's start menu, execute the "Run" command, open the system operation settings box, enter the string command in the dialog box. After "cmd", click the "OK" button, so the Windows server system will automatically switch to the DOS command line working state; then in the DOS command line, enter the string command "net share c$ /del", click After the Enter key, the shared state of the C disk partition in the server is automatically deleted; if there are still D disk partitions and E disk partitions in the server, you can execute the string command "net share d$" in the same way. /del", "net share e$ /del" to delete their shared state; In addition, for the default shared folder such as IP$, Admin$, you can also execute the string command "net share ipc$ /del" , "net share admin$ /del", to cancel their hidden sharing state, so that illegal attackers can not freely attack through these hidden sharing "channels" A Windows server. "Automatic" deletion method
If the server contains more hidden shared folders, it will be very troublesome to delete them one by one by using the "net share" command. In fact, we can create a batch file ourselves to let the server delete the sharing status of all default shared folders at once. When creating a batch file, just open a text editing tool like Notepad and enter the following source code command in the edit window: @echo off net share C$ /del net share D$ /del net share ipc$ /del net share admin$ /del ...... After completing the above code input operation, click the “File”/“Save” menu command in the text editing window, and enter the file name in the file save dialog box that pops up. Delshare.bat", and set the specific save path, click the "Save" button, you can complete the batch file creation work to automatically delete the default shared folder. When you need to delete the shared state of these default shared folders in the future, just double-click the "delshare.bat" batch file, and all the default shared "channels" in the server system will be automatically cut off.

Copyright © Windows knowledge All Rights Reserved