Syslog (Cisco ASA)

Syslog Packet:

The syslog packet size is limited to 1024 bytes and carries the following information:

 

Facility

Severity

Hostname

Timestamp

Message

Syslog Port numbers:

When sending messages using UDP the destination port is usually 514

When sending messages using TCP the destination port is usually 1468

Syslog Message Format:

Message

This is the text of the syslog message, along with some additional information about the process that generated the message. The syslog messages generated by Cisco IOS devices begin with a percent sign (%) and use the following format:

 

%FACILITY-SEVERITY-MNEMONIC: Message-text

Following is a description of each field:

 

FACILITY— Refers to the source of the message, such as a hardware device, a protocol, or a module of the system software. Note that this FACILITY is Cisco specific and is only relevant within the message string. It is different from the facility defined in RFC 3164 for the syslog protocol.

SEVERITY— This is similar to the severity defined in Table 4-2.

MNEMONIC— This is a device-specific code that uniquely identifies the message.

Message-text— This is a text string that describes the message and can contain details such as port numbers and network addresses.

Following is a sample syslog message generated by a Cisco IOS device:

 

*Mar  6 22:48:34.452 UTC: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0,

changed state to up

Note that the message begins with a special character (*) and that the timestamp includes the time-zone information. The message was generated by the LINEPROTO facility at severity 5 (Notice). The MNEMONIC UPDOWN along with the message-text describe the event.

Facility:

The facility allow administrators to logically separate messages (e.g. write them to separate files, forward them to different destinations, etc.)

Each Syslog message includes a priority value at the beginning of the text. The priority value ranges from 0 to 191 and is made up of a Facility value and a Level value.

Facility

Syslog messages are broadly categorized on the basis of the sources that generate them. These sources can be the operating system, the process, or an application. These categories, called facility, are represented by integers, as shown in Table 4-1. The local use facilities are not reserved and are available for general use. Hence, the processes and applications that do not have pre-assigned facility values can choose any of the eight local use facilities. As such, Cisco devices use one of the local use facilities for sending syslog messages.

The Facility value is a way of determining which process of the machine created the message. Since the Syslog protocol was originally written on BSD Unix, the Facilities reflect the names of Unix processes and Daemons.

The priority value is calculated using the following formula:

Priority = Facility * 8 + Level

 

Table 4-1. Facility Values

Facility 0

Kernel messages 1

User-level messages 2

Mail system 3

System daemons 4

Security/authorization messages 5

Messages generated internally by Syslogd 6

Line printer subsystem 7

Network news subsystem 8

UUCP subsystem 9

Clock daemon 10

Security/authorization messages 11

FTP daemon 12

NTP subsystem 13

Log audit 14

Log alert 15

Clock daemon 16

Local use 0 (local0) 17

Local use 1 (local1) 18

Local use 2 (local2) 19

Local use 3 (local3) 20

Local use 4 (local4) 21

Local use 5 (local5) 22

Local use 6 (local6) 23

Local use 7 (local7) 24

Severity Level:

The source or facility that generates the syslog message also specifies the severity of the message using a single-digit integer, as shown in Table 4-2.

The higher severity numbers “include” the lower severity numbers.

Table 4-2: The list of severity Levels:

0       Emergency: system is unusable

1       Alert: action must be taken immediately

2       Critical: critical conditions

3       Error: error conditions

4       Warning: warning conditions

5       Notice: normal but significant condition

6       Informational: informational messages

7       Debug: debug-level messages

Recommended practice is to use the Notice or Informational level for normal messages.

 

A detailed explanation of the severity Levels:

DEBUG: Info useful to developers for debugging the app, not useful during operations

INFORMATIONAL: Normal operational messages – may be harvested for reporting, measuring throughput, etc – no action required

NOTICE: Events that are unusual but not error conditions – might be summarized in an email to developers or admins to spot potential problems – no immediate action required

WARNING: Warning messages – not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full – each item must be resolved within a given time

ERROR: Non-urgent failures – these should be relayed to developers or admins; each item must be resolved within a given time

ALERT: Should be corrected immediately – notify staff who can fix the problem – example is loss of backup ISP connection

CRITICAL: Should be corrected immediately, but indicates failure in a primary system – fix CRITICAL problems before ALERT – example is loss of primary ISP connection

EMERGENCY: A “panic” condition – notify all tech staff on call? (earthquake? tornado?) – affects multiple apps/servers/sites…

Syslog IDs:

https://www.cisco.com/c/en/us/td/docs/security/asa/syslog/b_syslog.html

https://www.cisco.com/c/en/us/td/docs/security/asa/syslog/b_syslog/syslogs-sev-level.html

Event(All event classes) Lists:

Event List can be used to filter syslogs IDs (syslog ID or a range) sent to a logging destination.

Logging Filters:

Logging filters are used for logging destinations e.g. Syslog Servers, Email, ASDM, Internal buffers, Console, SSH, SNMP trap and attach the Event List to is as well.

Message/Event Class:

Use the message class in order to send all messages associated with a class to the specified output location e.g. auth, config, ha, snmp, vpn, ssl etc.

Syslog servers:

Simply define the destination IPs to send the logs (usual port number udp/514).

3rd party VPN/Invalid ID information/No valid SA (Summary subnet sent)

Scenario 1 – Wrong IPsec IDs are negotiated during IKE Quick Mode:
Symptoms:
“Invalid ID information” log in SmartView Tracker when the Security Gateway initiates a Quick Mode.
“No valid SA” logs in SmartView Tracker when creating IPsec VPN tunnel with an interoperable device.
Remote Access Client cannot access internal resources over the Site-to-Site tunnel with 3rd party VPN peer.

Explanation:
VPN tunnel can be initiated from 3rd party side to the Check Point Security Gateway side, but not from Check Point side to 3rd party side.
During IKE Quick Mode negotiation, the IP addresses, which define the VPN tunnel (also known as IPSec IDs, or traffic selectors) are negotiated. The IP addresses can be a set of discrete IP addresses, or a subnet.
When negotiating a VPN tunnel between Check Point Security Gateway and certain 3rd-party devices, IKE Quick Mode may fail, if the subnets are defined differently on each end of the VPN tunnel. One reason is that Check Point Security Gateway dynamically supernets subnets to reduce the amount of SA overhead.

Solution:
Define the IP ranges that the Check Point Security Gateway should negotiate with this 3rd party peer in the “subnet_for_range_and_peer” table in the relevant “user.def” file on the Security Management Server / Domain Management Server.

The “subnet_for_range_and_peer” table is designed to force Check Point Security Gateway to negotiate IPsec SAs using a specific subnet mask for a given IP address range:

subnet_for_range_and_peer = {
<peerGW_IP, first_IP_in_range1, last_IP_in_the_range1; subnet_mask>,
<peerGW_IP, first_IP_in_range2, last_IP_in_the_range2; subnet_mask>,
… … …
<peerGW_IP, first_IP_in_rangeN, last_IP_in_the_rangeN; subnet_mask>
};

 

Location of user.def file on the management:

https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk98239

CCSA/CCSE

Nokia IPSO Checkpoint CLI Commands

Checkpoint Commands1

Checkpoint Commands2

Checkpoint Commands3

0.0 CCSA R80 CBT Nuggets
0.1 Checkpoint Backward Compatibility Map
0.2 Checkpoint Firewall Packet Flow

1.0 How IPsec Site to Site VPN Tunnels Work
1.1 Remembering the 5 Things to Negotiate in IKE Phase 1 (IPsec)
1.2 How to Set Up a Site-to-Site VPN with Check Point Gateways Managed by the same Management Server
1.3 How to set up a Site-to-Site VPN with a 3rd-party remote gateway
1.4 Checkpoint Site to Site VPN (R80)
1.5 Site to Site VPN (R75/R76/R77)
1.6 3rd party VPN/Invalid ID information/No valid SA (Summary subnet sent)
1.7 VPN Debugging Commands CLI

2. Connection to the Security Gateway with WinSCP fails

3. Check Point – How To Collect CPinfo – CLI

cpinfo -l -z -o /var/log/FW01_2_6_2020_15_50.info.tar.gz

4.0 Check Point R77 Features

5.0 Building a Checkpoint Network
5.1 Checkpoint Management Server Installation
5.2 Checkpoint Security Gateway Installation & Adding to Mgmt Server
5.3 Interfaces Configuration and Default Route
5.4 Basic Security Policy and NAT
5.5 Checkpoint Security Policy Rules
5.6 Checkpoint NAT – Part 1
5.7 Checkpoint NAT – Part 2
5.8 Checkpoint Installation/SIC/Basic Setup

6.0 Basics of SmartView Monitor
6.1 Checkpoint Smartview Tracker Logging
7.0 Checkpoint Failover doesn’t work on Azure
8.0 Checkpoint Log Collection (LogRhythm) (OPSEC LEA)
8.1 Syslog Integration with CheckPoint
9.0 Port Scan Best Practices Checkpoint
9.1 Port Scan and DDoS Best Practices Checkpoint

10.0 Power Shell Script to create objects from list of IPs (Dbedit)
10.1 Using a dbedit script to create new network objects and network object groups
10.2 Checkpoint Firewall CLI tool “dbedit” and quick lab examples
11.0 Capture and Monitor traffic Checkpoint (CLI/Commands)
12.0 Adding/Renewing a new 3rd party VPN Certificate Checkpoint – Step 1
12.1 Adding/Renewing a new 3rd party VPN Certificate Checkpoint – Step 2

13.0 How do Domain Objects work?
13.1 Domain Objects in R80.10 and above
14.0 New R80.20 Commands
15.0 Route all traffic from Remote Access clients, including internet traffic, through Security Gateway
16.0 Restrict Smartconsole and SSH access to the Management (user cpconfig or edit file)
17.0 Check Point Upgrade Service Engine (CPUSE) – Gaia Deployment Agent

18.0 Video Lectures
18.1 ClusterXL/CoreXL/SecureXL
18.2 CCSE Commands List
18.3 Checkpoint Common Ports
18.4 CCSE R80 Syllabus
19.0 Configuring DHCP relay through Site-to-Site VPN on GAIA embedded Appliances
20.0 How to troubleshoot IPS update [scheduled and manual] issues
21.0 Domain Objects in R80.x FQDN and non FQDN
22.0 How to import multiple objects into R80.x Management database using .csv file and then add them to a group
23.0 Connectivity problems between the Security Gateway and the Log Server
cpstat fw -f log_connection
24.0 Checkpoint VPN Troubleshooting (Overlapping VPN)
25.0 Shows Visitor Mode users
26.0 Checkpoint Evaluation License steps (cplic)
27. ClusterXL HA Manual Failover

28. Remote Access VPN users count

Best Practices: 

SD-WAN:

CCNA/CCNP Security

0.0 Upload ASA software image without ASDM (CLI)(Using SCP)
1.0 Creating objects on ASA from a file of IPs and Putting then in an object group (CLI)
2.0 Packet Capture ASA (ASDM/CLI)
2.1 ASA Packet capture (ASDM)
3.0 ASA and ASDM Upgrade (ASDM)
3.1 ASA and ASDM Compatibility Matrix
4.0 Syslog (Cisco ASA)
4.1 ASA syslog configuration (ASDM/CLI)
5.0 ASA not allowing ping to distant or far interface IPs
6.0 SNMPv3 Configuration on ASA (ASDM)
7.0 Cisco ASA – Permitting traffic between two interfaces with the same security lev
7.1 Traffic between ASA interfaces of same security level
8.0 ISE Online Demo
9.0 Check Cisco Warranty and SMARTnet Coverage
10.0 Dynamic MultiPoint VPNs (DMVPN) (Naked, Protected and Tshoot)
11.0 Static and Dynamic VTI (Virtual Tunnel Interface)
12.0 FlexVPNs
13.0 GETVPN (Group Encrypted VPN)
14.0 Site to Site VPN between ASA and IOS (IKEv1 and IKEv2)
14.1 SITE TO SITE IPSEC VPN TROUBLESHOOTING STEPS (STATES AND MESSAGES)
14.2 ISAKMP (IKE Phase 1) Status Messages MM_WAIT_MSG#
15.0 RA VPN Profiles and Policies Flow (Pre and Post Login)
15.1 Clientless SSL VPN Wizard
15.2 Anyconnect VPN Wizard
15.3 VPN Profiles and Policies
15.4 Clientless SSL VPN
15.5 Anyconnect SSL VPN
15.6 Smart Tunnels and Plugins for Clientless VPN
15.7 AAA and VPNs
15.8 Troubleshooting Clientless SSL VPN
15.9 AnyConnect VPN Client U-turning Config Examples (Anyconnect TunnelAll and Internet Routing)
15.10 AnyConnect Error – ‘Failed To Get Configuration From Secure Gateway’
16.0 What is Dynamic Access Policy (DAP)?
16.1 Allowing only domain joined machines (Anyconnect) (Cisco Secure Desktop: Host Scan Module)
17.0 Cisco ASA and Firepower Threat Defense Reimage Guide
18.0 SNMP configuration examples
19.0 Next Generation Encryption (Recommended Algorithms for VPN)
19.1 Next Gen Cryptography
19.2 Diffie-Hellman Groups
20.0 Cisco Catalyst 2960-X vs. 2960-XR Series Switches
21.0 enable_15 default user (enter blank username and enable_15 as the password)

22.0 Route based vs Policy Based VPN

23.0 COMPARING CISCO VPN TECHNOLOGIES – POLICY BASED VS ROUTE BASED VPNS

CCNP Security Notes, Labs and Articles: 
1. Site to Site VPN Cisco Router Config

2. Site to Site VPN between ASA and IOS (IKEv1 and IKEv2) (Commands)

3. Site to Site VPN Cisco Router Config (Commands)

4. Config point-to-point GRE VPN Tunnels – unprotected GRE & protected GRE Over IPSec Tunnels

5. GRE over IPSec VPN Configuration on a Cisco Router (Commands)

6. UNDERSTANDING CISCO DYNAMIC MULTIPOINT VPN – DMVPN, MGRE, NHRP

7. CONFIGURING CISCO DYNAMIC MULTIPOINT VPN (DMVPN) – HUB, SPOKES , MGRE PROTECTION AND ROUTING – DMVPN CONFIGURATION

8. DMVPN (Dynamic Multi Point VPN) Config (Commands)

9. How To Configure Cisco GETVPN

10. GET VPN with pre-share keys – configuration example

11. GET VPN Config (Commands)

 

12. 

 

Best Practices: 

 

SD-WAN:

 

Creating objects on ASA from a file of IPs and Putting then in an object group (CLI)

Power Shell Script (Run it straight from powershell prompt/file must be in the same directory):

ASA:
object-group network Log4j_BadIP_Grp

foreach($ip in Get-Content ip1.txt)
{
Write-output “object network Log4j_BadIP_$ip” | Tee-Object -FilePath ‘C:\Users\fali\output_asa.txt’ -append
Write-output “Description NOC-2682-Created by FAli(Nettitude) on 18/12/2021” | Tee-Object -FilePath ‘C:\Users\fali\output_asa.txt’ -append
Write-output “host $ip” | Tee-Object -FilePath ‘C:\Users\fali\output_asa.txt’ -append
Write-output “object-group network Log4j_BadIP_Grp” | Tee-Object -FilePath ‘C:\Users\fali\output_asa.txt’ -append
Write-output “Description NOC-2682-Created by FAli(Nettitude) on 18/12/2021” | Tee-Object -FilePath ‘C:\Users\fali\output_asa.txt’ -append
Write-output “network-object object Log4j_BadIP_$ip” | Tee-Object -FilePath ‘C:\Users\fali\output_asa.txt’ -append
}

ACE/PCNSE

Palo Study Notes

0.0 Palo Alto CBT Nuggets
0.1 Palo Alto Training Videos

1. How to Import and Export Address and Address Objects (CLI) (Creating objects from a file of IPs)
2. How to Create an IPSec Tunnel to AWS (Amazon Web Services) From a Palo Alto Firewall with Static Routing
3. Revert Firewall Configuration Changes (Revert to the current running configuration)
4. Best Practices for PAN-OS Upgrade (Palo Alto Upgrade)
4.1 Upgrade Palo Firewalls (CLI)
5. How to Unblock Addresses after Block-IP Action is Triggered by Threat Protection
6.0 What is IPSec?
6.1 Palo Alto (8.0) Site to Site VPNs
6.2 IPSec VPN Setup (Site to Site VPN Config)
6.3 IPSec Site to Site tunnel: Palo Alto to Cisco
7.0 Example NAT Rules (Important)
7.1 Tutorial: How to Configure Source NAT on the PAN-OS GUI
7.2 Tutorial: Network Address Translation
7.3 Tutorial: Understanding the NAT/Security Policy Configuration
7.4 How to Configure U-Turn NAT
7.5 Configure Destination NAT Using Dynamic IP Addresses
8.0 Palo Alto Commands (Important)
8.1 Useful Troubleshooting Commands
9.0 SSL Outbound Decryption
9.1 How to Implement and Test SSL Decryption (Inbound and Outbound)
9.2 HOW TO TEMPORARILY DISABLE SSL DECRYPTION
10.0 GlobalProtect Logs from the Client
10.1 How to Configure GlobalProtect Portal Page to be Accessed on any Port
10.2 GLOBALPROTECT CLIENT STUCK AT CONNECTING WHEN WORKSTATION IS ON THE LOCAL NETWORK
10.3 BASIC GLOBALPROTECT CONFIGURATION WITH USER-LOGON
11.0 Brute Force Related Signatures
11.1 Best Practice for FTP Brute Force
12.0 End-of-Life Summary
13.0 How to Generate a CSR (Certificate Signing Request) & Import the Signed Certificate
14.0 TSHOOT USER-ID: Useful CLI Commands to Troubleshoot LDAP Connection
14.1 USER-ID TSHOOT: Agentless User-ID Connection to Active Directory Servers Intermittently Connect and Disconnect
14.2 AGENTLESS USER-ID ‘ACCESS DENIED’ ERROR IN SERVER MONITOR
14.3 Palo Alto NTSTATUS: NT_STATUS_ACCESS_DENIED – Access denied
14.4 HOW TO CONFIGURE AGENTLESS USER-ID
15.0 Viewing the configuration in set and XML format
16.0 How to View and Install PAN-OS Software through the CLI
17.0 Configuring IKEv2 IPsec VPN for Microsoft Azure Environment
17.1 Configuring IKEv2 IPsec VPN for Microsoft Azure Environment
18.0 What Happens When Licenses Expire on the Palo Alto Networks Firewall?
19.0 Deploy Palo Alto in Azure
20.0 NOT-APPLICABLE, INCOMPLETE, INSUFFICIENT DATA IN THE APPLICATION FIELD
21.0 WHAT IS A PORT SCAN?
22.0 AFTER CONFIGURING SSL DECRYPTION, WEB BROWSING SESSIONS DO NOT MATCH THE CONFIGURED POLICY
23.0 Multiple ISPs (Load Balancing and Load Sharing)
23.1 HOW TO CONFIGURE ISP REDUNDANCY AND LOAD BALANCING
23.2 HOW TO IMPLEMENT ECMP (LOAD BALANCING) ON THE FIREWALL
23.3 ECMP Load-Balancing Algorithms
24.0 Palo Alto Networks-Add HA Firewall Pair to Panorama
24.1 HOW TO ADD A LOCALLY MANAGED FIREWALL TO PANORAMA MANAGEMENT
24.2 HOW TO PERFORM A DEVICE CONFIG IMPORT INTO PANORAMA
24.3 Steps: Adding HA devices to Panorama
25.0 Comparing Palo Alto Next Gen Firewalls with Web Application Firewalls (WAF)
26.0 Reset/Recover Password Palo Alto
26.1 How to perform a Factory Reset on a Palo Alto Networks Device?
27.0 Log Retention and Quotas
27.1 TIPS & TRICKS: LOG DELETION BASED ON TIME
28.0 HOW TO IMPORT AND EXPORT ADDRESS AND ADDRESS OBJECTS
29.0 Migrating Checkpoint to Palo using Migration Tool 3.x
29.1 Migration Tool 3 Info and Guide
29.2 Checkpoint to Palo Alto Migration (Video)
30.0 Useful Palo Alto CLI Commands
31.0 SNMP configuration examples
31.1 Configuring Syslog, SNMP and NetFlow on a Palo Alto Networks Firewall
32.0 DNS Sinkhole
33.0 CONTROLLING WEBMAIL
34.0 Estimate logging rate based on log receiver statistics
35.0 Export Palo Policies in excel/xls format for version 7.x.x
36.0 User-ID Redistribution (Using Main firewall as User ID agent for other firewalls)
37.0 DUAL ISP REDUNDANCY USING STATIC ROUTES PATH MONITORING FEATURE, FOR TRAFFIC FAILOVER
38.0 HOW TO CHECK USERS IN LDAP GROUPS
39.0 CONFIGURING WINDOWS 2008 R2 RADIUS AUTHENTICATION (NPS RADIUS SERVER)
40.0 Connecting PAN-OS to MineMeld using External Dynamic Lists
40.1 Enable Access to Office 365 with MineMeld
40.2 MineMeld Overview
40.3 Quick Tour of MineMeld Default Config

Best Practices:

 

SD-WAN:

How to Setup SDWAN in LAB using Palo Alto Network Virtual Firewalls (Video)

A Palo Alto Networks Case Study: Secure Branch Networking with SD-WAN (Video)

Secure SD-WAN by Palo Alto Networks (Video)

Palo SD-WAN Admin Guide (Document)

 

How to Import and Export Address and Address Objects (CLI) (Creating objects from a file of IPs)

How to import export address and address objects

Power Shell Script (Run it straight from powershell prompt/file must be in the same directory):

Palo Script (object group is log4j) :
foreach($ip in Get-Content ip1.txt)
{
Write-output “set address Log4j_BadIP_$ip ip-netmask $ip” | Tee-Object -FilePath ‘C:\Users\fali\output_palo.txt’ -append
Write-output “set address-group log4j static Log4j_BadIP_$ip” | Tee-Object -FilePath ‘C:\Users\fali\output_palo.txt’ -append
}

Panorama Script (object group is log4j):
foreach($ip in Get-Content ip1.txt)
{
Write-output “set shared address Log4j_BadIP_$ip ip-netmask $ip” | Tee-Object -FilePath ‘C:\Users\fali\outputpano.txt’ -append
Write-output “set shared address-group log4j static Log4j_BadIP_$ip” | Tee-Object -FilePath ‘C:\Users\fali\outputpano.txt’ -append
}

}

What is the Difference between Network, Cyber and Info Sec?

Network security, cybersecurity, and information security are all related concepts, but they have slightly different meanings and scopes.

Network security refers to the protection of computer networks from unauthorized access or attacks. It involves the use of various hardware and software technologies to secure networks and prevent intruders from gaining access to sensitive information. Network security focuses on protecting the network infrastructure, such as routers, switches, firewalls, and other network devices, from attacks and intrusions.

Cybersecurity, on the other hand, is a broader term that encompasses network security as well as other aspects of security related to information technology. Cybersecurity involves the protection of computer systems, networks, and digital data from unauthorized access, theft, and damage. It includes a wide range of technologies, policies, and practices that are designed to secure digital assets and prevent cyber attacks.

Information security refers to the protection of all forms of information, including both digital and non-digital data, from unauthorized access, use, disclosure, modification, or destruction. Information security covers a wide range of topics, including confidentiality, integrity, availability, privacy, and compliance. It involves implementing appropriate controls and measures to safeguard information from various threats, such as cyber attacks, human error, and natural disasters.

Network and Security Certifications:
CCST Networking (Cisco)
Network+ (CompTIA)
CCNA (Cisco)
CCNP (Enterprise)
PCCET (Palo Alto)
PCNSA (Palo Alto)
PCNSE (Palo Alto)
NSE4 (Fortinet)
NSE5 (Fortinet)
NSE7 (Fortinet)
CCNP (Security) (Cisco)
F5 Admin (F5)

DevNet and Automation Certifications:
CCNA DevNet (Cisco)
ENAUTO (Cisco)
PCSAE (Palo Alto)

CyberSecurity Certifications:
Security+ (CompTIA)
CC (ISC2)
CCST Cybersecurity (Cisco)
CCNA CyberOps (Cisco)
CCNP CyberOps (Cisco)
Pentest+ (CompTIA)
CEH (EC-Council)
Linux+ (CompTIA)
CySA+ (CompTIA)
CASP+ (CompTIA)
SC-900 (Microsoft)
SC-200 (Microsoft)
SC-100 (Microsoft)

SASE, SSE and Cloud Security Certifications:
Cloud+ (CompTIA)
CCSP (ISC2)
AZ-900 (Microsoft)
AZ-500 (Microsoft)
PCCSE (Palo Alto)

Information Security Certifications:
CISSP (ISC2)
CISA (ICASA)
CISM (ICASA)
PECB ISO 27001 LE
CCISO (EC-Council)

Syslog on ASA

Syslog Packet:

The syslog packet size is limited to 1024 bytes and carries the following information:

 

Facility

Severity

Hostname

Timestamp

Message

Syslog Port numbers:

When sending messages using UDP the destination port is usually 514

When sending messages using TCP the destination port is usually 1468

Syslog Message Format:

Message

This is the text of the syslog message, along with some additional information about the process that generated the message. The syslog messages generated by Cisco IOS devices begin with a percent sign (%) and use the following format:

 

%FACILITY-SEVERITY-MNEMONIC: Message-text

Following is a description of each field:

 

FACILITY— Refers to the source of the message, such as a hardware device, a protocol, or a module of the system software. Note that this FACILITY is Cisco specific and is only relevant within the message string. It is different from the facility defined in RFC 3164 for the syslog protocol.

SEVERITY— This is similar to the severity defined in Table 4-2.

MNEMONIC— This is a device-specific code that uniquely identifies the message.

Message-text— This is a text string that describes the message and can contain details such as port numbers and network addresses.

Following is a sample syslog message generated by a Cisco IOS device:

 

*Mar  6 22:48:34.452 UTC: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0,

changed state to up

Note that the message begins with a special character (*) and that the timestamp includes the time-zone information. The message was generated by the LINEPROTO facility at severity 5 (Notice). The MNEMONIC UPDOWN along with the message-text describe the event.

Facility:

The facility allow administrators to logically separate messages (e.g. write them to separate files, forward them to different destinations, etc.)

Each Syslog message includes a priority value at the beginning of the text. The priority value ranges from 0 to 191 and is made up of a Facility value and a Level value.

Facility

Syslog messages are broadly categorized on the basis of the sources that generate them. These sources can be the operating system, the process, or an application. These categories, called facility, are represented by integers, as shown in Table 4-1. The local use facilities are not reserved and are available for general use. Hence, the processes and applications that do not have pre-assigned facility values can choose any of the eight local use facilities. As such, Cisco devices use one of the local use facilities for sending syslog messages.

The Facility value is a way of determining which process of the machine created the message. Since the Syslog protocol was originally written on BSD Unix, the Facilities reflect the names of Unix processes and Daemons.

The priority value is calculated using the following formula:

Priority = Facility * 8 + Level

 

Table 4-1. Facility Values

Facility 0

Kernel messages 1

User-level messages 2

Mail system 3

System daemons 4

Security/authorization messages 5

Messages generated internally by Syslogd 6

Line printer subsystem 7

Network news subsystem 8

UUCP subsystem 9

Clock daemon 10

Security/authorization messages 11

FTP daemon 12

NTP subsystem 13

Log audit 14

Log alert 15

Clock daemon 16

Local use 0 (local0) 17

Local use 1 (local1) 18

Local use 2 (local2) 19

Local use 3 (local3) 20

Local use 4 (local4) 21

Local use 5 (local5) 22

Local use 6 (local6) 23

Local use 7 (local7) 24

Severity Level:

The source or facility that generates the syslog message also specifies the severity of the message using a single-digit integer, as shown in Table 4-2.

The higher severity numbers “include” the lower severity numbers.

Table 4-2: The list of severity Levels:

0       Emergency: system is unusable

1       Alert: action must be taken immediately

2       Critical: critical conditions

3       Error: error conditions

4       Warning: warning conditions

5       Notice: normal but significant condition

6       Informational: informational messages

7       Debug: debug-level messages

Recommended practice is to use the Notice or Informational level for normal messages.

 

A detailed explanation of the severity Levels:

DEBUG: Info useful to developers for debugging the app, not useful during operations

INFORMATIONAL: Normal operational messages – may be harvested for reporting, measuring throughput, etc – no action required

NOTICE: Events that are unusual but not error conditions – might be summarized in an email to developers or admins to spot potential problems – no immediate action required

WARNING: Warning messages – not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full – each item must be resolved within a given time

ERROR: Non-urgent failures – these should be relayed to developers or admins; each item must be resolved within a given time

ALERT: Should be corrected immediately – notify staff who can fix the problem – example is loss of backup ISP connection

CRITICAL: Should be corrected immediately, but indicates failure in a primary system – fix CRITICAL problems before ALERT – example is loss of primary ISP connection

EMERGENCY: A “panic” condition – notify all tech staff on call? (earthquake? tornado?) – affects multiple apps/servers/sites…

Syslog IDs:

https://www.cisco.com/c/en/us/td/docs/security/asa/syslog/b_syslog.html

https://www.cisco.com/c/en/us/td/docs/security/asa/syslog/b_syslog/syslogs-sev-level.html

Event(All event classes) Lists:

Event List can be used to filter syslogs IDs (syslog ID or a range) sent to a logging destination.

Logging Filters:

Logging filters are used for logging destinations e.g. Syslog Servers, Email, ASDM, Internal buffers, Console, SSH, SNMP trap and attach the Event List to is as well.

Message/Event Class:

Use the message class in order to send all messages associated with a class to the specified output location e.g. auth, config, ha, snmp, vpn, ssl etc.

Syslog servers:

Simply define the destination IPs to send the logs (usual port number udp/514).