package ms17010 import ( "github.com/shadow1ng/fscan/plugins/adapters" "github.com/shadow1ng/fscan/plugins/base" LegacyPlugins "github.com/shadow1ng/fscan/plugins/legacy" ) // NewMS17010Plugin 创建MS17010漏洞检测插件 func NewMS17010Plugin() base.Plugin { // 插件元数据 metadata := &base.PluginMetadata{ Name: "ms17010", Version: "1.0.0", Author: "fscan-team", Description: "MS17010 SMB远程代码执行漏洞检测 (EternalBlue)", Category: "vulnerability", Ports: []int{445}, // SMB端口 Protocols: []string{"tcp"}, Tags: []string{"smb", "ms17010", "eternalblue", "vulnerability"}, } // 适配器选项 options := &adapters.LegacyPluginOptions{ CheckBruteFlag: false, // MS17010不依赖暴力破解标志 IsVulnPlugin: true, // 这是漏洞检测插件 IsInfoPlugin: false, CustomPorts: []int{445}, // 固定使用SMB端口 } // 创建适配器,直接使用老版本的MS17010函数 return adapters.NewLegacyPlugin(metadata, LegacyPlugins.MS17010, options) } // init 自动注册MS17010插件 func init() { // 创建插件工厂 metadata := &base.PluginMetadata{ Name: "ms17010", Version: "1.0.0", Author: "fscan-team", Description: "MS17010 SMB远程代码执行漏洞检测 (EternalBlue)", Category: "vulnerability", Ports: []int{445}, Protocols: []string{"tcp"}, Tags: []string{"smb", "ms17010", "eternalblue", "vulnerability"}, } factory := base.NewSimplePluginFactory(metadata, func() base.Plugin { return NewMS17010Plugin() }) base.GlobalPluginRegistry.Register("ms17010", factory) }