https://github.com/copyleftdev/msft-recon-rs

A Rust-based reconnaissance tool for Microsoft Azure and Microsoft 365 environments. This tool helps security professionals and administrators identify exposed services, tenant information, and potential configuration issues in Microsoft cloud environments.

https://github.com/copyleftdev/msft-recon-rs

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary

Keywords

msft recon reconnaissance rust security-tools
Last synced: 5 months ago · JSON representation

Repository

A Rust-based reconnaissance tool for Microsoft Azure and Microsoft 365 environments. This tool helps security professionals and administrators identify exposed services, tenant information, and potential configuration issues in Microsoft cloud environments.

Basic Info
  • Host: GitHub
  • Owner: copyleftdev
  • Language: Rust
  • Default Branch: master
  • Homepage:
  • Size: 58.6 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
msft recon reconnaissance rust security-tools
Created 11 months ago · Last pushed 11 months ago
Metadata Files
Readme

README.md

MSFT-Recon-RS

Rust CI/CD License: MIT Rust Version

A Rust-based reconnaissance tool for Microsoft Azure and Microsoft 365 environments. This tool helps security professionals and administrators identify exposed services, tenant information, and potential configuration issues in Microsoft cloud environments.

Features

  • DNS Reconnaissance: Detect Microsoft-related DNS records and service configurations
  • Microsoft 365 Service Detection: Identify SharePoint, Teams, Exchange, and other M365 services
  • Azure AD Information Gathering: Collect tenant information, federation status, and AAD Connect configuration
  • Azure Service Enumeration: Discover Azure App Services, Storage Accounts, and other Azure resources
  • Multi-Cloud Support: Works with Commercial, Government (GCC/GCC-High), and China cloud environments
  • JSON Output: Structured data output for integration with other tools and reporting

Installation

From Source

Prerequisites: - Rust 1.70+ and Cargo - OpenSSL development libraries

```bash

Clone the repository

git clone https://github.com/username/msft-recon-rs.git cd msft-recon-rs

Build the project

cargo build --release

The binary will be available at ./target/release/msft-recon-rs

```

Using Docker

```bash

Build the Docker image

docker build -t msft-recon-rs .

Run the tool with Docker

docker run msft-recon-rs --domain example.com --cloud commercial ```

Using Docker Compose

```bash

Start the services defined in docker-compose.yml

docker-compose up ```

Usage

Basic usage:

```bash

Run reconnaissance against a domain

msft-recon-rs --domain example.com --cloud commercial

Output results in JSON format

msft-recon-rs --domain example.com --cloud commercial --json

Use a specific configuration file

MSFTRECONCONFIG=/path/to/config.toml msft-recon-rs --domain example.com --cloud commercial ```

Command-line options

``` USAGE: msft-recon-rs [OPTIONS] --domain --cloud

OPTIONS: -d, --domain Target domain to perform reconnaissance on -c, --cloud Cloud environment to use (commercial, gov, cn) -j, --json Output results in JSON format -h, --help Print help information -V, --version Print version information ```

Configuration

The tool uses a TOML configuration file to define endpoints and settings for different cloud environments. The default configuration is provided at config/default.toml.

Example configuration:

```toml

Default settings

defaultuseragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.0.0 Safari/537.36" requesttimeoutseconds = 10

[clouds.commercial] loginendpoint = "https://login.microsoftonline.com" loginmicrosoftonline_host = "login.microsoftonline.com"

Additional endpoints...

```

Project Structure

The project follows Rust Clean Architecture principles:

msft-recon-rs/ ├── src/ # Source code │ ├── cli.rs # Command-line interface │ ├── config.rs # Configuration handling │ ├── error.rs # Error types │ ├── models.rs # Data structures │ ├── output.rs # Output formatting │ ├── recon/ # Reconnaissance modules │ │ ├── aad.rs # Azure AD reconnaissance │ │ ├── azure_svc.rs # Azure services reconnaissance │ │ ├── dns.rs # DNS reconnaissance │ │ ├── m365.rs # Microsoft 365 reconnaissance │ │ └── mod.rs # Module exports │ └── main.rs # Application entry point ├── tests/ # Integration tests │ └── cli_tests.rs # End-to-end CLI tests ├── config/ # Configuration files │ └── default.toml # Default configuration └── Cargo.toml # Project dependencies

Development

Running Tests

```bash

Run all tests

cargo test

Run specific test

cargo test testendtoendrecon_flow ```

Code Quality

```bash

Run clippy lints

cargo clippy --all-features -- -D warnings

Check formatting

cargo fmt --all -- --check ```

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • The Rust community for excellent libraries and tools
  • Microsoft for their comprehensive API documentation

Owner

  • Name: Donald Johnson
  • Login: copyleftdev
  • Kind: user
  • Location: Los Angeles

GitHub Events

Total
  • Watch event: 2
  • Push event: 5
  • Create event: 2
Last Year
  • Watch event: 2
  • Push event: 5
  • Create event: 2

Dependencies

.github/workflows/rust-ci.yml actions
  • Swatinem/rust-cache v2 composite
  • actions-rs/cargo v1 composite
  • actions-rs/toolchain v1 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • softprops/action-gh-release v1 composite
Cargo.lock cargo
  • 311 dependencies
Cargo.toml cargo
  • assert_cmd 2.0 development
  • predicates 3.0 development
  • proptest 1 development
  • tempfile 3.8 development
  • tokio-test 0.4 development
  • wiremock 0.6.3 development
  • clap 4
  • config 0.15.11
  • futures 0.3
  • quick-xml 0.37.3
  • reqwest 0.12
  • serde 1.0
  • serde_json 1.0
  • thiserror 2.0.12
  • tokio 1
  • tracing 0.1
  • tracing-subscriber 0.3
  • trust-dns-resolver 0.23
  • url 2.5
Dockerfile docker
  • debian bookworm-slim build
  • rust 1.72-slim build
docker-compose.yml docker
  • wiremock/wiremock latest