Skip to content

Commit 389287b

Browse files
committed
Enhance documentation with detailed guides for scanning URLs and raw requests, and add section headers for clarity
Signed-off-by: HAHWUL <[email protected]>
1 parent efc493e commit 389287b

17 files changed

+297
-152
lines changed

docs/page/installation.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,72 @@ toc: true
66
layout: page
77
---
88

9+
# Installation Guide
10+
11+
This guide provides detailed instructions on how to install Dalfox using various methods. Choose the method that best suits your environment.
12+
913
## Using Homebrew
10-
Homebrew is the package manager for MacOS(or linux). On devices using homebrew, you can easily install/update using the brew command.
14+
Homebrew is a package manager for macOS (or Linux). On devices using Homebrew, you can easily install or update Dalfox using the `brew` command.
1115

12-
### Install homebrew
16+
### Install Homebrew
17+
If you haven't installed Homebrew yet, you can install it by running the following command in your terminal:
1318
```shell
1419
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
1520
```
1621

17-
### Install dalfox
22+
### Install Dalfox
23+
Once Homebrew is installed, you can install Dalfox by running:
1824
```shell
1925
brew install dalfox
20-
21-
# https://formulae.brew.sh/formula/dalfox
2226
```
27+
For more details, you can visit the [Homebrew Formula page for Dalfox](https://formulae.brew.sh/formula/dalfox).
2328

2429
## Using Snapcraft
25-
Snapcraft is one of the packaging managers for Linux. Unlike app and yum, it can be used independently of the deployment OS version.
30+
Snapcraft is a package manager for Linux. Unlike `apt` and `yum`, it can be used independently of the deployment OS version.
2631

2732
### Install Snapcraft
28-
Please check this documents [https://snapcraft.io/docs/installing-snapd](https://snapcraft.io/docs/installing-snapd)
33+
To install Snapcraft, please refer to the official documentation: [Installing snapd](https://snapcraft.io/docs/installing-snapd).
2934

30-
### Install dalfox
31-
```
35+
### Install Dalfox
36+
Once Snapcraft is installed, you can install Dalfox by running:
37+
```shell
3238
sudo snap install dalfox
3339
```
3440

35-
## From source
41+
## From Source
42+
If you prefer to build Dalfox from the source, you can do so using the `go` command.
43+
44+
### Prerequisites
45+
Ensure you have Go installed on your system. You can download it from the [official Go website](https://golang.org/dl/).
3646

47+
### Install Dalfox
48+
To install the latest version of Dalfox from the source, run:
3749
```bash
3850
go install github.com/hahwul/dalfox/v2@latest
39-
40-
# The actual release might slightly differ. This is because go install references the main branch.
4151
```
52+
Note: The actual release might slightly differ as `go install` references the main branch.
4253

4354
## Using Docker
44-
Dalfox provides docker images by version. It can be used lightly with less capacity.
55+
Dalfox provides Docker images by version. This method allows you to use Dalfox with minimal setup.
56+
57+
### Pull the Latest Docker Image
58+
To pull the latest Docker image of Dalfox, run:
4559
```bash
4660
docker pull hahwul/dalfox:latest
4761
```
4862

49-
if you installed it, using like this command
63+
### Run Dalfox Using Docker
64+
You can run Dalfox using Docker with the following command:
5065
```bash
5166
docker run -it hahwul/dalfox:latest /app/dalfox url https://www.hahwul.com
5267
```
5368

54-
or live in docker
55-
69+
### Interactive Docker Shell
70+
For an interactive shell within the Docker container, run:
5671
```bash
5772
docker run -it hahwul/dalfox:latest /bin/bash
73+
```
74+
Once inside the container, you can run Dalfox:
75+
```bash
5876
./dalfox
5977
```

docs/page/modes/file-mode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ toc: true
88
layout: page
99
---
1010

11+
# File mode
12+
1113
`file` mode is a mode for scanning multiple URLs or for scanning based on a raw request file in Burp Suite/ZAP. Input is filename.
1214

1315
```shell

docs/page/modes/payload-mode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ toc: true
88
layout: page
99
---
1010

11+
# Payload Mode
12+
1113
`payload` mode is a mode for easy testing of XSS. Generate and Enumerate XSS Payloads and wordlists
1214

1315
```bash

docs/page/modes/pipe-mode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ toc: true
88
layout: page
99
---
1010

11+
# Pipeline Mode
12+
1113
`pipe` mode is the mode for scanning multiple URLs. I receive input as system I/O, so you can connect with other tools through pipeline.
1214
```shell
1315
dalfox pipe

docs/page/modes/server-mode.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ nav_order: 4
77
toc: true
88
layout: page
99
---
10+
11+
# Server Mode
12+
1013
`server` mode is a REST API mode that takes into account scalability. Using this mode, dalfox acts as a REST API server and can perform scanning using a web request.
1114

1215
```bash

docs/page/modes/sxss-mode.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ nav_order: 4
77
toc: true
88
layout: page
99
---
10+
11+
# Stored XSS Mode
12+
1013
`sxss` mode is a mode for easy identification of Stored XSS. The default behavior is the same as url mode, but you can specify a separate URL to validate, and you can generate a dynamic verification URL with the --sequence option in case the verification URL changes.
1114

1215
```bash

docs/page/modes/url-mode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ toc: true
88
layout: page
99
---
1010

11+
# URL Mode
12+
1113
`url` mode is the mode for detecting XSS for a single URL.
1214

1315
```shell

docs/page/output-handling.md

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@ toc: true
66
layout: page
77
---
88

9-
## Use dalfox output to other tools via Pipeline
9+
# Output Handling
10+
11+
This guide provides detailed instructions on how to handle the output from Dalfox. You can use various methods to save, filter, and process the output according to your needs.
12+
13+
## Use Dalfox Output to Other Tools via Pipeline
14+
You can pipe the output of Dalfox to other tools for further processing. For example, you can use `grep` to filter the output and `xargs` to open URLs in a browser.
1015

1116
```bash
1217
dalfox url http://testphp.vulnweb.com/listproducts.php | grep "\[V\]" | cut -d " " -f2 | xargs -I % open %
1318
```
1419

15-
## Save only PoC code with Stdout
20+
## Save Only PoC Code with Stdout
21+
You can save the Proof of Concept (PoC) code directly to a file using standard output redirection.
1622

1723
```bash
1824
dalfox url http://testphp.vulnweb.com/listproducts.php > output
1925
```
2026

21-
Output file
22-
27+
### Output File Example
2328
```bash
2429
# cat output
2530
[POC][G][BUILT-IN/dalfox-error-mysql2/GET] http://testphp.vulnweb.com/listproducts.php
@@ -29,13 +34,14 @@ Output file
2934
[POC][V][GET] http://testphp.vulnweb.com/listproducts.php?cat=%3CsCriPt+class%3Ddalfox%3Eprompt%2845%29%3C%2Fscript%3E
3035
```
3136

32-
## Save only PoC code with `-o` flag
33-
Command
37+
## Save Only PoC Code with `-o` Flag
38+
You can also use the `-o` flag to save the PoC code to a file.
39+
3440
```bash
3541
dalfox url http://testphp.vulnweb.com/listproducts.php -o output
3642
```
3743

38-
Output file
44+
### Output File Example
3945
```bash
4046
# cat output
4147
[POC][G][BUILT-IN/dalfox-error-mysql2/GET] http://testphp.vulnweb.com/listproducts.php
@@ -45,14 +51,14 @@ Output file
4551
[POC][V][GET] http://testphp.vulnweb.com/listproducts.php?cat=%3CsCriPt+class%3Ddalfox%3Eprompt%2845%29%3C%2Fscript%3E
4652
```
4753

48-
## Save all log (with `--output-all` flag)
54+
## Save All Logs with `--output-all` Flag
55+
To save all logs, including detailed analysis information, use the `--output-all` flag.
4956

50-
Command
5157
```bash
5258
dalfox url http://testphp.vulnweb.com/listproducts.php -o alllog.txt --output-all
5359
```
5460

55-
Output file
61+
### Output File Example
5662
```bash
5763
# cat alllog.txt
5864
[*] Using single target mode
@@ -66,23 +72,24 @@ Output file
6672
...snip...
6773
```
6874

69-
## Save only special PoC Code
70-
Supported
71-
* g(`grep`)
72-
* r(`reflected`)
73-
* v(`verified`)
75+
## Save Only Special PoC Code
76+
You can filter and save only specific types of PoC code using the `--only-poc` flag. Supported types are:
77+
* `g` (grep)
78+
* `r` (reflected)
79+
* `v` (verified)
7480

75-
Case
76-
* g: `[POC][G][BUILT-IN/dalfox-error-mysql1/GET] http://testphp.vulnweb.com/listproducts.php?cat=dalfox%2C`
77-
* r: `[POC][R][GET] http://testphp.vulnweb.com/listproducts.php?cat=%3CdETAILS%250aopen%250aonToGgle%250a%3D%250aa%3Dprompt%2Ca%28%29%3E`
78-
* v: `[POC][V][GET] http://testphp.vulnweb.com/listproducts.php?cat=%3CiFrAme%2Fsrc%3DjaVascRipt%3Aalert%281%29+class%3Ddalfox%3E%3C%2FiFramE%3E`
79-
80-
Command (only grep and verified poc)
81+
### Command Example
82+
To save only grep and verified PoC code:
8183
```bash
8284
dalfox url http://testphp.vulnweb.com/listproducts.php --only-poc=g,v
8385
```
8486

8587
## Save Traffic in HAR File
88+
You can save the HTTP traffic in a HAR (HTTP Archive) file for further analysis.
89+
8690
```bash
8791
dalfox url http://testphp.vulnweb.com/listproducts.php --har-file-path=log.har
88-
```
92+
```
93+
94+
### HAR File Example
95+
The HAR file can be opened with tools like [HAR Viewer](http://www.softwareishard.com/har/viewer/) for detailed inspection of the HTTP requests and responses.

docs/page/overview.md

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,19 @@ nav_order: 1
44
layout: page
55
---
66

7-
DalFox is a powerful open-source tool designed for automation, making it ideal for efficiently scanning and analyzing parameters to detect XSS vulnerabilities. Its advanced testing engine and unique features streamline the process of identifying and verifying security flaws.
7+
# Overview
88

9-
As for the name, Dal([](https://en.wiktionary.org/wiki/달)) is the Korean word for "moon," while Fox stands for "Finder Of XSS" (🦊).
9+
DalFox is a powerful open-source tool designed for automated detection of XSS vulnerabilities. With its advanced testing engine and comprehensive feature set, DalFox simplifies the process of scanning, analyzing parameters, and verifying vulnerabilities. Whether you are performing quick scans or detailed analyses, DalFox provides a streamlined experience tailored to the needs of security professionals and researchers.
1010

1111
![](/images/screen.png)
1212

13-
Mode: `url` `sxss` `pipe` `file` `server` `payload`
13+
The name "DalFox" has a unique origin:
14+
- **Dal ([](https://en.wiktionary.org/wiki/달))**: The Korean word for "moon."
15+
- **Fox**: An acronym for "Finder Of XSS" 🦊.
1416

15-
| Class | Key Feature | Description |
16-
| ------------- | ----------------------------- | ------------------------------------------------------------ |
17-
| Discovery | Parameter analysis | - Find reflected param<br />- Find alive/bad special chars, event handler and attack code <br />- Identification of injection points(HTML/JS/Attribute) <br /> `inHTML-none` `inJS-none` `inJS-double` `inJS-single` `inJS-backtick` `inATTR-none` `inATTR-double` `inATTR-single` |
18-
| | Static analysis | - Check bad-header like CSP, XFO, etc.. with req/res base |
19-
| | BAV analysis | - Testing BAV(Basic Another Vulnerability) , e.g `sqli` `ssti` `open-redirects`, `crlf`, `esii` |
20-
| | Parameter Mining | - Find new param with Dictionary attack (default is [GF-Patterns](https://github.com/1ndianl33t/Gf-Patterns))<br />- Support custom dictionary file (`--mining-dict-word`)<br />- Find new param with DOM<br />- Use remote wordlist to mining (`--remote-wordlists`) |
21-
| | Built-in Grepping | - It Identify the basic info leak of SSTi, Credential, SQL Error, and so on |
22-
| | WAF Detection and Evasion | - Detect to WAF(Web Application Firewall). <br />- if found waf and using special flag, evasion using slow request<br />- `--waf-evasion` |
23-
| Scanning | XSS Scanning | - Reflected XSS / Stored XSS / DOM XSS<br />- DOM base verifying<br />- Headless base verifying<br />- Blind XSS testing with param, header(`-b` , `--blind` options)<br />- Only testing selected parameters (`-p`, `--param`)<br />- Only testing parameter analysis (`--only-discovery`) |
24-
| | Friendly Pipeline | - Single url mode (`dalfox url`)<br />- From file mode (`dalfox file urls.txt`)<br />- From IO(pipeline) mode (`dalfox pipe`)<br />- From raw http request file mode (`dalfox file raw.txt --rawdata`) |
25-
| | Optimization query of payloads | - Check the injection point through abstraction and generated the fit payload.<br />- Eliminate unnecessary payloads based on badchar |
26-
| | Encoder | - All test payloads(built-in, your custom/blind) are tested in parallel with the encoder.<br />- To Double URL Encoder<br />- To HTML Hex Encoder |
27-
| | Sequence | - Auto-check the special page for stored xss (`--trigger`) <br />- Support (`--sequence`) options for Stored XSS , only `sxss` mode |
28-
| HTTP | HTTP Options | - Overwrite HTTP Method (`-X`, `--method`)<br />- Follow redirects (`--follow-redirects`)<br />- Add header (`-H`, `--header`)<br />- Add cookie (`-C`, `--cookie`)<br />- Add User-Agent (`--user-agent`)<br />- Set timeout (`--timeout`)<br />- Set Delay (`--delay`)<br />- Set Proxy (`--proxy`)<br />- Set ignore return codes (`--ignore-return`)<br />- Load cookie from raw request (`--cookie-from-raw`) |
29-
| Concurrency | Worker | - Set worker's number(`-w`, `--worker`) |
30-
| | N * hosts | - Use multicast mode (`--multicast`) , only `file` / `pipe` mode |
31-
| Output | Output | - Only the PoC code and useful information is write as Stdout<br />- Save output (`-o`, `--output`) |
32-
| | Format | - JSON / Plain (`--format`) |
33-
| | Printing | - Silence mode (`--silence`)<br />- You may choose not to print the color (`--no-color`)<br />- You may choose not to print the spinner (`--no-spinner`)<br />- You may choose show only special poc code (`--only-poc`) |
34-
| | Report | - Show detail report (`--report` and `--report-format=<plain/json>`)|
35-
| Extensibility | REST API | - API Server and Swagger (`dalfox server`) |
36-
| | Payload Mode | - Generate and Enumerate Payloads for XSS Testing (`dalfox payload`) |
37-
| | Found Action | - Lets you specify the actions to take when detected. <br />- Notify, for example (`--found-action`) |
38-
| | Custom Grepping | - Can grep with custom regular expressions on response<br />- If duplicate detection, it performs deduplication (`--grep`) |
39-
| | Custom Payloads | - Use custom payloads list file (`--custom-payload`) <br />- Custom alert value (`--custom-alert-value`) <br />- Custom alert type (`--custom-alert-type`)|
40-
| | Remote Payloads | - Use remote payloads from portswigger, payloadbox, etc.. (`--remote-payloads`) |
41-
| Package | Package manager | - [pkg.go.dev](https://pkg.go.dev/github.com/hahwul/dalfox/v2)<br/>- [homebrew with tap](https://github.com/hahwul/homebrew-dalfox)<br />- [snapcraft](https://snapcraft.io/dalfox) |
42-
| | Docker ENV | - [docker hub](https://hub.docker.com/repository/docker/hahwul/dalfox)<br />- [github package of docker](https://github.com/hahwul/dalfox/packages) |
43-
| | Other | - [github action](https://github.com/marketplace/actions/xss-scan-with-dalfox) |
44-
45-
And the various options required for the testing :D
17+
Key highlights of DalFox include:
18+
- **Flexible Scanning Modes**: Supports URL-based scans, file-based inputs, pipelines, and server modes.
19+
- **Comprehensive Analysis**: Detects reflected, stored, and DOM-based XSS, along with parameter mining and static analysis.
20+
- **Extensibility**: Offers custom payloads, remote wordlists, and API integrations for tailored testing.
21+
- **Performance Optimization**: Features such as payload abstraction, bad character filtering, and parallel encoding improve efficiency.
22+
- **Detailed Reporting**: Outputs can be formatted as plain text or JSON, with options for in-depth reports.

docs/page/running.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ nav_order: 4
44
has_children: true
55
toc: true
66
layout: page
7-
---
7+
---
8+
9+
# Running

0 commit comments

Comments
 (0)