Install
$ agentstack add skill-fastrevmd-lab-fwskillsshare-parsing-cisco-configs ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Parsing Cisco ASA / FTD Configurations
Overview
Use this skill to parse Cisco ASA and ASA-style FTD running configurations into the shared vendor-neutral firewall intermediate schema. It focuses on line-oriented show running-config text with parent commands and indented subcommands, including interfaces/nameifs, ACLs/access-groups, network and service objects, object-groups, NAT, routes, VPN, failover, and system settings.
Treat FMC-managed FTD exports and API data as adjacent but not identical inputs: parse what is present, preserve unresolved or unsupported structures in residual_raw, and call out assumptions rather than inventing missing policy context.
Scope and routing
Use only for Cisco ASA or FTD syntax. Hand off FortiOS config/edit/next/end blocks to parsing-fortinet-configs, PAN-OS XML or set deviceconfig to parsing-palo-configs, and Junos hierarchy or set security to parsing-srx-configs. Verify production-bound results against current device documentation and output. Downstream consumers are the audit, conversion, and diff skills.
Input Format
Cisco ASA configs are line-oriented with indented sub-commands:
interface GigabitEthernet0/0
nameif outside
security-level 0
ip address 203.0.113.1 255.255.255.0
!
object network web-server
host 10.0.1.10
nat (inside,outside) static 203.0.113.10
!
access-list outside_in extended permit tcp any object web-server eq 443
access-group outside_in in interface outside
Key syntax rules:
- Top-level commands start at column 0
- Sub-commands are indented with one space
!separates logical sections- Named interfaces use
nameif(e.g.,inside,outside,dmz) security-level(0-100) determines trust level
Building Command Blocks
Group indented lines under their parent top-level command — see references/parsing-patterns.md "Building Command Blocks" for the algorithm and worked example.
Extraction Pipeline
1. Interfaces
Source: interface blocks Extract from sub-commands:
nameif— the logical name used everywhere elsesecurity-level— trust levelip address— IP and subnet maskvlan— VLAN assignmentshutdown— interface is administratively downdescriptionbridge-group— transparent mode bridge group membershipip address dhcp— DHCP client mode (no static IP)ipv6 address [eui-64]— IPv6 addressmtu— MTU settingmanagement-only— management-only interface flagchannel-group— LAG/EtherChannel membership (Port-channel parent)tunnel source interface— VPN tunnel sourcetunnel destination— VPN tunnel destinationtunnel protection ipsec profile— IPsec profile binding
Interface types: detect Port-channel* as lag, Tunnel* as tunnel, Loopback* as loopback, Management* as management. Sub-interfaces contain . in name (e.g., GigabitEthernet0/0.100) — derive parent from name before the dot.
2. Zones (Derived from Interfaces)
ASA doesn't have explicit zones. Derive them from nameif values:
- Each unique
nameifbecomes a zone security-levelvalues are parser-internal inference metadata used to determine relative trust ordering between zones (higher = more trusted). This is NOT emitted as asecurity_levelortrust_levelfield in the intermediate schema — use it only to guide ordering or warn when ACLs are absent.- Associate the interface with its zone
3. Network Objects
Source: object network blocks Types from sub-commands:
host→ type: "host", value: ip + "/32" (or "/128" for IPv6)subnet→ type: "subnet", value: ip + "/cidr" (convert mask to CIDR)range→ type: "range", value: "start-end"fqdn v4orfqdn v6→ type: "fqdn"
Note: bare fqdn (without v4/v6 qualifier) is also valid.
subnet→ for IPv6 subnets the value is already in CIDR form, no mask conversion needed.
Also extract: description, inline nat statement (for object/auto NAT).
4. Network Object Groups
Source: object-group network blocks Members from sub-commands:
network-object host→ inline hostnetwork-object→ inline subnetnetwork-object object→ reference to named objectgroup-object→ nested group reference
5. Service Objects
Source: object service blocks Parse: service [source ] [destination ] Operators: eq, range, gt, lt, neq
6. Service Object Groups
Source: object-group service [] blocks Members:
port-object eq/port-object rangeservice-object [destination ]service-object objectgroup-object
7. Protocol Object Groups
Source: object-group protocol blocks Members: protocol-object
8. Access Lists (Security Policies)
Source: access-list extended []
ACL Remarks: access-list remark — attach as comment to the NEXT ACL entry.
ACL Line Parsing — Token by Token:
Format: access-list extended [] [log] [time-range ]
Protocol field:
ip— any IP protocoltcp,udp,icmp,sctp— specific protocolsobject-group— protocol group reference
Address parsing (for both source and destination):
any/any4/any6→ "any"host→ specific hostobject→ named network objectobject-group→ network object group→ network/subnet-mask pair (convert standard subnet mask to CIDR)interface→ the IP of that interface
Source port parsing (after source address, for TCP/UDP — optional):
eq/range→ source port match (less common)
Service/port parsing (after destination address, for TCP/UDP):
eq→ single port (use name or number)range→ port rangegt→ greater thanlt→ less thanneq→ not equal (warn: limited cross-platform support)object-group→ service group reference
ICMP parsing (for ICMP protocol):
- Optional ICMP type after destination:
icmp []
Flags:
log [] [interval ]→ enable loggingtime-range→ schedule referenceinactive→ disabled
9. Access Groups (Binding ACLs to Interfaces/Zones)
Source: access-group interface Also: access-group global (applies to all interfaces)
Critical: Deriving Zone-Based Policies from ACLs
ACLs alone don't have zone info. Combine with access-groups:
access-group outside_in in interface outside→ policies from this ACL have:src_zones: ["outside"](traffic enters on this interface, so it is the source zone)dst_zones:must be inferred (often "any" unless the ACL destination addresses map to a zone)- For
indirection: traffic is entering the named interface, so that interface is the source zone - For
outdirection: traffic is leaving the named interface - For
global: applies regardless of interface
Build security policies by iterating ACL entries and attaching zone information from access-groups.
10. NAT Rules
Object NAT (Auto NAT): Found inside object network blocks as nat (,)
nat (inside,outside) static 203.0.113.10→ static 1:1 NATnat (inside,outside) dynamic interface→ dynamic PAT to interfacenat (inside,outside) dynamic pat-pool→ dynamic PAT to pool
Twice NAT (Manual NAT): Top-level: nat (,) [after-auto] [] source [destination ] [service ]
Parse source static|dynamic and optional destination static components. The optional numeric token is a line number — the rule's position within its manual NAT section — NOT a section selector. Derive the section from rule form: Section 1 = manual/twice NAT without after-auto (evaluated before object/auto NAT); Section 2 = object/auto NAT (rules inside object network blocks); Section 3 = manual NAT with the after-auto keyword (evaluated after all auto NAT).
11. Time Ranges (Schedules)
Source: time-range blocks Sub-commands:
absolute start endperiodic to
12. Routing
- Static routes (IPv4):
route [] - Static routes (IPv6):
ipv6 route [] - BGP:
router bgpblock — extract: router-id,address-family ipv4 unicast- Per-neighbor:
remote-as,description,update-source,password,timers(keepalive/hold),next-hop-self,soft-reconfiguration,route-reflector-client,shutdown networkstatements (convert mask to CIDR)redistribute(connected/static)- Note: route-map and prefix-list references are not converted (warn)
- OSPF:
router ospfblock — extract: router-id,auto-cost reference-bandwidthnetwork area— match interfaces to areas via wildcard mask comparison- Area types: stub, nssa, with
no-summary; area default-cost; area authentication passive-interface default+no passive-interfaceexceptionsredistribute(connected/static with metric/metric-type)- Interface-level:
ip ospf cost,ip ospf priority,ip ospf hello-interval,ip ospf dead-interval,ip ospf network point-to-point,ip ospf authentication message-digest+ key - Normalize area IDs to dotted-decimal (0 → 0.0.0.0)
- OSPFv3:
router ospfv3block withaddress-family ipv6 unicast— similar structure to OSPFv2
13. Infrastructure
- Hostname:
hostnameanddomain-name→ system metadata - Version:
asa versionorfirepower version→ metadata.source_version - HA/Failover:
failoverpresence +failover lan unit primary|secondary(capture unit role),
failover interface ip, failover link
- Screen/Threat Detection:
threat-detection basic-threat+threat-detection rateentries - DNS:
dns server-group DefaultDNSblock → extractname-serverentries - NTP:
ntp server [prefer] - Management Access:
ssh|http|telnet— track which management protocols are accessible per zone - Admin Users:
username password ... privilege— map privilege 15=super-admin, 1-14=operator, 0=read-only.username attributesblock withssh authentication publickeyfor SSH keys. - VPN/IPsec:
crypto ikev2 policyblocks: encryption, integrity, DH group, lifetimecrypto ikev1 policyblocks: authentication, encryption, hash, DH group, lifetimecrypto ipsec ikev2 ipsec-proposal: protocol esp encryption/integritycrypto ipsec ikev1 transform-setcrypto ipsec profile: link proposals to PFS groupstunnel-group ipsec-attributes: PSK, certificates, authentication method- VTI assembly: match Tunnel interfaces to IPsec profiles, resolve tunnel source/destination, collect routes through tunnel nameifs
- Canonicalize algorithm names (ASA encryption names are mostly already canonical; e.g., sha → sha1, esp-3des → 3des)
- Flag weak algorithms (DES/3DES, MD5, DH group ≤ 5)
- Syslog:
logging host - DHCP Server:
dhcpd address -(pool range),
dhcpd dns [], dhcpd domain , dhcpd lease , dhcpd enable (commit trigger — binds staged options to interface). Derive network CIDR from the interface IP.
- DHCP Relay:
dhcprelay server+dhcprelay enable
14. Application Mapping (L7 → Canonical)
ASA/FTD is a port-based platform — it does not have native L7 application awareness in ACLs. However, when converting FROM ASA to an app-aware platform (PAN-OS, FortiGate), or comparing configs, the parser should attempt to resolve well-known port/protocol combinations to canonical application names.
Resolution from port-based services: For each service object or inline port match, check if the protocol+port maps to a known application:
| Protocol | Port(s) | Canonical App | Category | |----------|---------|---------------|----------| | TCP | 443 | https | web | | TCP | 80 | http | web | | TCP | 22 | ssh | remote-access | | TCP | 3389 | rdp | remote-access | | UDP | 53 | dns | network-mgmt | | TCP | 25 | smtp | email | | TCP | 465 | smtps | email | | TCP | 993 | imaps | email | | TCP | 143 | imap | email | | UDP | 123 | ntp | network-mgmt | | UDP | 161 | snmp | network-mgmt | | UDP | 162 | snmp-trap | network-mgmt | | TCP | 21 | ftp | file-transfer | | TCP | 23 | telnet | remote-access | | TCP | 389 | ldap | auth | | TCP | 636 | ldaps | auth | | UDP | 69 | tftp | file-transfer | | TCP | 1433 | mssql | database | | TCP | 3306 | mysql | database | | TCP | 5432 | postgresql | database | | TCP | 445 | smb | file-transfer | | UDP | 500 | ipsec | tunnel | | UDP | 4500 | ipsec-nat-t | tunnel | | TCP | 5060 | sip | voip | | UDP | 5060 | sip | voip |
ASA named port keywords: Map ASA port names to numbers before resolving — full table in references/parsing-patterns.md "Port Name Resolution". Caution: ASA literals predate IANA assignments (radius=1645, radius-acct=1646, kerberos=750) — do not "correct" them from prior knowledge; use the reference table.
On policy output: When a service match resolves to a known application, populate the policy's apps array with { vendor_name: "tcp/443", canonical: "https", confidence: 1.0, category: "web" }. The services array still keeps the port-based match. This enables downstream converters to use the app-aware rule on platforms that support it.
Unresolvable services: Complex port ranges, non-standard ports, or protocol groups that don't map to a single known application → keep as port-based services only, no apps entry.
15. Application Groups
ASA does not have application groups. However, when converting FROM an app-aware platform, object-group service entries that resolve entirely to known applications should be flagged as potential application_groups in the IR for downstream use.
16. Anonymous Objects
When inline addresses/services appear in ACLs or object groups without a named reference (e.g., host 10.0.1.10 directly in an ACL line), create anonymous objects with auto-generated names (e.g., anon-1-host, anon-2-net). This ensures every IR reference points to a named object.
17. Residual Config Capture
Capture unrecognized top-level commands verbatim. Categorize into: VPN/IPsec, AAA, QoS, PKI/Certificates, IPv6, Other. Store in residual_raw for manual review.
18. Transparent Mode
Detect: firewall transparent in config When in transparent mode:
- Interfaces are in bridge-groups instead of having IPs
bridge-groupon interfaces- BVI interfaces (
interface BVI) carry the management IP - Zones derived from nameifs still work the same way
19. Implicit Rules
The ASA implicit deny is scoped per bound ACL, not global: each ACL applied via access-group ends with an implicit deny for that interface/direction only. Applying an ACL on one interface does NOT disable security-level defaults for other interface pairs.
After building all policies from ACLs + access-groups, append:
- Implicit: Default Deny — one per access-group binding — action: "deny",
src_zones: [] for in direction (dst_zones for out; all any for global), remaining fields any, _implicit: true
- When every traffic-passing interface has a bound ACL (or a
globalaccess-group exists),
the per-binding denies may be collapsed into a single final any→any deny, _implicit: true
- For interfaces with NO ACL bound: do not fabricate a deny — security-level defaults still
apply (higher-to-lower permitted, lower-to-higher denied). Add a metadata.warnings entry ("no ACL bound on — security-level high-to-low permit applies") and, if downstream consumers need explicit rules, model the default permit as an _implicit: true allow policy from that zone to lower-security zones
Implicit-rule name values (e.g. "default-deny", "Implicit: Default Deny") are free-form labels; consumers must match implicit rules on _implicit: true, never on the name.
Output Format
Present results in the intermediate schema format documented in references/intermediate-schema.md.
Note: schema sections not yet populated by this pipeline (e.g., security_profile_objects, routing_contexts) are emitted empty ([]/{}); any unhandle
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: fastrevmd-lab
- Source: fastrevmd-lab/fwskillsshare
- License: Apache-2.0
- Homepage: https://mechub.org
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.