File size: 4,292 Bytes
4bfe235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Live downstream security evaluation

This directory contains a fresh, reproducible comparison of IoTProber,
Censys, and Shodan.

## Workflow

```bash
# Initial collection when no live validation data exists.
.venv/bin/python CVE/pipeline.py collect-censys --per-type 200

# Preserve the existing collection as the candidate pool, then expand each
# class to at least 400 cross-class unique IPs.
.venv/bin/python CVE/resample.py snapshot
.venv/bin/python CVE/resample.py expand --target 400

# Query Shodan and generate IoTProber vendor labels only for
# Shodan-visible candidates.
export IOTPROBER_LABEL_MODEL="<configured-label-model>"
.venv/bin/python CVE/resample.py collect-shodan
.venv/bin/python CVE/resample.py prepare-label-round --round r1 --batch-size 5
.venv/bin/python CVE/resample.py run-label-round --round r1 --workers 8 \
  --model "$IOTPROBER_LABEL_MODEL"
.venv/bin/python CVE/resample.py parse-label-round --round r1

# Inspect eligibility. If a class has fewer than 200 eligible hosts, expand
# only that class and repeat Shodan collection and IoTProber vendor labeling
# with a new round name until all classes pass.
.venv/bin/python CVE/resample.py status
.venv/bin/python CVE/resample.py expand --target 1000 \
  --devices MEDICAL SCADA
.venv/bin/python CVE/resample.py expand --target 600 --devices CAMERA
.venv/bin/python CVE/resample.py collect-shodan
.venv/bin/python CVE/resample.py prepare-label-round --round r2 --batch-size 5
.venv/bin/python CVE/resample.py run-label-round --round r2 --workers 8 \
  --model "$IOTPROBER_LABEL_MODEL"
.venv/bin/python CVE/resample.py parse-label-round --round r2

# Select 200 Shodan-visible, non-Unknown-vendor hosts per class.
.venv/bin/python CVE/resample.py select

# Run native-first CPE/KEV/CVE mapping and verify all outputs.
.venv/bin/python CVE/pipeline.py analyze
.venv/bin/python CVE/pipeline.py verify
```

All collection stages are incremental and resumable. The current candidate
pool has 5,800 unique IPs. The final conditional validation set has 2,200 IPs
(11 classes x 200), all with Shodan status `ok` and a non-`Unknown`
IoTProber vendor label.

## Mapping hierarchy

For Censys and Shodan:

1. Platform-native CVE records.
2. Platform-native CPE records.
3. Type-compatible fallback CPEs constructed from that platform's own vendor,
   product, and version observations.

Baseline fallback never uses the IoTProber vendor label.

For IoTProber, the identified type label and vendor label are combined with
product/version fingerprint evidence. Hardware mappings use the IoTProber
vendor label; software and operating-system mappings retain their component
vendor when available.

The shared vendor metric is agreement with the IoTProber vendor label.
Generic component vendors such as Apache or Linux do not count as
device-vendor identifications. The final set's 100% Shodan Host coverage and
100% IoTProber vendor-label availability are explicit selection constraints,
not unbiased Internet-wide performance estimates.

## Key outputs

- `data/candidate_manifest.csv`: 5,800-host candidate pool.
- `data/candidate_ipraw_<TYPE>.csv`: candidate 46-column fingerprints.
- `data/ipraw_<TYPE>.csv`: final 46-column validation fingerprints.
- `data/censys_raw/<TYPE>.jsonl.gz`: candidate Censys native records.
- `data/validation_manifest.csv`: 2,200 unique validation IPs.
- `data/selection_metadata.json`: pool eligibility and selection audit.
- `label/candidate_label_<TYPE>.csv`: candidate vendor labels.
- `label/label_<TYPE>.csv`: identified vendor labels.
- `label/r*_output.jsonl`: raw auditable responses.
- `data/shodan_hosts.jsonl.gz`: candidate Shodan records.
- `results/report.md`: complete Chinese report.
- `results/paper_method.md`: paper-ready statistical method.
- `results/comparison_overall.csv`: overall metrics and Wilson intervals.
- `results/comparison_by_device_type.csv`: per-device-type metrics.
- `results/mcnemar_tests.csv`: paired exact McNemar tests.
- `results/asset_level_results.csv`: asset-level evidence.
- `results/cve_exposures.csv`: all candidate mappings.
- `results/cve_exposures_high_confidence.csv`: native-reported or
  version-confirmed mappings.
- `results/figures/live_native_first_security_comparsion.png`: requested
  three-method security mapping comparison.