{"id":8591,"date":"2023-06-14T23:21:58","date_gmt":"2023-06-14T23:21:58","guid":{"rendered":"https:\/\/www.hexacorn.com\/blog\/?p=8591"},"modified":"2023-06-15T16:00:52","modified_gmt":"2023-06-15T16:00:52","slug":"mitre-attck-from-json-to-csv","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2023\/06\/14\/mitre-attck-from-json-to-csv\/","title":{"rendered":"Mitre Att&#038;ck &#8211; from JSON to CSV"},"content":{"rendered":"\n<p>I love JSON-formatted data so much that&#8230; anytime I see something valuable stored in this format I really can&#8217;t resist the temptation of converting it to CSV so that I can actually browse it and\/or visually understand\/analyze some of it \ud83d\ude42<\/p>\n\n\n\n<p>I know, I am old-school \ud83d\ude42<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/mitre\/cti\/raw\/master\/enterprise-attack\/enterprise-attack.json\">Mitre Att&amp;ck JSON file<\/a> is a maverick on its own. Updated on regular basis, it contains so much cyberjuice that it is almost a crime not to convert it to CSV, at least some of it \ud83d\ude00<\/p>\n\n\n\n<p>How do we go about it?<\/p>\n\n\n\n<p>This is one of the ways&#8230; we use <a href=\"https:\/\/hexacorn.com\/examples\/mitre_attack_template_to_csv_converter.py\">the following script<\/a> with the input being latest version of the Mitre Att&amp;ck JSON file. The file&#8217;s comments include the actual <a href=\"https:\/\/github.com\/mitre\/cti\/raw\/master\/enterprise-attack\/enterprise-attack.json\">link<\/a>&#8230;.<\/p>\n\n\n\n<p>Run it, and see if you like its output&#8230; Note that it uses lots of Boolean (0 or 1) output values in many of its columns &#8211; this is by design &#8211; these may help you to filter the data in Excel or Google Sheets as per your need&#8230;<\/p>\n\n\n\n<p>And YES, I know there is <a href=\"https:\/\/jqlang.github.io\/jq\/\">jq<\/a>, I know there are JSON readers\/viewers\/beautifiers, and I recently learned of <a href=\"https:\/\/github.com\/swimlane\/pyattck\">pyattck<\/a>, too. Still, when it comes to data analysis, I really like to keep my options open but also keep them close and control them a bit&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I love JSON-formatted data so much that&#8230; anytime I see something valuable stored in this format I really can&#8217;t resist the temptation of converting it to CSV so that I can actually browse it and\/or visually understand\/analyze some of it &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2023\/06\/14\/mitre-attck-from-json-to-csv\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[74,5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8591"}],"collection":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/comments?post=8591"}],"version-history":[{"count":9,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8591\/revisions"}],"predecessor-version":[{"id":8601,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/8591\/revisions\/8601"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=8591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=8591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=8591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}