Enhanced ClearPass Active Profiling
Enhanced ClearPass Active Profiling
Derin Mellor
Blue Sky Systems
[email protected]
Version DRAFT 0.3
13th July 2021
Contents
Objective...............................................................................................................................................1
Distributed or Large Networks..............................................................................................................2
Define Scanning Techniques SNMP, SSH & WMI...................................................................................3
Define Scanning Technique NMAP........................................................................................................4
Initiating Scans.......................................................................................................................................7
Results...................................................................................................................................................8
Identifying Common Fingerprints........................................................................................................12
Custom Fingerprint..........................................................................................................................14
Edit/Delete Existing Fingerprint.......................................................................................................16
New Classification............................................................................................................................20
Automate.............................................................................................................................................21
Objective
ClearPass has built-in tools that enable it to proactively scan devices on the network. This is not
dependent on any authentication.
ClearPass’ most mature profiling technique is DHCP Request profiling. This usually relies on relaying
the DHCP Request packet the ClearPass. All you need do is add a DHCP Relaying at the Access Router
to send these to ClearPass, either interface. ClearPass will process the packet – but never responds.
This is very effective for DHCP devices, but its not always possible to change the DHCP Relaying (eg
managed service environments) and most networks still have large numbers of devices with static IP
addresses.
The hierarchical scan identifies and profiles network access devices (NAS: switches, controllers,
routers, etc) and endpoints (servers, computers, IoT devices, etc) that they know about. This is a
recursive process that starts at “seed routers” and hops down interrogating devices with routing and
forwarding tables ultimately probing endpoints:
1) SNMP read information from its router, bridge, ARP, LLDP and CDP MIBs. This information is
used to discover:
a. Endpoints
b. Neighbouring NAS
2) Scan each Endpoint
3) Repeat this process for each neighbouring NAS.
This continues until the scan depth limit is reached. By default this scan depth is configured to 3
“hops”. Invariably this will discover both the MAC address and IP address – assuming the scan is
deep enough. Care needs be taken to prevent this scan going too far!
The subnet scan explicitly scans all the IP addresses within the defined subnet. This is particularly
useful to identify quiet devices. However, it should be used in conjunction with SNMP ARP scanning
of NAS (within the NAD definition) to resolve the IP to MAC address mapping.
SSH If port 22 is open use SSH to login and collect profiling information
WMI If port 135 is open use WMI to login and collect profiling information
SNMP If port 161 is open use SNMP to collect profiling information
NMAP This scans all TCP ports on open state* , this can be very process intensive
*Note: By default, if “Enable Endpoint Port Scans using Nmap” is disabled it will only scans TCP ports
135 & 3389 – these are typical of a Windows PC. This can be changed to scan a raft of common open
ports. If the “Enable Endpoint Port Scans using Nmap” is enabled it scans all 64K worth of ports and
is very process intensive.
NOTE: You can craft highly focused scans that can be associated with a ClearPass profile. Hence,
when a device connects ClearPass executes the device types profile scan… This document does not
discuss this.
WARNING: One weakness of NMAP scanning is that it only looks for open TCP ports. Open UDP ports
and closed ports generally are ignored. This is a shame.
NOTE: By the very nature of these scans ClearPass is only looking for open ports on the device, not
for communications from the device. Some switches can inform ClearPass of sessions (ie IP-protocol,
source IP & port, destination IP & port) via flow information. However, ClearPass only processes the
ingress sessions and I have concern over the scalability.
I find the SNMP the most useful scanning technique as it’s very accurate – particularly when using
V3. It’s surprising how many devices have public as a Read Only preconfigured.
Currently the SSH really is only useful for Linux environments. This is possibly useful to identify
devices that have default username/password (eg IoT).
This can be useful for a fresh install that has no authentication setup. Obviously, this is restricted to
Windows environments. This needs to be enabled in Cluster-Wide Parameters – see Define Scanning
Technique NMAP below.
Define Scanning Technique NMAP
NMAP on its own can be very inaccurate, it’s best to use this in conjunction with something else – eg
the MAC address’ OUI.
By default NMAP will only scan TCP 135 & 3389 ports. However, this can be changed:
Often scanning will learn devices purely with an IP address. Internally ClearPass will create a
phantom MAC address indicated starting with the ‘x’ character – ie. x01122334455.
WARNING: Occasionally, a device can be learnt via its MAC address (eg DHCP Request) and via its IP
address (eg scanning) but ClearPass does not always tie these together. The end result is you have
two entries in the Endpoints table.
Initiating Scans
Start Scan…
Neworks Scan=Hierarchical
Subnet Scan
On demand
or scheduled
For the first scan I leave this as On Demand and use a full NMAP scan.
Results
To monitor scanning, and abort scans, looking in the Network Scan Results:
To see the NADs learnt:
By selecting NAS you can quickly import as NADs – this is really convenient to populate the NADs for
a new site. It allows you to configure the RADIUS and TACACS details directly:
If you select a MAC address it will show you the Device Fingerprints tab:
This is fine when the device has been fingerprinted correctly.
Often, particularly with NMAP, the accuracy is questionable. There are not many built-in NMAP
Profiles. Devices that do not match a fingerprint rule are placed onto the Generic category:
Note: Device Family will automatically report the manufacturer’s name (based on the OUI) – if it is
available.
J(A,B) = |A ꓵ B|/|A ꓴ B|
The challenge with ClearPass is extracting the information. Alas the actual endpoint’s fingerprint is
not exposed in the RESTful API. Instead you have to use the PostGRESQL interface. With the
appropriate SQL you can extract all the endpoints and their associated fingerprint components into a
CSV file.
NMAP profiling alone is only reliable if it is very distinctive. For example, an Aruba Controller’s AOS8
open ports are usually: 17, 21, 22, 80, 443, 1723, 4343, 8080, 8081, 8082, 8088 (Mobility Controller
also has 9071), with common services ["17:tcpwrapped", "21:ftp - Aruba router ftpd", "80:http -
Apache httpd", "443:http - Apache httpd", "1723:pptp", "4343:http - Apache httpd", "8080:http -
nginx", "8081:http - nginx", "8082:http - Apache httpd", "8088:http - nginx]
0lder 6.x is missing 8082. The service details are significantly different.
IAP: 22, 80, 443, 4343, 8080 with services ["22:ssh - OpenSSH Version: 7.1", "80:http -
mini_httpd", "443:https", "4343:unicall", "8080:http-proxy - tinyproxy Version: 1.8.2"]
Phantom
MAC address
From here it is an easy exercise to see devices with common open ports, and more detailed services.
Problem with the services is they often change and may indicate version number, though they can
be really useful in identifying the device. A human validation of the device maybe required.
Irrespective, the CSV can have a status column added and then it can become a network audit and
re-imported back into ClearPass – see https://ase.arubanetworks.com/solutions/id/91
Custom Fingerprint
Often devices that are profiled with NMAP do not match a built-in filter. By looking at the open
ports/services it can sometimes be identified. For example here are the customer’s Aruba
Controllers:
10.101.200.200 is the VIP, though not sure what 192.168.100.210 is, but it is definitely Aruba.
The common open TCP ports are 17, 21, 22, 80, 443, 1723, 8080, 8081, 8088.
To add a new fingerprint: Search for the MAC address of the device, and update its fingerprint:
Trim the fingerprint rules down:
Once saved all matching devices will be inherit this fingerprint:
WARNING: You can add multiple fingerprint rules. But be careful, I believe if searches down these
rules and finds the first match. Hence, you need to order these most specific first. See below.
<valueList>1,121,33,3,6,12,15,26,28,42,51,54,58,59,119</valueList>
</RuleCondition>
<RuleCondition name="dhcp.option60" operator="contains">
<valueList>dhcpcd-6.11.5:Linux-4.19.102-v7+:armv7l:BCM2835</valueList>
</RuleCondition>
<RuleCondition name="dhcp.options" operator="contains">
<valueList>53,61,50,57,60,12,-111,55</valueList>
</RuleCondition>
<RuleCondition name="host.mac_vendor" operator="contains">
<valueList>Raspberry Pi Foundation</valueList>
</RuleCondition>
</FingerprintRule>
</FingerprintRules>
</DeviceFingerprint>
</DeviceFingerprints>
</TipsContents>
New Classification
Occasionally you need to define a new classification
Once the new classification has been added it can then be associated with an fingerprint.
Automate
Please refer to https://www.statology.org/jaccard-similarity-python/