You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/SUMMARY.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -443,6 +443,7 @@
443
443
-[Electron contextIsolation RCE via Electron internal code](network-services-pentesting/pentesting-web/electron-desktop-apps/electron-contextisolation-rce-via-electron-internal-code.md)
444
444
-[Electron contextIsolation RCE via IPC](network-services-pentesting/pentesting-web/electron-desktop-apps/electron-contextisolation-rce-via-ipc.md)
@@ -237,7 +238,7 @@ Launch some kind of **spider** inside the web. The goal of the spider is to **fi
237
238
-[**Javascript Parsing**](https://github.com/xnl-h4ck3r/burp-extensions): A Burp extension to find path and params in JS files.
238
239
-[**Sourcemapper**](https://github.com/denandz/sourcemapper): A tool that given the .js.map URL will get you the beatified JS code
239
240
-[**xnLinkFinder**](https://github.com/xnl-h4ck3r/xnLinkFinder): This is a tool used to discover endpoints for a given target.
240
-
-[**waymore**](https://github.com/xnl-h4ck3r/waymore)**:** Discover links from the wayback machine (also downloading the responses in the wayback and looking for more links
241
+
-[**waymore**](https://github.com/xnl-h4ck3r/waymore)**:** Discover links from the wayback machine (also downloading the responses in the wayback and looking for more links)
241
242
-[**HTTPLoot**](https://github.com/redhuntlabs/HTTPLoot) (go): Crawl (even by filling forms) and also find sensitive info using specific regexes.
242
243
-[**SpiderSuite**](https://github.com/3nock/SpiderSuite): Spider Suite is an advance multi-feature GUI web security Crawler/Spider designed for cyber security professionals.
243
244
-[**jsluice**](https://github.com/BishopFox/jsluice) (go): It's a Go package and [command-line tool](https://github.com/BishopFox/jsluice/blob/main/cmd/jsluice) for extracting URLs, paths, secrets, and other interesting data from JavaScript source code.
@@ -293,7 +294,7 @@ _Note that anytime a new directory is discovered during brute-forcing or spideri
-**Comments:** Check the comments of all the files, you can find **credentials** or **hidden functionality**.
295
296
- If you are playing **CTF**, a "common" trick is to **hide****information** inside comments at the **right** of the **page** (using **hundreds** of **spaces** so you don't see the data if you open the source code with the browser). Other possibility is to use **several new lines** and **hide information** in a comment at the **bottom** of the web page.
296
-
-**API keys**: If you **find any API key** there is guide that indicates how to use API keys of different platforms: [**keyhacks**](https://github.com/streaak/keyhacks)**,**[**zile**](https://github.com/xyele/zile.git)**,**[**truffleHog**](https://github.com/trufflesecurity/truffleHog)**,**[**SecretFinder**](https://github.com/m4ll0k/SecretFinder)**,**[**RegHex**](<https://github.com/l4yton/RegHex)/>)**,**[**DumpsterDive**](https://github.com/securing/DumpsterDiver)**,**[**EarlyBird**](https://github.com/americanexpress/earlybird)
297
+
-**API keys**: If you **find any API key** there is guide that indicates how to use API keys of different platforms: [**keyhacks**](https://github.com/streaak/keyhacks)**,**[**zile**](https://github.com/xyele/zile.git)**,**[**truffleHog**](https://github.com/trufflesecurity/truffleHog)**,**[**SecretFinder**](https://github.com/m4ll0k/SecretFinder)**,**[**RegHex**](https://github.com/l4yton/RegHex)**,**[**DumpsterDive**](https://github.com/securing/DumpsterDiver)**,**[**EarlyBird**](https://github.com/americanexpress/earlybird)
297
298
- Google API keys: If you find any API key looking like **AIza**SyA-qLheq6xjDiEIRisP_ujUseYLQCHUjik you can use the project [**gmapapiscanner**](https://github.com/ozguralp/gmapsapiscanner) to check which apis the key can access.
298
299
-**S3 Buckets**: While spidering look if any **subdomain** or any **link** is related with some **S3 bucket**. In that case, [**check** the **permissions** of the bucket](buckets/index.html).
299
300
@@ -312,7 +313,7 @@ _Note that anytime a new directory is discovered during brute-forcing or spideri
312
313
-**Javascript Deobfuscator and Unpacker:**[https://lelinhtinh.github.io/de4js/](https://lelinhtinh.github.io/de4js/), [https://www.dcode.fr/javascript-unobfuscator](https://www.dcode.fr/javascript-unobfuscator)
- On several occasions, you will need to **understand the regular expressions** used. This will be useful: [https://regex101.com/](https://regex101.com) or [https://pythonium.net/regex](https://pythonium.net/regex)
317
318
- You could also **monitor the files were forms were detected**, as a change in the parameter or the apearance f a new form may indicate a potential new vulnerable functionality.
318
319
@@ -358,7 +359,10 @@ You can use tools such as [https://github.com/dgtlmoon/changedetection.io](https
358
359
359
360
### HackTricks Automatic Commands
360
361
361
-
```
362
+
<details>
363
+
<summary>HackTricks Automatic Commands</summary>
364
+
365
+
```yaml
362
366
Protocol_Name: Web #Protocol Abbreviation if there is one.
363
367
Port_Number: 80,443#Comma separated if there is more than one.
364
368
Protocol_Description: Web #Protocol Abbreviation Spelled out
- Any request path that begins with a valid FortiWeb API prefix (e.g., `/api/v2.0/cmdb/` or `/api/v2.0/cmd/`) can traverse with `../` to `/cgi-bin/fwbcgi`.
39
+
40
+
2) Minimal-body validation bypass
41
+
- Once `fwbcgi` is reached, a first gate performs a permissive JSON check keyed by a per-path file under `/var/log/inputcheck/`. If the file is absent, the check passes immediately. If present, the body only needs to be valid JSON. Use `{}` as a minimal compliant body.
42
+
43
+
3) Header-driven user impersonation
44
+
- The program reads the CGI environment variable `HTTP_CGIINFO` (derived from the HTTP header `CGIINFO`), Base64-decodes it, parses JSON, and copies attributes directly into the login context, setting the domain/VDOM. Keys of interest:
- Presence of header `CGIINFO` with Base64 JSON containing keys `username`/`loginname`/`vdom`/`profname`.
100
+
- Backend artifacts:
101
+
- Per-path files under `/var/log/inputcheck/` (gate configuration).
102
+
- Unexpected admin creation and configuration changes.
103
+
- Rapid validation: the traversal probe returning 200 (exposed) vs 403 (blocked in fixed builds).
104
+
105
+
## Mitigation
106
+
107
+
- Upgrade to fixed releases (examples: 8.0.2, 7.6.5, 7.4.10, 7.2.12, 7.0.12) per vendor advisory.
108
+
- Until patched:
109
+
- Do not expose FortiWeb management plane to untrusted networks.
110
+
- Add reverse-proxy/WAF rules to block:
111
+
- Paths that start with `/api/` and contain `../cgi-bin/fwbcgi`.
112
+
- Requests carrying a `CGIINFO` header.
113
+
- Monitor and alert on the detection indicators above.
114
+
115
+
## References
116
+
117
+
-[When the impersonation function gets used to impersonate users — Fortinet FortiWeb auth bypass (watchTowr Labs)](https://labs.watchtowr.com/when-the-impersonation-function-gets-used-to-impersonate-users-fortinet-fortiweb-auth-bypass/)
118
+
-[watchTowr vs FortiWeb Auth Bypass — Detection artefact generator](https://github.com/watchtowrlabs/watchTowr-vs-Fortiweb-AuthBypass)
0 commit comments