Upgrade to Pro — share decks privately, control downloads, hide ads and more …

(Mis)Using APIs for Fun & Profit

(Mis)Using APIs for Fun & Profit

Over the last decade, APIs have opened up new worlds and allowed us to accomplish wildly complex tasks with just a few lines of code. They’ve made the extraordinary almost mundane. Unfortunately, poorly designed and implemented APIs have opened us up to vulnerabilities and attacks we never considered before. While Equifax is the biggest and one of the most well known, odds are there are APIs within your systems which are just as bad but you don’t even know.

In this session, we’ll walk through a number of (now resolved!) vulnerabilities from production APIs, how they were found, and what you should watch for in your own APIs.

Keith Casey

April 21, 2018
Tweet

More Decks by Keith Casey

Other Decks in Technology

Transcript

  1. CAMBRIDGE ANALYTICS • Not a data breach, not even misuse

    • They used it exactly as Facebook planned, designed, and implemented • Just as thousands of others have
  2. PANERA • Completely unprotected API • Reported in August 2017,

    not addressed until April 2018 • Gave access to name, address, email, username, phone, birthday, food preferences, and last 4 credit card digits
  3. WHAT CAN I DO WITH THIS? • Change your food

    preferences? • Verify your email address/phone number? • Use your home address? • Hijack your Google & Twitter accounts and get control of your Mac?
  4. ATTACK PATTERN • Use Panera data to get name, email,

    address and last 4 cc digits • Contact Tech Support to update email address, reset accounts, take over everything • Contact [cell carrier] to port number to compromise 2FA-protected systems & data
  5. EQUIFAX • Identity Proofing • When you sign up for

    something and have to verify who you are • Realistically, this no longer exists. With this data, anyone can “prove” they are anyone they want
  6. API JOURNEY: A MATURITY MODEL 5 Phase 0 Integrate internal

    systems by introducing Private APIs Phase 1 Internal advocacy & collaboration for internal APIs and CoE/ Governance Phase 2 Limited API access to partners, resellers and suppliers Phase 3 Grow these APIs as full fledged products with external developer access Either monetized directly or to reach new customers and enter new markets. Security Team evaluates use cases, interfaces, authentication, access management, etc, etc Credit: okta.com
  7. API JOURNEY: A MATURITY MODEL 6 Phase 0 Integrate internal

    systems by introducing Private APIs Phase 1 Internal advocacy & collaboration for internal APIs and CoE/ Governance Phase 2 Limited API access to partners, resellers and suppliers Phase 3 Grow these APIs as full fledged products with external developer access Either monetized directly or to reach new customers and enter new markets. The security issue was always there Credit: okta.com
  8. THREE GROUPS: ALWAYS AT WAR ODDS Buyers: Integration Architects (NEW)

    Influencers: Developers Security Architects Credit: okta.com
  9. AuthN vs AuthZ • Authentication is “who you are” •

    Authorization is “what are you allowed to do” • Understand who needs to do what when • is_admin is NOT enough
  10. • Scope your API keys • Expire/rotate your keys •

    Provide multiple keys? • Understand the use cases you’re addressing KEY & TOKEN MGMT
  11. • What does sample code demonstrate? • What the API

    does • How to use the API • The Right Way to use the API WRITE GOOD EXAMPLES
  12. Don’t: Roll your own Encryption • Use an existing library

    that implements an open standard, audit if you prefer • Don’t create your own encryption • No, don’t. You’re not special. • No, not even then. Are you even listening?
  13. Don’t: Leak your own Data • What can I tell

    from using your API? • Do the URLs tell a story? • Does that put customers at risk? • Does it share internal company data?
  14. Don’t: Collect or Share Extra Data • Cambridge Analytica •

    Why should people to share this information? • How might Keith a bad actor use this information? • You can’t leak what you don’t have