Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- security
|
| 4 |
+
- proof-of-concept
|
| 5 |
+
- protobuf
|
| 6 |
+
license: mit
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Protocol Buffers MetricDescriptor monitored_resource_types materialization DoS PoC
|
| 10 |
+
|
| 11 |
+
This repository contains a benign security research PoC for a protobuf binary
|
| 12 |
+
artifact that drives large repeated-string materialization during
|
| 13 |
+
`google.api.metric_pb2.MetricDescriptor.ParseFromString(...)`.
|
| 14 |
+
|
| 15 |
+
Files:
|
| 16 |
+
|
| 17 |
+
- `control_one_display_name.pb`
|
| 18 |
+
- `malicious_monitored_resource_types_6000000.pb`
|
| 19 |
+
- `reproduce.py`
|
| 20 |
+
|
| 21 |
+
Observed behavior:
|
| 22 |
+
|
| 23 |
+
- control artifact:
|
| 24 |
+
- parses successfully with zero `monitored_resource_types`
|
| 25 |
+
- malicious artifact:
|
| 26 |
+
- both files are `12,000,000` bytes
|
| 27 |
+
- parses successfully with `6,000,000` `monitored_resource_types` entries
|
| 28 |
+
- increases peak RSS by about `213988 kB` in local clean-process replay
|
| 29 |
+
- takes about `15.42x` the control parse time
|
| 30 |
+
|
| 31 |
+
Tested runtime:
|
| 32 |
+
|
| 33 |
+
- `protobuf==7.35.1`
|
| 34 |
+
- Python: `/usr/bin/python3`
|
| 35 |
+
|
| 36 |
+
Public files:
|
| 37 |
+
|
| 38 |
+
- `https://huggingface.co/hacnho/protobuf-metricdescriptor-monitored-resource-types-dos-poc/resolve/main/control_one_display_name.pb`
|
| 39 |
+
- `https://huggingface.co/hacnho/protobuf-metricdescriptor-monitored-resource-types-dos-poc/resolve/main/malicious_monitored_resource_types_6000000.pb`
|
| 40 |
+
- `https://huggingface.co/hacnho/protobuf-metricdescriptor-monitored-resource-types-dos-poc/resolve/main/reproduce.py`
|
| 41 |
+
|
| 42 |
+
Reproduction:
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
python3 reproduce.py
|
| 46 |
+
```
|