pentesting, updated

katana

katana: a fast, next-generation crawler that spiders an application and extracts endpoints, forms and parameters for further testing.

What it’s for

Automate the crawl/spidering step — discover every URL, form field and parameter an app exposes, including JS-rendered routes, to feed into fuzzing and injection tools.

Install

go install github.com/projectdiscovery/katana/cmd/katana@latest   # https://github.com/projectdiscovery/katana

Common commands

katana -u https://example.com                                  # crawl a single target
katana -u https://example.com -jc                                # also crawl JS files for endpoints
katana -u https://example.com -headless                          # render JS (SPA routes) with a headless browser
katana -u https://example.com -d 3                                # limit crawl depth to 3
katana -u https://example.com -f qurl                             # output only URLs with query parameters
katana -u https://example.com -H "Cookie: session=<your-session>" # authenticated crawl
katana -u https://example.com -o urls.txt                         # save discovered URLs

Useful flags

FlagEffect
-jcCrawl JavaScript files for additional endpoints
-headlessUse a headless browser, needed for JS-rendered SPAs
-dMax crawl depth
-f qurlOutput only URLs that carry a query string
-HAdd a header (auth cookie, custom header)
-oWrite discovered URLs to a file

Notes

The natural first step before ffuf (fuzz what katana finds) or dalfox (katana -u https://example.com -f qurl | dalfox pipe).

Used in

§ home
~/knubertus/home/
1,1 Top