diff --git a/plugin/channel.go b/plugin/channel.go index a00060c5..efdc065e 100644 --- a/plugin/channel.go +++ b/plugin/channel.go @@ -1,6 +1,5 @@ package plugin -import "C" import ( "bytes" "fmt" @@ -165,7 +164,7 @@ typedef UINT VCAPITYPE VIRTUALCHANNELWRITEEX(LPVOID pInitHandle, DWORD openHandl typedef VIRTUALCHANNELWRITEEX* PVIRTUALCHANNELWRITEEX; */ -//static channel name +// static channel name const ( CLIPRDR_SVC_CHANNEL_NAME = "cliprdr" //剪切板 RDPDR_SVC_CHANNEL_NAME = "rdpdr" //设备重定向(打印机,磁盘,端口,智能卡等) diff --git a/protocol/nla/ntlm.go b/protocol/nla/ntlm.go index 0f69912c..fc2459cc 100644 --- a/protocol/nla/ntlm.go +++ b/protocol/nla/ntlm.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/md5" "crypto/rc4" + "crypto/sha256" "encoding/binary" "encoding/hex" "time" @@ -410,7 +411,8 @@ func (n *NTLMv2) GetAuthenticateMessage(s []byte) (*AuthenticateMessage, *NTLMv2 if challengeMsg.NegotiateFlags&NTLMSSP_NEGOTIATE_UNICODE != 0 { n.enableUnicode = true } - glog.Infof("user: %s, passwd:%s", n.user, n.password) + pwHash := sha256.Sum256([]byte(n.password)) + glog.Infof("user: %s, passwd (SHA256 hash):%x", n.user, pwHash) domain, user, _ := n.GetEncodedCredentials() n.authenticateMessage = NewAuthenticateMessage(challengeMsg.NegotiateFlags,