In cyber war games or netwars the Red Team attackers try tohack into(or just kill) the computers of the Blue Team defenders while an automatedscorebot keeps track of who is winning. Sometimes the players also get to play a kind of capture the flag in (un)coordinated groups as they fight to keep or steal user accounts, secret files, listening ports, etc. These network wargames are great fun and good practice for real life, especially when the adrenaline starts pumping and the yelling starts — or especially when the beer starts pumping and the drinking starts, whichever comes first...
As the instructors of the Blue Team Courses at SANS for operating systems, Hal Pomeranz (UNIX/Linux) and myself (Windows) put together a one-page cheat sheet guide back in Oct'07 for new Blue Team players at conferences to help them survive the first ten minutes of gameplay without freaking out or immediately getting crushed. The text of the guide is below and you can get it in PDF format too, but remember that it's not intended to be a comprehensive incident handling guide, it's just for those new to hacking and thecapture the flag games, so have fun!
Before Start of Play:
- Who will be the team organizer? The team organizer documents the networks, system names, OS versions, IP addresses, open ports, passwords, and updates configuration changes for everyone to see (such as on a whiteboard); helps to prioritize tasks; ensures that no systems are forgotten; reminds players to periodically check for compromise; monitors the functioning of the fictional production application(s) and otherwise maintains the "big picture" and a calm head while others are absorbed in the details and chaos of gameplay.
- Exactly which port numbers must be available on which systems for the scorebot? Can't block these.
- How will the scorebot confirm that your other target applications are still running? Don't block the scorebot.
- Which target systems are running the most vulnerable operating systems and/or services (such as IIS, RPC, SMB, and/or older unpatched software versions with known exploits)? Important to prioritize.
- What special tools will be available? Process Explorer? WireShark? Tripwire? PowerShell? Best to ask.
- Does everyone on the team know how to view listening ports and established sessions? Does everyone know how to reset a password from the command line? Does everyone know how to kill a process? Does everyone know how to configure IPSec, the Windows Firewall and/or iptables for packet filtering?
- Who are you permitted to ask for help if necessary? What can or can't they do for you?
When Play Begins:
- Block all non-scorebot-required ports on all systems using IPSec/Windows Firewall/iptables.
- Assign a different 15+ character long passphrase to every administrative account on every system.
- Change all default application and service passwords to a different 15+ character passphrase.
- Remove all accounts from all administrative groups on each system except for one.
- Delete or disable all user accounts, including Guest, except for the one administrative account on each system.
- Establish a baseline by saving lists of your current processes, listening ports, services, device drivers, user accounts, and all files ("dir /s /b" or "ls ?lARt") to text files on each machine. If possible, generate a checksum database using a tool like Tripwire (or just md5sum). Use this information to detect compromise.
- Enable useful audit policies, clear all logs, and keep Event Viewer open (Windows) or "tail ?f" critical log files (Linux). When you look at a log, if you notice that the only new events are of no security consequence, clear that log to reduce clutter during the games (it's not real life).
- Continuously watch your list of established sessions, running processes, target applications and logs to try to detect malicious changes. Write scripts or use command history (up-arrow or F7) to help automate this work. Detect changes and respond: kill offensive processes, delete new user accounts, delete new binaries, etc.
- Finally, focus on your plan and don't panic!