shadow1ng/fscan · info
i18n.GetText("ms17010_port_only")
Error message
i18n.GetText("ms17010_port_only") What it means
The MS17-010 (EternalBlue) plugin only supports SMB on TCP port 445. During Scan, if info.Port is anything other than 445, it immediately returns an unsuccessful ScanResult with the localized 'ms17010_port_only' message instead of attempting the check.
Source
Thrown at plugins/services/ms17010.go:46
// NewMS17010Plugin 创建MS17010插件
func NewMS17010Plugin() *MS17010Plugin {
return &MS17010Plugin{
BasePlugin: plugins.NewBasePlugin("ms17010"),
}
}
// GetPorts 实现Plugin接口
// Scan 执行MS17-010扫描
func (p *MS17010Plugin) Scan(ctx context.Context, info *common.HostInfo, session *common.ScanSession) *ScanResult {
target := info.Target()
// 检查端口
if info.Port != 445 {
return &ScanResult{
Success: false,
Service: "ms17010",
Error: fmt.Errorf("%s", i18n.GetText("ms17010_port_only")),
}
}
// 执行MS17010漏洞检测
vulnerable, osVersion, hasBackdoor, err := p.checkMS17010Vulnerability(ctx, info.Host, session)
if err != nil {
return &ScanResult{
Success: false,
Service: "ms17010",
Error: err,
}
}
if vulnerable {
msg := fmt.Sprintf("MS17-010 %s", target)
if osVersion != "" {
msg += fmt.Sprintf(" [%s]", osVersion)
}View on GitHub (pinned to 95cc12e753)
Solutions
- Ensure the target list contains hosts with port 445 open (or scan 445 explicitly)
- If SMB is only on 139, port-forward or test 445 directly; the check requires native port 445
- Fix upstream service-detection so SMB hosts are reported with their 445 endpoint
- For nonstandard forwarded ports, adjust the plugin check to accept the mapped port knowingly
Example fix
// before (target spec)
hosts: [{host: "10.0.0.5", port: 139}]
// after
hosts: [{host: "10.0.0.5", port: 445}] Defensive patterns
Strategy: validation
Validate before calling
if info.Port != 445 {
return errors.New("ms17010 check requires port 445")
} Type guard
func isSMBTarget(info HostInfo) bool {
return info.Port == 445
} Try / catch
res := plugin.Scan(ctx, info, session)
if res.Error != nil && strings.Contains(fmt.Sprint(res.Error), "port") {
log.Infof("skipping MS17-10 on %s:%d — needs 445", info.Host, info.Port)
return nil
} Prevention
- Filter scan targets to hosts with 445/tcp open before dispatching the plugin
- Ensure service discovery reports the SMB endpoint on 445, not 139
- For NAT/port-forwarded SMB, remap targets to the original 445 port
When it happens
Trigger: A plugin dispatch/scan entry passes a HostInfo whose Port != 445 — e.g. the scan targets 139 (NetBIOS) or an arbitrary port where SMB was detected.
Common situations: Scanning legacy hosts exposing SMB only over NetBIOS port 139; service-discovery mapping SMB to a nonstandard port behind NAT/port-forwarding; misconfigured scan target lists.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- i18n.GetText("ms17010_not_vulnerable")
- ms17010_connection_error: %w
- ms17010_send_protocol_error: %w
- MS17-010 exp failed: %w
- Failed to listen on port: %w
AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06).
Data as JSON: /api/errors/babe4dbc646365fc.
Report an issue: GitHub.