Этот коммит содержится в:
Sara-Jayne Terp 2021-06-25 08:52:18 +01:00
родитель a76fddddda
Коммит f3336513cc
6 изменённых файлов: 316 добавлений и 819 удалений

Просмотреть файл

@ -9,34 +9,120 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"dict_keys(['df_phases', 'df_techniques', 'df_tasks', 'df_incidents', 'df_counters', 'df_detections', 'df_actortypes', 'df_resources', 'df_responsetypes', 'df_metatechniques', 'it', 'df_tactics', 'df_techniques_per_tactic', 'df_counters_per_tactic', 'phases', 'tactics', 'techniques', 'counters', 'metatechniques', 'actortypes', 'resources', 'num_tactics', 'cross_counterid_techniqueid', 'cross_counterid_resourceid', 'cross_counterid_actortypeid'])\n"
"dict_keys(['df_phases', 'df_frameworks', 'df_techniques', 'df_tasks', 'df_incidents', 'df_counters', 'df_detections', 'df_actortypes', 'df_resources', 'df_responsetypes', 'df_metatechniques', 'it', 'df_tactics', 'df_techniques_per_tactic', 'df_counters_per_tactic', 'phases', 'tactics', 'techniques', 'counters', 'metatechniques', 'actortypes', 'resources', 'num_tactics', 'cross_counterid_techniqueid', 'cross_counterid_resourceid', 'cross_counterid_actortypeid'])\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>amitt_id</th>\n",
" <th>technique_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0007</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0015</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0018</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0043</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0053</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>135</th>\n",
" <td>C00219</td>\n",
" <td>T0025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>136</th>\n",
" <td>C00220</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>137</th>\n",
" <td>C00221</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>138</th>\n",
" <td>C00222</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>139</th>\n",
" <td>C00223</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>898 rows × 2 columns</p>\n",
"</div>"
],
"text/plain": [
"{'TA01': 'Strategic Planning',\n",
" 'TA02': 'Objective Planning',\n",
" 'TA03': 'Develop People',\n",
" 'TA04': 'Develop Networks',\n",
" 'TA05': 'Microtargeting',\n",
" 'TA06': 'Develop Content',\n",
" 'TA07': 'Channel Selection',\n",
" 'TA08': 'Pump Priming',\n",
" 'TA09': 'Exposure',\n",
" 'TA10': 'Go Physical',\n",
" 'TA11': 'Persistence',\n",
" 'TA12': 'Measure Effectiveness'}"
" amitt_id technique_id\n",
"0 C00006 T0007\n",
"0 C00006 T0015\n",
"0 C00006 T0018\n",
"0 C00006 T0043\n",
"0 C00006 T0053\n",
".. ... ...\n",
"135 C00219 T0025\n",
"136 C00220 \n",
"137 C00221 \n",
"138 C00222 \n",
"139 C00223 \n",
"\n",
"[898 rows x 2 columns]"
]
},
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
@ -52,12 +138,12 @@
"\n",
"# Check which amitt variables we can see from here\n",
"print('{}'.format(vars(amitt).keys()))\n",
"vars(amitt)['tactics']"
"vars(amitt)['cross_counterid_techniqueid']"
]
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 3,
"metadata": {
"scrolled": true
},
@ -84,407 +170,99 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>amitt_id</th>\n",
" <th>name</th>\n",
" <th>metatechnique</th>\n",
" <th>summary</th>\n",
" <th>playbooks</th>\n",
" <th>actortypes</th>\n",
" <th>resources_needed</th>\n",
" <th>how_found</th>\n",
" <th>references</th>\n",
" <th>incident_ids</th>\n",
" <th>tactic</th>\n",
" <th>responsetype</th>\n",
" <th>notes</th>\n",
" <th>techniques</th>\n",
" <th>longname</th>\n",
" <th>tactic_id</th>\n",
" <th>tactic_name</th>\n",
" <th>metatechnique_id</th>\n",
" <th>metatechnique_name</th>\n",
" <th>technique_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>Charge for social media</td>\n",
" <td>M004 - friction</td>\n",
" <td>Include a paid-for privacy option, e.g. pay Fa...</td>\n",
" <td></td>\n",
" <td>A033 - social media platform owner</td>\n",
" <td></td>\n",
" <td>2019-11-workshop</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D2 Deny</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00006 - Charge for social media</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M004</td>\n",
" <td>- friction</td>\n",
" <td>T0007</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>Censorship</td>\n",
" <td>M005 - removal</td>\n",
" <td>Alter and/or block the publication/disseminati...</td>\n",
" <td></td>\n",
" <td>A031 - social media platform administrator</td>\n",
" <td></td>\n",
" <td>grugq</td>\n",
" <td>Taylor81</td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D2 Deny</td>\n",
" <td></td>\n",
" <td>T0009 - Create fake experts\\nT0008 - Create fa...</td>\n",
" <td>C00006 - Censorship</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M005</td>\n",
" <td>- removal</td>\n",
" <td>T0015</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>C00008</td>\n",
" <td>Create shared fact-checking database</td>\n",
" <td>M006 - scoring</td>\n",
" <td>Snopes is best-known example</td>\n",
" <td></td>\n",
" <td>A007 - factchecker</td>\n",
" <td></td>\n",
" <td>2019-11-workshop\\n2019-11-search</td>\n",
" <td></td>\n",
" <td>I00049,I00050</td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D4 Degrade</td>\n",
" <td></td>\n",
" <td>TA01 - Strategic Planning\\nTA06 - Develop Cont...</td>\n",
" <td>C00008 - Create shared fact-checking database</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M006</td>\n",
" <td>- scoring</td>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0018</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>C00009</td>\n",
" <td>Educate high profile influencers on best pract...</td>\n",
" <td>M001 - resilience</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>A016 - influencer,A006 - educator</td>\n",
" <td></td>\n",
" <td>2019-11-workshop</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA02 Objective Planning</td>\n",
" <td>D2 Deny</td>\n",
" <td></td>\n",
" <td>TA08 - Pump Priming\\nT0010 - Cultivate ignoran...</td>\n",
" <td>C00009 - Educate high profile influencers on b...</td>\n",
" <td>TA02</td>\n",
" <td>Objective Planning</td>\n",
" <td>M001</td>\n",
" <td>- resilience</td>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0043</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>C00010</td>\n",
" <td>Enhanced privacy regulation for social media</td>\n",
" <td>M004 - friction</td>\n",
" <td>Privacy standards</td>\n",
" <td></td>\n",
" <td>A020 - policy maker</td>\n",
" <td></td>\n",
" <td>2019-11-workshop</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D2 Deny</td>\n",
" <td></td>\n",
" <td>TA05 - Microtargeting\\nT00018 - Paid targeted ads</td>\n",
" <td>C00010 - Enhanced privacy regulation for socia...</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M004</td>\n",
" <td>- friction</td>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0053</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>135</th>\n",
" <td>C00219</td>\n",
" <td>Add metadata to content thats out of the cont...</td>\n",
" <td>M003 - daylight</td>\n",
" <td>Steganography. Adding date, signatures etc to ...</td>\n",
" <td>Add date and source to images</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>grugq</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA06 Develop Content</td>\n",
" <td>D4 Degrade</td>\n",
" <td></td>\n",
" <td>T0024 - Create fake videos and images\\nT0026 -...</td>\n",
" <td>C00219 - Add metadata to content thats out of...</td>\n",
" <td>TA06</td>\n",
" <td>Develop Content</td>\n",
" <td>M003</td>\n",
" <td>- daylight</td>\n",
" <td>T0025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>136</th>\n",
" <td>C00220</td>\n",
" <td>Develop a monitoring and intelligence plan</td>\n",
" <td>M007 - metatechnique</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>Counters cleanup</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D3 Disrupt</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00220 - Develop a monitoring and intelligence...</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M007</td>\n",
" <td>- metatechnique</td>\n",
" </tr>\n",
" <tr>\n",
" <th>137</th>\n",
" <td>C00221</td>\n",
" <td>Run a disinformation red team, and design miti...</td>\n",
" <td>M007 - metatechnique</td>\n",
" <td>Include PACE plans - Primary, Alternate, Conti...</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>Counters cleanup</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D3 Disrupt</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00221 - Run a disinformation red team, and de...</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M007</td>\n",
" <td>- metatechnique</td>\n",
" </tr>\n",
" <tr>\n",
" <th>138</th>\n",
" <td>C00222</td>\n",
" <td>Tabletop simulations</td>\n",
" <td>M007 - metatechnique</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA02 Objective Planning</td>\n",
" <td>D3 Disrupt</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00222 - Tabletop simulations</td>\n",
" <td>TA02</td>\n",
" <td>Objective Planning</td>\n",
" <td>M007</td>\n",
" <td>- metatechnique</td>\n",
" </tr>\n",
" <tr>\n",
" <th>139</th>\n",
" <td>C00223</td>\n",
" <td>Strengthen Trust in social media platforms</td>\n",
" <td>M001 - resilience</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D3 Disrupt</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00223 - Strengthen Trust in social media plat...</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M001</td>\n",
" <td>- resilience</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>140 rows × 19 columns</p>\n",
"<p>898 rows × 2 columns</p>\n",
"</div>"
],
"text/plain": [
" amitt_id name \\\n",
"0 C00006 Charge for social media \n",
"8 C00006 Censorship \n",
"1 C00008 Create shared fact-checking database \n",
"2 C00009 Educate high profile influencers on best pract... \n",
"3 C00010 Enhanced privacy regulation for social media \n",
".. ... ... \n",
"135 C00219 Add metadata to content thats out of the cont... \n",
"136 C00220 Develop a monitoring and intelligence plan \n",
"137 C00221 Run a disinformation red team, and design miti... \n",
"138 C00222 Tabletop simulations \n",
"139 C00223 Strengthen Trust in social media platforms \n",
" amitt_id technique_id\n",
"0 C00006 T0007\n",
"0 C00006 T0015\n",
"0 C00006 T0018\n",
"0 C00006 T0043\n",
"0 C00006 T0053\n",
".. ... ...\n",
"135 C00219 T0025\n",
"136 C00220 \n",
"137 C00221 \n",
"138 C00222 \n",
"139 C00223 \n",
"\n",
" metatechnique summary \\\n",
"0 M004 - friction Include a paid-for privacy option, e.g. pay Fa... \n",
"8 M005 - removal Alter and/or block the publication/disseminati... \n",
"1 M006 - scoring Snopes is best-known example \n",
"2 M001 - resilience \n",
"3 M004 - friction Privacy standards \n",
".. ... ... \n",
"135 M003 - daylight Steganography. Adding date, signatures etc to ... \n",
"136 M007 - metatechnique \n",
"137 M007 - metatechnique Include PACE plans - Primary, Alternate, Conti... \n",
"138 M007 - metatechnique \n",
"139 M001 - resilience \n",
"\n",
" playbooks \\\n",
"0 \n",
"8 \n",
"1 \n",
"2 \n",
"3 \n",
".. ... \n",
"135 Add date and source to images \n",
"136 \n",
"137 \n",
"138 \n",
"139 \n",
"\n",
" actortypes resources_needed \\\n",
"0 A033 - social media platform owner \n",
"8 A031 - social media platform administrator \n",
"1 A007 - factchecker \n",
"2 A016 - influencer,A006 - educator \n",
"3 A020 - policy maker \n",
".. ... ... \n",
"135 \n",
"136 \n",
"137 \n",
"138 \n",
"139 \n",
"\n",
" how_found references incident_ids \\\n",
"0 2019-11-workshop \n",
"8 grugq Taylor81 \n",
"1 2019-11-workshop\\n2019-11-search I00049,I00050 \n",
"2 2019-11-workshop \n",
"3 2019-11-workshop \n",
".. ... ... ... \n",
"135 grugq \n",
"136 Counters cleanup \n",
"137 Counters cleanup \n",
"138 \n",
"139 \n",
"\n",
" tactic responsetype notes \\\n",
"0 TA01 Strategic Planning D2 Deny \n",
"8 TA01 Strategic Planning D2 Deny \n",
"1 TA01 Strategic Planning D4 Degrade \n",
"2 TA02 Objective Planning D2 Deny \n",
"3 TA01 Strategic Planning D2 Deny \n",
".. ... ... ... \n",
"135 TA06 Develop Content D4 Degrade \n",
"136 TA01 Strategic Planning D3 Disrupt \n",
"137 TA01 Strategic Planning D3 Disrupt \n",
"138 TA02 Objective Planning D3 Disrupt \n",
"139 TA01 Strategic Planning D3 Disrupt \n",
"\n",
" techniques \\\n",
"0 \n",
"8 T0009 - Create fake experts\\nT0008 - Create fa... \n",
"1 TA01 - Strategic Planning\\nTA06 - Develop Cont... \n",
"2 TA08 - Pump Priming\\nT0010 - Cultivate ignoran... \n",
"3 TA05 - Microtargeting\\nT00018 - Paid targeted ads \n",
".. ... \n",
"135 T0024 - Create fake videos and images\\nT0026 -... \n",
"136 \n",
"137 \n",
"138 \n",
"139 \n",
"\n",
" longname tactic_id \\\n",
"0 C00006 - Charge for social media TA01 \n",
"8 C00006 - Censorship TA01 \n",
"1 C00008 - Create shared fact-checking database TA01 \n",
"2 C00009 - Educate high profile influencers on b... TA02 \n",
"3 C00010 - Enhanced privacy regulation for socia... TA01 \n",
".. ... ... \n",
"135 C00219 - Add metadata to content thats out of... TA06 \n",
"136 C00220 - Develop a monitoring and intelligence... TA01 \n",
"137 C00221 - Run a disinformation red team, and de... TA01 \n",
"138 C00222 - Tabletop simulations TA02 \n",
"139 C00223 - Strengthen Trust in social media plat... TA01 \n",
"\n",
" tactic_name metatechnique_id metatechnique_name \n",
"0 Strategic Planning M004 - friction \n",
"8 Strategic Planning M005 - removal \n",
"1 Strategic Planning M006 - scoring \n",
"2 Objective Planning M001 - resilience \n",
"3 Strategic Planning M004 - friction \n",
".. ... ... ... \n",
"135 Develop Content M003 - daylight \n",
"136 Strategic Planning M007 - metatechnique \n",
"137 Strategic Planning M007 - metatechnique \n",
"138 Objective Planning M007 - metatechnique \n",
"139 Strategic Planning M001 - resilience \n",
"\n",
"[140 rows x 19 columns]"
"[898 rows x 2 columns]"
]
},
"execution_count": 45,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"amitt.df_counters"
"amitt.cross_counterid_techniqueid"
]
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 10,
"metadata": {
"scrolled": true
},
@ -587,7 +365,7 @@
" <td>T0062</td>\n",
" <td>TA12</td>\n",
" <td>Behaviour changes</td>\n",
" <td></td>\n",
" <td>Monitor and evaluate behaviour changes from mi...</td>\n",
" <td>62</td>\n",
" </tr>\n",
" <tr>\n",
@ -595,7 +373,7 @@
" <td>T0063</td>\n",
" <td>TA12</td>\n",
" <td>Message reach</td>\n",
" <td></td>\n",
" <td>Monitor and evaluate message reach in misinfor...</td>\n",
" <td>63</td>\n",
" </tr>\n",
" <tr>\n",
@ -603,7 +381,7 @@
" <td>T0064</td>\n",
" <td>TA12</td>\n",
" <td>Social media engagement</td>\n",
" <td></td>\n",
" <td>Monitor and evaluate social media engagement i...</td>\n",
" <td>64</td>\n",
" </tr>\n",
" </tbody>\n",
@ -634,21 +412,21 @@
".. ... .. \n",
"59 continue narrative or message amplification af... 60 \n",
"60 Sell hats, t-shirts, flags and other branded c... 61 \n",
"61 62 \n",
"62 63 \n",
"63 64 \n",
"61 Monitor and evaluate behaviour changes from mi... 62 \n",
"62 Monitor and evaluate message reach in misinfor... 63 \n",
"63 Monitor and evaluate social media engagement i... 64 \n",
"\n",
"[64 rows x 5 columns]"
]
},
"execution_count": 44,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Generate minimal sqlite database from the Amitt variables\n",
"conn = sql.connect('test_amitt_sqlite.db')\n",
"conn = sql.connect('amittsite.sqlite')\n",
"\n",
"def add_table(dataframe, tablename, columns): \n",
" # Create sql table\n",
@ -664,10 +442,12 @@
"\n",
"#newtable = add_table(amitt.df_actortypes, 'actor_type', ['amitt_id', 'sector_id', 'framework_id', 'name', 'summary'])\n",
"# counter\n",
"newtable = add_table(amitt.df_counters, 'counter', ['amitt_id', 'tactic_id', 'metatechnique_id', 'name', 'summary'])\n",
"# dataset\n",
"# framework\n",
"newtable = add_table(amitt.df_frameworks, 'framework', ['amitt_id', 'name', 'summary'])\n",
"# incident\n",
"# metatechnique\n",
"newtable = add_table(amitt.df_metatechniques, 'metatechnique', ['amitt_id', 'name', 'summary'])\n",
"newtable = add_table(amitt.df_phases, 'phase', ['amitt_id', 'name', 'rank', 'summary'])\n",
"# playbook\n",
"# reference\n",
@ -996,21 +776,15 @@
},
{
"cell_type": "code",
"execution_count": 124,
"execution_count": 141,
"metadata": {},
"outputs": [
{
"name": "stdout",
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"\n",
"Table countermeasures is changed\n",
"Differences in column name\n",
"Differences in column summary\n",
"Differences in column responsetype\n",
"Differences in column techniques\n",
"Differences in column longname\n"
"<ipython-input-141-d791eafb5aa0>:9: FutureWarning: Passing a negative integer is deprecated in version 1.0 and will not be supported in future version. Instead, use None to not limit the column width.\n",
" pd.set_option('display.max_colwidth', -1)\n"
]
}
],
@ -1022,6 +796,8 @@
"import numpy as np\n",
"import os\n",
"from sklearn.feature_extraction.text import CountVectorizer\n",
"pd.set_option('display.max_rows', 1000)\n",
"pd.set_option('display.max_colwidth', -1)\n",
"\n",
"newfile = '../AMITT_MASTER_DATA/AMITT_TTPs_MASTER.xlsx'\n",
"oldfile = 'AMITT_TTPs_MASTER_github_version.xlsx'\n",
@ -1068,7 +844,7 @@
},
{
"cell_type": "code",
"execution_count": 125,
"execution_count": 142,
"metadata": {},
"outputs": [
{
@ -1098,81 +874,17 @@
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>C00047</td>\n",
" <td>Coordinated inauthentics</td>\n",
" <td>Honeypot with coordinated inauthentics</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32</th>\n",
" <td>C00056</td>\n",
" <td>Get off social media</td>\n",
" <td>Encourage people to leave social media</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34</th>\n",
" <td>C00059</td>\n",
" <td>Verification of project before posting (counte...</td>\n",
" <td>Verification of project before posting fund re...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42</th>\n",
" <td>C00072</td>\n",
" <td>Remove non-relevant content from special inter...</td>\n",
" <td>Remove non-relevant content from special inter...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>68</th>\n",
" <td>C00105</td>\n",
" <td>Buy more advertising than misinformation creators</td>\n",
" <td>Buy more advertising than the adversary to shi...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>74</th>\n",
" <td>C00113</td>\n",
" <td>Debunk and defuse a fake expert / credentials.</td>\n",
" <td>Debunk and defuse a fake expert / credentials....</td>\n",
" </tr>\n",
" <tr>\n",
" <th>80</th>\n",
" <td>C00119</td>\n",
" <td>Engage payload and debunk.</td>\n",
" <td>Engage payload and debunk. Provide link to fac...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>101</th>\n",
" <td>C00147</td>\n",
" <td>Make amplification of social media posts expir...</td>\n",
" <td>Make amplification of social media ports expir...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" amitt_id new \\\n",
"27 C00047 Coordinated inauthentics \n",
"32 C00056 Get off social media \n",
"34 C00059 Verification of project before posting (counte... \n",
"42 C00072 Remove non-relevant content from special inter... \n",
"68 C00105 Buy more advertising than misinformation creators \n",
"74 C00113 Debunk and defuse a fake expert / credentials. \n",
"80 C00119 Engage payload and debunk. \n",
"101 C00147 Make amplification of social media posts expir... \n",
"\n",
" old \n",
"27 Honeypot with coordinated inauthentics \n",
"32 Encourage people to leave social media \n",
"34 Verification of project before posting fund re... \n",
"42 Remove non-relevant content from special inter... \n",
"68 Buy more advertising than the adversary to shi... \n",
"74 Debunk and defuse a fake expert / credentials.... \n",
"80 Engage payload and debunk. Provide link to fac... \n",
"101 Make amplification of social media ports expir... "
"Empty DataFrame\n",
"Columns: [amitt_id, new, old]\n",
"Index: []"
]
},
"execution_count": 125,
"execution_count": 142,
"metadata": {},
"output_type": "execute_result"
}
@ -1180,13 +892,13 @@
"source": [
"# Look at individual table differences\n",
"table = 'countermeasures'\n",
"column = 'name'\n",
"column = 'summary'\n",
"coldiffs = newdfs[table][column] != olddfs[table][column]\n",
"diffcols = pd.DataFrame()\n",
"diffcols['amitt_id'] = newdfs[table][coldiffs]['amitt_id']\n",
"diffcols['new'] = newdfs[table][coldiffs][column]\n",
"diffcols['old'] = olddfs[table][coldiffs][column]\n",
"diffcols"
"diffcols[diffcols['old'] != '']"
]
},
{

Просмотреть файл

@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {
"scrolled": true
},
@ -48,8 +48,10 @@
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"execution_count": 10,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
@ -437,7 +439,7 @@
"[140 rows x 18 columns]"
]
},
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}

Просмотреть файл

@ -9,34 +9,120 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"dict_keys(['df_phases', 'df_techniques', 'df_tasks', 'df_incidents', 'df_counters', 'df_detections', 'df_actortypes', 'df_resources', 'df_responsetypes', 'df_metatechniques', 'it', 'df_tactics', 'df_techniques_per_tactic', 'df_counters_per_tactic', 'phases', 'tactics', 'techniques', 'counters', 'metatechniques', 'actortypes', 'resources', 'num_tactics', 'cross_counterid_techniqueid', 'cross_counterid_resourceid', 'cross_counterid_actortypeid'])\n"
"dict_keys(['df_phases', 'df_frameworks', 'df_techniques', 'df_tasks', 'df_incidents', 'df_counters', 'df_detections', 'df_actortypes', 'df_resources', 'df_responsetypes', 'df_metatechniques', 'it', 'df_tactics', 'df_techniques_per_tactic', 'df_counters_per_tactic', 'phases', 'tactics', 'techniques', 'counters', 'metatechniques', 'actortypes', 'resources', 'num_tactics', 'cross_counterid_techniqueid', 'cross_counterid_resourceid', 'cross_counterid_actortypeid'])\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>amitt_id</th>\n",
" <th>technique_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0007</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0015</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0018</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0043</td>\n",
" </tr>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0053</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>135</th>\n",
" <td>C00219</td>\n",
" <td>T0025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>136</th>\n",
" <td>C00220</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>137</th>\n",
" <td>C00221</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>138</th>\n",
" <td>C00222</td>\n",
" <td></td>\n",
" </tr>\n",
" <tr>\n",
" <th>139</th>\n",
" <td>C00223</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>898 rows × 2 columns</p>\n",
"</div>"
],
"text/plain": [
"{'TA01': 'Strategic Planning',\n",
" 'TA02': 'Objective Planning',\n",
" 'TA03': 'Develop People',\n",
" 'TA04': 'Develop Networks',\n",
" 'TA05': 'Microtargeting',\n",
" 'TA06': 'Develop Content',\n",
" 'TA07': 'Channel Selection',\n",
" 'TA08': 'Pump Priming',\n",
" 'TA09': 'Exposure',\n",
" 'TA10': 'Go Physical',\n",
" 'TA11': 'Persistence',\n",
" 'TA12': 'Measure Effectiveness'}"
" amitt_id technique_id\n",
"0 C00006 T0007\n",
"0 C00006 T0015\n",
"0 C00006 T0018\n",
"0 C00006 T0043\n",
"0 C00006 T0053\n",
".. ... ...\n",
"135 C00219 T0025\n",
"136 C00220 \n",
"137 C00221 \n",
"138 C00222 \n",
"139 C00223 \n",
"\n",
"[898 rows x 2 columns]"
]
},
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
@ -52,12 +138,12 @@
"\n",
"# Check which amitt variables we can see from here\n",
"print('{}'.format(vars(amitt).keys()))\n",
"vars(amitt)['tactics']"
"vars(amitt)['cross_counterid_techniqueid']"
]
},
{
"cell_type": "code",
"execution_count": 45,
"execution_count": 3,
"metadata": {
"scrolled": true
},
@ -84,407 +170,99 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>amitt_id</th>\n",
" <th>name</th>\n",
" <th>metatechnique</th>\n",
" <th>summary</th>\n",
" <th>playbooks</th>\n",
" <th>actortypes</th>\n",
" <th>resources_needed</th>\n",
" <th>how_found</th>\n",
" <th>references</th>\n",
" <th>incident_ids</th>\n",
" <th>tactic</th>\n",
" <th>responsetype</th>\n",
" <th>notes</th>\n",
" <th>techniques</th>\n",
" <th>longname</th>\n",
" <th>tactic_id</th>\n",
" <th>tactic_name</th>\n",
" <th>metatechnique_id</th>\n",
" <th>metatechnique_name</th>\n",
" <th>technique_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>Charge for social media</td>\n",
" <td>M004 - friction</td>\n",
" <td>Include a paid-for privacy option, e.g. pay Fa...</td>\n",
" <td></td>\n",
" <td>A033 - social media platform owner</td>\n",
" <td></td>\n",
" <td>2019-11-workshop</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D2 Deny</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00006 - Charge for social media</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M004</td>\n",
" <td>- friction</td>\n",
" <td>T0007</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>Censorship</td>\n",
" <td>M005 - removal</td>\n",
" <td>Alter and/or block the publication/disseminati...</td>\n",
" <td></td>\n",
" <td>A031 - social media platform administrator</td>\n",
" <td></td>\n",
" <td>grugq</td>\n",
" <td>Taylor81</td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D2 Deny</td>\n",
" <td></td>\n",
" <td>T0009 - Create fake experts\\nT0008 - Create fa...</td>\n",
" <td>C00006 - Censorship</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M005</td>\n",
" <td>- removal</td>\n",
" <td>T0015</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>C00008</td>\n",
" <td>Create shared fact-checking database</td>\n",
" <td>M006 - scoring</td>\n",
" <td>Snopes is best-known example</td>\n",
" <td></td>\n",
" <td>A007 - factchecker</td>\n",
" <td></td>\n",
" <td>2019-11-workshop\\n2019-11-search</td>\n",
" <td></td>\n",
" <td>I00049,I00050</td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D4 Degrade</td>\n",
" <td></td>\n",
" <td>TA01 - Strategic Planning\\nTA06 - Develop Cont...</td>\n",
" <td>C00008 - Create shared fact-checking database</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M006</td>\n",
" <td>- scoring</td>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0018</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>C00009</td>\n",
" <td>Educate high profile influencers on best pract...</td>\n",
" <td>M001 - resilience</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>A016 - influencer,A006 - educator</td>\n",
" <td></td>\n",
" <td>2019-11-workshop</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA02 Objective Planning</td>\n",
" <td>D2 Deny</td>\n",
" <td></td>\n",
" <td>TA08 - Pump Priming\\nT0010 - Cultivate ignoran...</td>\n",
" <td>C00009 - Educate high profile influencers on b...</td>\n",
" <td>TA02</td>\n",
" <td>Objective Planning</td>\n",
" <td>M001</td>\n",
" <td>- resilience</td>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0043</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>C00010</td>\n",
" <td>Enhanced privacy regulation for social media</td>\n",
" <td>M004 - friction</td>\n",
" <td>Privacy standards</td>\n",
" <td></td>\n",
" <td>A020 - policy maker</td>\n",
" <td></td>\n",
" <td>2019-11-workshop</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D2 Deny</td>\n",
" <td></td>\n",
" <td>TA05 - Microtargeting\\nT00018 - Paid targeted ads</td>\n",
" <td>C00010 - Enhanced privacy regulation for socia...</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M004</td>\n",
" <td>- friction</td>\n",
" <th>0</th>\n",
" <td>C00006</td>\n",
" <td>T0053</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>135</th>\n",
" <td>C00219</td>\n",
" <td>Add metadata to content thats out of the cont...</td>\n",
" <td>M003 - daylight</td>\n",
" <td>Steganography. Adding date, signatures etc to ...</td>\n",
" <td>Add date and source to images</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>grugq</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA06 Develop Content</td>\n",
" <td>D4 Degrade</td>\n",
" <td></td>\n",
" <td>T0024 - Create fake videos and images\\nT0026 -...</td>\n",
" <td>C00219 - Add metadata to content thats out of...</td>\n",
" <td>TA06</td>\n",
" <td>Develop Content</td>\n",
" <td>M003</td>\n",
" <td>- daylight</td>\n",
" <td>T0025</td>\n",
" </tr>\n",
" <tr>\n",
" <th>136</th>\n",
" <td>C00220</td>\n",
" <td>Develop a monitoring and intelligence plan</td>\n",
" <td>M007 - metatechnique</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>Counters cleanup</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D3 Disrupt</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00220 - Develop a monitoring and intelligence...</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M007</td>\n",
" <td>- metatechnique</td>\n",
" </tr>\n",
" <tr>\n",
" <th>137</th>\n",
" <td>C00221</td>\n",
" <td>Run a disinformation red team, and design miti...</td>\n",
" <td>M007 - metatechnique</td>\n",
" <td>Include PACE plans - Primary, Alternate, Conti...</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>Counters cleanup</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D3 Disrupt</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00221 - Run a disinformation red team, and de...</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M007</td>\n",
" <td>- metatechnique</td>\n",
" </tr>\n",
" <tr>\n",
" <th>138</th>\n",
" <td>C00222</td>\n",
" <td>Tabletop simulations</td>\n",
" <td>M007 - metatechnique</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA02 Objective Planning</td>\n",
" <td>D3 Disrupt</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00222 - Tabletop simulations</td>\n",
" <td>TA02</td>\n",
" <td>Objective Planning</td>\n",
" <td>M007</td>\n",
" <td>- metatechnique</td>\n",
" </tr>\n",
" <tr>\n",
" <th>139</th>\n",
" <td>C00223</td>\n",
" <td>Strengthen Trust in social media platforms</td>\n",
" <td>M001 - resilience</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>TA01 Strategic Planning</td>\n",
" <td>D3 Disrupt</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>C00223 - Strengthen Trust in social media plat...</td>\n",
" <td>TA01</td>\n",
" <td>Strategic Planning</td>\n",
" <td>M001</td>\n",
" <td>- resilience</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>140 rows × 19 columns</p>\n",
"<p>898 rows × 2 columns</p>\n",
"</div>"
],
"text/plain": [
" amitt_id name \\\n",
"0 C00006 Charge for social media \n",
"8 C00006 Censorship \n",
"1 C00008 Create shared fact-checking database \n",
"2 C00009 Educate high profile influencers on best pract... \n",
"3 C00010 Enhanced privacy regulation for social media \n",
".. ... ... \n",
"135 C00219 Add metadata to content thats out of the cont... \n",
"136 C00220 Develop a monitoring and intelligence plan \n",
"137 C00221 Run a disinformation red team, and design miti... \n",
"138 C00222 Tabletop simulations \n",
"139 C00223 Strengthen Trust in social media platforms \n",
" amitt_id technique_id\n",
"0 C00006 T0007\n",
"0 C00006 T0015\n",
"0 C00006 T0018\n",
"0 C00006 T0043\n",
"0 C00006 T0053\n",
".. ... ...\n",
"135 C00219 T0025\n",
"136 C00220 \n",
"137 C00221 \n",
"138 C00222 \n",
"139 C00223 \n",
"\n",
" metatechnique summary \\\n",
"0 M004 - friction Include a paid-for privacy option, e.g. pay Fa... \n",
"8 M005 - removal Alter and/or block the publication/disseminati... \n",
"1 M006 - scoring Snopes is best-known example \n",
"2 M001 - resilience \n",
"3 M004 - friction Privacy standards \n",
".. ... ... \n",
"135 M003 - daylight Steganography. Adding date, signatures etc to ... \n",
"136 M007 - metatechnique \n",
"137 M007 - metatechnique Include PACE plans - Primary, Alternate, Conti... \n",
"138 M007 - metatechnique \n",
"139 M001 - resilience \n",
"\n",
" playbooks \\\n",
"0 \n",
"8 \n",
"1 \n",
"2 \n",
"3 \n",
".. ... \n",
"135 Add date and source to images \n",
"136 \n",
"137 \n",
"138 \n",
"139 \n",
"\n",
" actortypes resources_needed \\\n",
"0 A033 - social media platform owner \n",
"8 A031 - social media platform administrator \n",
"1 A007 - factchecker \n",
"2 A016 - influencer,A006 - educator \n",
"3 A020 - policy maker \n",
".. ... ... \n",
"135 \n",
"136 \n",
"137 \n",
"138 \n",
"139 \n",
"\n",
" how_found references incident_ids \\\n",
"0 2019-11-workshop \n",
"8 grugq Taylor81 \n",
"1 2019-11-workshop\\n2019-11-search I00049,I00050 \n",
"2 2019-11-workshop \n",
"3 2019-11-workshop \n",
".. ... ... ... \n",
"135 grugq \n",
"136 Counters cleanup \n",
"137 Counters cleanup \n",
"138 \n",
"139 \n",
"\n",
" tactic responsetype notes \\\n",
"0 TA01 Strategic Planning D2 Deny \n",
"8 TA01 Strategic Planning D2 Deny \n",
"1 TA01 Strategic Planning D4 Degrade \n",
"2 TA02 Objective Planning D2 Deny \n",
"3 TA01 Strategic Planning D2 Deny \n",
".. ... ... ... \n",
"135 TA06 Develop Content D4 Degrade \n",
"136 TA01 Strategic Planning D3 Disrupt \n",
"137 TA01 Strategic Planning D3 Disrupt \n",
"138 TA02 Objective Planning D3 Disrupt \n",
"139 TA01 Strategic Planning D3 Disrupt \n",
"\n",
" techniques \\\n",
"0 \n",
"8 T0009 - Create fake experts\\nT0008 - Create fa... \n",
"1 TA01 - Strategic Planning\\nTA06 - Develop Cont... \n",
"2 TA08 - Pump Priming\\nT0010 - Cultivate ignoran... \n",
"3 TA05 - Microtargeting\\nT00018 - Paid targeted ads \n",
".. ... \n",
"135 T0024 - Create fake videos and images\\nT0026 -... \n",
"136 \n",
"137 \n",
"138 \n",
"139 \n",
"\n",
" longname tactic_id \\\n",
"0 C00006 - Charge for social media TA01 \n",
"8 C00006 - Censorship TA01 \n",
"1 C00008 - Create shared fact-checking database TA01 \n",
"2 C00009 - Educate high profile influencers on b... TA02 \n",
"3 C00010 - Enhanced privacy regulation for socia... TA01 \n",
".. ... ... \n",
"135 C00219 - Add metadata to content thats out of... TA06 \n",
"136 C00220 - Develop a monitoring and intelligence... TA01 \n",
"137 C00221 - Run a disinformation red team, and de... TA01 \n",
"138 C00222 - Tabletop simulations TA02 \n",
"139 C00223 - Strengthen Trust in social media plat... TA01 \n",
"\n",
" tactic_name metatechnique_id metatechnique_name \n",
"0 Strategic Planning M004 - friction \n",
"8 Strategic Planning M005 - removal \n",
"1 Strategic Planning M006 - scoring \n",
"2 Objective Planning M001 - resilience \n",
"3 Strategic Planning M004 - friction \n",
".. ... ... ... \n",
"135 Develop Content M003 - daylight \n",
"136 Strategic Planning M007 - metatechnique \n",
"137 Strategic Planning M007 - metatechnique \n",
"138 Objective Planning M007 - metatechnique \n",
"139 Strategic Planning M001 - resilience \n",
"\n",
"[140 rows x 19 columns]"
"[898 rows x 2 columns]"
]
},
"execution_count": 45,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"amitt.df_counters"
"amitt.cross_counterid_techniqueid"
]
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 10,
"metadata": {
"scrolled": true
},
@ -587,7 +365,7 @@
" <td>T0062</td>\n",
" <td>TA12</td>\n",
" <td>Behaviour changes</td>\n",
" <td></td>\n",
" <td>Monitor and evaluate behaviour changes from mi...</td>\n",
" <td>62</td>\n",
" </tr>\n",
" <tr>\n",
@ -595,7 +373,7 @@
" <td>T0063</td>\n",
" <td>TA12</td>\n",
" <td>Message reach</td>\n",
" <td></td>\n",
" <td>Monitor and evaluate message reach in misinfor...</td>\n",
" <td>63</td>\n",
" </tr>\n",
" <tr>\n",
@ -603,7 +381,7 @@
" <td>T0064</td>\n",
" <td>TA12</td>\n",
" <td>Social media engagement</td>\n",
" <td></td>\n",
" <td>Monitor and evaluate social media engagement i...</td>\n",
" <td>64</td>\n",
" </tr>\n",
" </tbody>\n",
@ -634,21 +412,21 @@
".. ... .. \n",
"59 continue narrative or message amplification af... 60 \n",
"60 Sell hats, t-shirts, flags and other branded c... 61 \n",
"61 62 \n",
"62 63 \n",
"63 64 \n",
"61 Monitor and evaluate behaviour changes from mi... 62 \n",
"62 Monitor and evaluate message reach in misinfor... 63 \n",
"63 Monitor and evaluate social media engagement i... 64 \n",
"\n",
"[64 rows x 5 columns]"
]
},
"execution_count": 44,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Generate minimal sqlite database from the Amitt variables\n",
"conn = sql.connect('test_amitt_sqlite.db')\n",
"conn = sql.connect('amittsite.sqlite')\n",
"\n",
"def add_table(dataframe, tablename, columns): \n",
" # Create sql table\n",
@ -664,10 +442,12 @@
"\n",
"#newtable = add_table(amitt.df_actortypes, 'actor_type', ['amitt_id', 'sector_id', 'framework_id', 'name', 'summary'])\n",
"# counter\n",
"newtable = add_table(amitt.df_counters, 'counter', ['amitt_id', 'tactic_id', 'metatechnique_id', 'name', 'summary'])\n",
"# dataset\n",
"# framework\n",
"newtable = add_table(amitt.df_frameworks, 'framework', ['amitt_id', 'name', 'summary'])\n",
"# incident\n",
"# metatechnique\n",
"newtable = add_table(amitt.df_metatechniques, 'metatechnique', ['amitt_id', 'name', 'summary'])\n",
"newtable = add_table(amitt.df_phases, 'phase', ['amitt_id', 'name', 'rank', 'summary'])\n",
"# playbook\n",
"# reference\n",

Просмотреть файл

@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {
"scrolled": true
},
@ -48,8 +48,10 @@
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"execution_count": 10,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
@ -437,7 +439,7 @@
"[140 rows x 18 columns]"
]
},
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}

Двоичный файл не отображается.

Просмотреть файл

@ -92,6 +92,7 @@ class Amitt:
# Create individual tables and dictionaries
self.df_phases = metadata['phases']
self.df_frameworks = metadata['frameworks']
self.df_techniques = metadata['techniques']
self.df_tasks = metadata['tasks']
self.df_incidents = metadata['incidents']