Advavce task 4
Advavce task 4
Advavce task 4
Types of APIs:
o Description: Available to external developers or users. Open APIs are often shared
publicly and can be accessed with minimal restrictions.
o Description: These APIs are used within an organization and are not exposed to external
users. They allow different systems within the company to interact and communicate.
3. Partner APIs:
o Description: These APIs are shared with specific partners or third parties, often for the
purpose of business collaborations. They are more controlled than open APIs and are
usually not available to the general public.
o Examples: APIs provided to suppliers or key business partners for integration purposes.
# API architecture and Its types
API Architecture refers to the design and structure of an Application Programming Interface (API), which
serves as a bridge between different software components. It defines how these components interact,
exchange data, and perform specific functions.
1. Endpoint: The unique address (URL) that clients use to access the API.
3. Request: A message sent by a client to the API, typically containing the endpoint, HTTP method
(GET, POST, PUT, DELETE), and request parameters.
4. Response: A message sent by the API to the client, containing the requested data or a status
code indicating the success or failure of the request.
1. RESTful API:
o Employs HTTP methods (GET, POST, PUT, DELETE) to represent CRUD (Create, Read,
Update, Delete) operations on resources.
2. SOAP API:
o Uses a more complex structure compared to REST, involving WSDL (Web Services
Description Language) for defining the API's interface.
o Offers greater flexibility and features like transaction management and security.
o Allows clients to specify exactly the data they need, reducing over-fetching and under-
fetching.
o Well-suited for applications that require flexible and efficient data retrieval.
4. RPC API:
o Typically uses a more verbose syntax and requires a more complex setup.
o Less commonly used today due to the popularity of REST and GraphQL.
API penetration testing involves a systematic approach to identify and exploit vulnerabilities in web APIs.
Here's a general process you can follow:
1. Gather Information
Understand the API: Learn about the API's functionality, architecture, and authentication
mechanisms.
Identify endpoints: Discover the available endpoints and their corresponding HTTP methods.
Gather documentation: Collect any available API documentation, including specifications and
usage examples.
2. Identify Vulnerabilities
Automated scanning: Use tools like Burp Suite, OWASP ZAP, or Acunetix to scan for common
vulnerabilities like SQL injection, cross-site scripting (XSS), and cross-site request forgery (CSRF).
Manual testing: Perform manual testing to identify vulnerabilities that might be missed by
automated tools, such as insecure direct object references, missing authentication, and
authorization flaws.
Fuzzing: Use fuzzing tools to generate random input and test the API's resilience to unexpected
or malicious data.
Reverse engineering: Analyze the API's communication protocol to understand its underlying
logic and identify potential attack vectors.
3. Exploit Vulnerabilities
Develop exploit code: Create code or scripts to exploit the vulnerabilities and gain unauthorized
access or control.
4. Document Findings
Create detailed reports: Document the vulnerabilities, their severity, and the potential impact.
5. Retest
Verify fixes: After the vulnerabilities are addressed, retest the API to ensure that they have been
effectively mitigated.
# Here are some Screenshots of VAmPI lab