Open
Conversation
Implements a new O365 authentication plugin ported from o365spray that provides improved OAuth2 authentication against Microsoft O365 services. Features: - OAuth2-based authentication using Microsoft's common endpoint - Support for multiple legitimate Microsoft client IDs (17 different apps) - Randomized scope selection to evade detection - Comprehensive AADSTS error code handling (13 different codes) - Proper distinction between valid credentials with MFA/CAP vs invalid creds - FireProx integration with spoofed headers for IP rotation - User enumeration capability through error code analysis The plugin includes: - __init__.py: Plugin validation and connectivity testing - o365.py: Core authentication logic with o365_authenticate() function This implementation follows the CredMaster plugin architecture and integrates with the existing utils module for header spoofing and FireProx support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new
o365plugin for authenticating against Microsoft Office 365 using OAuth2. The implementation is based on the authentication logic from o365spray, adapted to CredMaster's plugin architecture.Background
The original O365 plugin was deprecated and removed from CredMaster. This implementation brings back O365 support using the OAuth2 method from o365spray. The authentication functionality has been tested and confirmed working.
o365spray Authentication Methods
o365spray supports 6 different authentication methods:
login.microsoftonline.com/common/oauth2/tokenoutlook.office365.com/Microsoft-Server-ActiveSyncautodiscover-s.outlook.com/autodiscover/autodiscover.xmlautologon.microsoftazuread-sso.comlogin.microsoftonline.com/rst2.srfThis PR implements the OAuth2 method, which is the most reliable and commonly used approach for managed (non-federated) O365 tenants.
Implementation Details
The plugin includes:
AADSTS Error Handling
Usage