How dirkjanm/roadtools works
Main Components
• ROADlib – This is the foundational library that provides common functionality:
• It includes modules for authentication (asyncauth, asyncdeviceauth, deviceauth), metadata generation (metagen, metagen_msgraph), and database creation (dbgen, dbgen_msgraph).
• The database model is auto-generated using metadata definitions from the Azure AD internal API.
• ROADrecon – A tool for exploring and analyzing Azure AD data:
• It uses ROADlib to asynchronously retrieve data from the Azure AD Graph API.
• It populates an SQLAlchemy-backed database with the fetched data.
• It comes with a plugin system (plugins for bloodhound, policies, etc.) to process and transform the data.
• The front-end component is built in Angular (located in roadrecon/frontend) for interactive offline data analysis.
• roadtx – The token exchange tool:
• Provides support for various Azure AD authentication flows.
• Handles operations to exchange and utilize different tokens.
• Its functionality revolves around token management and often reuses parts of ROADlib.
• Additional Components:
• roadoidc: Contains a Flask-based web application (an OpenID Connect related demo or service).
• browsercore: Likely a browser-integrated tool (with a manifest and test script) that supports the overall framework.
• Testing and CI/CD: The tests directory, Azure Pipelines configuration, and setup scripts indicate an emphasis on continuous integration/delivery and testing.
Relationships and Interactions
• ROADlib is at the heart of the framework: both ROADrecon and roadtx rely on it for handling Azure AD interactions, authentication, and database model generation.
• ROADrecon divides into two primary layers:
• The backend that performs asynchronous HTTP calls to fetch data and populate the database.
• The Angular front-end that queries this offline database to provide a user-friendly interface.
• The plugin system within roadrecon extends its functionality to produce various outputs (e.g., for red/blue team perspectives).
• roadtx operates as a standalone tool, but it shares similar dependencies with ROADlib for token operations.
• roadoidc (the Flask app) and browsercore likely serve specialized roles or proof-of-concept features; they interface with other parts of the framework or demonstrate integration with web-based/OIDC protocols.
• External integrations such as Azure AD (and possibly MS Graph through the msgraph-specific modules) are key to the system’s operation.
Architectural Patterns and Design Principles
• Modularity: The separation into ROADlib, ROADrecon, and roadtx demonstrates a clear modular design where each tool focuses on a distinct set of functionalities.
• Separation of Concerns: The Angular front-end is cleanly separated from the ROADrecon backend, emphasizing a clear API/data-flow pipeline.
• Asynchronous Processing: The use of async methods in ROADlib and ROADrecon indicates non-blocking calls for better performance when interacting with external services.
• Plugin Architecture: ROADrecon’s plugins allow for extensibility and customization in processing the Azure AD data.
• Reusability: ROADlib’s architecture supports reuse across multiple tools (both recon and token exchange).