Skip to content

Commit 2b895ea

Browse files
author
HackTricks News Bot
committed
Add content from: HTTP Parsing Vulnerabilities in Check Point Firewall-1
1 parent 3748718 commit 2b895ea

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

src/network-services-pentesting/pentesting-264-check-point-firewall-1.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,42 @@ The output from this command provides detailed information regarding the firewal
3737
CN=Panama,O=MGMTT.srv.rxfrmi
3838
```
3939

40-
## References
40+
## HTTP Security Server Format String Bug (CAN-2004-0039)
4141

42-
- [https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk69360](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk69360)
43-
- [https://bitvijays.github.io/LFF-IPS-P2-VulnerabilityAnalysis.html\#check-point-firewall-1-topology-port-264](https://bitvijays.github.io/LFF-IPS-P2-VulnerabilityAnalysis.html#check-point-firewall-1-topology-port-264)
42+
**Affected builds:** NG FCS, NG FP1, NG FP2, NG FP3 HF2, and NG with Application Intelligence R54/R55.
43+
**Requirement:** The HTTP Security Server or AI HTTP proxy must be enabled and transparently inspecting the targeted port; if HTTP inspection is disabled the vulnerable code path is never reached.
4444

45-
{{#include ../banners/hacktricks-training.md}}
45+
### Triggering the error handler
46+
47+
The proxy rejects malformed HTTP messages and builds its own error page with `sprintf(errbuf, attacker_string);`, letting attacker-controlled bytes act as the format string. Send an invalid request through the firewall and look for a proxy-generated error that reflects your payload:
48+
49+
```bash
50+
printf 'BOGUS%%08x%%08x%%08x%%n HTTP/1.0\r\nHost: internal.local\r\n\r\n' | nc -nv [FIREWALL_IP] 80
51+
```
52+
53+
If HTTP inspection is active, the firewall (not the backend server) answers immediately, proving the middlebox parsed and replayed the request line.
54+
55+
### Exploitation
4656

57+
#### Format string primitive
4758

59+
- Force the parser into the error routine (invalid method, URI, or headers).
60+
- Place attacker-controlled dwords up front so `%x`, `%s`, and `%n` directives treat them as stack arguments.
61+
- Use `%x/%s` to leak pointers, then `%n/%hn` to write the formatted byte count into chosen addresses, overwriting return pointers, vtables, or heap metadata before hijacking execution with injected shellcode or ROP.
4862

63+
#### Heap overflow primitive
64+
65+
The same unsafe `sprintf()` writes into a fixed-size heap buffer. Mix a long request body with oversized directives (e.g., `%99999x`) so the formatted output overruns the allocation and corrupts adjacent heap structures, letting you forge freelist pointers or function tables that are later dereferenced.
66+
67+
### Impact
68+
69+
Compromise of the proxy grants code execution inside the firewall process (SYSTEM on Windows appliances, root on UNIX), enabling rule manipulation, traffic interception, and pivoting deeper into the management network.
70+
71+
## References
72+
73+
- [https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk69360](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk69360)
74+
- [https://bitvijays.github.io/LFF-IPS-P2-VulnerabilityAnalysis.html#check-point-firewall-1-topology-port-264](https://bitvijays.github.io/LFF-IPS-P2-VulnerabilityAnalysis.html#check-point-firewall-1-topology-port-264)
75+
- [https://www.cisa.gov/news-events/alerts/2004/02/05/http-parsing-vulnerabilities-check-point-firewall-1](https://www.cisa.gov/news-events/alerts/2004/02/05/http-parsing-vulnerabilities-check-point-firewall-1)
76+
- [http://xforce.iss.net/xforce/alerts/id/162](http://xforce.iss.net/xforce/alerts/id/162)
77+
78+
{{#include ../banners/hacktricks-training.md}}

0 commit comments

Comments
 (0)