Skip to content

Commit

Permalink
Fix the bug of the corresponding relationship between dwLogonType and…
Browse files Browse the repository at this point in the history
… dwLogonProvider in MakeToken
  • Loading branch information
s3cst4rs authored and moloch-- committed Jan 3, 2023
1 parent 35eedd7 commit cc55f38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion implant/sliver/priv/priv_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ func MakeToken(domain string, username string, password string, logonType uint32
if err != nil {
return err
}
err = syscalls.LogonUser(pu, pd, pp, logonType, syscalls.LOGON32_PROVIDER_DEFAULT, &token)
if logonType == 0 {
err = syscalls.LogonUser(pu, pd, pp, logonType, syscalls.LOGON32_PROVIDER_WINNT50, &token)
} else {
err = syscalls.LogonUser(pu, pd, pp, logonType, syscalls.LOGON32_PROVIDER_DEFAULT, &token)
}
if err != nil {
// {{if .Config.Debug}}
log.Printf("LogonUser failed: %v\n", err)
Expand Down

0 comments on commit cc55f38

Please sign in to comment.