Test SMTP NTLM AUTH with TELNET + hint
The process:
220 server.local.com Microsoft ESMTP MAIL Service ready at Thu, 18 Aug 2022 08:13:52 -0700
helo
250 server.local.com Hello [2.12.2.14]
ehlo
250-server.local.com Hello [2.12.2.14]
250-SIZE 37748736
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH NTLM LOGIN
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-SMTPUTF8
250 XRDST
AUTH LOGIN
334 VXNlcm5hbWU6
hidden base64 username
334 UGFzc3dvcmQ6
hidden base64 password
235 2.7.0 Authentication successful
mail from:user@local.com
250 2.1.0 Sender OK
rcpt to:admin@local.com
250 2.1.5 Recipient OK
data
354 Start mail input; end with <CRLF>.<CRLF>
test
.
250 2.6.0 <792e2375-0efd-4232-8b7c-51802a1a3b45@server.local.com> [InternalId=21350282428684, Hostname=server.local.com] 1360 bytes in 2.929, 0.453 KB/sec Queued mail for delivery
quit
221 2.0.0 Service closing transmission channel
Connection to host lost.
Notice: the base64 linux and windows encoding are different.
The command to encode in powershell:
[System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(“password”))
hint: https://stackoverflow.com/questions/37996640/how-can-i-base64-encode-a-string-on-linux-so-it-matches-windows-unicode-getbytehttps://stackoverflow.com/questions/37996640/how-can-i-base64-encode-a-string-on-linux-so-it-matches-windows-unicode-getbyte
If you plan to bring a string encoded in Powershell into Linux then do the following, first encode in Powershell
$string = "That's no moon!"
[system.convert]::ToBase64String([System.Text.Encoding]::unicode.getbytes($String))
VABoAGEAdAAnAHMAIABuAG8AIABtAG8AbwBuACEA
Then in Linux do the following:
echo VABoAGEAdAAnAHMAIABuAG8AIABtAG8AbwBuACEA | base64 -d | iconv -f utf-16 -t utf-8; echo
That's no moon!
Ubuntu + Create a user with password from the parameter Exchange 2019 + renew the certificate
Comments are currently closed.