liveBook · Manning

Injection attack

As explained in Secure APIs

An injection attack is an attack in which crafted input is interpreted as commands, code, or query structure by a target system.

An injection attack crafts input that a target system interprets as commands, code, or query structure. In an API, malicious SQL or script content may appear in a request and produce unauthorized, malformed, or unusually slow responses. section 11.5

Detect and investigate suspected injection attempts by:

  • Recording request headers, bodies, URLs, response status codes, errors, and processing latency. section 11.5
  • Using complete request details to reproduce suspicious behavior locally and inspect its effect on the API. section 11.5

How Secure APIs covers it

How deep it goes
Defines malicious SQL and script input, then explains logging, reproduction, and sensitive-field exclusion.
Examples
Uses malicious SQL or script input, unauthorized or malformed responses, slow requests, and complete request logs.
What it assumes
Assumes familiarity with API requests and instrumentation signals such as logs, traces, and metrics.
What you can do after
Diagnose injection attempts by correlating request details with errors, statuses, and latency, then reproduce suspicious requests locally.
How it connects
Connects injection attacks with API requests, observability, logs, traces, metrics, response codes, and latency.

Also explained in

Compare how 3 books explain injection attack →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.