This GitHub repository houses a cutting-edge project that leverages Retrieval Augmented Generation (RAG) to identify dependencies between Red Team attack techniques. The system utilizes MistralAI, in conjunction with LangChain, to perform advanced analysis and reasoning for the identification of unsecured assets in the realm of cyber threat intelligence.
This initiative introduces a comprehensive framework to convert Cyber Threat Intelligence (CTI) data into flows compatible with the Mitre ATT&CK framework. The conversion process spans multiple steps, and the ensuing guide facilitates seamless setup and execution within this framework.
- Access to a Google Colab account for running the associated notebooks.
Before initiating the notebook, ensure you have a Pinecone account and the necessary approval for using the Llama 2 model.
- Complete the Llama access request form, specifying the need for both the Llama 2 and Llama Chat models. Use the email associated with your HuggingFace account.
- Typically, approval emails are received within an hour.
- Visit the Llama 2 13B Chat model page.
- Submit the request form for downloading the model.
- Approval is generally received within an hour.
After securing approval, follow these steps to set up the notebook for Retrieval-Augmented Generation (RAG) with Llama 2. Replace three key strings as indicated throughout the notebook:
- PINECONE_API_KEY: Obtain from your Pinecone account.
- PINECONE_ENV: Extract from Pinecone under the Environment header.
- HF_AUTH_TOKEN: Generate or use an existing token from the Access token page.
- Create a Pinecone account if you don't have one.
- Sign in and navigate to API Keys on the right panel.
- Copy the PINECONE_API_KEY using the designated button.
- Copy the Pinecone environment (PINECONE_ENV) under the Environment header.
- Generate a new token or use an existing one from the Access token page.
- Open the notebook Tram2flow_fin.ipynb.
- Execute the code within the notebook.
- Follow the prompts and instructions to summarize and run TRAM.
- Save the output for further analysis.
- Open the notebook operator.ipynb.
- Execute the code within the notebook.
- Follow the prompts and instructions to perform LLM analysis.
- Save the generated results for subsequent steps.
- Open the notebook LLM_output_to_Image.ipynb.
- Execute the code within the notebook.
- Follow the prompts and instructions to convert DataFrame to STIX format.
- Save the generated STIX file.
- Open the notebook Json_to_PNG.ipynb.
- Execute the code within the notebook.
- Follow the prompts and instructions to convert STIX to PNG images.
- Save the generated PNG files representing Mitre ATT&CK Flows.
Follow these outlined steps to successfully convert CTI data into Mitre ATT&CK Flow representations. Ensure you save the outputs at each step for future reference and analysis.
For any concerns or inquiries, kindly open an issue in this repository.
This project operates under the MIT License.