Module 8, Lab A: Securing Telnet Transmissions

Exercise 1: Configuring the Telnet Server to Accept Clear-text Authentication

Tasks Detailed Steps

Important:
These steps must be performed on the computer that has been designated as the Telnet server.
  1. Configure the Telnet server to accept only clear-text authentication.
    Stop and start the service to accept the new settings.
  1. Log on to your domain as Administrator with a password of password.
  1. Click Start, point to Programs, point to Administrative Tools, and then click Telnet Server Administration.
  1. In the Telnet Server Administration window, type 3 to Display / change registry settings, and then press ENTER.
  1. In the Telnet Server Administration window, type 7 to select the NTLM option, and then press ENTER.
  1. In the Telnet Server Administration window, type y and then press ENTER.
  1. In the Telnet Server Administration window, type 0 to disable NTLM authentication, and then press ENTER.
Note: The acceptable values for NTLM authentication are: 0 (disable NTLM authentication), 1 (attempt NTLM authentication, then use clear text if NTLM fails), or 2 (accept only NTLM authentication). The default setting for the Windows 2000 Terminal server is to accept only NTLM authentication.
  1. (continued)
  1. In the Telnet Server Administration window, type y to disable NTLM, and then press ENTER.
  1. In the Telnet Server Administration window, type 0 to exit the Options menu, and then press ENTER.
  1. In the Telnet Server Administration window, type 5 to stop the Telnet Server service, and then press ENTER.
  1. In the Telnet Server Administration window, type 4 to start the Telnet Server service, and then press ENTER.
  1. In the Telnet Server Administration window, type 0 to quit Telnet Server Administration, and then press ENTER.
  1. Close all open windows.

Exercise 2: Installing the SMS Network Monitor

Tasks Detailed Steps

Important:
These steps must be performed on both computers.
  1. Install the SMS Network Monitor from the share on \\london\netmon.
  1. Click Start, and then click Run.
  1. In the Run box, type \\london\netmon\setup and then click OK.
  1. In the Microsoft SMS Network Monitor 2.0 Service Pack 1 Installation welcome page, click Next.
  1. Review the license agreement, and then close license agreement.
  1. Click I accept the license agreement, and then click Next.
  1. In the Ready to Install! page, click Next.
  1. In the Installation Completed! page, click Finish.
  1. Determine the physical (or MAC) address of your network card by using ipconfig.
  1. Open a command prompt.
  1. At the command prompt, type ipconfig /all and then press ENTER.
Enter the physical address of your local area connection below.

Answer

The physical address of your local area connection is listed as the Physical Address in the IPCONFIG output screen.

  1. (continued)
  1. Close the command prompt.
  1. Configure Network Monitor to use the physical address of your network adapter as the default network from which to capture.
  1. Click Start, point to Programs, point to Administrative Tools, point to Network Analysis Tools, and then click Network Monitor.
  1. In the Network Monitor - Select Default Network message box, click OK to select the default network.
  1. In the Select a network dialog box, expand Local Computer, click the network card with your physical address, and then click OK.

Exercise 3: Analyzing a Telnet Session Using Clear-text Authentication

Tasks Detailed Steps

Important:
The following step must be performed on both computers.
  1. Start the Network Monitor capturing packets.
  1. From the Capture menu, click Start.
Important: Run the following procedure only from the computer identified as the Telnet client in the table at the beginning of the lab.
  1. Start a Telnet session to the Telnet server by logging on as Administrator with a password of password.
  1. Click Start, and then click Run.
  1. In the Run box, type telnet telnetserver (where telnetserver is the name of the Telnet server computer), and then click OK.
  1. At the login prompt, type administrator and then press ENTER.
  1. At the password prompt, type password and then press ENTER.
The Telnet session will start and you will see the c:\> prompt.
  1. Display the contents of the file c:\moc\win2150a\labfiles\
    rfc527.txt, and then exit the Telnet session.
  1. At the c:\> prompt, type cd \moc\win2150a\labfiles and then press ENTER.
  1. At the c:\> prompt, type the command type rfc527.txt and then press ENTER.
The contents of the file will appear across the screen.
  1. At the c:\> prompt, type Exit and then press ENTER.

Important:
Perform the following procedure at both computers.
  1. Stop and view the Network Monitor capture.
  1. If necessary, switch to the Microsoft Network Monitor window
  1. From the Capture menu, click Stop and View.
Tasks Detailed Steps
  1. Filter the capture to show only Telnet packets destined to or originating from your computer.
  1. On the Display menu, click Filter.
  1. In the Display Filter dialog box, click Protocol == Any, and then click Edit Expression.
  1. In the Expression dialog box, click Disable All.
  1. In the Disabled Protocols list, select Telnet, and then click Enable.
  1. In the Expression dialog box, click OK.
  1. In the Display Filter dialog box, select ANY < -- > ANY, and then click Edit Expression.
  1. In the Expression dialog box, click LOCAL in the Station 1 list, and then click OK.
  1. In the Display Filter dialog box, click OK.
  1. Examine the hexadecimal display of the first captured packet.
  1. Double-click the first frame in the packet capture.
This will display three panes in the Network Monitor. The top frame shows each packet, the second pane shows the highlighted packet's details. The bottom frame shows the actual hexadecimal traffic that is contained in the packet and will be the primary focus of the analysis.
  1. Select the first record of the capture in the top pane.
  1. Examine the contents of the hexadecimal pane.
What process produced the text that appears in the hexadecimal pane?

Answer

The Telnet server sending the logon screen to the Telnet client produced this text.

  1. Select the fourth packet of the capture in the top pane.
  1. Select the fourth record of the capture in the top pane.
  1. Examine the contents of the hexadecimal pane.
What is the last character displayed in the alphanumeric portion of the hexadecimal pane?

Answer

The letter a.

  1. Move down two packets in the top pane.
  1. Select the capture packet two below your current location.
  1. Look at the hexadecimal pane.
Tasks Detailed Steps
What is the last character displayed in the alphanumeric portion of the hexadecimal pane?

Answer

The letter d.

  1. Continue to move down two packets at a time and note the last character in the hexadecimal pane.
  1. Move the focus in the top pane to the packet two below the current packet.
  1. Note the last character displayed in the hexadecimal pane.
  1. Repeat the process until you recognize the word that you are spelling.
What word is spelled across these packets?

Answer

Administrator. The logon name is passed in clear text during a Telnet session.

  1. Look for the packet where the prompt password: was sent to the Telnet client. Inspect the packets from this point on to determine the password that was used to authenticate with the Telnet server.
  1. Select the packet where the last r in administrator is displayed.
  1. Move down three packets.
You should see password: in the hexadecimal pane.
  1. Move down packet by packet and inspect the hexadecimal pane.
What password is included in the capture?

Answer

Password. As with the logon name, it appears one character per packet.

What risk exists in running a Telnet session by using default authentication?

Answer

Authentication is sent in clear text. This includes both the user account and password.

  1. Navigate to the packet that displayed the text "Welcome to Microsoft Telnet Server".
  1. Move to the packet where Welcome to Microsoft Telnet Server appears in the hexadecimal pane.
  1. Answer the following questions based on the remaining packets in the capture.
Tasks Detailed Steps
Can you see the command to change the current directory to c:\moc\win2150a\labfiles?

Answer

Yes, the type command is displayed one character per packet, just like the account and password information.

Can you see the text of the rfc527.txt document?

Answer

Yes.

  1. Save the Telnet session as Cleartext and close the capture.
  1. In Microsoft Network Monitor, on the File menu, click Save As.
  1. In the File name box, type Cleartext
  1. Click Save.
  1. On the File menu, click Close.
  1. Minimize Microsoft Network Monitor.

Exercise 4: Configuring the Telnet Server to Accept Only NTLM Authentication

Tasks Detailed Steps

Important:
Perform this exercise only at the computer that has been designated as the Telnet server.
  1. Configure the Telnet server to accept only clear-text authentication by setting the NTLM parameter to a value of 0 in the Telnet Server Administration utility.
    Stop and start the service to accept the new settings.
  1. On the Start menu, click Programs, click Administrative Tools, and then click Telnet Server Administration.
  1. In the Telnet Server Administration window, type 3 to display or change registry settings, and then press ENTER.
  1. In the Telnet Server Administration window, type 7 to select the NTLM option, and then press ENTER.
  1. In the Telnet Server Administration window, type y and then press ENTER.
  1. In the Telnet Server Administration window, type 2 to enable NTLM authentication, and then press ENTER.
  1. In the Telnet Server Administration window, type y to verify that NTLM authentication is enabled, and then press ENTER.
  1. In the Telnet Server Administration window, type 0 to exit the Options menu, and then press ENTER.
  1. In the Telnet Server Administration window, type 5 to stop the Telnet Server service, and then press ENTER.
  1. In the Telnet Server Administration window, type 4 to start the Telnet Server service, and then press ENTER.
  1. In the Telnet Server Administration window, type 0 to quit Telnet Server Administration, and then press ENTER.
  1. Close all open windows.

Exercise 5: Analyzing a Telnet Session Using NTLM Authentication

Tasks Detailed Steps

Important:
Perform the following procedure on both computers.
  1. Start Network Monitor.
  1. Restore the Microsoft Network Monitor window.
  1. On the Capture menu, click Start.
Important: Run the following procedure only from the computer identified as the Telnet client in the table at the beginning of the lab.
  1. Run a Telnet session to the Telnet server.
  1. On the Start menu, click Run, type telnet telnetserver (where telnetserver is the name of the Telnet server computer), and then click OK.
Why were you not prompted for credentials?

Answer

NTLM authentication is based on current logon credentials.

  1. Display the contents of the file c:\moc\win2150a\labfiles\
    rfc527.txt and then exit the Telnet session.
  1. At the c:\> prompt, type cd \moc\win2150a\labfiles and then press ENTER.
  1. At the c:\> prompt, type the command type rfc527.txt
The contents of the file appear across the screen.
  1. At the c:\> prompt, type Exit and then press ENTER.

Important:
Perform the following procedure at both computers.
  1. Stop and view the Network Monitor capture.
  1. Restore Microsoft Network Monitor.
  1. On the Capture menu, click Stop and View.
Tasks Detailed Steps
  1. Filter the capture to show only Telnet packets destined to or originating from your computer.
  1. On the Display menu, click Filter.
  1. In the Display Filter dialog box, select Protocol == Any, and then click Edit Expression.
  1. In the Expression dialog box, click Disable All.
  1. In the Disabled Protocols list, select TELNET, and then click Enable.
  1. Ensure that only TELNET appears in the Enabled Protocols list, and then click OK.
  1. In the Display Filter dialog box, select ANY < -- > ANY, and then click Edit Expression.
  1. In the Expression dialog box, in the Station 1 list, click LOCAL, and then click OK.
  1. Click OK to close the Display Filter dialog box.
  1. Double-click the fifth frame in the packet capture.
  1. Double-click the fifth frame in the packet capture.
  1. Look at the hexadecimal pane.
What protocol is the Telnet server requesting for authentication?

Answer

NTLMSSP.

  1. Move down two frames in the packet capture.
  1. Move down two frames in the top pane.
  1. Look at the hexadecimal pane.
What credentials were provided in the hexadecimal pane?

Answer

Domain\Administrator (where domain is the NetBIOS name of your domain) and TelnetClientComputer (where TelnetClientComputer is the name of the computer on which the Telnet client runs).

Can you read the password information? Why or why not?

Answer

No. The password information is encrypted within this frame.

  1. Navigate down to the packet that displays the text "Welcome to Microsoft Telnet Server".
  1. Move down to the packet where Welcome to Microsoft Telnet Server appears in the hexadecimal pane.
  1. Answer the following questions based on the remaining packets in the capture.
Tasks Detailed Steps
Can you see the command to change the current folder to c:\moc\win2150a\labfiles? Why or why not?

Answer

Yes. Output from the type command is transmitted in clear text during the Telnet session.

Can you see the contents of rfc527.txt?

Answer

Yes. The text of the document is displayed in a single Telnet packet. If the document were larger, it would be spread across multiple Telnet packets.

What risk remains when running a Telnet session by using NTLM authentication?

Answer

NTLM authentication does not display any password information during the establishment of the Telnet session. Data is still transported in clear text and can be read by using Network Monitor.

  1. Save the Telnet session as Ntlm, and then close the capture.
  1. On the File menu, click Save As..
  1. In the File name box, Ttype Ntlm in the File name box.
  1. Click Save.
  1. On the File menu, click Close.
  1. Minimize Microsoft Network Monitor.

Exercise 6: Configuring the Telnet Server to Use IPSec for Telnet Sessions

Tasks Detailed Steps

Important:
The following exercise must be performed only on the Telnet server computer.
  1. Create an MMC console that contains the IP Security Policy Management snap-in focused on the local computer. Save the console as IPSec Manager.
  1. Click Start, and then click Run.
  1. Type mmc and then click OK.
  1. On the Console menu, click Add/Remove Snap-in.
  1. In the Add/Remove Snap-in dialog box, click Add.
  1. In the Add Standalone Snap-in dialog box, click IP Security Policy Management, and then click Add.
  1. In the Select Computer dialog box, select Local Computer, and then click Finish.
  1. In the Add Standalone Snap-in box, click Close.
  1. In the Add/Remove Snap-in box, click OK.
  1. On the Console menu, click Save As.
  1. In the Save As dialog box, in the File Name box, type IPSec Manager and then click Save.
  1. Open the Properties dialog box for the Secure Server policy.
  1. In the console tree, select IP Security Policies on Local Machine.
  1. In the details pane, right-click Secure Server (require Security), and then click Properties.
Tasks Detailed Steps
  1. Using the Security Rule wizard, add an IP security rule for Telnet sessions by using the following information:
  • Tunnel endpoint: This rule does not specify a tunnel.
  • Network type: All network connections
  • Authentication Method: Certificate authority= EnterpriseCA
Configure a Telnet IP filter named Telnet with the following settings:
  • Source Address: Telnet client IP
  • Destination Address: My IP address
  • IP Protocol Type: TCP
  • IP Protocol Port: To port 23
Set the Telnet IP filter action to require security.
  1. In the Secure Server (Require Security) dialog box, click Add.
The Security Rule wizard appears.
  1. On the Security Rule Wizard page, click Next.
  1. On the Tunnel Endpoint page, make sure This rule does not specify a tunnel is selected, and then click Next.
  1. On the Network Type page, make sure All network connections is selected, and then click Next.
  1. On the Authentication Method page, click Use a certificate from this Certificate Authority (CA), and then click Browse.
  1. Click Issued to to sort by CA name.
  1. On the Select Certificate page, in the Issued to column, select EnterpriseCA, and then click OK.
  1. On the Authentication Method page, click Next.
  1. On the IP Filter List page, click Add.
  1. In the IP Filter List dialog box, in the Name box, type Telnet, and then click Add.
The IP Filter wizard appears.
  1. On the IP Filter Wizard page, click Next.
  1. On the IP Traffic Source page, in the Source Address list, click Any IP Address, and then click Next.
  1. On the IP Traffic Destination page, in the Destination address list, select My IP Address, and then click Next.
  1. On the IP Protocol Type page, in the Select a protocol type list, click TCP, and then click Next.
  1. On the IP Protocol Port page, click To this port, type 23 and then click Next.
  1. On the IP Filter Wizard page, click Finish.
  1. In the IP Filter List dialog box, click Close.
  1. On the IP Filter List page, in the IP filter lists column, click the newly created Telnet filter, and then click Next.
  1. On the Filter Action page, click Require Security, and then click Next.
  1. Click Finish to close the Security Rule wizard.
  1. In the Secure Server (Require Security) Properties dialog box, click Close.
  1. Enable the Secure Server IPSec Policy.
  1. In the details pane, right-click Secure Server, and then click Assign.
  1. Close IPSec Manager.
The partner who completed this exercise must skip to exercise 8, but must not start exercise 8 until the other partner has completed exercise 7.

Exercise 7: Configuring the Telnet Client to Use IPSec for Telnet Sessions

Tasks Detailed Steps

Important:
The following exercise must be performed on only the Telnet client computer.
  1. Create an MMC console that contains the IP Security Policy Management snap-in focused on the local computer. Save the MMC console as IPSec Manager.
  1. Click Start, and then click Run.
  1. In the Run box, type mmc and then click OK.
  1. On the Console menu, click Add/Remove Snap-in.
  1. In the Add/Remove Snap-in dialog box, click Add.
  1. In the Add Standalone Snap-in dialog box, click IP Security Policy Management, and click Add.
  1. In the Select Computer dialog box, ensure that Local Computer is selected, and then click Finish.
  1. In the Add Standalone Snap-in dialog box, click Close.
  1. In the Add/Remove Snap-in dialog box, click OK.
  1. On the Console menu, click Save As.
  1. In the Save As dialog box, in the File Name box, type IPSec Manager and then click Save.
  1. Open the Properties dialog box for the Client policy.
  1. In the console tree, select IP Security Policies on Local Machine.
  1. In the details pane, right-click Client (Respond Only), and then click Properties.
Tasks Detailed Steps
  1. Modify the existing IPSec Security rule to first use certificate authentication. Use EnterpriseCA as the certificate authority.
  1. In the Client (Respond Only) Properties dialog box, click Edit.
  1. In the Edit Rule Properties dialog box, click the Authentication Methods tab.
  1. In the Edit Rule Properties dialog box, click Add.
  1. In the New Authentication Method Properties dialog box, click Use a certificate from this certificate authority (CA), and then click Browse.
  1. In the Select Certificate dialog box, click the Issued to column header to sort by CA name.
  1. In the Select Certificate dialog box, select EnterpriseCA, and then click OK.
  1. In the New Authentication Method Properties dialog box, click OK.
  1. In the Edit Rule Properties dialog box, in the Authentication Method preference order list, click Certificate Authority, and then click Move up.
  1. In the Edit Rules Properties dialog box, click OK.
  1. In the Client (Respond Only) Properties dialog box, click Close.
  1. Enable the Secure Server IPSec Policy.
  1. In the details pane, right-click Client (Respond Only), and then click Assign.
  1. Close IPSec Manager.

Exercise 8: Analyzing an IPSec Encrypted Telnet Session

Tasks Detailed Steps
Important: The following steps must be performed on both computers. Ensure that both the Telnet server (exercise 6) and Telnet client (exercise 7) are configured to use IPSec.
  1. Start the Network Monitor capturing packets.
  1. Restore the Microsoft Network Monitor window.
  1. On the Capture menu, click Start.
Important: The following steps must be run from the computer identified as the Telnet client in the table at the beginning of the lab.
  1. Start a Telnet session to the Telnet server.
  1. Click Start, and then click Run
  1. Type telnet telnetserver (where telnetserver is the name of the Telnet server computer), and then click OK.
  1. Display the contents of the file c:\moc\win2150a\labfiles\
    rfc527.txt, and then exit the Telnet session.
  1. At the c:\> prompt, type cd \moc\win2150a\labfiles and then press ENTER.
  1. At the c:\> prompt, type the command type rfc527.txt
  1. At the c:\> prompt, type Exit and then press ENTER.

Important:
Perform the following steps at both computers.
  1. Stop and view the Network Monitor capture.
  1. Switch to the Microsoft Network Monitor window (if necessary).
  1. On the Capture menu, click Stop and View.
  1. Filter the capture to show only Telnet packets that either originate from or are destined to the local computer.
  1. In Microsoft Network Monitor, on the Display menu, click Filter.
  1. In the Display Filter dialog box, select Protocol == Any, and then click Edit Expression.
  1. In the Expression dialog box, click Disable All.
  1. In the Disabled Protocols list, select Telnet, and then click Enable.
  1. In the Expression dialog box, click OK.
  1. In the Display Filter dialog box, select ANY < -- > ANY, and then click Edit Expression.
  1. In the Expression dialog box, in the Station 1 list, click LOCAL, and then click OK.
  1. In the Display Filter dialog box, click OK.
Tasks Detailed Steps
Are there any Telnet packets in your capture? Why or why not?

Answer

No. IPSec encrypts the Telnet packets when they are transmitted across the network.

  1. (continued)
  1. Click OK to close the Microsoft Network Monitor message box.
What protocols must be included in a filter to view only IPSec-related traffic?

Answer

ISAKMP (Internet Security Association and Key Management Protocol), AH (Authentication Header), and ESP (Encapsulating Security Payload).

  1. Configure the display filter to display only ISAKMP, AH, and ESP packets.
  1. On the Display menu, click Filter.
  1. In the Display Filter dialog box, select Protocol == TELNET, and then click Edit Expression.
  1. In the Expression dialog box, click Disable All.
  1. In the Disabled Protocols list, click AH, click ESP, click ISAKMP, and then click Enable.
AH, ESP, and ISAKMP appear in the Enabled Protocols list.
  1. In the Expression box, click OK.
  1. In the Display Filter box, click OK
  1. Examine the summary pane.
In what order do the ISAKMP and ESP packets appear in the summary pane? How are ISAKMP and ESP packets used in an IPSec-protected data transmission?

Answer

ESP packets follow ISAKMP packets. The ISAKMP packets negotiated the security to be used for the IPSec transmission; the ESP packets are the actual encrypted data packets.

  1. Examine an ISAKMP packet to determine specific protocol information.
  1. In the summary pane, click an ISAKMP packet.
  1. In the detail pane, expand UDP.
Tasks Detailed Steps
What UDP port is used for ISAKMP negotiations?

Answer

UDP port 500.

  1. Examine an ISAKMP packet in the details pane to determine how IPSec encrypts the data for transmission.
  1. In the details pane of Network Monitor, expand ISAKMP.
  1. In the details pane of Network Monitor, expand ISAKMP: Flags summary=1.
What options are negotiated by the ISAKMP negotiation?

Answer

The Payloads are Encrypted flag is the only flag set to be on. This signifies that IPSec is using ESP. AHs are not enabled for this data transmission.

  1. Examine the ESP packets in the capture.
  1. In the summary pane, click an ESP packet.
  1. Examine the hexadecimal pane.
Can you recognize any data in the hexadecimal pane? Why?

Answer

No, the data is encrypted and cannot be read.

What risk is there in running a Telnet session protected with IPSec encryption?

Answer

None. The data is encrypted and cannot be captured and read by using a network monitor.

  1. Save the Telnet session as IPSec and then close the capture.
  1. On the File menu, click Save As.
  1. In the File name box, type IPSec
  1. Click Save.
  1. On the File menu, click Close.
  1. Close Microsoft Network Monitor.

Exercise 9: Disabling All IPSec Policies

Tasks Detailed Steps
  1. Open IPSec Manager.
  1. Open IPSec Manager from the Administrative Tools menu.
Important: The following steps must be run from the computer identified as the Telnet server in the table at the beginning of the lab.
  1. Disable the Secure Server IPSec Policy.
  1. In the console tree, click IP Security Policies on Local Machine.
  1. Right-click Secure Server (Require Security), and then click Un-assign.
  1. Close IPSec Manager.
  1. Restart the IPSec Policy Agent to reset IPSec policies for the computer.
  1. Open Services from the Administrative Tools menu.
  1. In the details pane, right-click IPSEC Policy Agent, and then click Restart.
The Service Control dialog box shows the progress of restarting the IPSec Policy Agent.
  1. Close Services.
Important: The following steps must be run from the computer identified as the Telnet client in the table at the beginning of the lab.
  1. Disable the Client (Respond Only) IPSec policy.
  1. In the console tree, click IP Security Policies on Local Machine.
  1. In the details pane, right-click Client (Respond Only), and then click Un-assign.
  1. Close IPSec Manager, and if prompted, click No to not save settings.
.
  1. Restart the IPSec Policy Agent to reset IPSec policies for the computer.
  1. Open Services from the Administrative Tools menu.
  1. In the details pane, right-click IPSEC Policy Agent, and then click Restart.
The Service Control dialog box shows the progress of restarting the IPSec Policy Agent.
  1. Close Services.

Important:
Perform the following step on both computers.
  1. Close all open windows and log off the computer.
  1. Close all open windows and log off the computer.

 

©2000 Microsoft Corporation. All rights reserved. Legal Notices.
Last Updated: June 20, 2000