A researcher was awarded $10,000 by Facebook for the discovery of a critical vulnerability that could have been exploited to hack Instagram accounts.

The white-hat hacker Laxman Muthiyah has discovered a critical vulnerability that could have been exploited to hack Instagram accounts.

The process affected Instagram’s password recovery process for mobile devices that leverages on a six-digit code sent to the users’ phone to change the password.

The photo and video-sharing social networking service implemented a mechanism that prevents brute-force attacks aimed at obtaining this code.

Muthiyah discovered that Instagram randomly generates for every device an ID that is included in the password reset request. This ID is also used to check the validity of the code.

Muthiyah discovered that Instagram allowed the same device ID to be used to request codes for multiple user accounts, allowing attackers to carry out brute-force attacks to obtain the six-digit codes.

“As you can see in my previous post, device ID is the unique identifier used by Instagram server to validate password reset codes. When a user requests a pass code using his / her mobile device, a device ID is sent along with the request.” wrote the expert. “The same device ID is used again to verify the passcode.

Verify pass code

POST /api/v1/accounts/account_recovery_code_verify/ HTTP/1.1 User-Agent: Instagram 92.0.0.11.114 Android (27/8.1.0; 440dpi; 1080×2150; Xiaomi/ xiaomi ; Redmi Note 6 Pro; tulip; qcom ; en_IN; 152830654) Accept-Language: en-IN, en-US Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Accept-Encoding: gzip, deflate Host: i.instagram.com Connection: keep-alive reecover_code=123456&device_id=device-id

“Device ID is random string generated by Instagram application. So what if the same device ID is used to request pass codes of multiple Instagram accounts? I checked it and realized that same device ID can be used to request multiple pass codes of different users. “

The expert explained that are one million combinations for a 6 digit pass code (000001 to 999999). It is possible to increase the probability of hacking Instagram accounts by requesting reset codes of multiple users.

“For example, if you request pass code of 100 thousand users using the same device ID, you can have a 10 percent success rate since 100k codes are issued to the same device ID.” continues the expert. “If we request pass codes for 1 million users, we would be able to hack all the one million accounts easily by incrementing the pass code one by one.”

Considering that the six-digit code expires after 10 minutes, it is necessary to request codes for one million Instagram users to have a 100% success rate.

Facebook awarded Muthiyah $10,000 for his findings.

Does the surname Muthiyah sound familiar?

In July, Muthiyah reported another flaw to Instagram that would have allowed attackers to take over any account.

The expert discovered that the rate limiting can be bypassed by carrying out a brute force attack from different IP addresses and leveraging race condition, sending concurrent requests.

The hacker also published a video PoC of the attack that shows the exploitation of the flaw while hacking an Instagram account using 200,000 different passcode combinations without being blocked.

Laxman Muthiyah received by Facebook a $30,000 reward as part of its bug bounty program.

In the past, Muthiyah also received other rewards from Facebook for flaws that could have been exploited to delete videos and delete a user’s photos .

Pierluigi Paganini