This application converts the TTPs from the MITRE ATT&CK Matrix into an SQLite database.
Before running this application, you need to create the SQLite database.
To create the database, use the sqlite3.exe
command followed by the name of the database file. For example, to create a database named mitre_matrix.db
, run the following command:
sqlite3.exe mitre_matrix.db
Once the database is created, you need to create the necessary tables. Use the following SQL commands to create the tables:
CREATE TABLE IF NOT EXISTS Tactics (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS Techniques (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS Tactics_Techniques (
tactic_id INTEGER,
technique_id INTEGER,
FOREIGN KEY (tactic_id) REFERENCES Tactics(id),
FOREIGN KEY (technique_id) REFERENCES Techniques(id),
PRIMARY KEY (tactic_id, technique_id)
);
You can execute these commands within the SQLite command line interface. After running sqlite3.exe mitre_matrix.db
, paste and execute each of the CREATE TABLE
commands above.
Here is a step-by-step example:
-
Open your terminal or command prompt.
-
Run the command to create the database:
sqlite3.exe mitre_matrix.db
-
In the SQLite command line interface, execute the following commands:
CREATE TABLE IF NOT EXISTS Tactics ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS Techniques ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS Tactics_Techniques ( tactic_id INTEGER, technique_id INTEGER, FOREIGN KEY (tactic_id) REFERENCES Tactics(id), FOREIGN KEY (technique_id) REFERENCES Techniques(id), PRIMARY KEY (tactic_id, technique_id) );
-
Exit the SQLite command line interface by typing
.exit
.
Your SQLite database is now ready with the required tables. You can now proceed to use the application.
Feel free to customize the application.