Network Security Control Reviews

Network Security Control Reviews

Enables automated review and analysis of network security controls (AWS Security Groups, Network ACLs) using natural language queries. Supports NSC configuration reviews, network segmentation testing, and identifying security gaps through conversational LLM interaction.

Category
访问服务器

README

Network Security Control Reviews with MCP and LLMs

Illustrative diagram showing the architecture of the NSC Reviews with MCP and LLMs

Overview

An educational lab exercise demonstrating how to use Model Context Protocol (MCP) servers with LLMs to perform automated Network Security Control (NSC) configuration reviews and network segmentation analysis. This lab uses AWS Security Groups and Network ACLs as examples of Network Security Controls, enabling security professionals to "talk to" NSC configurations using natural language queries. While this implementation focuses on AWS, the architecture is extensible to support other NSC types including Azure Network Security Groups (NSGs), GCP Firewall Rules, OCI Security Lists, and traditional on-premises firewalls.

Key Features

  • Read-only MCP Server - Parse and query NSC configurations
  • Natural Language Queries - Use LLMs to analyze NSC rules and segmentation through conversational queries
  • Network Segmentation Test Environment - AWS test environment with production and development VPCs demonstrating NSC configurations
  • Segmentation Testing - Test network segmentation between zones/VPCs using NSC rules

Quick Start

  1. Set up AWS environment with Terraform - Follow the AWS Setup Guide to deploy test infrastructure (VPCs, Security Groups, Network ACLs) using Infrastructure as Code
  2. Install and configure MCP server - Follow the MCP Setup Guide to install dependencies and connect to your LLM
  3. Start querying - Load NSC configurations from AWS and analyze them using natural language queries such as those in LLM Usage Examples.

Project Structure

.
├── mcp-server/          # MCP server implementation
│   ├── src/
│   │   ├── parsers/    # NSC parsers
│   │   └── tools/       # MCP tool definitions
│   └── tests/          # Unit tests (mocked) and integration tests (real AWS)
├── terraform/          # Terraform Infrastructure as Code (IaC) for AWS test environment
│   └── main.tf         # Defines VPCs, Security Groups, Network ACLs, and rules
└── docs/               # Documentation

MCP Server Tools

The MCP server provides tools for querying NSC configurations. This implementation uses AWS Security Groups and Network ACLs as examples:

  • list_vpcs - List all VPCs in AWS account with filtering by tags
  • get_config - Load NSC configurations (AWS Security Groups and Network ACLs) directly from AWS
  • query_rules - Query NSC rules by various criteria (source, destination, port, protocol, tags), or get all rules with no parameters

Example Use Cases

  • NSC Configuration Review - Review Network Security Control rules to identify overly permissive configurations, security gaps, and compliance issues
  • Segmentation Testing - Verify network isolation between production and development networks using NSC rules and detect NSC rules that violate network segmentation policies

See LLM Usage Examples for detailed examples using AWS Security Groups and Network ACLs.

Documentation

  • AWS Setup Guide - Set up AWS test environment with Security Groups and Network ACLs (NSC examples)
  • MCP Setup Guide - MCP server installation, configuration, and secure credential management
  • LLM Usage Examples - Detailed examples of NSC reviews and segmentation testing using AWS Security Groups and Network ACLs
  • Troubleshooting - Common issues and solutions

Network Security Controls (NSCs)

This lab demonstrates NSC reviews using AWS Security Groups and Network ACLs as practical examples. NSCs are rules and policies that govern network traffic flow, including, but not limited to:

  • AWS Security Groups: Stateful, instance-level firewalls (the example used for this lab)
  • AWS Network ACLs: Stateless, subnet-level firewalls (the example used for this lab)
  • Azure Network Security Groups (NSGs): Azure's NSC implementation
  • Google Cloud Platform (GCP) Firewall Rules: GCP's NSC implementation
  • Oracle Cloud Infrastructure (OCI) Security Lists: OCI's NSC implementation
  • Traditional On-Premises Firewalls: Palo Alto, Check Point, Fortinet, Cisco

Extensibility

This MCP server architecture is designed to be extensible. While the current implementation uses AWS Security Groups and Network ACLs as examples, you can extend it to support other NSC types:

  1. Create a parser: Implement a parser class following the pattern in mcp-server/src/parsers/aws_security_groups.py or aws_network_acls.py
  2. Add MCP tools: Extend mcp-server/src/tools/nsc_tools.py to support the new NSC parser
  3. Update documentation: Add examples and usage instructions for the new NSC type

See mcp-server/src/parsers/README.md for extensibility documentation and examples.

Learning Objectives

After completing this lab, you should be able to:

  • Infrastructure as Code (Terraform): Deploy and manage AWS infrastructure using Terraform, including VPCs, Security Groups, Network ACLs, and their rules
  • MCP Server Development: Understand how MCP servers enable LLM interaction with structured data
  • NSC Analysis: Use natural language and LLMs to query NSC configurations
  • Security Review: Identify security and segmentation issues in NSC rules
  • NSC Architecture: Understand how different AWS NSC types (Security Groups vs Network ACLs) operate at different layers (instance-level vs subnet-level)

License

MIT License - See LICENSE file for details

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选