用途:通过阿里云云防火墙 OpenAPI(aliyun cloudfw CLI)对公网暴露面做只读扫描与分析,识别不必要暴露的资产和端口,评估暴露风险并生成整改建议。
主要能力:暴露概览统计;暴露公网 IP 明细与风险等级;暴露端口明细与风险评估;暴露资产的防火墙防护覆盖情况;最近 7 天新增暴露检测;按 IP 的风险原因;与漏洞防护、攻击事件的关联;互联网边界 ACL 策略覆盖检查。
使用方式:需 Aliyun CLI >= 3.3.3,可用 curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash 安装或更新。执行前运行 aliyun configure set --auto-plugin-install true 与 aliyun plugin update,并启用 AI 模式:aliyun configure ai-mode enable 及 aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-cfw-exposure-detection";每条命令需带 --user-agent AlibabaCloud-Agent-Skills/alibabacloud-cfw-exposure-detection。凭据通过 aliyun configure list 检查,需具备云防火墙只读权限(如 AliyunYundunCloudFirewallReadOnlyAccess)。RegionId 仅支持 cn-hangzhou(中国大陆)与 ap-southeast-1(香港/海外),默认 cn-hangzhou。核心步骤依次调用 DescribeInternetOpenStatistic、DescribeInternetOpenIp、DescribeInternetOpenPort、DescribeAssetList(含 NewResourceTag 查新增)、DescribeAssetRiskList、DescribeVulnerabilityProtectedList、DescribeRiskEventGroup、DescribeControlPolicy。退出前须执行 aliyun configure ai-mode disable。
适用场景:公网暴露面审计、高风险端口排查、新增暴露发现、指定 IP 暴露详情与风险原因查询。
限制:仅只读查询,数据仅来自 CLI,不读取日志文件、不访问服务器或私网资源;服务未开通时需先在控制台开通;单次风险查询最多 20 个 IP;部分步骤依赖前序结果。具体收费与价格暂未提供。