Security Concern (ClickATell, ClickSend)
-
First, please create a GitHub repository so that people like me can create a pull request or maybe discuss these types of issues more privately. WordPress website is not exactly known for development tools.
And second, the code created for ClickATell and ClickSend providers is pretty much vulnerable to brute force attacks; not on the login process itself, but rather on the hash of the OTP code sent; which is worse since it is not possible to mitigate.
Both these plugins send the hash of the phone number and the generated OTP code to the client and since the phone number is known, the attacker only needs to crack the hash for the 9999 possible OTP codes. It takes less than a second for anyone sophisticated enough to crack the hash and to be honest you don’t need to be an expert to do so. So its a quite serious problem that might allow access to an administrator account to anyone with little knowledge.Following is a quick fix for this; just replace
$hash = md5( $str_mobile . $str_otp );
with
$hash = md5( md5( $str_mobile . $str_otp ) . wp_salt());
in “class-olws-clickatell-api.php” and “class-olws-clicksend-api.php” files.This simple change makes it a lot harder for anyone to crack the hash. A better solution would be to keep the hash in a table and not send it to the user. Or at least keep it in the PHP session.
https://www.php.net/manual/en/reserved.variables.session.php
- The topic ‘Security Concern (ClickATell, ClickSend)’ is closed to new replies.