HUB
Sign inSign up

fredcastillo/cis-lab

By fredcastillo

•Updated 4 days ago

CIS-based auditing and hardening for Cisco IOS and FortiGate; automated security checks and reports.

Image
Security
0

70

fredcastillo/cis-lab repository overview

⁠CIS-Lab

CIS-Lab is a Dockerized toolkit for auditing and hardening network devices in cybersecurity and networking labs. It was designed primarily for GNS3 environments and supports Cisco IOS devices (routers and switches) and FortiGate 7.0.x firewalls.

The image provides a ready-to-use management workstation with the tools required to audit device configurations, apply selected security recommendations, verify network services, and collect system logs.

⁠Features

  • Automated security audits: Inspect device configurations without making changes.
  • Configuration hardening: Apply selected security recommendations to Cisco IOS and FortiGate devices.
  • Before-and-after reports: Generate HTML and JSON reports showing control status and configuration differences.
  • Configuration backups: Save device configurations before applying changes.
  • Network verification: Check SSH, Telnet, HTTP, and HTTPS availability.
  • TLS validation: Test supported TLS protocol negotiation on the FortiGate management interface.
  • Nmap integration: Perform additional port verification.
  • Syslog collection: Receive and store network device logs.
  • Interactive CLI: Manage the toolkit through a single command: cis-lab.

⁠Supported platforms

PlatformDevice type
Cisco IOSRouters
Cisco IOSSwitches
FortiOS 7.0.xFortiGate firewalls

The toolkit uses Netmiko for network device connections and includes Paramiko 3.5.1 for SSH compatibility with the IOS images used in the lab.

⁠Installation

Pull the image from Docker Hub:

docker pull fredcastillo/cis-lab:1.0

Start an interactive container with a persistent working directory:

mkdir -p cis-lab-work

docker run --rm -it \
  -v "$PWD/cis-lab-work:/work" \
  fredcastillo/cis-lab:1.0

The container starts the syslog service and opens an interactive shell.

⁠Available commands

CommandDescription
cis-lab auditAudit devices without modifying their configurations
cis-lab applyBack up configurations, apply selected fixes, and generate post-hardening reports
cis-lab verifyVerify network connectivity, exposed ports, and TLS behavior
cis-lab verify --nmapInclude additional Nmap port scanning
cis-lab listDisplay the implemented security controls
cis-lab syslogStart the syslog receiver
cis-lab logsDisplay received log entries
cis-lab ipConfigure the container's network interface
cis-lab shellStart syslog and open an interactive shell

⁠Audit and hardening workflow

The toolkit provides two main operating modes:

Audit mode

cis-lab audit

Connects to the devices, evaluates the selected controls, and generates HTML and JSON reports without changing their configurations.

Apply mode

cis-lab apply

Creates configuration backups, applies available remediation commands, attempts to reconnect to Cisco devices, saves their configurations when possible, and performs a post-hardening assessment.

The generated reports include the initial and final status of the evaluated controls.

⁠Configuration and credentials

The working directory /work is mounted as a Docker volume. This allows inventories, reports, backups, and collected logs to persist outside the container.

The inventory is created automatically from the example template on first use. Adapt it to your own device addresses, management networks, interfaces, and exceptions.

Credentials can be supplied through environment variables:

  • CISCO_USER
  • CISCO_PASS
  • CISCO_ENABLE
  • FGT_USER
  • FGT_PASS

Alternatively, the application prompts for credentials interactively.

Do not store real credentials in the Docker image, inventory templates, or public repositories.

⁠Technology stack

  • Python 3.12
  • Debian Bookworm Slim
  • Netmiko
  • Paramiko 3.5.1
  • OpenSSH client
  • Nmap
  • OpenSSL
  • Netcat
  • tcpdump
  • iproute2
  • rsyslog

⁠Intended use

CIS-Lab is intended for educational environments, network security exercises, configuration auditing, and controlled GNS3 labs.

It helps students practice security assessment, configuration hardening, validation, and documentation through an automated workflow.

Security notice: Run the tool only against devices and networks you own or are explicitly authorized to assess. The apply mode modifies device configurations and may affect management connectivity. Always maintain console access and backups.

Benchmark note: The implementation evaluates a selected set of controls inspired by CIS Benchmark recommendations. It is an educational automation project, not an official CIS-CAT product or a certification of CIS compliance. Verify control references against the exact benchmark edition used in your environment.

⁠Author

Developed by Fred Sneyder Castillo Apolinar.

Docker Hub: fredcastillo/cis-lab⁠

Tag summary

Content type

Image

Digest

sha256:98653e694…

Size

74 MB

Last updated

4 days ago

docker pull fredcastillo/cis-lab