Open main menu

CDOT Wiki β

Changes

SEC520/labs/Lab 3

34,558 bytes added, 14:55, 31 January 2018
Created page with "<h1> <span class="mw-headline">Scanning, Enumeration & Vulnerability Testing</span></h1> <a name="Introduction" id="Introduction"></a><h2> <span class="mw-headline">Introd..."
<h1> <span class="mw-headline">Scanning, Enumeration &amp; Vulnerability Testing</span></h1>
<a name="Introduction" id="Introduction"></a><h2> <span class="mw-headline">Introduction</span></h2>
This lab focuses on identifying and exploiteng a server's vulnerabilities in order to gain access to that system. Information assembled in the reconnaissance phase provides the data used in the <b>scanning &amp; enumeration</b> phases.
<br><br>
Students will obtain information from reconnaissance of their vulnerable VMs (IP_ADDRESS) and use <i>scanning &amp; enumeration</i> to better map and then exploit their vulnerable <i>Linux</i> and <i>Windows</i> servers. They will do this in the following manner:
<br><br>

<dl><dd><ol><li>Students will first use the <b>nmap</b> utility to scan a
server to determine that the server is active (running). Verifying
active servers can reduce the amount of scanning time to help avoid
detection.
</li></ol>
</dd></dl>
<dl><dd><ol><li value="2">The <b>nmap</b> utility will then be used to list various <b>services</b> (ports) that are running on a server.
</li></ol></dd></dl>
<dl><dd><ol><li value="3">The student will perform enumeration (via <b>banner-grabbing</b>) to identify running services, and will perform <b>fingerprinting</b> to determine the version and type of the operating system on that targetted server.
</li></ol></dd></dl>
<dl><dd><ol><li value="4">Once students have completed the <i>scanning</i> &amp; <i>enumeration</i> phase, they will use that information to perform <i>vulnerability testing</i> (using <b>Nessus</b> and <b>Metasploit</b>) to gain access to that targeted server.
</li></ol></dd></dl>
<dl><dd><ol><li value="5">
Finally, once students sign a waiver form and receive authorization to perform penetration testing on Seneca's Tank server, they can apply what they have learned in this lab on the <b>Tank</b> server. Students will also receive accounts to access this server for penetration testing...
</li></ol></dd></dl>
<dl><dd><ol><li value="6">Once students have completed the <i>scanning</i> &amp; <i>enumeration</i> phase, they will use that information to perform <i>vulnerability testing</i> (using <b>Nessus</b> and <b>Metasploit</b>) to gain access to that targeted server.
<br><br>
</li>
</ol></dd></dl>
<br>
<a name="Objectives" id="Objectives"></a><h2> <span class="mw-headline">Objectives</span></h2>
<ol>
<li>Use the <b>nmap</b> utility to verify that a targeted server is active (running).</li>
<li>Learn various options of the nmap utility to perform <b>half-open scans</b>, <b>UDP scans</b>, and list <b>running ports</b>.</li>
<li>Use the <b>nmap</b> utility to generate reports.</li>
<li>Use the <b>nmap</b> and <b>netcat</b> utilities to verify the type
and version of the operating system (<b>finger-printing</b>), and verify the
version running services (<b>banner grabbing</b>).</li>
<li>Use the <b>nessus</b> and <b>Metasploit</b> frameworks to flag, exploit, and gain access to a vulnerable computer system.</li>
<li>Practice scanning and enumeration on the <b>Tank</b> server at Seneca College (assuming permissions forms submitted, and permission granted by your instructor / ACS).</li>
</ol>
<p><br>
</p>
<a name="Required_Materials_.28Bring_to_All_Labs.29" id="Required_Materials_.28Bring_to_All_Labs.29"></a><h2> <span class="mw-headline">Required Materials (Bring to All Labs)</span></h2>
<ul>
<li> <b>SATA Hard Disk</b> (in removable disk tray).
</li><li> <b>Lab Logbook (Lab3 Reference Sheet)</b> (to make notes and observations).
</li></ul>
<p><br>
</p>
<a name="Prerequisites" id="Prerequisites"></a><h2> <span class="mw-headline">Prerequisites</span></h2>
<ul><li> <a href="https://scs.senecac.on.ca/%7Efac/sec520/labs/SEC520_Lab_2.html">SEC520 Lab 2</a>
</li></ul>
<p><br>
</p>
<a name="Linux_Command_Online_Reference" id="Linux_Command_Online_Reference"></a><h2> <span class="mw-headline">Online Tools and References</span></h2>
<table cellpadding="12">
<tbody><tr valign="top">
<td><b>Scanning &amp; Enumeration</b></td>
<td><b>Vulnerability Testing</b></td>
<td><b>Other</b></td>

</tr>
<tr valign="top">
<td>
<ul>
<li><a href="http://linuxmanpages.com/man1/nmap.1.php" target="_new">nmap</a></li>
<li><a href="http://www.howtoforge.com/useful-uses-of-netcat" target="_new">netcat</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="http://www.symantec.com/connect/articles/introduction-nessus" target="_new">nessus</a></li>
<li><a href="http://www.ehacking.net/2011/10/metasploit-tutorials-from-beginner-to.html" target="_new">Metasploit Framework</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="http://linuxmanpages.com/" target="_new">Online Linux Manpages</a></li>
</ul>
</td>
</tr>
</tbody></table>
<p><br>
</p>
<a name="Resources_on_the_web" id="Resources_on_the_web"></a><h2> <span class="mw-headline">Course Notes / Resources</span></h2>
<ul>
<li><a href="http://cs.senecac.on.ca/%7Efac/sec520/slides/sec520_w2_l1.odp" target="_new">odp</a> | <a href="http://cs.senecac.on.ca/%7Efac/sec520/slides/sec520_w2_l1.pdf" target="_new">pdf</a> | <a href="http://cs.senecac.on.ca/%7Efac/sec520/slides/sec520_w2_l1.ppt" target="_new">ppt </a>(Slides: Scanning &amp; Enumeration)</li>
<li><a href="http://cs.senecac.on.ca/%7Efac/sec520/slides/sec520_w2_l2.odp" target="_new">odp</a> | <a href="http://cs.senecac.on.ca/%7Efac/sec520/slides/sec520_w2_l2.pdf" target="_new">pdf</a> | <a href="http://cs.senecac.on.ca/%7Efac/sec520/slides/sec520_w2_l2.ppt" target="_new">ppt </a>(Slides: Vulnerability Testing)</li>
<li><a href="http://www.youtube.com/watch?v=_Ch0RJlHFBo" target="_new"> Scanning 1</a> | <a href="http://www.youtube.com/watch?v=WKLNAAt57Wg" target="_new">Scanning 2</a> | <a href="http://www.youtube.com/watch?v=_Ch0RJlHFBo" target="_new">Enumeration</a> |<a href="https://www.youtube.com/watch?v=FMgAIfcPsyw" target="_new">Vulnerability Testing - Overview</a> (YouTube Videos)</li>
<li><a href="http://www.youtube.com/watch?v=BDTLdCllfr4" target="_blank">Installing Nessus in Kali Linux</a> (YouTube Video)</li>
<li><a href="http://www.youtube.com/watch?v=QjuyasD1aBE" target="_blank">Using Nessus in Kali Linux</a> (YouTube Video)</li>
<li><a href="http://www.youtube.com/watch?v=WlZuq6Vj5AI" target="_blank">Using Metasploit Pro in Kali Linux</a> (YouTube Video)</li>
<li><a href="http://www.youtube.com/watch?v=xErWWX2jllU" target="_blank">Use Armitage to Exploit Multiple Machines in Kali Linux</a> (YouTube Video)</li>
<li><a href="http://libcat.senecac.on.ca/vwebv/holdingsInfo?searchId=89542&amp;recCount=50&amp;recPointer=0&amp;bibId=315433" target="_new">Penetration Tester's Open Source Toolkit (E-book)</a> (Chapter 3)</li>
</ul>

<p><br>
</p>
<a name="Performing_Lab_2" id="Performing_Lab_2"></a><h1> <span class="mw-headline">Performing Lab 3</span></h1>
<a name="Task1" id="Investigation_1:_How_to_Perform_a_Fedora_DVD_Install_on_Your_Removable_Hard_Drive"></a><h2> <span class="mw-headline">Task #1: Verifying Server is Active</span></h2>
<br>
After the <i>reconnaissance</i> phase, it is important to verify that
the target IP Address(es) are active (running). A great amount of time
can be saved during the scanning and enumeration process by simply
confirming that your target exists. Wasting time while scanning invalid
targets can also increase the chance of detection from a server's IDS (Instrusion Detection System).<br /><br />
In investigations 1 - 3, you will be learning to perform manual scans of targeted servers using the nmap utility. It is useful to learn how to use nmap, since other penetration testing software such as Nessus and Metasploit (discussed in later investigations) use the nmap utility.
<br><br>
<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/Caution.png" height="35" border="0" width="35"></a></div>
<div><b>CAUTION!</b><br>To date, any reconnaissance activity is considered to be “safe” for the penetration tester. <b>The tester will “cross the line” when they start to <u>scan ports</u>, or use utilities that <u>scan ports</u> to identify vulnerabilities on a server (enumeration)</b>. If the tester does NOT have written permission to scan a server's ports, they may be subject to <b>legal action or account suspension from their ISP!</b><br><br><b>There are safe-guards that are available for performing scanning and enumeration at Seneca College:</b><ul><li>The <b>IFS lab</b> is designed for user to switch from the Internet to an internal network to practice authorized scanning &amp; enumeration.</li><li>Students have created <b>Virtual Machines</b> (<i>Linux</i> and <i>Windows 2003 server</i>) in <i>lab1</i> to practice scanning &amp; enumeration.</li><li>Seneca's <b>Tank</b>
server available for SEC520 students to practice scanning &amp;
enumeration at college or at home (on the basis of the student properly
completing a signed permission form from ACS).</li></ul></div>
</div>
<br>
INSTRUCTIONS:
<ol>
<li>Boot-up your <i>Kali Linux (host)</i>.</li>
<li>Prior to booting up your vulnerable Linux and Windows VMs, follow the steps in the message box below to changes the network settings for <u>each</u> VM.</li>
</ol>


<ol>
<li value="3">After making the network settings changes (above for each VM), boot your vulnerable Linux and Windows VMs.</li>
<li>Determine the IP Addresses for your Linux VM (<b>/sbin/ifconfig</b> for LINUX_IP_ADDRESS) and your Windows 2003 Server VM (<b>ipconfig</b> for WINDOWS_IP_ADDRESS). Write this information in your lab log-book.</li>
<li>Take several minutes to review <b>class notes</b>, <b>YouTube vidoes</b>, and the <b>online man pages</b> to learn how to use the <b>nmap</b> utility before proceeding.</li>
<li>Switch to your Kali Linux (host) machine and open a shell terminal.</li>
<li>Issue the following command to verify that the virtual server is active:<br><br><b>nmap -v -sn LINUX_IP_ADDRESS</b><br><br></li>
<li>Is this server active?</li>
</ol>

<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/35px-Idea.png" height="35" border="0" width="35"></a></div>
<div><b>Paranoid of Making a Mistake with nmap?</b><br>
If you are worried about making a mistake when using nmap (eg. scanning a wrong network), you can <b>disconnect from the Seneca wireless or lan connection prior to scanning and enumeration</b>. In this way, you are disconnected from Seneca's computer network prior to experimenting with your own host machine and virtual machines. Remember to establish the wireless or lan connection after you have performed your scan...</li></ol>
</div>
</div>


<ol>
<li value="8">Try to verify that the Windows 2003 Server is active (running nmap with your WINDOWS_IP_ADDRESS).</li>
<li>Can you detect this server? Write the result in your lab log-book.</li>
<li>Try performing a <b>UDP scan</b> for <b>both the Linux and Windows VMs</b> by issuing the following commands:<br /><br /><b>nmap -v -sU LINUX_IP_ADDRESS</b><br /><b>nmap -v -sU WINDOWS_IP_ADRESS</b><br /><br />This may take some time. Try to time how long this UDP scan takes, and compare it with the TCP ping scan you previously performed. Why do you think it is useful to perform a UDP scan in addition to a TCP scan?<br /><br /></li>
<li> Record your findings in your lab log-book.</li>
<li>Proceed to Task #2<br><br></li>
</ol>
<p><b>Answer the Task #1 observations / questions in your lab log book.</b>
</p>
<br><br>
<a name="Task2" d="Investigation_2:_How_many_file_packages_and_files_are_installed_on_the_system.3F"></a><h2> <span class="mw-headline">Task #2: Various Scanning Techniques</span></h2>
<br>
Now that we have verified that our targeted IP Addresses are active, we
can perform a scan to determine which services are running on those
servers. We can also record this information in a report format
(which can be inserted into a later Security Audit Report).<br /><br />
<p>
INSTRUCTIONS:
</p><ol>
<li>Use the <b>nmap</b> command to perform a <b>stealthy scan</b> in order to list the ports for the Linux VM by issuing the following command:<br /><br /><b>nmap -sS LINUX_IP_ADDRESS</b><br /><br /></li>
<li>Record any running services (with associated port numbers) in your lab log-book.</li>
<li>Repeat step 2, but view course notes and add an <b>option</b> to record findings in report file(s) called <b>/root/linux_vm_scan</b></li>
<li>The reports are created in 3 different formats. List those formats, and give a reason how these can be incorporated into a Security Audit Report.</li>
<li>Repeat steps 2 and 3, generating similar reports for the Windows 2003 Server VM called <b>/root/windows_vm_scan</b>.</li>
<li>Use what you have learned in <i>task #2</i> to assemble a scanning report for your Linux and Windows VMs. These files must be available for your instructor to check when you have completed this lab.</li>
<li>Proceed to Task #3.<br><br></li>
</ol>

<p><b>Answer Task #2 observations / questions in your lab log book.</b>
</p><p><br>
</p>


<a name="Task3" d="Investigation_2:_How_many_file_packages_and_files_are_installed_on_the_system.3F"></a><h2> <span class="mw-headline">Task #3: Enumeration Techniques</span></h2>
<br>
<br>
The process of enumeration places more emphasis on scanning information of a server's <b>operating system</b> (<b>finger-printing</b>), and on software versions of a server's running services (<b>banner-grabbing</b>).
<br><br>

INSTRUCTIONS:
<ol>
<li>Issue the following command for the Linux VM:<br><br><b>nmap -O LINUX_IP_ADDRESS</b><br><br></li>
<li>Can you detect the type and version of the operating system? Record your findings in your log lab-book.</li>
<li>Perform the same scan, but for the Windows 2003 Server VM. Record your findings in your log lab-book.</li>
<li>Issue the following command to perform a <b>banner grab</b> for your vulnerable Linux VM:<br /><br /><b>nmap -sV LINUX_IP_ADDRESS</b><br /><br /></li>
<li>Take several minutes to review <b>class notes</b>, <b>YouTube vidoes</b>, and the <b>online man pages</b> to learn how to use the <b>netcat</b> utility before proceeding.</li>
<li>Use the <b>netcat</b> utility to verify the purpose of the running services on the Linux VM.</li>
<li>Record your findings in your lab log-book.</li>
<li>Repeat the 2 previous steps, but for the Windows 2003 Server.</li>
<li>Use what you have learned in task #2 to perform enumeration for
your Windows and Linux VMs. Incorporate this information into a file
called: <b>vm_security_audit_linux</b> and <b>vm_security_audit_windows</b> respectively.</li>
<li>Proceed to Task #4<br><br></li>
</ol>

<p><b>Answer Task #3 observations / questions in your lab log book.</b>
</p><p><br>
</p>


<a name="Task4" d="Investigation_2:_How_many_file_packages_and_files_are_installed_on_the_system.3F"></a><h2> <span class="mw-headline">Task #4: Identifying Server Vulnerabilities Using Nessus</span></h2>

This section will reap the benefits from the previous phases of penetration testing you have performed in the previous labs. You
will be using the information assembled in your previous labs to <b>gain access</b> into your vulnerable <b>Windows</b> VM (possibly Linux VM) by <u>exploiting weaknesses</u> of their running services. You will be using two common utilties (or <i>frameworks</i>) in order to achieve access: <b>Nessus</b> and <b>Metasploit</b>.
<br><br>

INSTRUCTIONS:
<ol>
<li>Make certain that your <b>Kali Linux system is running</b>, and that both of your <b>Windows and Linux VMs are running</b>.</li>
</ol>
<br>
<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/35px-Idea.png" height="35" border="0" width="35"></a></div>
<div><b>Exploiting Local Systems: Nessus Server-Client</b><br>This
application is a server-client model that is run on the running server
to determine its vulnerabilities. This application has the <b>nmap</b> utility built into the application, and allows for plugins to be added to enhance vulnerability testing. The Nessus server
(<b>daemon</b>) must run first to allow the penetration test to graphically interface with the application (<b>client</b>).</div>
</div>
<ol>
<br />
<li>First you should register a free account on the <b>Nessus Website</b> in order to download plugins (and run the nessus server). To register, go to the following URL, and select home use: <a href="http://www.nessus.org/register/" target="_new">http://www.nessus.org/register/</a>. Once you complete the registration form, an e-mail will be sent with a "one-time" ACTIVATION_CODE_# (you will need this in an up-coming step).<br /><br /></li>
<li>Next, in your host machine, open a shell terminal and issue the following command to install the <b>gdebi</b> application to allow you to automatically download and install debian packages by clicking on a .deb file link:<br /><b>sudo apt-get install gdebi</b><br /><br /></li>
</ol>

<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/35px-Idea.png" height="35" border="0" width="35"></a></div>
<div><b>Is There a Previous Version of Nessus?</b><br>
If there is already an older version of <b>nessus</b> that exists on your host, remove it by issuing the command: <br /><b>sudo apt-get remove nessus</b><br />

</div>
</div>
<br>
<ol>
<li value="3">Next go to the following website: <a href="http://www.tenable.com/products/nessus/nessus-download-agreement" target="_new">http://www.tenable.com/products/nessus/nessus-download-agreement</a><br /> (select to download a version for <b>Debian</b> for your appropriate OS: 32-bit or 64-bit).</li>
<li>A dialog box will appear to allow you to save the file. Note the directory where you have saved the deb file.</li><li>In the <b>Administration</b> menu, selec the <b>Gdebi Package Manager</b>. Click the <b>File</b> menu, and <b>open</b> and then select the downloaded deb file. Allow the program to install the Nessus package.</li>
<li>Allow the installation to complete (it may take a long time to download the newest plugins).<br /><br /></li>
<li>You need to create a username and password in order to access the Nessus server (from web-browser). Run the following command to create a username and password:<br /><b>sudo /opt/nessus/sbin/nessus-adduser</b><br /><br /></li>
<li>Prior to starting the Nessus server, you need to register this application. <b>Use the registration/activiation code (provided from e-mail you received from above procedure)</b> by issuing the command:<br /><b>sudo /opt/nessus/bin/nessus-fetch --register xxxx-xxxx-xxxx-xxxx</b><br /> (i.e. xxxx-xxxx-xxxx-xxxx represents activation-code contained in received e-mail message)</b><br /><br /></li>
<li>Issue the following command to start the Nessus server: <b>sudo service nessusd start</b><br /><br /></li>
<li>You can run the Nessus client application in order to connect to the Nessus server (recommended) by web-browser. Simply launch a web-browser and type the following URL: <b><a href="https://127.0.0.1:8834/" target="_new">https://127.0.0.1:8834/</a></b></li>
</ol>

<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/35px-Idea.png" height="35" border="0" width="35"></a></div>
<div><b>Problems connecting to Future Nessus Sessions</b><br>
If you have installed and setup Nessus, yet cannot connect to the Nessus client, check to see if the Nessus server is running, and if no, start the service. It is recommended to make this service persistent.
</div>
</div>
<br />
<ol>
<li value="11">When the application launches in the web-browser resource, you may have to indicate that you trust the connection, and to add an exception. It may take serveral minutes for the application to initialize. Login to your default user account (with the corresponding password).<br /><br /></li>
<li>Go to the <b>Policies</b> section, and create a new policy called <b>Basic</b> for a "Basic Scan". Select this policy for Windows, but you are NOT required to provide the Window's username and password.</li>
<li>Click the <b>Scan</b> section and add a new scan called <b>Windows 2003 Server</b> using the <b>Basic</b> policy, and adding the IP ADDRESS at the bottom target area. Click on the <b>Launch</b> button to begin the scan.</li>
<li>You will be able to view the status of the scan. When the scanning has been completed, view and note the vulnerabilities that are listed in the scanning report.</li>
<li>What vulnerabilities do you see? Which ones were the most severe? Record these observations in your lab log-book.</li>
<li>How do you think that you can use the above-mentioned information
that you have collected? Note your observations in your lab log-book.<br /><br /></li>
<li>Try creating other policies for the different types, and repeat scanning for the Windows target. What other vulnerabilities did you discover? Record your findings in your lab Log-book.</li>
<li>Repeat <b>steps 12 to 16</b>, but for your <b>Vulnerable Linux (Fedora) sever VM</b>. Make certain to use your <b>VULNERABLE_IP_ADDRESS (or range)</b> and name the report <b>Fedora 5 Linux</b>. Note your observations in your lab log-book.</li>
<li>Proceed to Task #5</li>
</ol>

<p><b>Answer Task #4 observations / questions in your lab log book.</b>
</p><p><br>
</p>


<a name="Task5" d="Investigation_2:_How_many_file_packages_and_files_are_installed_on_the_system.3F"></a><h2> <span class="mw-headline">Task #5: Accessing Vulnerable Servers Using Metasploit</span></h2>

<b>Metasploit</b> is a framework (collection of utilities) for penetration testing. This framework acts as
a server-client model that is run on an <b>internal network</b> (unlike <b>Nessus</b> which can be run from a remote server).
This framework is ideal when working on your host/VM setup for penetration testing. Depending on the targeted server's vulnerability, the penetration tester may be able to access that system.
<br /><br />
<br />
<ol>
<li>For <u>both</u> vulnerable machines, log-in as a regular-user.</li>
<li>To obtain the Proprietary version of Metasploit, you need to register first. Here is the link to Metasploit Pro website: <br><a href="https://www.rapid7.com/products/metasploit/metasploit-community-registration.jsp" target="_blank">https://www.rapid7.com/products/metasploit/metasploit-community-registration.jsp</a></li>
<li>You will presented with a form to fill-out your personal information, and then you are required to <b>create account</b>. Make certain to apply for the free (community edition). During that process, you will be required to fill out information (including e-mail) in order to get an activation code.</li>
<li>At some point, you will be redirected to another screen to download the file for Metaspoit Pro. Once downloaded, you need to add execution permissions for the downloaded file, and run the file from the shell.</li>
<li>After the file installs, you will be prompted to open a web interface (open it). Make certain to create a new user.</li>
<li>Once you check your e-mail to obtain the activation code, enter the product key (activation code) in the required field to obtain your account.</li>
<li>If all goes well, there will be an indication that the activation is successful.</li>
<li>Back in your e-mail message with the <b>activiation code</b>, there is a link to a <b>"Getting Started Guide (pdf)"</b>. Take a few minutes to read the pdf to get a sense of how to setup and use Metasploit to exploit your Window and Linux servers.</li>
<li>In your screen, click <b>New Project</b>. For this new project, give it a name of <b>Windows 2003 Sever</b>. Set the scan range for your Windows IP ADDRESS, then click to perform a scan, and then click on <b>Launch Scan</b>. The scanning process can take a few minutes to complete.</li>
</ol>
<br />
<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/35px-Idea.png" height="35" border="0" width="35"></a></div>
<div><b>Scanning is Required Prior to Exploitation</b><br>
<br /><br />Other than configuration there are generally three steps in using Metasploit:<ul><li><b>Scan the targeted server(s)</b> to detect vulnerabilities</li><li>If any vulnerabilities are discovered, <b>load the attack(s) to exploit the server</b>, thus hopefully gaining access to the targeted server</li><li><b>Collect evidence</b> to show employer or client proof of vulnerable server being penetrated</li></ul><br /><br />After proving server penetration, then steps can be taken to make it harder for the server to be penetrated (referred to as system "hardening").
</div>
</div>
<br />
<ol>
<li value="10">Refer to the <b>YouTube Video</b> on how to use both <b>Nessus</b> and <b>Metasploit</b> to penetrate the target server(s):<br /><br /><a href="http://www.youtube.com/watch?v=WlZuq6Vj5AI" target="_blank">Kali Linux - Security by Penetration Testing Tutorial: Metasploit Pro</a><br /><br /></li>
</ol>
<br />
<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/35px-Idea.png" height="35" border="0" width="35"></a></div>
<div><b>Upgrade to Pro Trial Version Required</b><br>
<br /><br />When you start an exploit or "brute force" attack, you will be shown a webpage that allows you to upgrade to the Pro version (trial version). Click on that link to download activation code to install and register the trial version, then continue with your exploit.
</div>
</div>
<br />
<ol>
<li value="10">Learn how to penetrate, and capture proof that you pentrated the Windows 2003 server. Make certain to record the procedures in your lab log-book.</li>
<li>Perform the same operations above, but for your vulnerable Linux server. Where you successful? If not, why do you think you were unsucessful? Perform a netsearch in Google to see if there are recommended approaches on how to penetrate the Fedora Core 5 system.</li>
<li>Do you think performing a <b>"Brute Force"</b> or <b>"Hail Mary"</b> attack is advised? If not, provide the reasons why an alternative should be used.<br /><br /></li>
</ol>

<br />
<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/35px-Idea.png" height="35" border="0" width="35"></a></div>
<div><b>Armitage is Open Source (free) GUI Alternative</b><br>
<br /><br />The company <b>rapid7</b> has taken over ownership of Metasploit, and the the full version of this application costs approximately $1800! On the positive side, there is an open source (free) GUI for Metasploit client called <b>armitage</b>. If armitage does not appear to be present on your Kali Linux system, it has been added to the default repository for install.<br /><br />You will be following instructions below to install and run armitage and compare the common scanning and exploit attacks to gain access.
</div>
</div>
<br />
<ol>
<li value="13">Open a shell terminal, and login as root.</li>
<li>Issue the command: <b>which armitage</b> to confirm that this application exists on this server. If there is no pathname to that application, issue the command: <b>apt-get install armitage</b> (make certain application has been installed).</li>
<li>While logged on as root, issue the command: <b>armitage</b></li>
<li>Refer to the following YouTube video to learn how to use armitage to scan and run exploitation attacks:<br /><br /><a href="https://www.youtube.com/watch?v=j7uLBzULOE0&feature=youtu.be" target="_blank">Use Armitage to Exploit Multiple Machines in Kali Linux</a><br /><br /></li>
<li>Note the differences between using armitage and the proprietory application Metasploit Pro in your lab log-book.</li>
</ol>
<br>
<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/35px-Important.png" height="35" border="0" width="35"></a></div>
<div><b>Additional Practice with Metasploit (Optional)</b><br>
If you were not able to access the Fedora Core 5 machine, you can always perform a Google search to find out techniques to help to access the machine. You ca
n also create another VM using a more vulnerable Linux Distribution (like Metasploitable: <a href="http://www.rapid7.com/resources/videos/test-metasploit-wit
h-metasploitable.jsp" target="_blank">Download Metasploitable OS</a><br /><br />Another thing to consider is to learn how to use the Metasploit command conso
le to learn how to load and launch singluar attacks (resource: <a href="http://www.offensive-security.com/metasploit-unleashed/Msfconsole_Commands" target="_
blank">MSF Console Commands</a>
</div>
</div>
<br>
<ol>
<li value="18">After you have received authorization (i.e. "green light" from your instructor) try penetration testing on your <b>Tank</b> server accounts, login to confirm IP_ADDRESS, and start to perform penetration testing in this server. <b>WORD TO THE WISE: Don't do anything relating to penetration testing with the Tank server without "thinking it through" first!</b> (i.e. you have been warned)...</li>
</ol>
<br />
<div class="messagebox" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: 35px; padding-left: 45px;">
<div style="float: left; margin-left: -40px;"><a href="https://scs.senecac.on.ca/wiki/index.php/File:Important.png" class="image" title="Important.png"><img alt="" src="SEC520_Lab_1_files/Idea.png" height="35" border="0" width="35"></a></div>
<div><b>Preparing for Lab #4</b><br>
Now that you have learned to pentrate a network server, you will learn now to protect (<i>harden</i>) the server. We will learn how to harden the Linux server first, and then learn how to harden the Windows 2003 server (in a later lab).
<br /><br />
You will be creating a new virtual machine called <b>"Hardened Linux"</b> with the most recent version of Fedora. The reason why we do this is that <b>Fedora 5 is no longer supported</b>, and we want to learn the proper way to harden a Linux system (which involves constant upgrading).
<br /><br />
In Virtualbox, you can install a downloaded Fedora image as a <b>virtual file</b>. You will learn how to perform this in lab4. In the meantime, you can download the most recent version of the Fedora install DVD image from (32-bit or 64-bit):<br />
<a href="http://mirrors.fedoraproject.org/publiclist/Fedora/17/" target="_new">https://getfedora.org/en/workstation/</a>
<br /><br />
</div>
</div>
<br />
<ol>
<li value="17">Proceed to "Completing The Lab".</li>
</ol>

<p><b>Answer Task #5 observations / questions in your lab log book.</b>
</p><p><br>
</p>



<a name="Completing_the_Lab" id="Completing_the_Lab"></a><h1> <span class="mw-headline"> Completing the Lab </span></h1>
<p><b>Arrange evidence for each of these items on your screen, then ask
your instructor to review them and sign off on the lab's completion:</b>
</p>
<ol>
<li>File contents of your Linux and Windows system <b>enumeration</b> (both Nessus and Metasploit).</li>
<li>Completed Lab 3 notes (indicating scanning and enumeration techniques).</li>
</ol>
<p><br>
</p>
<a name="Preparing_for_Quizzes" id="Preparing_for_Quizzes"></a><h1> <span class="mw-headline"> Preparing for Quizzes </span></h1>

<ol>
<li>Explain the difference between <b>scanning</b> and <b>enumeration</b>.</li>
<li>What is the purpose of a <b>half-open scan</b> when using the <b>nmap</b> utility?</li>
<li>What is the purpose of a <b>UDP scan</b> when using the <b>nmap</b> utility?</li>
<li>List 3 unique methods and permitted methods of performing penetration-testing at Seneca College?</li>
<li>Explain how to issue the <b>nmap</b> command in order to save the results of the scan in a file. What is it useful to save results into a file?</li>
<li>Define the term <b>banner-grabbing</b>. How does this term differ from <b>fingerprinting</b>?</li>
<li>List and explain two types of utilities (frameworks) that can be used to exploit (gain access) to targetted servers?</li>
<li>In your opinion, how can successfully exploiting a targetted server be useful?</li>
<li>Try to instinctively guess 3 steps to take in order to help the targeted sever from being exploited.</li>
</ol>