Export All Techniques

Import Libraries

from attackcti import attack_client
import pandas as pd

Initialize Attack client

lift = attack_client()

Get All Techniques STIX Format

all_techniques = lift.get_techniques()
all_techniques = lift.remove_revoked(all_techniques)
len(all_techniques)
916

Export CSV File

techniques_df = pd.json_normalize(all_techniques)
techniques_df.to_csv('all_techniques_stix.csv', index=False)

Get All Techniques Non-STIX Format

all_techniques = lift.get_techniques(stix_format=False)
all_techniques = lift.remove_revoked(all_techniques)
len(all_techniques)
916
techniques_df = pd.json_normalize(all_techniques)
techniques_df.to_csv('all_techniques_non_stix.csv', index=False)