Cisco Secure ACS 5.3 and GNS3


In a previous post I showed how I installed ACS in VBox. The reason I wanted it in VBox was so I could add it to GNS3 topology as a host. GNS uses first NIC in of a VM as a “management” NIC and adds a second NIC for linking within the topology.  ACS supports only single NIC (even the hardware appliance that comes with 4 NICs, has 3 of them disabled). “Runtime”  is the process that listens to and processes TACACS and RADIUS requests. It gets “bound” to the IP addresses configured during the initial setup. When ACS is added to GNS and second NIC installed and configured, the "runtime" still listens only on the first NICs IP address. Configuring the second NIC, disabling the first one and restarting ACS application results in "runtime" not starting at all.

To get around that, I needed to do the following at the ACS’s console once ACS was added to GNS as a VBox host:

1.         Configure second NIC with the same IP address as the first one

# configure terminal
# interface gigabitEthernet 1
# ip address 10.0.0.5 255.255.255.0 (or whatever address you used)
don't restart the services
#exit
#copy running-config startup-config

2.       Restart the VM and login to ACS

# configure terminal
# interface gigabitEthernet 0
# shutdown
don't restart the services
# end

3.       Restart ACS app (not the VM just the application)

# acs stop
# acs start

It takes a few minutes to stop and restart

4.       Confirm all ACS processes are started

# show application status acs

5.       Confirm ACS is listening on runtime ports (TCP 49 for TACACS)

# show ports

When you do “show interfaces”, ACS displays real interface names (eth0 and eth1) however to configure them you need to use “gigabitEthernet”.  

You could also try editing the startup-config file by booting to a Live Linux CD and editing the file using VI or some other text editor. The config file is stored in /_storedconfig partition. 

Monitoring Cisco Secure ACS 5 for authentication failures


Monitoring and alerting on failed authentication attempts is a crucial part of a security strategy. Failed authentication events may be a result of someone trying to guess or brute force passwords.   ACS is used for controlling access to network devices such as switches, routers, firewalls as well as authenticating VPN connections and wireless access. Authentication failures from ACS could alert us of an attacker trying to establish remote connection over VPN or trying to penetrate our wireless.

We’ll need 3 separate alarms to notify us of:


Attempts to access network devices (TACACS+ authentication failures )
      Attempts to penetrate wireless or VPN (RADIUS authentication failures)
          Attempts to access ACS admin interface (ACS Instance authentication failures)

To configure alerting we need to go to:
“Monitoring and Reports” -> “Launch Monitoring & Report Viewer”
 “Alarms” -> “Thresholds”


  
1.       Configuring TACACS+ authentication failures alerts
a.       Click “Create”
b.      Specify alarm name
c.       Leave “Schedule” at default value of “nonstop”


d.      Go to “Criteria” page
e.      Under “Category” select “Failed Authentications”
f.        Under “Failed Authentications greater than” specify desired value of occurrences
g.       Under “In the past” specify desired time
h.      Select for an “Access Service”



i.         Set “Protocol” to “TACACS+”


j.        On “Notification” page
k.       Set desired “Severity”
l.         Configure either email notification or syslog message or both
m.    Click “Submit”

2.       Configuring RADIUS authentication failures alerts
Procedure is the same as for TACACS+ but protocol must be set to RADIUS.

3.       Configuring ACS Instance authentication failures alerts
Once again procedure is the same as above but we select “ACS Instance” instead of “Access Service”



Now it would be a good idea to test if alerting works by attempting to login with incorrect password.

Installing Cisco Secure ACS 5.3 in VirtualBox


ACS 5.3 is supported on a hardware appliance, VMWare ESX and VMWare Server. Even though not supported, it works without modification in VMWare Player. None of the above helps us if we want to test it with switches or routers in GNS3. While version 5.2 could be installed in VirtualBox, v5.3 consistently failed installation with “Unsupported hardware” error message. After trying all possible combinations of virtual hardware in VBox it still refused to install. After some hacking I eventually managed to get working.

Installation requires modification of the ISO image provided by Cisco and a bit of cheating in the kickstart file and pre-creation of partitions in the VM. We will need ISO editor (ISOpen or MagicISO), text editor (such as Notepad++) and a Linux live CD of your choice.

VBox hardware configuration:
OS Type: RedHat
RAM: 1024
CPU: PAE/NX enabled, VT-x/AMD-V disabled
Floppy: Disabled
Storage: Disk 70GB (I used dynamically expanded), Controller SCSI, SCSI Port 0
Audio: disabled
Network: Adapter Intel PRO/1000 MT
Serial Ports & USB: Disabled

All remaining settings stay at defaults.
Now we need to modify the kickstart file – ks.cfg – found in the root of the installation disk.

Red color shows old values and blue new ones. 

Change 0 to 1 on line 36

36: VM_APPLIANCE=01

Delete line 54
54:   UDI_PID=`/sbin/cars_udi_util -p`

Set variable “ret” to 0

56:   ret="$?"0

Delete lines 57 to 61 inclusive

57: if [ "$ret" -eq 0 ]; then
58:   echo "***** Cisco UDI PID: $UDI_PID " > /dev/console
59:     case $UDI_PID in
60:       Cisco-VM-SPID)
61:         VM_APPLIANCE=1

Delete –all from line 104

104:             echo "#clearpart --all --initlabel";

Delete lines 186 to 195 inlcusive

186:   else
187:       echo "***** Error: Unsupported Hardware Configuration. " > /dev/console
188:       echo "*****        This software can only be installed on Cisco " > /dev/console
189:       echo "*****        supported hardware or Virtual Machine technology " > /dev/console
190:       echo "*****        meeting the requirements specified in the installation guide." > /dev/console
191:       echo "*****        Exiting Installation..." > /dev/console
192:       sleep 5
193:       /sbin/halt -f
194:       exit 0
195:   fi

Save the file, and replace the existing ks.cfg in the ISO image.  When saving the edited ISO make sure the it is still bootable (ISOopen shows if the disk is bootable in the main UI).

Edited ks.cfg file can be downloaded here: http://www.filefactory.com/file/a322ga9ez05/n/ks.cfg

If we try the installation with our edited ISO we’ll get further than before, the install will still fail though.
Now we need to create partitions on the disk we’ll be installing ACS to.
Boot the VM to a Live Linux distro of your choice, create 2GB partition /sda1 and format it as ext3.
Now we should be able to install ACS. Simply boot the edited installation disk and follow the prompts. 

When booting ACS sits on "ip_contract" for a few minutes so be patient it will eventually boot.