Skip to content

Commit 28097c2

Browse files
dcerpcauth: Add option to disable SPNEGO
1 parent ccb9193 commit 28097c2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

dcerpcauth/dcerpcauth.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ type Options struct {
3737
// Debug can be set to enable debug output, for example with
3838
// adauth.NewDebugFunc(...).
3939
Debug func(string, ...any)
40+
41+
// Use raw NTLM and Kerberos instead of wrapping it in SPNEGO.
42+
DisableSPNEGO bool
4043
}
4144

4245
func (opts *Options) debug(format string, a ...any) {
@@ -63,7 +66,9 @@ func AuthenticationOptions(
6366
return nil, err
6467
}
6568

66-
dcerpcOptions = append(dcerpcOptions, dcerpc.WithMechanism(ssp.SPNEGO))
69+
if !upstreamOptions.DisableSPNEGO {
70+
dcerpcOptions = append(dcerpcOptions, dcerpc.WithMechanism(ssp.SPNEGO))
71+
}
6772

6873
switch {
6974
case target.UseKerberos || creds.ClientCert != nil:

0 commit comments

Comments
 (0)