{"record":{"id":"95c0708c145e2ec0","repo":"shadow1ng/fscan","slug":"smbv2-ntlm-send-failed-w","errorCode":null,"errorMessage":"smbv2_ntlm_send_failed: %w","messagePattern":"smbv2_ntlm_send_failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/smb_protocol.go","lineNumber":336,"sourceCode":"\t\tflags := []byte{0x05, 0x80, 0x08, 0xa0}\n\t\tntlmData = buildNTLMSSPData(flags)\n\t}\n\n\t// 发送Session Setup\n\t_, err = conn2.Write(smbv2SessionSetupPacket)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"smbv2_session_send_failed\"), err)\n\t}\n\n\t_, err = readSMBMessage(conn2)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"smbv2_session_read_failed\"), err)\n\t}\n\n\t// 发送NTLM协商包\n\t_, err = conn2.Write(ntlmData)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"smbv2_ntlm_send_failed\"), err)\n\t}\n\n\tret, err := readSMBMessage(conn2)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"smbv2_ntlm_read_failed\"), err)\n\t}\n\n\tntlmOff := bytes.Index(ret, []byte(\"NTLMSSP\"))\n\tif ntlmOff == -1 {\n\t\treturn &SMBTarget{Protocol: SMBProtocol2}, nil\n\t}\n\n\tinfo := &SMBTarget{\n\t\tProtocol: SMBProtocol2,\n\t}\n\n\tparseNTLMChallenge(ret[ntlmOff:], info)\n\treturn info, nil","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/smb_protocol.go#L318-L354","documentation":"Guard in probeSMBv2: writing the constructed NTLMSSP NEGOTIATE packet failed after session setup completed. The NTLM negotiation that yields server version info cannot be sent, aborting the fingerprint attempt.","triggerScenarios":"Thrown at plugins/services/smb_protocol.go:336 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the NTLM exchange on a new connection","Increase the deadline","Verify no security device is resetting NTLM traffic"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}