{"record":{"id":"aae78157d8c59a07","repo":"shadow1ng/fscan","slug":"netbios-smb-response-too-short","errorCode":null,"errorMessage":"netbios_smb_response_too_short","messagePattern":"netbios_smb_response_too_short","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/netbios.go","lineNumber":338,"sourceCode":"\t\t\t\t\tcase \"WorkstationService\":\n\t\t\t\t\t\tinfo.WorkstationService = name\n\t\t\t\t\tcase \"ServerService\":\n\t\t\t\t\t\tinfo.ServerService = name\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn info, nil\n}\n\n// parseNetBIOSSession 解析NetBIOS会话响应\nfunc (p *NetBIOSPlugin) parseNetBIOSSession(data []byte) (*NetBIOSInfo, error) {\n\tinfo := &NetBIOSInfo{Valid: false}\n\n\tif len(data) < 47 {\n\t\treturn info, fmt.Errorf(\"%s\", i18n.GetText(\"netbios_smb_response_too_short\"))\n\t}\n\n\tinfo.Valid = true\n\n\t// 解析OS版本信息\n\tblobLength := int(data[43]) + int(data[44])*256\n\tif len(data) >= 48+blobLength {\n\t\tosVersion := data[47+blobLength:]\n\t\tosText := p.cleanOSString(osVersion)\n\t\tif osText != \"\" {\n\t\t\tinfo.OSVersion = osText\n\t\t}\n\t}\n\n\t// 查找NTLM数据\n\tntlmStart := bytes.Index(data, []byte(\"NTLMSSP\"))\n\tif ntlmStart != -1 && len(data) > ntlmStart+45 {\n\t\tp.parseNTLMInfo(data[ntlmStart:], info)","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/netbios.go#L320-L356","documentation":"Guard in parseNetBIOSSession: the TCP 139 session response is shorter than the 47 bytes required to contain the NetBIOS session header and SMB negotiation fields. The truncated payload cannot be parsed for OS version or names, so the result stays invalid.","triggerScenarios":"Thrown at plugins/services/netbios.go:338 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase the read timeout so the full session response arrives","Verify the endpoint on 139 actually speaks the NetBIOS session protocol","Retry the session setup; mid-response resets cause truncation"],"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"}