{"record":{"id":"f58e76021095a4cf","repo":"shadow1ng/fscan","slug":"smbv1-session-send-failed-w","errorCode":null,"errorMessage":"smbv1_session_send_failed: %w","messagePattern":"smbv1_session_send_failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/smb_protocol.go","lineNumber":242,"sourceCode":"\tif err != nil {\n\t\tsession.LogDebug(i18n.Tr(\"smbv1_negotiate_read_failed\", err))\n\t}\n\n\t// 检查是否支持SMBv1\n\tif len(r1) > 0 {\n\t\treturn probeSMBv1(conn, target, timeout)\n\t}\n\n\t// SMBv2路径\n\treturn probeSMBv2(ctx, target, timeout, session)\n}\n\n// probeSMBv1 处理SMBv1协议信息收集\nfunc probeSMBv1(conn net.Conn, target string, timeout time.Duration) (*SMBTarget, error) {\n\t// 发送Session Setup请求\n\t_, err := conn.Write(smbv1SessionSetupPacket)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"smbv1_session_send_failed\"), err)\n\t}\n\n\tret, err := readSMBMessage(conn)\n\tif err != nil || len(ret) < 47 {\n\t\treturn nil, fmt.Errorf(\"%s: %w\", i18n.GetText(\"smbv1_session_read_failed\"), err)\n\t}\n\n\tinfo := &SMBTarget{\n\t\tProtocol: SMBProtocol1,\n\t}\n\n\t// 解析blob信息\n\tblobLength := int(bytesToUint16(ret[43:45]))\n\tblobCount := int(bytesToUint16(ret[45:47]))\n\n\tgssNative := ret[47:]\n\tgssLen := len(gssNative)\n","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/smb_protocol.go#L224-L260","documentation":"Guard in probeSMBv1: writing the Session Setup request packet over the SMBv1 connection failed after negotiate succeeded. The write error aborts SMBv1 information gathering (OS version, domain) for the target.","triggerScenarios":"Thrown at plugins/services/smb_protocol.go:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the SMBv1 probe","Verify the server still accepts SMBv1 (often disabled by hardening)","Fall back to the SMBv2 probe path"],"exampleFix":null,"handlingStrategy":"fallback","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"}