![]() |
|
|
About Me Articles Find Me! Humour Links Photographs Random Stuff Tips 'n' Tricks Videos Weblogs Welcome!
|
This article was originally researched and written by DieselDragon, and was published in the Winter 2008CE issue of 2600 Magazine (Vol 25, nr 4).
It has been over a year since I wrote my last article ("Free Files from Flash", 24:3) and I have been hoping to write another two or three in the meantime, but sadly I've always been kept busy by other annoying diversions and hardly ever get the chance to sit in front of a computer nowadays, let alone write articles. However, today's a typical British summer day (Freezing cold with six inches of rain!) and I thought it may be well to try my hand in making another contribution to such a great magazine!
Following a long running period of playing around with the various security tools and features in Windows, I thought that I'd share some of my findings made over this time. Hopefully, this might help those of us "locked in" to using the Windows family in protecting our machines a little bit better than they are normally. :-)
0x01. Who this guide is for:
This article has been written so that it can be used easily by those without much computer know-how (Such as the less computer-savvy friends of regular readers) and as a result a lot of the wording may appear very simple and newbie-friendly to more experienced readers...So please accept my apologies in advance if this article appears a little too simple or long-winded for your liking! :-)
0x02. Security in Windows - A brief intro: In short, this means that any user on a Windows 98/ME machine can install programs and make changes to the operating system without needing administrative privileges, whereas users on Windows 2000/XP/Vista computers - Who don't have the administrator privilege - Cannot generally make any changes except from creating and changing files inside their own document folders. In addition, the same security measures also mean that User A cannot read or change User B's files unless User A has administrative privileges, or User B has specifically allowed User A access to those files.
0x03. A hypothetical case-study: When they set up their computer, the Doe family simply plugged it in and turned it on, gave no thought to computer and user management, and created user accounts for everyone using the Windows default settings - Unwittingly giving all five users full administrative privileges, and allowing anyone logged in to the machine to install programs and change any aspect of the operating system. At this stage, everyone has become extremely annoyed with the computer. Over time it has gradually slowed down and become increasingly unreliable. Their anti-virus programmes (Of which they have several) continually warn of viruses and trojans that keep appearing over and over, and nothing they try seems to get rid of them. They can't seem to figure out how all of these viruses/trojans keep making their way through the firewall and installing themselves onto the computer. In addition, unusual transactions from foreign countries have recently started appearing on Jane's business account with an ever increasing frequency.
0x04. Spotting the security flaws:
Likewise, giving ANY regularly used account administrative rights is an unwise practice for a computer in a home or general office environment as it would allow any potentially malicious code (Say, ActiveX controls in a web page) full reign of the system and all of the data held upon it...And it takes only a momentary lapse in security - Or a single webpage - For malicious code to arrive and execute on the computer in question. Although this practice would not defeat all forms of malware, it should make it much harder for a malicious application to gain full control of the system and access every file on the machine. In general practice, this means that malware arriving and successfully installing itself under a child's user account can only access and manipulate data in the childs' document folders, and should only be able to monitor whatever that child is doing - As opposed to monitoring every keystroke and mouse click of every user of the machine. Remember that when an application is run, it is run under the same privileges and restrictions as the user who started it...And therefore, an application running under a restricted user account should not be able to make changes to the operating system, or access any other users files.
0x05. A clean, more secure installation: After the usual succession of reboots, progress bars, language/network related prompts, setting a very strong password for the "Administrator" account, and on-screen messages of how "superior" Windows XP is, he comes to the Windows XP first-run screen (Or "Out of Box Experience", as Microsoft call it) and proceeds to work through the screens for setting up his computer. Upon arriving at the page where the user enters names for accounts that will use the machine, Bob tells him to stop entering account names as there is a problem with this page: All accounts created here will be given administrative rights by default, and it's very difficult (If not downright impossible) to change them to limited accounts later on. Instead, Bob advises creating a single account called "SuperUser" that can be used to create general user accounts, and for system administration at a later date. After even more waiting around whilst Windows gets it's first-run act together, John is finally logged in as "SuperUser" and gets a default Windows desktop. Before doing anything else, Bob shows him how to turn on the Windows firewall (My Computer > Network Connections > Right-click the Internet connection > Select "Properties" > Click the "Advanced" tab > Check the box and click "Apply") and set it up with the "Don't allow exceptions" rule. John then reconnects his Ethernet cable, activates Windows over the Internet, and updates his machine using Windows Update. Now his machine has been fully updated with the latest security patches, and the most up-to-date settings for default users have been applied. After updating Windows with the latest security patches and making a "Clean start" system restore point (Start > Programs > Accessories > System Tools > System Restore) he proceeds to the "User Accounts" control panel to create logons for himself, his wife, and kids. Before doing anything else though, he sets a suitably strong password for the "SuperUser" account so that only authorised users (Himself and Bob in this case) can perform system-wide changes and application installations. After this, he creates new accounts for everyone and ensures that everyone - Himself included - Has a "Restricted" account that will not be able to change anything that would affect the system. Additionally, he turns off the "Fast user switching" feature (User account control panel > Change how users log on and off) to reduce the chance of a malicious application running under a restricted user account managing to "jump" over to the SuperUser account if both are logged in at the same time. Finally - After reinstalling Windows, activating the Windows firewall, creating restricted accounts for all users, performing fresh installs of security software and firewalls, and restoring backed-up user data - He tests his restricted account by logging on and trying to install an application...Finding to his satisfaction that the install program quits with an "Access denied - User has no administrative privileges" error.
0x06. Dealing with troublesome applications: However, there is one problem: David - Having recently found a strong addiction to World of Warcraft (WoW) - Is requesting that his user account be made into an Administrator's account. The reason that he's asking for this is because WoW is frequently updated with new patches and software updates, and although David can run the game fine under a restricted account, the game needs to be run under "SuperUser" every time it is updated (It normally runs under David's account, and thus only has read permissions for the WoW program folder)...And John's busy schedule often means that he can't always be there to update the game as soon as a new patch is applied. Noting that the majority of malware and virus alerts on the system are traced to files stored in David's account, John is rightly against the idea of giving Davids account administrative rights. He consults Bob for advice on how to work around the problem without placing the system at risk of attack from malware or other nasties. Now Bob knows that every file and folder on an NTFS drive has an Access Control List (Or ACL) attached to it, and it is this list that controls which users can access, create, or change that file. Noting that David is the only family member who uses WoW, he logs in as "SuperUser", opens the command prompt (Start > Run > Type "command.com" and hit [Enter]), changes to the "Program Files" folder (Type "CD \Progra~1" [Enter] - The "Progra~1" is a DOS short-path, and should be valid on WinXP and Vista PCs), and checks the ACL for the World of Warcraft folder by typing "cacls Worldo~1" [Enter]. This shows a list of which users have access to the WoW folder; All users can read it, but only administrators can change the data in there. Typing "cacls /?" will display a brief guide to using the command.
The next step is best done only by experienced computer users: Bob decides to give David full access rights to the World of Warcraft folder, and uses the command "cacls Worldo~1 /T /E /C /G David:F". After verifying the output (Which gave David full read/write/modify/execute rights to the WoW program folder and every file and folder below it), Bob logs out of "SuperUser" and asks David to log in, try running WoW, and to see if the changes to the ACL were successful. David tries some functions that would result in data being changed on the HDD (Performing a WoW update, taking in-game screenshots, and setting up character macros are three such tests that can be performed) and finds that - Unlike before - The in-game screenshots and character macros have been saved to the WoW program folders successfully. Another approach to solving this problem - Useful if WoW (Or whatever application) is accessed by multiple users - Is to create a new restricted user account specifically for that program, give the account read/write or full access to the relevant folder using CACLS, and changing the application shortcuts to make sure that the program is run under the application-specific account (Right-click the shortcut > Select "Properties" > Click the "Advanced" button under the "Shortcut" tab > Select "Run As" or "Run with different credentials") insted of the current user's account. An additional benefit to this approach - Assuming that the "Protect my files, folders and settings" option is checked - Is that anything running under that account (Say, malware that piggy-backs off of a legitimate application) will be denied access to user files or folders by Windows - Although this technique would inhibit legitimate read/write operations to user files if it was applied to a program that uses them, such as Microsoft Word. Following Bobs simple modification to the WoW folder ACL, David has been able to play and update World of Warcraft himself, without needing John or Bob to log in under the "SuperUser" account...Which has saved David a lot of inconvenience and waiting around, and John no longer has to deal with continual requests and SMS messages asking him to come home and update WoW as soon as he can! :-)
0x07. Windows security and best-practice summary:
I hope that this (Rather long-winded) tutorial has helped you all learn a little about how the security setup works on Windows NT-based platforms, and some best practices for ensuring that your Windows boxes are set up to inhibit (Or at least reduce the damage done from) unwanted system-wide changes and malware installations. :-) If you need assistance with doing anything mentioned in this article, there are many free support forums out there for Windows users (Do a Google search) where you should be able to get help much quicker and more easily than I could ever manage! :-) Shouts to:
+++ DieselDragon +++ |
This website and it's contents are copyright ©2009CE Colin Blanchard except where otherwise stated. Permission to copy material from this website is granted for all private, educational and non-commercial purposes, provided that credit for the material and a URL back to this site are also given. This page was generated on 22/11/2009CE at 22:11 server time, has been loaded 157 times, and has clocked up 149 unique hits. This site has served 22655 pages, and has received 18166 unique visitors to date. Download this page! |