How to create a target to scan a web app
To scan a web app for vulnerabilities, you have to create a target that will define the scope and the behavior of the scan.
Prerequisites
Before creating a target, ensure you have created and verified the target domain. Learn more about how to create and verify a target domain.
Step 1: Create the Target
Start by creating the target with a recognizable name and the web app's URL you wish to scan.
For example, for this tutorial, the target name is My Target (web app)
and the URL is https://example.com
.
Request
curl https://api.probely.com/targets/ \
-X POST \
-H 'Authorization: JWT <YOUR_API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"site": {
"name": "My target (web app)",
"url": "https://example.com"
}
}'
The response will return the newly created target with the identifier (id
), and the information you provided (name
and url
).
You will find other information such as:
host
- It must have the domain corresponding to the URL you provided. In this tutorial, it isexample.com
because the URL ishttps://example.com
.verified
- If you followed the prerequisites, it must betrue
. If not, the target scans can be interpreted as malicious attacks. Learn more about how to create and verify a target domain.
Response
{
"id": "2Qz854SSsTur",
"site": {
"id": "spMJGK2QAB7B",
"name": "My target (web app)",
"desc": "",
"url": "https://example.com",
"host": "example.com",
"has_form_login": false,
...
"stack": [],
"verified": true,
"verification_token": "5041700e-e954-4905-95d3-20324666134c",
...
},
...
}
Now that your target has been created, you can start a scan. Learn more in how to start a scan.