본문으로 건너뛰기
Skillpedia
보안48k · #5124

m365-entra-attack

하는 일

이 도구는 Microsoft 365 시스템(Outlook, OneDrive 등)의 기업 이메일 계정이 유효한지, 비밀번호가 맞는지 통제된 방식으로 확인하도록 돕습니다. 계정 잠금을 피하도록 설계되었습니다.

사용하는 경우

  • ✓Microsoft 365 시스템의 보안을 테스트할 때.
  • ✓이메일 목록이 있고 어떤 것이 유효한지 알고 싶을 때.
  • ✓계정 잠금을 일으키지 않고 비밀번호가 맞는지 확인하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/m365-entra-attack/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/m365-entra-attack/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Microsoft 365에서 ‘user@company.com’ 이메일이 존재하는지, 비밀번호 ‘Password123’이 맞는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 Microsoft 서버에 특정 요청을 보냅니다. 응답(오류 코드 또는 성공 메시지)을 분석해 이메일이 유효한지, 비밀번호가 맞는지 판단합니다. 실제로 전체 로그인을 시도하지는 않습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

When to use this skill

Trigger when:

  • Target uses M365 / Entra ID (autodiscover.* records, login.microsoftonline.com redirects, "Microsoft Office 365" in tech-stack notes)
  • You have a list of corporate emails or stealer-leaked creds
  • Engagement involves "credential spray", "password spray", "Entra attack", "ATO via M365"
  • You see *.onmicrosoft.com, *-my.sharepoint.com, enterpriseregistration.*, enterpriseenrollment.* in recon
  • Client mentions "Conditional Access", "MFA bypass", "compliant device"

DO NOT use for:

  • On-prem-only Active Directory (use a separate AD-attack skill)
  • Service-to-service token attacks (different threat model)
  • Phishing-required attack chains (covered by phishing skills) — but you can prep for the credential-validation step here

Tenant discovery (msftrecon)

# For each owned domain
msftrecon -d client.example
msftrecon -d clientltd.example
msftrecon -d sister-brand-school.example

Key fields in output:

  • Tenant ID (different domains may share OR have separate tenants — always test all owned domains)
  • Federation Information.Namespace Type = Managed (cloud-only, ROPC works) | Federated (ADFS, different attack)
  • SharePoint Detected (Yes = OneDrive enum vector available)
  • Communication Services Teams/Skype (post-auth lateral targets)
  • Admin Consent Endpoint accessible (consent-phishing surface)

Red flag: if the org has multiple Entra tenants for sister domains, each is a separate attack surface with its own user list, lockout policy, and CA configuration. Don't assume one spray covers all.


AADSTS code reference (memorize)

AADSTS Meaning Lockout impact What to do
50034 User does not exist None Skip; remove from spray list
50126 Invalid username/password +1 attempt counter User exists — try alternate password later (within cap)
50053 Account locked (Smart Lockout) None (already locked) Pre-existing → flag to SOC; don't retry
53003 CA blocked token issuance +1 attempt counter PASSWORD VALID — STOP, password is correct
50076 MFA required +1 attempt counter PASSWORD VALID — second factor needed
50079 Strong auth required +1 attempt counter PASSWORD VALID — same as 50076
50158 External auth required +1 attempt counter PASSWORD VALID — federated MFA
530003 Device-state required +1 attempt counter PASSWORD VALID — needs compliant device
65001 Consent required +1 attempt counter App-consent issue, not auth
700016 App not in tenant None User in different tenant — adjust target
90002 Tenant does not exist None Tenant typo / dead tenant

Critical insight: any code in {53003, 50076, 50079, 50158, 530003} means the password is correct — Microsoft only returns these AFTER successful credential validation. Document as a confirmed-valid finding even if you can't get a token.


Smart Lockout math (the cap discipline)

Microsoft default policy:

  • 10 failed sign-ins in 10 minutes → 1-minute lockout
  • 20 failed sign-ins → progressively longer lockouts (exponential backoff)
  • Counter shared across ALL auth flows (ROPC + SAML + IMAP + EWS + SMTP + device-code)

Engagement discipline:

  • Hard cap: ≤2 password attempts per user lifetime per engagement (some engagements: 1)
  • State file with atomic writes — never let two test runs race the counter
  • Kill switch: stop run if more than N LOCKED responses observed (suggests pre-existing attacker activity OR you miscounted; either way pause)

…

자주 묻는 질문

잘못된 비밀번호를 너무 많이 입력하면 어떻게 되나요?

이 도구는 잠금을 피하도록 설계되었습니다. 이메일별 시도 횟수를 제한하고, 잠금이 일어나기 전에 응답을 분석해 비밀번호가 맞는지 확인합니다.

이 도구를 쓰려면 허가가 필요한가요?

네, 사용하기 전에 시스템 소유자의 명시적인 서면 허가가 반드시 필요합니다. 허가 없는 사용은 불법입니다.

이메일 주소가 실제로 존재하는지 어떻게 아나요?

시스템이 존재를 나타내는 방식으로 응답하는지(예: 로그인 리디렉션이나 특정 OneDrive 응답)를 확인하며, 비밀번호는 필요하지 않습니다.

상세 정보

작성자의 원본 설명

Microsoft 365 / Entra ID red-team attack chain

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5124
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬