Datasets:
add notes on features
Browse files
README.md
CHANGED
|
@@ -51,7 +51,7 @@ Researchers and cybersecurity enthusiasts can leverage D3FEND to:
|
|
| 51 |
- Gain insight into ontology development and modeling in the
|
| 52 |
cybersecurity domain.
|
| 53 |
|
| 54 |
-
###
|
| 55 |
|
| 56 |
### Source:
|
| 57 |
- [Dataset Repository - 0.13.0-BETA-1](https://github.com/d3fend/d3fend-ontology/tree/release/0.13.0-BETA-1)
|
|
@@ -63,7 +63,7 @@ Researchers and cybersecurity enthusiasts can leverage D3FEND to:
|
|
| 63 |
built from the beta version of the D3FEND ontology referenced
|
| 64 |
above using documented README in d3fend-ontology. This includes the
|
| 65 |
CWE extensions.
|
| 66 |
-
2. **
|
| 67 |
utilizing the Pellet reasoner plugin for logical reasoning and
|
| 68 |
verification.
|
| 69 |
3. **Coherence Check**: Utilized the Debug Ontology plugin in Protege
|
|
@@ -89,9 +89,39 @@ line tools. (https://jena.apache.org/documentation/tools/)
|
|
| 89 |
4. **Compression**: Compressed the resulting ontology files using
|
| 90 |
gzip.
|
| 91 |
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
the following Python code:
|
| 96 |
|
| 97 |
```python
|
|
@@ -99,6 +129,35 @@ from datasets import load_dataset
|
|
| 99 |
dataset = load_dataset('wikipunk/d3fend', split='train')
|
| 100 |
```
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
### Acknowledgements
|
| 103 |
This ontology is developed by MITRE Corporation and is licensed under
|
| 104 |
the MIT license. I would like to thank the authors for their work
|
|
|
|
| 51 |
- Gain insight into ontology development and modeling in the
|
| 52 |
cybersecurity domain.
|
| 53 |
|
| 54 |
+
### Dataset construction and pre-processing
|
| 55 |
|
| 56 |
### Source:
|
| 57 |
- [Dataset Repository - 0.13.0-BETA-1](https://github.com/d3fend/d3fend-ontology/tree/release/0.13.0-BETA-1)
|
|
|
|
| 63 |
built from the beta version of the D3FEND ontology referenced
|
| 64 |
above using documented README in d3fend-ontology. This includes the
|
| 65 |
CWE extensions.
|
| 66 |
+
2. **Import and Reasoning**: Imported into Protege version 5.6.1,
|
| 67 |
utilizing the Pellet reasoner plugin for logical reasoning and
|
| 68 |
verification.
|
| 69 |
3. **Coherence Check**: Utilized the Debug Ontology plugin in Protege
|
|
|
|
| 89 |
4. **Compression**: Compressed the resulting ontology files using
|
| 90 |
gzip.
|
| 91 |
|
| 92 |
+
## Features
|
| 93 |
+
The D3FEND dataset is composed of triples representing the
|
| 94 |
+
relationships between different cybersecurity countermeasures. Each
|
| 95 |
+
triple is a representation of a statement about a cybersecurity
|
| 96 |
+
concept or a relationship between concepts. The dataset includes the
|
| 97 |
+
following features:
|
| 98 |
|
| 99 |
+
### 1. **Subject** (`string`)
|
| 100 |
+
The subject of a triple is the entity that the statement is about. In
|
| 101 |
+
this dataset, the subject represents a cybersecurity concept or
|
| 102 |
+
entity, such as a specific countermeasure or ATT&CK technique.
|
| 103 |
+
|
| 104 |
+
### 2. **Predicate** (`string`)
|
| 105 |
+
The predicate of a triple represents the property or characteristic of
|
| 106 |
+
the subject, or the nature of the relationship between the subject and
|
| 107 |
+
the object. For instance, it might represent a specific type of
|
| 108 |
+
relationship like "may-be-associated-with" or "has a reference."
|
| 109 |
+
|
| 110 |
+
### 3. **Object** (`string`)
|
| 111 |
+
The object of a triple is the entity that is related to the subject by
|
| 112 |
+
the predicate. It can be another cybersecurity concept, such as an
|
| 113 |
+
ATT&CK technique, or a literal value representing a property of the
|
| 114 |
+
subject, such as a name or a description.
|
| 115 |
+
|
| 116 |
+
### Usage
|
| 117 |
+
First make sure you have the requirements installed:
|
| 118 |
+
|
| 119 |
+
```python
|
| 120 |
+
pip install datasets
|
| 121 |
+
pip install rdflib
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
You can load the dataset using the Hugging Face Datasets library with
|
| 125 |
the following Python code:
|
| 126 |
|
| 127 |
```python
|
|
|
|
| 129 |
dataset = load_dataset('wikipunk/d3fend', split='train')
|
| 130 |
```
|
| 131 |
|
| 132 |
+
#### Note on Format:
|
| 133 |
+
The subject, predicate, and object are stored in N3 notation, a
|
| 134 |
+
verbose serialization for RDF. This allows users to unambiguously
|
| 135 |
+
parse each component using `rdflib.util.from_n3` from the RDFLib
|
| 136 |
+
Python library. For example:
|
| 137 |
+
|
| 138 |
+
```python
|
| 139 |
+
from rdflib.util import from_n3
|
| 140 |
+
subject_node = from_n3(dataset[0]['subject'])
|
| 141 |
+
predicate_node = from_n3(dataset[0]['predicate'])
|
| 142 |
+
object_node = from_n3(dataset[0]['object'])
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
Once loaded, each example in the dataset will be a dictionary with
|
| 146 |
+
`subject`, `predicate`, and `object` keys corresponding to the
|
| 147 |
+
features described above.
|
| 148 |
+
|
| 149 |
+
### Example
|
| 150 |
+
|
| 151 |
+
Here is an example of a triple in the dataset:
|
| 152 |
+
- Subject: `"<http://d3fend.mitre.org/ontologies/d3fend.owl#T1550.002>"`
|
| 153 |
+
- Predicate: `"<http://d3fend.mitre.org/ontologies/d3fend.owl#may-be-associated-with>"`
|
| 154 |
+
- Object: `"<http://d3fend.mitre.org/ontologies/d3fend.owl#T1218.014>"`
|
| 155 |
+
|
| 156 |
+
This triple represents the statement that the ATT&CK technique
|
| 157 |
+
identified by `#T1550.002` may be associated with the ATT&CK technique
|
| 158 |
+
identified by `#T1218.014` in the D3FEND knowledge graph of
|
| 159 |
+
cybersecurity countermeasures
|
| 160 |
+
|
| 161 |
### Acknowledgements
|
| 162 |
This ontology is developed by MITRE Corporation and is licensed under
|
| 163 |
the MIT license. I would like to thank the authors for their work
|