This week, we have news of the eye-opening vulnerability on the Coinbase platform which netted $250,000 in bug bounty. There’s also an excellent guide on best practices for authentication and authorization for REST APIs, an article on the growth of bad bots and how to mitigate against them, and a fun read from APIHandyman on how to hack the Elgato Key light API.
This week’s major news story has been the disclosure of a major vulnerability in an API on Coinbase, a cryptocurrency trading platform. This vulnerability potentially allowed an attacker to make unlimited cryptocurrency trades between different currency accounts.
The vulnerability is a rather epic example of API1:2019 — Broken object-level authorization. To exploit the vulnerability, attackers needed two different cryptocurrency accounts and a modest balance in one account. Attackers could initiate a market order using the account with funds as the source account, but then could modify the API request to specify the other account with a low balance. Unfortunately, the Coinbase validation logic did not verify the source account properly and processed the trade normally. Thus, the attacker could complete the trade using cryptocurrency they did not in fact have.
The security researcher initially took to Twitter to publicize the potential issue to get in contact with the relevant security team at Coinbase. Once alerted, the response from Coinbase was exemplary, resulting in a complete resolution within 6 hours, and earning the security researcher a record $250,000 bounty. Coinbase themselves has covered the issue in their security blog, where they also describe additional compensating controls that would have reduced the impact.
At 42Crunch, we recently featured a webinar focused on API authentication and authorization, an evergreen hot topic for API developers and security teams. This week, we have an excellent concise guide on this topic, courtesy of StackOverflow.
The key takeaways from the guide include the following:
The single most important lesson worth repeating here for a developer is to leverage the power of standard libraries and frameworks as much as possible, not re-invent the wheel.
NordicAPIs has contributed an interesting article on the rise of bad bots and how these are impacting APIs.
The article sheds light on how “sneaker bots” (because they automated the online purchase of sneakers on websites) were born, how they evolved to scrape Twitter accounts to gain access to market news a fraction before human users, and how they process this information.
From an adversarial viewpoint, the ability to automate API access facilitates easy attacks and the subsequent exfiltration of data once a vulnerability is discovered. To counteract this, the authors suggest several mitigation strategies against bots:
As a little self-indulgence (I’m an owner of an Elgato Key light) this week, we have a great write-up from the APIHandyman on hacking the Key light internal API. The article describes how to use the proxy feature in Postman to capture requests from the Elgato desktop application to the Key light. The author then demonstrates how the API can be enumerated using standard light operations.
Finally, the author makes some observations on the quality of the API design including:
HTTP 200 OKcode was returned rather than an error code as might be expected.
All in all, a fun write-up showing some great Postman techniques and API design tips.
Источник: DZone Securitybitcoin api security authorization bots coinbase reverse engineering authenticaion bug bounty mobile api