Skip to content

Commit a4a525e

Browse files
committed
Audit and improve testproxy.py indicators with comprehensive enhancements
- Fixed critical bug in WAF indicator loading - added proper parsing function for Header:Value:WAF_Name format - Organized WAF indicators file with comments, removed duplicates, and added modern providers (Google Cloud Armor, Fastly, Azure Front Door, AWS Shield) - Expanded proxy indicators with extensive cloud service support (Cloudflare, AWS CloudFront, Azure, Fastly, Akamai, Google Cloud) - Added comprehensive file format validation with error handling and UTF-8 support - Improved error handling throughout the indicator loading process with detailed logging - Standardized header formats using lowercase for consistent matching - Enhanced detection of modern CDN and load balancer infrastructure - Maintained backward compatibility with default indicator lists
1 parent 33fc623 commit a4a525e

File tree

3 files changed

+431
-235
lines changed

3 files changed

+431
-235
lines changed

proxy_indicators.txt

Lines changed: 173 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -1,197 +1,140 @@
1+
# Common Proxy/Load Balancer Headers (Standard)
12
X-Forwarded-For
23
X-Real-IP
34
Via
45
X-Forwarded-Host
56
X-Forwarded-Proto
6-
X-Load-Balancer
7-
Proxy-Connection
8-
X-Proxy-ID
9-
Forwarded
10-
X-Forwarded-Server
117
X-Forwarded-Port
12-
X-Original-URL
13-
X-Rewrite-URL
14-
X-Proxy-Cache
15-
X-Cache
16-
X-Cache-Lookup
17-
X-Varnish
18-
X-Azure-Ref
19-
CF-RAY
20-
X-Amzn-Trace-Id
8+
Forwarded
219
X-Client-IP
22-
X-Host
23-
X-Forwarded-By
2410
X-Originating-IP
25-
X-Backend-Server
26-
X-Served-By
27-
X-Timer
28-
Fastly-Debug-Digest
29-
X-CDN
30-
X-CDN-Provider
31-
X-Edge-IP
32-
X-Backend-Host
33-
X-Proxy-Host
34-
X-Akamai-Transformed
35-
X-True-Client-IP
36-
Fly-Request-ID
37-
Server-Timing
38-
X-Cache-Hit
39-
X-Cache-Status
40-
X-Middleton-Response
41-
X-Origin-Server
42-
X-Cloudflare-Visitor
43-
X-Cloudtrace-Context
11+
Client-IP
12+
X-Remote-IP
13+
X-Remote-Addr
14+
15+
# Cloudflare Proxy Indicators
16+
CF-RAY
4417
CF-Connecting-IP
45-
X-Cloud-ID
46-
X-Google-Forwarding
47-
X-Forwarded-Scheme
48-
X-Original-Host
49-
X-Accel-Buffering
50-
X-Fastly-Request-ID
51-
X-Envoy-Internal
52-
X-Edge-Request-ID
53-
X-Edge-Cache
54-
X-Proxy-Backend
55-
True-Client-IP
56-
X-Azure-FDID
57-
X-Correlation-ID
58-
X-VPN-IP
59-
X-Anon-Client-IP
60-
X-Anonymous-Request-ID
61-
X-Tor-Exit-Node
62-
X-Proxy-User
63-
X-Onion-Request
64-
X-Tunnel-ID
65-
X-VPN-Forwarded-For
66-
X-Security-Proxy
67-
X-Identity-Forwarded
68-
X-WAF-Proxy
69-
X-Security-Appliance
70-
X-Security-Service-ID
71-
X-WAF-Trace
72-
X-DDoS-Request
73-
X-Malware-Scan
74-
X-Firewall-ID
75-
X-Mobile-Proxy
76-
X-IoT-Forwarding
77-
X-Mobile-Forwarded-For
78-
X-MIOT-Device-ID
79-
X-Device-Proxy-ID
80-
X-SIM-Proxy
81-
X-Cellular-Forwarding
82-
X-MMS-Forwarding
18+
X-Cloudflare-Visitor
19+
X-Cloudflare-Country
20+
21+
# Amazon AWS Proxy Indicators
22+
X-Amzn-Trace-Id
8323
X-AWS-Edge-Trace
8424
X-Edge-Lambda-Invoke
85-
X-Compute-Region
86-
X-Edge-Trace
8725
X-CloudFront-Viewer-Country
8826
X-CloudFront-Forwarded-Proto
8927
X-CloudFront-Is-Desktop-Viewer
9028
X-CloudFront-Is-Mobile-Viewer
9129
X-CDN-Edge-ID
92-
X-Cloudflare-Country
93-
X-Balancer-Server
30+
X-Forwarded-ELB-IP
31+
X-Backend-Server
32+
X-Forwarded-Server-IP
33+
34+
# Microsoft Azure/IIS ARR Proxy Indicators
35+
X-Azure-Ref
36+
X-Azure-FDID
37+
X-Azure-CDN
38+
X-Azure-Edge-Forwarded
39+
X-ARR-SSL
40+
X-Forwarded-Ssl
41+
X-Forwarded-For-Original
42+
43+
# Fastly Proxy Indicators
44+
Fastly-Debug-Digest
45+
X-Fastly-Request-ID
46+
X-Served-By
47+
X-Cache-Hit
48+
X-Cache-Status
49+
X-Cache-Miss
50+
X-Cache
51+
X-Timer
52+
53+
# Akamai Proxy Indicators
54+
X-Akamai-Transformed
55+
X-True-Client-IP
56+
X-Akamai-Origin-Hop
57+
X-EdgeConnect-MidMile-RTT
58+
X-EdgeConnect-Origin-MEX-Latency
59+
60+
# Google Cloud Proxy Indicators
61+
X-Cloudtrace-Context
62+
X-Google-Forwarding
63+
X-Cloudtrace-ID
64+
65+
# Load Balancer Specific Headers
66+
X-Load-Balancer
9467
X-Load-Balancer-ID
95-
X-CDN-Node-ID
68+
X-Balancer-Server
69+
X-LoadBalancer-Server
70+
X-Backend-Host
71+
X-Proxy-Host
72+
X-Proxy-Backend
73+
X-Upstream-Status
74+
X-Backend-Status
75+
76+
# Reverse Proxy/General Proxy Headers
9677
X-Reverse-Proxy-ID
9778
X-Nginx-Proxy
98-
X-Heroku-Request-ID
99-
X-CF-Connecting-IP
79+
Proxy-Connection
80+
X-Proxy-ID
81+
X-Proxy-Via
82+
X-Proxy-Authenticate
83+
X-Proxy-Authtype
84+
X-Proxy-Connection
85+
X-Proxy-Client-IP
10086
X-Proxy-IP-Chain
101-
X-Cache-Request
87+
X-ProxyUser-IP
88+
89+
# CDN Specific Headers
90+
X-CDN
91+
X-CDN-Provider
92+
X-Edge-IP
93+
X-CDN-Node-ID
94+
X-Edge-Cache
95+
X-Edge-Request-ID
96+
X-Edge-Trace
97+
98+
# Heroku/Cloud Platform Proxy Indicators
99+
X-Heroku-Request-ID
100+
X-Forwarded-Https
101+
Front-End-Https
102+
X-Forwarded-Scheme
103+
X-Forwarded-Protocol
104+
X-Origin-Protocol
105+
X-Origin-Scheme
106+
107+
# Application Gateway Proxy Indicators
102108
X-Request-Cluster-ID
103109
X-Gateway-Request-ID
104110
X-Global-Trace-ID
105-
X-Azure-CDN
106-
X-Azure-Edge-Forwarded
107111
X-Kubernetes-Service-Proxy
108-
X-Cloudtrace-ID
109-
X-Forwarded-Protocol
110-
X-Pound-Forwarded-For
111-
X-Original-Forwarded-For
112-
Front-End-Https
113-
X-ARR-SSL
114-
X-Forwarded-Ssl
115-
X-Forwarded-For-Original
116-
X-Rewrite-Url
117-
X-Original-Remote-Addr
118-
X-Forwarded-Client-IP
119-
X-Originating-Client-IP
120-
X-ProxyUser-IP
121-
X-Real-Client-IP
122-
X-Forwarded-For-IP
123-
X-Remote-IP
124-
X-Remote-Addr
125-
Client-IP
126-
X-Forwarded-For-Cluster
127-
Cluster-Client-IP
128-
X-Forwarded-For-Client
129-
X-True-IP
130-
X-Origin-IP
131-
X-Remote-User
132-
X-Forwarded-Host-Original
133-
X-Forwarded-Server-IP
134-
X-Forwarded-Remote-User
135-
X-Forwarded-From
136-
X-Forwarded-For-Original
137-
X-Forwarded-Access-Token
112+
113+
# SSL/TLS Proxy Indicators
138114
X-Client-SSL-Cipher
139115
X-Client-SSL-Cert
140116
X-Client-SSL-Protocol
141117
X-Server-SSL-Cipher
142118
X-Server-SSL-Cert
143119
X-Server-SSL-Protocol
144-
X-Proxy-Via
145-
X-Proxy-Authenticate
146-
X-Proxy-Authtype
147-
X-Proxy-Connection
148-
X-Cache-Control
149-
X-Forwarded-Authorization
150-
X-Forwarded-Ssl
151-
X-Forwarded-For-Original
152-
X-Forwarded-For-IP
153-
X-Origin-IP
154-
X-Real-Host
155-
X-Requested-With
156-
X-Forwarded-Proto-Version
157-
X-Forwarded-Proto-Original
158-
X-Forwarded-Protocol-Version
159-
X-HTTP-Host-Override
160-
X-Original-Url
161-
X-Forwarded-Protocol
162-
X-Original-Method
163-
X-Original-Path
164-
X-Proxy-URL
165-
X-Rewriting-Url
166-
X-Forwarded-Response-Status
167-
X-Upstream-Status
168-
X-Upstream-Cache-Status
169-
X-Backend-Status
170-
X-Akamai-Origin-Hop
171-
X-EdgeConnect-MidMile-RTT
172-
X-EdgeConnect-Origin-MEX-Latency
120+
121+
# Geographic/Location Proxy Indicators
173122
X-Country-Code
174-
X-Device
175123
X-GeoIP-Country
176124
X-GeoIP-Region
177125
X-GeoIP-City
178126
X-GeoIP-Latitude
179127
X-GeoIP-Longitude
180-
X-Forwarded-ELB-IP
181-
X-LoadBalancer
182-
X-LoadBalancer-Server
183-
X-Forwarded-Port
184-
X-Forwarded-Protocol
185-
X-True-Host
186-
X-True-Method
187-
X-True-Path
188-
X-Real-Method
189-
X-Real-Path
190-
X-Rewrite-Method
191-
X-Rewrite-Path
192-
X-Origin-Protocol
193-
X-Origin-Scheme
194-
X-Proxy-Client-IP
128+
129+
# Mobile/WAP Proxy Indicators
130+
X-Mobile-Proxy
131+
X-IoT-Forwarding
132+
X-Mobile-Forwarded-For
133+
X-MIOT-Device-ID
134+
X-Device-Proxy-ID
135+
X-SIM-Proxy
136+
X-Cellular-Forwarding
137+
X-MMS-Forwarding
195138
X-WAP-Profile
196139
X-ATT-DeviceId
197140
X-WAP-Profile-Diff
@@ -200,18 +143,85 @@ X-Network-Info
200143
X-Network-Access-Node
201144
X-Network-Operator
202145
X-Network-Type
146+
147+
# Security/VPN/Media Proxy Indicators
148+
X-VPN-IP
149+
X-Anon-Client-IP
150+
X-Anonymous-Request-ID
151+
X-Tor-Exit-Node
152+
X-Proxy-User
153+
X-Onion-Request
154+
X-Tunnel-ID
155+
X-VPN-Forwarded-For
156+
X-Security-Proxy
157+
X-Identity-Forwarded
158+
X-WAF-Proxy
159+
X-Security-Appliance
160+
X-Security-Service-ID
161+
X-WAF-Trace
162+
X-DDoS-Request
163+
X-Malware-Scan
164+
165+
# Cache/Acceleration Proxy Indicators
166+
X-Proxy-Cache
167+
X-Cache
168+
X-Cache-Lookup
169+
X-Cache-Request
170+
X-Upstream-Cache-Status
171+
X-Varnish
172+
X-Accel-Buffering
173+
174+
# Request Rewriting Proxy Indicators
175+
X-Original-URL
176+
X-Rewrite-URL
177+
X-Original-Remote-Addr
178+
X-Forwarded-Host-Original
179+
X-Forwarded-Access-Token
180+
X-Forwarded-Response-Status
181+
X-Forwarded-Authorization
182+
X-HTTP-Host-Override
183+
X-Requested-With
184+
X-Forwarded-Proto-Version
185+
X-Forwarded-Protocol-Version
186+
X-Proxy-URL
187+
X-Rewriting-Url
188+
X-Rewrite-Url
189+
190+
# User Agent Forwarding Proxy Indicators
203191
X-Forwarded-User-Agent
204192
X-Forwarded-Referer
205193
X-Original-User-Agent
206194
X-Original-Referer
207-
X-Forwarded-Host
195+
196+
# Additional Service-Specific Proxy Indicators
197+
X-Origin-Host
198+
X-Real-Host
199+
X-True-Host
200+
X-Host
201+
X-Forwarded-By
202+
X-Forwarded-From
203+
X-Origin-IP
204+
X-True-IP
205+
X-Real-Client-IP
206+
X-Forwarded-For-IP
207+
X-Forwarded-Client-IP
208+
X-Originating-Client-IP
209+
X-Forwarded-For-Cluster
210+
Cluster-Client-IP
211+
X-Forwarded-For-Client
212+
X-Remote-User
213+
X-Forwarded-Remote-User
208214
X-Forwarded-Server
209215
X-Forwarded-User
210216
X-Forwarded-Group
211217
X-Forwarded-Context
212218
X-Forwarded-Role
213-
X-Proxy-Authorization
214219
X-Custom-IP-Authorization
215-
Forwarded-For
216-
Forwarded-Host
217-
Forwarded-Server
220+
X-Compute-Region
221+
X-Middleton-Response
222+
X-Origin-Server
223+
Fly-Request-ID
224+
Server-Timing
225+
X-Corpo-ID
226+
Copy-ID
227+
X-Forwarded-Scheme-Protocol

0 commit comments

Comments
 (0)