<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">thanks. I've swapped over to using NTLM hashes <div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Regards,<br class=""><br class=""><b class="">Christian Salway <br class=""></b>IT Consultant<br class="">Tel: 07463 331432<br class=""><a href="mailto:christian.salway@naimuri.com" class="">christian.salway@naimuri.com</a><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="http://www.naimuri.com" class=""><br class="Apple-interchange-newline" style="color: rgb(0, 105, 217); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: underline;"><span style="color: rgb(0, 105, 217); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: underline;"><span><img apple-inline="yes" id="88A16ADF-368D-4F70-92A4-91EC366A00FC" src="cid:35E087B0-19E1-4B6D-9410-B6F791DC7FF1" class=""></span>
</span></a></div><a href="http://www.naimuri.com" class="">
</a></div><div><br class=""><blockquote type="cite" class=""><div class="">On 14 May 2018, at 10:13, Tobias Brunner <<a href="mailto:tobias@strongswan.org" class="">tobias@strongswan.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Christian,<br class=""><br class=""><blockquote type="cite" class="">but what if the server stored the password in a sha256(md4(password))<br class="">hash and then when it received the md4 hash from the client, hashed that<br class="">with sha256 to compare to?<br class=""></blockquote><br class="">It doesn't receive the MD4 hash, which is only a part of the calculation<br class="">of EAP-MSCHAPv2 (the NT password hash). The actual value that's<br class="">transmitted (ChallengeResponse) and has to be verified (by doing the<br class="">same calculation) also incorporates random challenges (see RFC 2759 [1]<br class="">for details). Which is why the only thing you can store instead of the<br class="">plainttext password is the NT hash (ntlm secrets in swanctl.conf).<br class=""><br class=""><blockquote type="cite" class="">The Server can send any fake md4 hash across the network to the client<br class="">(unless the client does its own check of the hash)...<br class=""></blockquote><br class="">It does, the server sends its an AuthenticatorResponse, which<br class="">incorporates the client's response and the random challenges (including<br class="">one provided by the client) to prove it knows the password. So the EAP<br class="">method does provide mutual authentication, however, a weak version<br class="">because the server is authenticated after the client. Which means a<br class="">MITM could attack a weak client password, which is why the server should<br class="">be authenticated via IKEv2 pubkey authentication first (i.e. EAP-only<br class="">authentication is not allowed for EAP-MSCHAPv2). EAP-MSCHAPv2 can also<br class="">be tunneled in another EAP method (e.g. EAP-TTLS or EAP-PEAP) to<br class="">authenticate the AAA server first.<br class=""><br class="">There are, of course, several other EAP methods based on passwords, with<br class="">much stronger algorithms and some of them don't require plaintext<br class="">passwords. The problem is that common clients (as those built-in<br class="">Windows and Apple OSes) don't support them (and neither does strongSwan<br class="">actually).<br class=""><br class="">Regards,<br class="">Tobias<br class=""></div></div></blockquote></div><br class=""></div></body></html>