National Cyber Warfare Foundation (NCWF)

Using Artificial Intelligence (AI) in Cybersecurity: Automate Threat Modeling with STRIDE GPT


0 user ratings
2025-11-28 14:49:16
milo
Red Team (CNA)
Welcome back, aspiring cyberwarriors! The STRIDE methodology has been the gold standard for systematic threat identification, categorizing threats into Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege. However, applying STRIDE effectively requires not just understanding these categories but also having the experience to identify how they manifest in specific application architectures. […

Welcome back, aspiring cyberwarriors!





The STRIDE methodology has been the gold standard for systematic threat identification, categorizing threats into Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege. However, applying STRIDE effectively requires not just understanding these categories but also having the experience to identify how they manifest in specific application architectures.





To solve this problem, we have STRIDE GPT. By combining the analytical power of AI with the proven STRIDE methodology, this tool can generate comprehensive threat models, attack trees, and mitigation strategies in minutes rather than hours or days.





In this article, we’ll walk you through how to install STRIDE GPT, check out its features, and get you started using them. Let’s get rolling!





Step #1: Install STRIDE GPT





First, make certain you have Python 3.8 or later installed on your system.





pi> python3 –version





Now, clone the STRIDE GPT repository from GitHub.





pi > git clone https://github.com/mrwadams/stride-gpt.git





pi> cd stride-gpt









Next, install the required Python dependencies.





pi > pip3 install -r requirements.txt –break-system-packages









This installation process may take a few minutes.





Step #2: Configure Your Groq API Key





STRIDE GPT supports multiple AI providers including OpenAI, Anthropic, Google AI, Mistral, and Groq, as well as local hosting options through Ollama and LM Studio Server. In this example, I’ll be using Groq. Groq provides access to models like Llama 3.3 70B, DeepSeek R1, and Qwen3 32B through their Lightning Processing Units, which deliver inference speeds significantly faster than traditional GPU-based solutions. Besides that, Groq’s API is cost-effective compared to proprietary models.





To use STRIDE GPT with Groq, you need to obtain an API key from Groq. The tool supports loading API keys through environment variables, which is the most secure method for managing credentials. In the stride-gpt directory, you’ll find a file named .env.example. Copy this file to create your own .env file:





pi > cp .env.example .env





Now, open the .env file in your preferred text editor and add the API key.





Step #3: Launch STRIDE GPT





Start the application by running:





pi> python3 -m streamlit run main.py









Streamlit will start a local web server.





Once you copy the URL into your browser, you will see a dashboard similar to the one shown below.









In the STRIDE GPT sidebar, you’ll see a dropdown menu labeled “Select Model Provider”. Click on this dropdown and you’ll see options for OpenAI, Azure OpenAI, Google AI, Mistral AI, Anthropic, Groq, Ollama, and LM Studio Server.





Select “Groq” from this list. The interface will update to show Groq-specific configuration options. You’ll see a field for entering your API key. If you configured the .env file correctly in Step 2, this field should already be populated with your key. If not, you can enter it directly in the interface, though this is less secure as the key will only persist for your current session.





Below the API key field, you’ll see a dropdown for selecting the specific Groq model you want to use. For this tutorial, I selected Llama 3.3 70B.





Step #4: Describe Your Application





Now comes the critical part where you provide information about the application you want to threat model. The quality and comprehensiveness of your threat model depends heavily on the detail you provide in this step.





In the main area of the interface, you’ll see a text box labeled “Describe the application to be modelled”. This is where you provide a description of your application’s architecture, functionality, and security-relevant characteristics.





Let’s work through a practical example. Suppose you’re building a web-based project management application. Here’s the kind of description you should provide:





“This is a web-based project management application built with a React frontend and a Node.js backend API. The application uses JWT tokens for authentication, with tokens stored in HTTP-only cookies. Users can create projects, assign tasks to team members, upload file attachments, and generate reports. The application is internet-facing and accessible to both authenticated users and unauthenticated visitors who can view a limited public project showcase. The backend connects to a PostgreSQL database that stores user credentials, project data, task information, and file metadata. Actual file uploads are stored in an AWS S3 bucket. The application processes sensitive data including user email addresses, project details that may contain confidential business information, and file attachments that could contain proprietary documents. The application implements role-based access control with three roles: Admin, Project Manager, and Team Member. Admins can manage users and system settings, Project Managers can create and manage projects, and Team Members can view assigned tasks and update their status.”





The more specific you are, the more targeted and actionable your threat model will be.









Besides that, near the application description field, you’ll see several dropdowns that help STRIDE GPT understand your application’s security context.





Step #5: Generate Your Threat Model





With all the configuration complete and your application described, you’re ready to generate your threat model. Look for a button labeled “Generate Threat Model” and click it.





Once complete, you’ll see a comprehensive threat model organized by the STRIDE categories. For each category, the model will identify specific threats relevant to your application. Let’s look at what you might see for our project management application example:









Each threat includes a detailed description explaining how the attack could be carried out and what the impact would be.





Step #6: Generate an Attack Tree





Beyond the basic threat model, STRIDE GPT can generate attack trees that visualize how an attacker might chain multiple vulnerabilities together to achieve a specific objective.









The tool generates these attack trees in Mermaid diagram format, which renders as an interactive visual diagram directly in your browser.









Step #7: Review DREAD Risk Scores





STRIDE GPT implements the DREAD risk scoring model to help you prioritize which threats to address first.





The tool will analyze each threat and assign scores from 1 to 10 for five factors:





Damage: How severe would the impact be if the threat were exploited?





Reproducibility: How easy is it to reproduce the attack?





Exploitability: How much effort and skill would be required to exploit the vulnerability?





Affected Users: How many users would be impacted?





Discoverability: How easy is it for an attacker to discover the vulnerability?









The DREAD assessment appears in a table format showing each threat, its individual factor scores, and its overall risk score.





Step #8: Generate Mitigation Strategies





Identifying threats is only half the battle. You also need actionable guidance on how to address them. STRIDE GPT includes a feature to generate specific mitigation strategies for each identified threat.





Look for a button labeled “Mitigations” and click it.









These mitigation strategies are specific to your application’s architecture and the threats identified. They’re not generic security advice but targeted recommendations based on the actual risks in your system.





Step #8: Generate Gherkin Test Cases





One of the most innovative features of STRIDE GPT is its ability to generate Gherkin test cases based on the identified threats. Gherkin is a business-readable, domain-specific language used in Behavior-Driven Development to describe software behaviors without detailing how that behavior is implemented. These test cases can be integrated into your automated testing pipeline to ensure that the mitigations you implement actually work.





Look for a button labeled “Generate Test Cases”. When you click it, STRIDE GPT will create Gherkin scenarios for each major threat.









Summary





Traditional threat modeling takes a lot of time and requires experts, which stops many organizations from doing it well. STRIDE GPT makes threat modeling easier for everyone by using AI to automate the analysis while keeping the quality of the proven STRIDE method.





In this article, we checked out STRIDE GPT and went over its main features. No matter if you’re protecting a basic web app or a complicated microservices setup, STRIDE GPT gives you the analytical tools you need to spot and tackle security threats in a straightforward way.



Source: HackersArise
Source Link: https://hackers-arise.com/using-artificial-intelligence-ai-in-cybersecurity-automate-threat-modeling-with-stride-gpt/


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2025 - National Cyber Warfare Foundation - All rights reserved worldwide.