{"record":{"id":"bf093e3582b22650","repo":"projectdiscovery/nuclei","slug":"dial-epmapper-w","errorCode":null,"errorMessage":"dial epmapper: %w","messagePattern":"dial epmapper: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/dcerpc/dcerpc.go","lineNumber":216,"sourceCode":"//\n// @example\n// ```javascript\n// const dcerpc = require('nuclei/dcerpc');\n// const c = new dcerpc.Client('dc01', 'acme.local', 'admin', 'P@ss');\n// const eps = c.RpcDump();\n// for (const e of eps) { log(e.UUID + ' ' + e.Annotation); }\n// ```\nfunc (c *Client) RpcDump(ctx context.Context) ([]Endpoint, error) {\n\tif !protocolstate.IsHostAllowed(c.nj.ExecutionId(), c.Host) {\n\t\treturn nil, protocolstate.ErrHostDenied.Msgf(c.Host)\n\t}\n\tdialer := protocolstate.GetDialersWithId(c.nj.ExecutionId())\n\tif dialer == nil {\n\t\treturn nil, fmt.Errorf(\"dialers not initialized for execution %s\", c.nj.ExecutionId())\n\t}\n\tconn, err := dialer.Fastdialer.Dial(ctx, \"tcp\", net.JoinHostPort(c.Host, strconv.Itoa(135)))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"dial epmapper: %w\", err)\n\t}\n\tdefer func() { _ = conn.Close() }()\n\n\trpc := gprpc.NewClientTCP(gprpc.NewTCPTransport(conn))\n\tif err := rpc.Bind(gpepm.UUID, gpepm.MajorVersion, gpepm.MinorVersion); err != nil {\n\t\treturn nil, fmt.Errorf(\"epmapper bind: %w\", err)\n\t}\n\tepm := gpepm.NewEpmClient(rpc)\n\treturn epm.Lookup()\n}\n\n// SamrEnumerateUsers connects to SAMR and returns every domain user record\n// (impacket: samrdump.py).\n//\n// @example\n// ```javascript\n// const c = new dcerpc.Client('dc01', 'acme.local', 'admin', 'P@ss');\n// const users = c.SamrEnumerateUsers();","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/dcerpc/dcerpc.go#L198-L234","documentation":"RpcDump dials tcp/<host>:135 via the fastdialer and the dial failed: connection refused, i/o timeout, no route, or DNS resolution failure. A pure L3/L4 reachability problem for the RPC endpoint-mapper port, raised after the host allow/deny policy check already passed.","triggerScenarios":"Client.RpcDump() against a down/unreachable host, a host firewalled on 135 (Windows client SKUs block inbound RPC by default), a non-Windows device answering nothing on 135, or a filtered VPN path.","commonSituations":"Corporate or host firewalls filtering 135; scanning workstations with File and Printer Sharing disabled; typo'd hostname that never resolves; IPS dropping RPC traffic.","solutions":["Confirm 135/tcp is open on the target (nuclei port check or nmap -p135) and fix firewalling on the path.","Verify the target is actually Windows and the RPC service is running.","If only 445 is permitted, skip RpcDump and use the named-pipe methods (SamrEnumerateUsers, EnumServices).","Check name resolution of c.Host (use an IP to bypass DNS issues)."],"exampleFix":"// before\nconst eps = c.RpcDump(); // dial epmapper: dial tcp ...:135: i/o timeout\n\n// after\nlet eps;\ntry {\n  eps = c.RpcDump();\n} catch (e) {\n  // 135 filtered: fall back to named-pipe enumeration over 445\n  log('epmapper unreachable (' + e + '), falling back to SAMR over 445');\n  eps = [];\n}","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"let endpoints = null;\nfor (let attempt = 0; attempt < 2 && endpoints === null; attempt++) {\n  try {\n    endpoints = c.RpcDump();\n  } catch (e) {\n    const msg = String(e);\n    if (!msg.includes('dial epmapper')) throw e; // only retry dial failures\n    log('epmapper dial failed, attempt ' + attempt + ': ' + msg);\n  }\n}\nif (endpoints === null) { /* 135 unreachable: fall back to pipe-based methods over 445 */ }","preventionTips":["Verify 135/tcp reachability before running the template (separate connectivity check).","Prefer IP literals to avoid DNS resolution failures masquerading as dial errors.","Design templates to degrade to 445-only enumeration when 135 is filtered."],"tags":["network","epmapper","rpc","firewall","connectivity"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}