Capturing Network Traces from the CLI on CUCM and other Cisco UC Appliances

Author
William Bell
Vice President, Solutions and Products

Let’s assume that we have an issue where one has setup LDAP synchronization and authentication on a Cisco Unified Communications Manager (CUCM) cluster but is having an issue with authenticating against LDAP over SSL.

For our example, the LDAP server in question is ad1.mycompany.priv (10.3.2.21).  The server is a Microsoft AD server and we are using the default TCP port allocation for LDAP over SSL (which is 636 for Microsoft).

We have decided that we would like to see a sniffer trace (sorry, protocol trace) of the conversation between the CUCM publisher and the LDAP server.

Step 1: Connect to the CUCM Host

Using an SSH client like putty/secureCRT/copSSH connect to the  CUCM publisher.

—————-

wjbell@tuffgong /
$ ssh admin@10.3.3.20
admin@10.3.3.20’s password:
Last login: Sat Mar 21 12:51:00 2009 from 192.168.1.4
Welcome to the Platform Command Line Interface

admin:

————–

Simple enough.

Step 2: Prepare a Capture Trace File

From the admin: prompt, you will use the capture network utility to setup a protocol trace.  You can do this live and watch it on the screen if you are simply trying to determine that a conversation is happening or you can capture the output to a file.  We are going to do the latter.

———-

admin: utils network capture file mycap count 100000 size all host all 10.3.2.21

Executing command with options:
size=all count=100000 interface=eth0
src= dest= port=
ip=10.3.2.21

———–

The trace continues until you press Ctrl-C.

Step 3: Download the Trace File

OK, so now you have a file somewhere on the system with the data that you would really like to view.  You have to download it to your machine.  You will need a running SFTP server on the target machine.  You can use openSSH on linux/unix, freeFTPd, copSSH, or something similar.

——-

admin:file get activelog platform/cli/mycap.cap

The size of the file and other information is sent to the output screen.  You are prompted for the host name: use DNS or IP address of SFTP server
You are prompted for the port: Defaults to 22 (SSH)
The CUCM checks its local keys and then asks for your user ID and password on the SFTP server.

Step 4: View Trace

After the file has been downloaded, you can view it in whatever protocol analyzer you prefer as long as it support the  tcpdump/libpcap format (.cap usual file extension).  A good tool is WireShark.

As previously noted you can look at packets live on the CUCM console screen. You can also specify port, source address, destination address, and protocol filters.  Enter the command “utils network capture ?” for a list of all options.

7 responses to “Capturing Network Traces from the CLI on CUCM and other Cisco UC Appliances

  1. It was very usefull. Before read it I used to use the remote port mirror feature. That CM feature is more easy to use. I used the freeFTPd as SFTP Server. Works Fine !

  2. Asif,

    I do not think that is possible but I would have to go double check that assertion. My lab is offline at the moment. I’ll have to look into that later. For now, I am assuming that this is not possible. When I have used RTMT to retrieve files it has always been application trace files (or things like app log or syslog).

    I guess I think that if you are going to be at the CLI to create the protocol trace/capture then you might as well stay there to download the file.

    HTH.

    -Bill
    (twitter: @ucguerrilla)

Leave a Reply

 

Nick Kelly

Cybersecurity Engineer, Cisco

Nick has over 20 years of experience in Security Operations and Security Sales. He is an avid student of cybersecurity and regularly engages with the Infosec community at events like BSides, RVASec, Derbycon and more. The son of an FBI forensics director, Nick holds a B.S. in Criminal Justice and is one of Cisco’s Fire Jumper Elite members. When he’s not working, he writes cyberpunk and punches aliens on his Playstation.

 

Virgilio “BONG” dela Cruz Jr.

CCDP, CCNA V, CCNP, Cisco IPS Express Security for AM/EE
Field Solutions Architect, Tech Data

Virgilio “Bong” has sixteen years of professional experience in IT industry from academe, technical and customer support, pre-sales, post sales, project management, training and enablement. He has worked in Cisco Technical Assistance Center (TAC) as a member of the WAN and LAN Switching team. Bong now works for Tech Data as the Field Solutions Architect with a focus on Cisco Security and holds a few Cisco certifications including Fire Jumper Elite.

 

John Cavanaugh

CCIE #1066, CCDE #20070002, CCAr
Chief Technology Officer, Practice Lead Security Services, NetCraftsmen

John is our CTO and the practice lead for a talented team of consultants focused on designing and delivering scalable and secure infrastructure solutions to customers across multiple industry verticals and technologies. Previously he has held several positions including Executive Director/Chief Architect for Global Network Services at JPMorgan Chase. In that capacity, he led a team managing network architecture and services.  Prior to his role at JPMorgan Chase, John was a Distinguished Engineer at Cisco working across a number of verticals including Higher Education, Finance, Retail, Government, and Health Care.

He is an expert in working with groups to identify business needs, and align technology strategies to enable business strategies, building in agility and scalability to allow for future changes. John is experienced in the architecture and design of highly available, secure, network infrastructure and data centers, and has worked on projects worldwide. He has worked in both the business and regulatory environments for the design and deployment of complex IT infrastructures.