Lodestar Forge Documentation
website·Indexed 31 days ago
https://docs.lodestar-forge.comAn open-source infrastructure management platform designed for red team projects. Lodestar Forge enables the deployment and configuration of infrastructure using Terraform and Ansible templates, managing the lifecycle of deployments, domains, and DNS records. It includes integrations with cloud providers such as AWS and DigitalOcean, as well as Tailscale for VPN connectivity.
What's inside Lodestar Forge
- Configuration templates in Forge are Ansible templates written in YAML used to configure infrastructure resources. They support the use of custom variables to make infrastructure deployment flexible.
Overview of Tailscale integration in Forge
Tailscale is a required provider for Forge. It provides a VPN service that allows Forge to configure infrastructure securely without the need for a jump or bastion host.Overview of Infrastructure Templates in Forge
Infrastructure Templates in Forge are Terraform templates written in HCL (HashiCorp Configuration Language) used to deploy infrastructure resources. They support the use of custom variables to make deployments modular and flexible.Overview of Lodestar Forge components
Lodestar Forge is an open-source infrastructure management platform for red team engagements. It consists of four primary components:
- Forge Nucleus: The central API that coordinates the platform and handles the creation and configuration of infrastructure.
- Forge Command: The web-based user interface for interacting with the platform.
- Forge Radar: A lightweight container used for monitoring DNS records and domain health.
- Forge Store: A PostgreSQL database managed via Drizzle ORM for platform data storage.
Understand the Lodestar Forge Deployment Lifecycle
Lodestar Forge deployments progress through a series of sequential stages. The deployment status indicates the current state. The standard lifecycle is as follows:
- Ready to Prepare: The deployment is initialized. Use the 'Prepare' button in the Deployment Status card to move to the next stage.
- Preparing: Lodestar Forge initiates Terraform to create underlying network infrastructure and SSH keys.
- Ready to Deploy: Required cloud provider infrastructure is created. You must add specific Infrastructure to the deployment before clicking the 'Deploy' button.
- Deploying: The defined infrastructure is being provisioned.
- Ready to Configure: Infrastructure is created. You must add configurations to proceed. From this stage onward, you can add new infrastructure and redeploy using the 'Deploy' button.
- Configuring: The infrastructure is being configured.
- Live: The deployment is successfully deployed and configured. Further configurations can be applied using the 'Configure' button.
- Destroying: The deployment and its associated infrastructure are being removed.
- Destroyed: The deployment and infrastructure have been successfully removed.
Understand Lodestar Forge infrastructure lifecycle stages
Infrastructure in Lodestar Forge progresses through several status stages. The current stage is indicated by the infrastructure's 'status' tag. The standard lifecycle follows these steps:
- Pending: The infrastructure is added to Forge and awaiting deployment. To proceed, use the 'Deploy' button in the 'Deployment Status' card.
- Building: The infrastructure is actively being provisioned using Terraform.
- Running: The infrastructure is operational and healthy.
- Configuring: The infrastructure is being configured via Ansible. Once configuration is complete, the status reverts to 'Running'.
Delete a project in Lodestar Forge
Deleting a project is a permanent action that cannot be undone. A project can only be deleted if it has no associated deployments.
Steps to delete:
- Select the target project using the project switcher.
- Navigate to "Overview" in the sidebar.
- Locate the "Danger Zone" section and click the "Delete Project" button.
- Confirm the action by clicking "Delete".
Manage project domains in Lodestar Forge
Domains used for red team projects can be added to Lodestar Forge via the 'domains' section. Once added, these domains are used for deploying and configuring infrastructure and can be monitored for signs of triage.Understand Infrastructure in Lodestar Forge
In Lodestar Forge, infrastructure is used to define a singular host and its associated resources (for example, a C2 server and its corresponding firewall rules). A single deployment can consist of multiple pieces of infrastructure. To ensure consistency and ease of management, infrastructure should be designed using a modular approach.Understand Lodestar Forge infrastructure resources
In Lodestar Forge, any created infrastructure consists of resources. These resources are informational and cannot be modified directly within Forge. Each resource typically maps to a Terraform resource defined in the infrastructure template and contains three key attributes used for debugging or manual infrastructure modification:
- Identifier: The Terraform resource type combined with the resource name.
- Forge ID: The unique identifier assigned by Forge.
- Provider ID: The unique identifier assigned by the cloud provider.
Understand Lodestar Forge deployment structures
Deployments in Lodestar Forge group together pieces of infrastructure. Users can choose between two architectural patterns: a single large deployment containing all infrastructure, or a modular approach using individual deployments for specific environments (e.g., malware-development, phishing, and command and control).Understand DNS record management in Lodestar Forge
DNS records in Lodestar Forge are used for informational purposes only. Adding, modifying, or removing a DNS record through the Forge UI does not affect the actual DNS records associated with the domain at the registrar or DNS provider level.