Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Pentesting APIs

You're reading from   Pentesting APIs A practical guide to discovering, fingerprinting, and exploiting APIs

Arrow left icon
Product type Paperback
Published in Sep 2024
Publisher Packt
ISBN-13 9781837633166
Length 290 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Maurício Harley Maurício Harley
Author Profile Icon Maurício Harley
Maurício Harley
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: Introduction to API Security
2. Chapter 1: Understanding APIs and their Security Landscape FREE CHAPTER 3. Chapter 2: Setting Up the Penetration Testing Environment 4. Part 2: API Information Gathering and AuthN/AuthZ Testing
5. Chapter 3: API Reconnaissance and Information Gathering 6. Chapter 4: Authentication and Authorization Testing 7. Part 3: API Basic Attacks
8. Chapter 5: Injection Attacks and Validation Testing 9. Chapter 6: Error Handling and Exception Testing 10. Chapter 7: Denial of Service and Rate-Limiting Testing 11. Part 4: API Advanced Topics
12. Chapter 8: Data Exposure and Sensitive Information Leakage 13. Chapter 9: API Abuse and Business Logic Testing 14. Part 5: API Security Best Practices
15. Chapter 10: Secure Coding Practices for APIs 16. Index 17. Other Books You May Enjoy

Importance of API security

Even with the simple code and template examples you have seen here, an attentive reader will realize that potential security flaws may arise from them since those simple data structures and queries can result in extensive resource consumption with a small number of lines. Secure software development is not a new buzzword but has gradually received more focus as new threats and attacks enter general awareness.

Some companies prefer investing more of their time and money into containment strategies, such as implementing an incident response team, bound to a business continuity plan. Albeit very important, we know that such teams are put into action when something has already happened. They can only do damage control, trying to reduce the impact some intrusion has on the company’s assets. Some other companies believe that their systems are secure simply because they are running on a public cloud. It is well known that public cloud players share this responsibility with their customers in a way that is called the shared responsibility model:

Figure 1.2 – The public cloud shared responsibility model

Figure 1.2 – The public cloud shared responsibility model

As it is valid with any substantial software being developed, APIs have their life cycles, and they belong to a pipeline. There is a general sense that security should be shifted left as much as possible, which means that concerns about potential flaws should be taken into consideration sooner rather than later. You need to think about security starting with the API design. However, this may not be exactly easy for companies with a small budget or without proper technical enablement. This is to say that not all companies adopt security countermeasures in the early stages because they simply cannot.

When developing an API, you should start by choosing the protocol your API will use. Consider the ones discussed here and select one that you believe will fulfill the application’s needs and user expectations. Look for the protocol’s drawbacks and verify the possibility of letting a public cloud player implement the API for you. All major players have API management or gateway offerings. They usually implement security best practices and are integrated with web firewalls.

APIs are frequently the only entrance doors, or at least the most used ones, for applications. This is why reinforcing them is paramount for any business segment. All parts of an API should get their corresponding protection. For example, how do you handle AuthN and Authorization (AuthZ)? Do you use tokens or only user/password credentials pairs? How are such tokens or credentials stored and how do they flow between your API endpoints and clients? Do you handle their life cycles? Do you record every time a token or credential is used and what parts of your system a user with such tokens or credentials tries to access? Do you frequently rotate tokens or credentials? Can you see how many questions were raised for a single point of attention? Badly handled AuthN and AuthZ may lead to potential intrusions and massive damage.

You have been reading a chapter from
Pentesting APIs
Published in: Sep 2024
Publisher: Packt
ISBN-13: 9781837633166
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime