Access Tokens Exposed Users Amazon Photos!

Access Tokens Exposed Users Amazon Photos!

Hackers with Amazon users’ authentication tokens could have stolen or encrypted personal photos & documents.

The Amazon Photos app for Android insufficiently protected user access tokens, according to a blog post published on Wed.

In theory, with exposed tokens, an attacker could have accessed users’ personal data from several different Amazon apps – not just Photos but also, for instance, Amazon Drive. They also could have performed a ransomware attack, locking up or permanently deleting photos, documents etc..

The findings were 1st reported to Amazon’s Vulnerability Research Program on Nov. 7th, 2021. On Dec.18th, Amazon announced that the issues had been fully resolved.

Loose Tokens

To authenticate users across various apps within their system, like other software suite vendors, Amazon uses access tokens. It is convenient for users, but also, potentially, for attackers.

In their report, researchers from Checkmarx described how access tokens naturally ‘leaked’ through an Amazon application programming interface (API) through “a misconfiguration of the com[.]amazon[.]gallery[.]thor[.]app[.]activity[.]ThorViewActivity component, which is implicitly exported in the app’s manifest file” – manifest files describe critical application information to the Android OS and Google Play store – “thus allowing external applications to access it.

HTTP request

Whenever this activity is launched, it triggers an HTTP request that carries a header with the customer’s access token.”

In a video explainer, they put it in simpler terms:

“You can think of it as the password being sent to other apps in plaintext.”

In addition to 3rd-party applications, the same unsecure token was also shared with Amazon Drive – used for file storage & sharing.

Could’ve Stolen / Deleted Data

There are any number of ways in which an attacker could’ve ed unsecured access tokens.

For example, with a malicious 3rd-party app installed on the victim’s phone, they could have redirected the token in a way “that effectively launches the vulnerable activity & triggers the request to be sent to a server controlled by the attacker.”

From there, the attacker could have accessed all kinds of personal information a victim had stored in Amazon Photos.

Amazon Drive

Because the tokens also leaked to Amazon Drive, attackers could have found, read, or even unrecoverably deleted files & folders in a victim’s Drive account.

Also, “with all these options available for an attacker,” the researchers speculated, “a ransomware scenario was easy to produce as a likely attack vector. A malicious actor would simply need to read, encrypt, & re-write the customer’s files while erasing their history.”

Amazon APIs

It is not clear just how many apps could have been targeted with such loose access tokens, as only a small number of Amazon APIs were analysed for the report. The real range could be quite a bit greater. Erez Yalon, VP of Security Research at Checkmarx, reflected on the implications, in a statement:

“In an era where we all blindly trust our technology suppliers & gladly store all our private & most coveted secrets on someone’s cloud, a reminder is necessary that these incidents might happen even to the best (Amazon.)”