shadow1ng/fscan · info

i18n.GetText("ms17010_not_vulnerable")

Error message

i18n.GetText("ms17010_not_vulnerable")

What it means

The MS17-010 Scan plugin returns a non-success ScanResult whose Error field carries the localized message "ms17010_not_vulnerable" when the SMB probe completed without error but the target was determined NOT to be vulnerable to EternalBlue (checkMS17010Vulnerability returned vulnerable=false). It is not an exceptional failure: it is how the plugin reports a 'clean' host via the uniform ScanResult error channel.

Source

Thrown at plugins/services/ms17010.go:81

			msg += fmt.Sprintf(" [%s]", osVersion)
		}
		session.LogVuln(msg)
		if hasBackdoor {
			session.LogVuln(fmt.Sprintf("MS17-010 %s has DOUBLEPULSAR SMB IMPLANT", target))
		}

		return &ScanResult{
			Success: true,
			Type:    plugins.ResultTypeVuln,
			Service: "ms17010",
			Banner:  i18n.Tr("ms17010_vuln_banner", osVersion),
		}
	}

	return &ScanResult{
		Success: false,
		Service: "ms17010",
		Error:   fmt.Errorf("%s", i18n.GetText("ms17010_not_vulnerable")),
	}
}

// Exploit 执行MS17-010漏洞利用
func (p *MS17010Plugin) Exploit(ctx context.Context, info *common.HostInfo, creds Credential, session *common.ScanSession) *ExploitResult {
	config := session.Config
	target := info.Target()
	session.LogSuccess(i18n.Tr("ms17010_start", target))

	var output strings.Builder
	output.WriteString(i18n.Tr("ms17010_exploit_header", target) + "\n")

	// 首先确认漏洞存在
	vulnerable, osVersion, hasBackdoor, err := p.checkMS17010Vulnerability(ctx, info.Host, session)
	if err != nil {
		output.WriteString("\n" + i18n.Tr("ms17010_exploit_check_failed", err) + "\n")
		return &ExploitResult{
			Success: false,

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Treat Success==false with this Error as an informational 'not vulnerable' verdict, not a crash — check Error text before alarming.
  2. Confirm the target actually exposes SMBv1 on 445 (e.g. with an SMB probe) if you expected it to be vulnerable; MS17-010 requires SMBv1.
  3. Verify patch status on the host; if it is patched, this result is correct and no action is needed.
  4. If you expected the plugin to skip the host, pre-filter targets by port 445 before invoking Scan (port != 445 yields ms17010_port_only instead).

Example fix

// before: treating every Scan error as a hard failure
if res := plugin.Scan(ctx, host, session); res.Error != nil {
    log.Fatalf("scan failed: %v", res.Error)
}
// after: distinguish 'not vulnerable' from real probe errors
if res := plugin.Scan(ctx, host, session); res.Error != nil {
    if strings.Contains(res.Error.Error(), i18n.GetText("ms17010_not_vulnerable")) {
        log.Printf("host not vulnerable, skipping")
    } else {
        log.Printf("probe error: %v", res.Error)
    }
}
Defensive patterns

Strategy: fallback

Validate before calling

if host.Port != 445 { /* skip ms17010 plugin */ }

Type guard

func isNotVulnerable(res *ScanResult) bool { return res != nil && !res.Success && res.Error != nil && strings.Contains(res.Error.Error(), "not_vulnerable") }

Prevention

When it happens

Trigger: Calling MS17010Plugin.Scan on a host with port 445 open where the SMB negotiation/trans2 probe completes but the target does not exhibit the MS17-010 vulnerable behavior (no proper SMB response patterns indicating EternalBlue, no DOUBLEPULSAR backdoor).

Common situations: Scanning patched Windows hosts (post MS17-01x updates), non-Windows SMB implementations (Samba), or hosts where SMBv1 was disabled but 445 still answers; also misreading a benign result as a failure.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06). Data as JSON: /api/errors/d2227ee651133405. Report an issue: GitHub.