Che237 commited on
Commit
d7c2542
·
verified ·
1 Parent(s): e0d0b3b

Retrain web_attack_detection on public labelled data (2026-10-13)

Browse files
web_attack_detection/best_model.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f3bc69c2e0063713cc89692913b494dc81f61441a9f354f13d1b60c59020c01c
3
- size 107913
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c1fdc278c8c6a556ee80b61399d5b84335a254a193500779e226529a7a87e44
3
+ size 456344
web_attack_detection/metadata.json CHANGED
@@ -1,23 +1,254 @@
1
  {
2
- "name": "web_attack_detection",
3
- "trained_at": "2026-05-09T17:11:51.392325",
4
- "samples": 4000,
5
- "threat_rate": 0.5,
6
- "accuracy": 1.0,
7
- "f1": 1.0,
8
  "feature_names": [
9
- "url_length",
10
- "hostname_length",
11
- "path_length",
12
- "is_https",
13
- "has_ip_address",
14
- "has_suspicious_tld",
15
- "subdomain_count",
16
- "has_port",
17
- "query_params_count",
18
- "has_at_symbol",
19
- "has_double_slash",
20
- "special_char_count"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ],
22
- "model_type": "GradientBoostingClassifier"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  }
 
1
  {
2
+ "model_type": "HistGradientBoostingClassifier",
 
 
 
 
 
3
  "feature_names": [
4
+ "payload_length",
5
+ "payload_quotes",
6
+ "payload_angle_brackets",
7
+ "payload_parentheses",
8
+ "payload_semicolons",
9
+ "payload_spaces",
10
+ "payload_sql_keywords",
11
+ "payload_script_tokens",
12
+ "payload_comment_markers",
13
+ "payload_traversal",
14
+ "payload_pipes_backticks",
15
+ "payload_encoded_specials",
16
+ "payload_special_ratio",
17
+ "payload_longest_run_specials",
18
+ "payload_equals_in_value",
19
+ "payload_null_bytes",
20
+ "bare_path_length",
21
+ "query_length",
22
+ "query_params",
23
+ "count_percent",
24
+ "path_depth",
25
+ "query_longest_value"
26
+ ],
27
+ "uses_scaler": false,
28
+ "decision_threshold": 0.5,
29
+ "decision_point": {
30
+ "target_false_positive_rate": 0.02,
31
+ "validation_urls": 21178,
32
+ "validation_benign": 18249,
33
+ "note": "raw scores are rescaled so that this threshold reads as 0.5"
34
+ },
35
+ "training": {
36
+ "rows": 207592,
37
+ "positives": 28114,
38
+ "sites": 99916,
39
+ "seconds": 4.9,
40
+ "iterations": 300,
41
+ "rows_by_source": {
42
+ "benign URLs with a query": 21038,
43
+ "normal strings placed like payloads": 3835,
44
+ "older collection, benign": 26045,
45
+ "payloads placed on benign sites": 31043,
46
+ "phishing collection, benign": 95655,
47
+ "popular sites": 48034,
48
+ "reference, legitimate": 3120
49
+ },
50
+ "dropped_as_listed_on_both_sides": 0,
51
+ "note": "attack rows are real SQL-injection and XSS payloads placed as a query value or path segment on benign sites"
52
+ },
53
+ "holdout": {
54
+ "samples": 57173,
55
+ "positives": 7979,
56
+ "true_positives": 7940,
57
+ "false_positives": 71,
58
+ "false_negatives": 39,
59
+ "true_negatives": 49123,
60
+ "precision": 0.9911,
61
+ "recall": 0.9951,
62
+ "f1": 0.9931,
63
+ "false_positive_rate": 0.0014,
64
+ "auc": 0.9998,
65
+ "average_precision": 0.9995,
66
+ "at_raw_0.5": {
67
+ "precision": 0.9911,
68
+ "recall": 0.9951,
69
+ "false_positive_rate": 0.0014
70
+ },
71
+ "sites": 24980,
72
+ "by_source": {
73
+ "benign URLs with a query": {
74
+ "urls": 4638,
75
+ "kind": "negative",
76
+ "false_positive_rate": 0.0028
77
+ },
78
+ "normal strings placed like payloads": {
79
+ "urls": 950,
80
+ "kind": "negative",
81
+ "false_positive_rate": 0.0432
82
+ },
83
+ "older collection, benign": {
84
+ "urls": 6721,
85
+ "kind": "negative",
86
+ "false_positive_rate": 0.0009
87
+ },
88
+ "payloads placed on benign sites": {
89
+ "urls": 7979,
90
+ "kind": "positive",
91
+ "recall": 0.9951
92
+ },
93
+ "phishing collection, benign": {
94
+ "urls": 24341,
95
+ "kind": "negative",
96
+ "false_positive_rate": 0.0004
97
+ },
98
+ "popular sites": {
99
+ "urls": 11874,
100
+ "kind": "negative",
101
+ "false_positive_rate": 0.0
102
+ },
103
+ "reference, legitimate": {
104
+ "urls": 670,
105
+ "kind": "negative",
106
+ "false_positive_rate": 0.0015
107
+ }
108
+ },
109
+ "note": "URLs from sites that were not in the training rows"
110
+ },
111
+ "other_datasets": {},
112
+ "known_legitimate": {
113
+ "checked": 24,
114
+ "flagged": [],
115
+ "highest": [
116
+ {
117
+ "url": "https://www.bbc.co.uk/news",
118
+ "score": 0.0111
119
+ },
120
+ {
121
+ "url": "https://www.amazon.com/dp/B08N5WRWNW?ref=abc&th=1",
122
+ "score": 0.0007
123
+ },
124
+ {
125
+ "url": "https://www.google.com/search?q=cybersecurity",
126
+ "score": 0.0003
127
+ },
128
+ {
129
+ "url": "https://github.com/",
130
+ "score": 0.0003
131
+ },
132
+ {
133
+ "url": "https://github.com/login",
134
+ "score": 0.0003
135
+ }
136
+ ]
137
+ },
138
+ "known_hostile": [
139
+ {
140
+ "url": "https://shop.example.com/item.php?id=1%27%20UNION%20SELECT%20username,password%20FROM%20users--",
141
+ "score": 1.0
142
+ },
143
+ {
144
+ "url": "https://example.com/search?q=<script>alert(document.cookie)</script>",
145
+ "score": 1.0
146
+ },
147
+ {
148
+ "url": "https://example.com/download?file=../../../../etc/passwd",
149
+ "score": 0.001
150
+ }
151
  ],
152
+ "feature_importances": {
153
+ "payload_special_ratio": 0.02071,
154
+ "payload_spaces": 0.00105,
155
+ "payload_equals_in_value": 0.00074,
156
+ "count_percent": 0.00031,
157
+ "payload_angle_brackets": 0.0003,
158
+ "payload_parentheses": 0.00026,
159
+ "payload_semicolons": 0.00021,
160
+ "payload_script_tokens": 0.00016,
161
+ "payload_sql_keywords": 8e-05,
162
+ "bare_path_length": 5e-05,
163
+ "query_longest_value": 4e-05,
164
+ "payload_encoded_specials": 4e-05,
165
+ "payload_length": 2e-05,
166
+ "payload_quotes": 1e-05,
167
+ "path_depth": 1e-05,
168
+ "payload_comment_markers": 1e-05,
169
+ "query_length": 1e-05,
170
+ "query_params": 1e-05,
171
+ "payload_longest_run_specials": 0.0,
172
+ "payload_pipes_backticks": 0.0,
173
+ "payload_traversal": 0.0,
174
+ "payload_null_bytes": 0.0
175
+ },
176
+ "gate": {
177
+ "rules": {
178
+ "min_auc": 0.9,
179
+ "max_false_positive_rate": 0.05,
180
+ "max_known_legitimate_flagged": 0
181
+ },
182
+ "passed": true,
183
+ "reasons": [],
184
+ "failed_rules": []
185
+ },
186
+ "name": "web_attack_detection",
187
+ "trained_at": "2026-10-13T22:50:22.856319Z",
188
+ "settings": {
189
+ "benign_sample": 120000,
190
+ "collection_benign_sample": 40000,
191
+ "popular_sample": 60000,
192
+ "phishing_sample": 120000,
193
+ "malware_sample": 30000,
194
+ "attack_benign_sample": 40000,
195
+ "test_fraction": 0.2,
196
+ "max_iter": 300,
197
+ "learning_rate": 0.1,
198
+ "max_leaf_nodes": 31,
199
+ "min_samples_leaf": 20,
200
+ "l2_regularization": 0.0,
201
+ "anomaly_contamination": 0.02,
202
+ "popular_domains": 300000,
203
+ "target_false_positive_rate": 0.02,
204
+ "seed": 42,
205
+ "drop_features": []
206
+ },
207
+ "sources": {
208
+ "domain popularity": {
209
+ "source": "https://tranco-list.eu/download/PYGVJ/1000000",
210
+ "domains": 300000
211
+ },
212
+ "Mitake/PhishingURLsANDBenignURLs": {
213
+ "revision": "1f939bad78f95b470c5d058dfb23c7fce35275b7",
214
+ "rows": {
215
+ "benign": 592095,
216
+ "phishing": 253199
217
+ }
218
+ },
219
+ "bgspaditya/byt-malicious-url-treatment": {
220
+ "revision": "82af40f1d701d03269f777aee09ceed80bb96b1c",
221
+ "rows": {
222
+ "benign": 341830,
223
+ "malware": 18900
224
+ }
225
+ },
226
+ "pirocheto/phishing-url": {
227
+ "revision": "1375d450d4540205ac11781b807249c9509739cd",
228
+ "rows": {
229
+ "train": {
230
+ "legitimate": 3828,
231
+ "phishing": 3735
232
+ },
233
+ "test": {
234
+ "legitimate": 1886,
235
+ "phishing": 1872
236
+ }
237
+ }
238
+ },
239
+ "phl-ldm/tranco_top_million": {
240
+ "revision": "37974646d7107b8789afb486461be81ba719a08a",
241
+ "rows": {
242
+ "landing pages": 149995
243
+ }
244
+ },
245
+ "shengqin/web-attacks": {
246
+ "revision": "631e4ca957612c34d09176ef6ee2e0284b18955f",
247
+ "rows": {
248
+ "attack": 19511,
249
+ "normal": 4785
250
+ }
251
+ }
252
+ },
253
+ "feature_set": "url_features.py, scheme-free and without a leading www."
254
  }
web_attack_detection/model.pkl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:f774d2935861a272513a885cc3d091c1d44dbc067e739590e8600bc335b127aa
3
- size 285769
 
 
 
 
web_attack_detection/package_info.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "name": "web_attack_detection",
3
- "type": "random_forest",
4
- "version": "1.0.0",
5
- "accuracy": 1.0,
6
- "f1_score": 1.0,
7
- "inference_time_ms": 0.029021159858460637,
8
- "files": {
9
- "model": {
10
- "path": "web_attack_detection/model.pkl",
11
- "checksum": "3071f634875fa3a54b389667634b1afe",
12
- "size_bytes": 285769
13
- },
14
- "scaler": {
15
- "path": "web_attack_detection/scaler.pkl",
16
- "checksum": "a511f6f966d0e45f2515732533dec192"
17
- },
18
- "metadata": {
19
- "path": "web_attack_detection/metadata.json"
20
- }
21
- },
22
- "packaged_at": "2026-03-14 21:51:56"
23
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
web_attack_detection/scaler.pkl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b39b981c87b0d9fb323facd4f000ec5d69de83cf692ac7de21e6ae57d069d1f6
3
- size 1319