Windows Security
  Home arrow Windows Security arrow Page 7 - Windows Host Security: Network Security Ha...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SECURITY

Windows Host Security: Network Security Hacks
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 10
    2004-09-20

    Table of Contents:
  • Windows Host Security: Network Security Hacks
  • Run the Verbose Switch
  • Hack 22: Get a List of Open Files and Their Owning Processes
  • Hack 23: List Running Services and Open Ports
  • Hack 24: Enable Auditing
  • Hacks 25 and 26: Secure Your Event Logs, and Change Your Maximum Log Files Sizes
  • Hacks 27 and 28: Disable Default Shares, and Encrypt Your Temp Folder
  • Hacks 29 and 30: Clear the Paging File at Shutdown, and Restrict Applications Available to Users

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Windows Host Security: Network Security Hacks - Hacks 27 and 28: Disable Default Shares, and Encrypt Your Temp Folder


    (Page 7 of 8 )

    Hack 27: Disable Default Shares

    Stop sharing all your files with the world.

    By default, Windows enables sharing for each logical disk on your system (C$ for the C drive) in addition to another share called ADMIN$ for the %SystemRoot% directory (e.g., C:WINNT). Although this is accessible only to Administrators, it is wise to disable these shares (if at all possible) since they still present a potential security hole.

    To disable these shares, open the Registry by running regedit.exe and then find the HKey_Local_MachineSYSTEMCurrentControlSetServices lanmanserverparameterskey.

    If you’re using Windows 2000 workstation, add an AutoShareWks DWORD key with the value of 0 (as shown in Figure 2-5) by clicking Edit -> New -> DWORD Value. For Windows 2000 Server, add an AutoShareServer key with a value of 0. When you’re done editing the Registry, restart Windows for the change to take effect.

    Lockhart

    After Windows has finished loading, you can verify that the default shares no longer exist by running net share:

    C:\>net share
    Share name Resource Remark
    -----------------------------------------------------------
    IPC$ Remote IPC The command completed successfully.

    Before doing this, you should be sure that disabling these shares will not negatively affect your environment. Lack of these shares can cause some sys tem management software—such as HFNetChk [Hack #21] or System Manage ment Server—to not work. This is because software like this depends on remote access to the default administrative shares in order to access the con tents of the systems disks.

    Hack 28: Encrypt Your Temp Folder

    Keep prying eyes out of your temporary files.

    Many Windows applications will create intermediary files while they do their work. They typically store these files in a temporary folder within the current user’s settings directory. Most often these files are created world-readable and aren’t always cleaned up when the program exits. How would you like it if your word processor left a copy of the last document you were working on for anyone to come across and read? Not a pretty thought, is it?

    One way to guard against this situation is to encrypt your temporary files folder. To do this, open an Explorer window and go to the C:Documents and Settings Local Settings folder. In this folder you should see another folder called Temp. This is the folder that holds the temporary files. Right-click the folder and bring up its Properties dialog. Make sure the Gen eral tab is selected, and click the button labeled Advanced. This will bring up an Advanced Attributes dialog, as seen in Figure 2-6. Here you can choose to encrypt the folder.

    Lockhart

    Check the “Encrypt contents to secure data” box and click the OK button. When you have done that, click the Apply button in the Properties dialog. Another dialog (as seen in Figure 2-7) will open asking you whether you would like the encryption to apply recursively.

    Lockhart

    To apply the encryption recursively, choose the “Apply changes to this folder, subfolders and filesoption. This will automatically create a public-key pair if you have never encrypted any files before. Otherwise, Windows will use the public key that it generated for you previously. When decrypting, Windows ensures that the private keys are stored in nonpaged kernel memory, so that the decryption key will never be left in the paging file. Unfortunately, the encryption algorithm used, DESX, is barely an improvement on DES and is nowhere near as strong as 3DES. However, it serves the purpose of transpar ently encrypting temporary files very well. If you want to encrypt other files, it is suggested you use a third-party utility such as GnuPG (http://www.gnupg.org), which has Windows binaries available on its web site.

    Buy the book!If you've enjoyed what you've seen here, or to get more information, click on the "Buy the book!" graphic. Pick up a copy today!

    Visit the O'Reilly Network http://www.oreillynet.com for more online content.

    More Windows Security Articles
    More By O'Reilly Media


     

    WINDOWS SECURITY ARTICLES

    - Advanced Data Protection in Windows
    - Basic Data Protection in Windows
    - Windows XP Security
    - Lucky You, Microsoft has Sent You an Email! ...
    - Implementing a PKI, Part III: Managing Micro...
    - Windows 2000 Security
    - A Security Roadmap
    - Implementing a Public Key Infrastructure (PK...
    - Hardening Communications
    - Windows Host Security: Network Security Hacks
    - Hardening Wireless LAN Connections, Part 2
    - Hardening Wireless LAN Connections Part 1
    - Windows Reverse Engineering
    - Microsoft's Latest Security Updates -- The G...
    - Cross Site Scripting (XSS): An Overview





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway