Course contentsShow
← Security
Lesson 1376 of 3,05228. Application Security - TestingFree lesson

API and Modern App DAST

Testing REST APIs, GraphQL, SPAs, and modern architectures with specialized DAST techniques and tools.

API and Modern App DAST

What you'll learn: How to adapt DAST techniques for RESTful APIs, GraphQL endpoints, single-page applications, and modern microservice architectures.

The Challenge of Modern Applications

Traditional DAST tools were built for server-rendered HTML applications with predictable page-to-page navigation. Modern apps break this model: SPAs render dynamically in the browser, REST APIs return JSON instead of HTML, and GraphQL uses a single endpoint for all queries. You need specialized techniques to discover and test these attack surfaces effectively.

REST API Testing

Unlike crawling HTML links, API DAST requires specification-driven testing. You provide an OpenAPI (Swagger) or RAML definition to guide the scanner. The tool then:

  • Generates requests for each documented endpoint
  • Tests parameter injection, authentication bypass, and rate limiting
  • Validates response schemas and status codes for security anomalies

Without a spec, scanners resort to traffic recording — capturing legitimate API calls during manual testing, then fuzzing those patterns.

GraphQL Considerations

GraphQL's introspection feature (if enabled) lets DAST tools discover the entire schema automatically. Scanners test for:

  • Deeply nested queries that cause resource exhaustion
  • Authorization gaps between different query fields
  • Injection through variables and directives

Single-Page Applications (SPAs)

SPAs require headless browser automation since navigation happens via JavaScript, not HTTP redirects. Modern DAST tools use Chrome or Firefox instances to click, scroll, and trigger dynamic content, then intercept and test the underlying API calls.

Configuration Requirements

You typically need to:

  • Provide API specifications or record traffic baselines
  • Configure authentication tokens that refresh during long scans
  • Define business logic test cases (e.g., "checkout must validate inventory")
  • Set appropriate request rate limits to avoid denial-of-service

Key Takeaway: Modern app DAST shifts from passive HTML crawling to active specification-driven testing, requiring API schemas, headless browsers, and custom authentication handling to effectively test REST, GraphQL, and SPA architectures.