Scan Web Application
Scan Web Application mode runs the K2agent, crawls and scans the application completely. It will list all the vulnerable APIs present in the application.
Scan Web Application
scan-web-application command will scan the application for potential exploits using the K2 component. It will provide complete summary of the scan.
scan-web-application will set up the K2 Component if not present .
Options
Note: The options marked with ** are MANDATORY.
Option
Description
**--applicationIdentifier
This is an identifier JSON string that is used to detect the application attachment with the K2 Component. - For applications deployed on host, use this format: {"pid":"application_pid"} - For applications deployed on Docker container, use this format: {"containerid":"application_container_id", "pid":"application_pid"}
--isAuthRequired
Set this to true when application has authenticated routes.
--applicationLoginUrl
Provide the URL of the login page when --isAuthRequired is set to true
**--applicationUrl
The URLs pointing to the application.
--applicationLoginIdentifier
Provide the application login identifier when --isAuthRequired is set to true.
How to prepare the application login identifier?
--ignoreUrl
Provide a list of keywords/URLs that will be ignored while crawling.
--allowedDomain
Provide a list of domains that will be considered while crawling.
--k2email
Provide the registered K2 email. The default value is set to installer@k2io.com.
--k2password
Provide the password corresponding to the registered K2 email.
--k2GroupName
Provide the Policy group name. The default is set to IAST.
--k2GroupEnv
Provide the Deployment environment of the policy group name other than PRODUCTION. The default is set to IAST.
--k2Cloud
Provide the K2 cloud URL. By default, it is set to https://k2io.net.
--k2icDirectoryPath
The directory path where you want all the K2 related stuff to be downloaded. Default value is set to ${HOME}/k2-ic
--config
Provide the config file path. How to setup config file?
Commands
Make sure that K2HackBot is setup correctly at this point before running scan-web-application commands.
Command to display the help page:
Command to scan applications without authentication:
Command to scan applications with authentication:
Config File Setup
K2HackBot support two ways to define options:
CLI
Config File
The Hierarchy for reading config is as follows:
The config file can be created with any name but it MUST be in JSON format. Below is a sample config file for scan-web-application:
Command to run scan-web-application using the config file:
Last updated
Was this helpful?