Nmap AJP Fingerprinting
AJP (Apache JServ Protocol) on port 8009 is the connector between a front-end web server and Tomcat. When exposed directly, it provides an alternate entry point into the Java application stack that may bypass front-end access controls. Fingerprinting confirms the connector is active, reveals the application context paths, and identifies which HTTP methods are accepted. Move to AJP URI requests after establishing the context, and to Ghostcat file read testing for CVE-2020-1938.
Confirm AJP Service
8009/tcp open ajp13 Apache Jserv (Protocol v1.3)
Pull Response Headers via AJP
The JSESSIONID cookie path reveals the deployed web application context — this is the path to probe next:
| ajp-headers: | X-Powered-By: JSP/2.2 | Set-Cookie: JSESSIONID=abc123; Path=/webapp | Content-Type: text/html;charset=UTF-8 |_ Content-Length: 842
Path=/webapp in the JSESSIONID cookie confirms the deployed application context is /webapp. Probe that path directly with ajp-request and also test it over HTTP/HTTPS if those ports exist. A Path=/manager is an immediate priority — it means the Tomcat manager is deployed and accessible via AJP.
| ajp-headers: | WWW-Authenticate: Basic realm="Tomcat Manager Application" |_ Content-Type: text/html;charset=utf-8
Enumerate Supported HTTP Methods
| ajp-methods: | Supported methods: GET HEAD POST PUT DELETE TRACE OPTIONS | Potentially risky methods: PUT DELETE TRACE |_ See https://nmap.org/nsedoc/scripts/ajp-methods.html
PUT and DELETE being enabled is a finding — it should not be accepted on standard Tomcat deployments. TRACE enables cross-site tracing. Test PUT against specific application paths to confirm whether file upload via AJP is possible. Check methods on the manager context separately:
When Scripts Return Nothing
If ajp-headers and ajp-methods return nothing despite the port being open, the connector may expect specific attributes or be bound to a particular virtual host. Try verbose mode and direct AJP requests:
References
-
nmap — ajp-headers NSEnmap.org/nsedoc/scripts/ajp-headers.html (opens in new tab)
Script args and JSESSIONID context path output
-
nmap — ajp-methods NSEnmap.org/nsedoc/scripts/ajp-methods.html (opens in new tab)
Supported methods discovery and risky method identification
Was this helpful?
Your feedback helps improve this page.