MSFTRecon
MSFTRecon is a reconnaissance tool designed for red teamers and security professionals to map Microsoft 365 and Azure tenant infrastructure. It performs comprehensive enumeration without requiring authentication, helping identify potential security misconfigurations and attack vectors.
Installation
# Clone the repository
git clone https://github.com/Arcanum-Sec/msftrecon.git
cd msftrecon
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install requirements
pip install -r requirements.txt
chmod +x msftrecon.py
Usage
Basic scan:
./msftrecon.py -d example.com
JSON output:
./msftrecon.py -d example.com -j
Government cloud:
./msftrecon.py -d example.gov --gov
China cloud:
./msftrecon.py -d example.cn --cn
Sample Output
[+] Target Organization:
Tenant Name: Contoso
Tenant ID: 1234abcd-1234-abcd-1234-1234abcd1234
[+] Federation Information:
Namespace Type: Managed
Brand Name: Contoso
Cloud Instance: microsoftonline.com
[+] Azure AD Configuration:
Tenant Region: NA
[+] Azure AD Connect Status:
Identity Configuration: Managed (Cloud Only)
Authentication Type: Managed
[!] Identity Insights:
* Cloud-only authentication detected
* All authentication handled in Azure AD
* Focus on cloud-based attack vectors
Red Team Usage
MSFTRecon provides valuable insights for red teamers:
-
Identity Attack Vectors
- Identifies authentication methods for targeted attacks
- Reveals potential password spray opportunities
- Highlights federation configurations for SAML attacks
-
Application Attack Surface
- Discovers exposed enterprise applications
- Identifies OAuth abuse opportunities
- Reveals admin consent endpoints for phishing
-
Infrastructure Insights
- Maps Azure services for lateral movement
- Identifies B2C configurations
- Discovers potential storage misconfigurations
-
Security Control Awareness
- Detects MDI presence for evasion planning
- Identifies conditional access configurations
- Reveals authentication requirements
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Disclaimer
This tool is intended for legal security assessments and penetration testing only. Users must obtain proper authorization before conducting security assessments. The authors are not responsible for any misuse or damage caused by this tool.
License
This project is licensed under the MIT License
Acknowledgments
- Based on research and techniques from various Microsoft 365 and Azure security resources, plus check_mdi.py
Author
jhaddix
Metadata
Release files for msftrecon 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| msftrecon-0.1.0.tar.gz | 12.3 kB | Without provenance | Details for msftrecon-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| msftrecon-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for msftrecon-0.1.0-py3-none-any.whl |
Total release size: 23.8 kB
Release files / msftrecon-0.1.0.tar.gz
| Download URL | msftrecon-0.1.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e3b89e0ba8c0ff6970d7fe0625dfe38d6eb59fb53ca981cd1fe5eb3976c3712
|
|
BLAKE2b-256 checksum How to use checksums |
0431f955ce8767328f7ed09058f00e08d3827a939bce90f7be7ef35fb6b202dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / msftrecon-0.1.0-py3-none-any.whl
| Download URL | msftrecon-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
693454ee1c75a8dc5cbe8cff3be184250ee96060ca810bbbddd64f6e279502a2
|
|
BLAKE2b-256 checksum How to use checksums |
621fe0633a3a9c0ee4aef6bcd5ee78e522145db875e2abf6996f7188bf8003ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for msftrecon 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.