Collect Cisco Router logs

Supported in:

This document explains how to ingest Cisco Router logs to Google Security Operations using a Bindplane agent. The parser first extracts common fields from various syslog message formats using a series of Grok patterns, handling different timestamp and key-value data variations. Then, it applies specific logic based on the extracted event type (facility, mnemonics, message_type), enriching the data with additional fields and mapping them to the UDM model.

Before you begin

  • Ensure that you have a Google SecOps instance.
  • Ensure that you are using Windows 2016 or later, or a Linux host with systemd.
  • If running behind a proxy, ensure firewall ports are open.
  • Ensure that you have privileged access to a Cisco Router.

Get Google SecOps ingestion authentication file

  1. Sign in to the Google SecOps console.
  2. Go to SIEM Settings > Collection Agents.
  3. Download the Ingestion Authentication File. Save the file securely on the system where Bindplane will be installed.

Get Google SecOps customer ID

  1. Sign in to the Google SecOps console.
  2. Go to SIEM Settings > Profile.
  3. Copy and save the Customer ID from the Organization Details section.

Install the Bindplane agent

Windows installation

  1. Open the Command Prompt or PowerShell as an administrator.
  2. Run the following command:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

Linux installation

  1. Open a terminal with root or sudo privileges.
  2. Run the following command:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

Additional installation resources

Configure the Bindplane agent to ingest Syslog and send to Google SecOps

  1. Access the configuration file:

    1. Locate the config.yaml file. Typically, it's in the /etc/bindplane-agent/ directory on Linux or in the installation directory on Windows.
    2. Open the file using a text editor (for example, nano, vi, or Notepad).
  2. Edit the config.yaml file as follows:

    receivers:
        udplog:
            # Replace the port and IP address as required
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/chronicle_w_labels:
            compression: gzip
            # Adjust the path to the credentials file you downloaded in Step 1
            creds: '/path/to/ingestion-authentication-file.json'
            # Replace with your actual customer ID from Step 2
            customer_id: <customer_id>
            endpoint: malachiteingestion-pa.googleapis.com
            # Add optional ingestion labels for better organization
            ingestion_labels:
                log_type: CISCO_ROUTER
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. Replace the port and IP address as required in your infrastructure.

  4. Replace <customer_id> with the actual customer ID.

  5. Update /path/to/ingestion-authentication-file.json to the path where the authentication file was saved in the Get Google SecOps ingestion authentication file section.

Restart the Bindplane agent to apply the changes

  • To restart the Bindplane agent in Linux, run the following command:

    sudo systemctl restart bindplane-agent
    
  • To restart the Bindplane agent in Windows, you can either use the Services console or enter the following command:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

Configure Syslog on a Cisco Router

  1. Sign in to the Cisco Router.
  2. Escalate privileges by entering the enable command:

    Switch> enable
    Switch#
    
  3. Switch to configuration mode by entering the conf t command:

    Switch# conf t
    Switch(config)#
    
  4. Enter the following commands:

    logging host <bindplane-server-ip> transport <tcp/udp> port <port-number>
    logging source-interface <interface>
    
    • Replace <bindplane-server-ip> with the Bindplane agent IP address, and <port-number> with the configured port.
    • Replace <tcp/udp> with the configured listening protocol on the Bindplane agent; for example, udp.
    • Replace <interface> with the Cisco interface ID; for example, Ethernet1/1.
  5. Set the priority level by entering the following command:

    logging trap Informational 
    logging console Informational 
    logging severity Informational
    
  6. Set the syslog facility:

    logging facility local6
    
  7. Enable timestamps by entering the following command:

    service timestamps log datetime
    
  8. Save and exit.

  9. Configure the settings to survive restart by entering the following command:

    copy running-config startup-config
    

UDM Mapping Table

Log field UDM mapping Logic
client_ip target.ip, target.asset.ip The value is taken from the client_ip field extracted by the grok parser.
client_mac target.mac The value is taken from the client_mac field extracted by the grok parser.
dst_ip target.ip, target.asset.ip The value is taken from the dst_ip field extracted by the grok parser.
dst_port target.port The value is taken from the dst_port field extracted by the grok parser and converted to an integer.
duration - This field is not mapped to the UDM.
host_ip target.ip, target.asset.ip The value is taken from the host_ip field extracted by the grok parser.
local_proxy intermediary.ip The value is taken from the local_proxy field extracted by the grok parser.
message_data metadata.description The value is taken from the message_data field extracted by the grok parser.
protocol network.ip_protocol The value is taken from the protocol field extracted by the grok parser and converted to uppercase.
received_bytes network.received_bytes The value is taken from the received_bytes field extracted by the grok parser and converted to an unsigned integer.
referral_url network.http.referral_url The value is taken from the referral_url field extracted by the grok parser.
remote_proxy intermediary.ip The value is taken from the remote_proxy field extracted by the grok parser.
send_bytes network.sent_bytes The value is taken from the send_bytes field extracted by the grok parser and converted to an unsigned integer.
sent_bytes network.sent_bytes The value is taken from the sent_bytes field extracted by the grok parser and converted to an unsigned integer.
server_host target.hostname, target.asset.hostname The value is taken from the server_host field extracted by the grok parser.
server_ip target.ip, target.asset.ip The value is taken from the server_ip field extracted by the grok parser.
src_ip principal.ip, principal.asset.ip The value is taken from the src_ip field extracted by the grok parser.
src_port principal.port The value is taken from the src_port field extracted by the grok parser and converted to an integer.
user_ip target.ip, target.asset.ip The value is taken from the user_ip field extracted by the grok parser.
user_mail principal.user.userid, principal.user.email_addresses The value is taken from the user_mail field extracted by the grok parser.
username target.user.userid The value is taken from the username field extracted by the grok parser.
- is_alert The value is set to true by default.
- is_significant The value is set to true by default.
- metadata.event_timestamp The value is taken from the create_time field.
- metadata.event_type The value is set to GENERIC_EVENT by default, and changed to specific event types based on the parsed log message.
- metadata.log_type The value is set to CISCO_ROUTER.
- metadata.product_event_type The value is taken from the message_type field, which is generated by combining the facility, priority, and mnemonics fields.
- metadata.product_name The value is set to Router.
- metadata.vendor_name The value is set to Cisco.
- network.application_protocol The value is set to HTTP or HTTPS if the protocol field is http or https, respectively.
- extensions.auth.type The value is set to AUTHTYPE_UNSPECIFIED by default, and changed to specific authentication types based on the parsed log message.
- security_result.action The value is set to ALLOW for successful logins and BLOCK for failed logins.
- security_result.category The value is set to NETWORK_SUSPICIOUS for events with IP options and AUTH_VIOLATION for failed logins.
- security_result.description The value is set to specific messages for different events.
- security_result.severity The value is set to LOW for successful logins, MEDIUM for failed logins, and INFORMATIONAL for other events.
- security_result.severity_details The value is taken from the fail_reason field for failed logins, and set to Informational message for events with IP options.
- security_result.summary The value is set to specific messages for different events.

Changes

2024-12-12

Enhancement:

  • Mapped intermediary_host to intermediary.hostname.

2024-12-05

Enhancement:

  • Added a Grok pattern to support new pattern of syslog logs.
  • Mapped srcip to principal.ip.

2024-10-30

Enhancement:

  • Added support for metadata.event_timestamp in BST timezone.

2024-10-15

Enhancement:

  • Mapped inter_hostname to intermediary.ip and intermediary_host to intermediary.hostname.

2024-09-12

Enhancement:

  • Added a Grok pattern to map int_ip to intermediary.hostname.

2024-06-26

Enhancement:

  • Added a new Grok pattern to parse a new format of SYSLOG logs.

2024-06-09

Enhancement:

  • Mapped hostname from syslog header to intermediary.hostname.

2024-05-20

Enhancement:

  • Added a new Grok pattern to parse a new format of SYSLOG logs.
  • Mapped MessageSourceAddress to principal.ip and principal.asset.ip.
  • Mapped SourceModuleName and SourceModuleType to principal.resource.attribute.labels.

2023-11-10

Enhancement:

  • Added new Grok patterns to parse failing SYSLOG logs.
  • Added Unable, exceeded, and No space left on device conditions for AUTH_VIOLATION.

2023-10-30

Enhancement:

  • Added new Grok patterns to parse failing syslog logs.
  • Mapped resourcename to principal.resource.name.
  • Mapped app_protocol to network.application.protocol.
  • Mapped app to target.application.
  • Mapped source_port to principal.port.
  • Mapped source_ip to principal.ip.
  • Mapped device_ip to target.ip.
  • Mapped username to target.user.userid.
  • Mapped intermediary_ip to intermediary.ip.
  • Mapped mnemonics to metadata.event_type.
  • Mapped sec_action to security_result.action.
  • Mapped sec_category security_result.category.
  • Mapped sec_summary to security_result.summary.
  • For authentication type logs, set metadata.event_type to USER_LOGIN.

2023-05-09

Enhancement:

  • Logs with value FMANFP-6-IPACCESSLOGP are parsed as NETWORK_CONNECTION events.

2022-12-02

Enhancement:

  • Added grok to support unparsed Syslog logs.
  • If principal.hostname changed event_type mapping from GENERIC_EVENT to STATUS_UPDATE.

2022-11-10

Enhancement:

  • Added support for SYS-5-CONFIG_I event logs.
  • Modified grok to support logs having timezone.

2022-10-27

Enhancement:

  • Parse following syslog fields of log type IOSXE-6-PLATFORM
  • Mapped ip to intermediary.ip
  • Mapped src_ip to principal.ip
  • Mapped src_port to principal.port
  • Mapped dst_ip to target.ip
  • Mapped dst_port to target.port
  • Mapped protocol to network.ip_protocol
  • Mapped facility to principal.resource.type
  • Mapped mnemonics to metadata.product_event_type
  • Mapped sc_summary to metadata.description
  • Mapped sr_action to security_result.action
  • Mapped summary to security_result.summary

2022-08-23

Enhancement:

  • Corrected mapping of principal and target ip
  • Mapped target_ip to event.idm.read_only_udm.target.ip
  • Mapped src_ip to event.idm.read_only_udm.principal.asset.ip

2022-07-01

Enhancement:

  • Fixed an error to parse logs containing product_event_type as SYS-3-LOGGINGHOST_FAIL,SEC_LOGIN-5-LOGIN_SUCCESS,SYS-6-LOGGINGHOST_STARTSTOP,SYS-6-LOGOUT and timestamp is not present.
  • Changed metadata.event_type of SYS-3-LOGGINGHOST_FAIL logs to STATUS_UPDATE from GENERIC_EVENT.

Need more help? Get answers from Community members and Google SecOps professionals.