Slapdash Safeguards

にわか仕込みのセキュリティ

ActiveDirectory探検家は、どこへ行く?

ActiveDirectoryの情報収集をするならSharpHoundを使って、BloodHound CEにデータを入れるのが良いのは分かってる。

でも、SharpHoundのマルウェア検知をどうしても回避できないし、BloodHound系のLDAPクエリがブロックされてしまうこともある。

そんなときには、複雑な回避なんて考えずにやっぱActive Directory Explorerでしょ。

Active Directory Explorer(ADExplorer)

Sysinternalsに含まれるツールの1つ。

Active DirectoryのデータベースをGUIで確認できる。

ADExplorer公式ページより(https://learn.microsoft.com/ja-jp/sysinternals/downloads/adexplorer)

ADExplorerでGUIで脆弱な設定を見にいける。

正規のActiveDirectory管理ツールなので、マルウェア検知されないのが良い。

ただし、ADExplorerに脆弱性を簡単に発見できるような機能は無い。

ADExplorerでもっと簡単にADの脆弱性探せたらいいなぁ

良い方法あります!!!

ADExplorerには、取得したドメインの情報を保存するスナップショット機能がある。スナップショットを使うことで、後々ADサーバに接続できなくともドメイン情報をADExplorerで同じように確認できる。

そして、ADExplorerで取得したスナップショットを読み込ませることで、ActiveDirectory脆弱性を発見しやすくなるツールがありまっせ!!!

何はともあれ、まずはADExplorerでスナップショットを取得

公式ページからダウンロードする。
learn.microsoft.com

解凍して実行

AdExplorer.zip中身

今回も以前のようにCRTEのLab環境で検証する。
ドメイン情報取得のためにADサーバに接続する。ドメインユーザとしてログオンしていれば、入力の必要無し。

ADExplorerでの接続

ちゃんと接続できていれば、情報が出ます。

us.techcorp.localのドメイン情報を確認できる

ドメインユーザとしてログオンしていなければ、認証情報入力してください。必要あれば、再接続

接続はFile項目にある

IPアドレス(ADサーバ)とユーザ名とパスワードを入力

IPアドレスやユーザ名、パスワードをちゃんと入れた場合

この環境でパスワードを覚えていたのが、AD connectのユーザだったので特殊なアカウントを使用しているが、ドメインユーザアカウントであれば良い。

techcorp.localにログオンして繋がった場合

スナップショットを取得する。

スナップショット取得ボタンはココ

保存ファイル名は御好きに

保存先は何でも良い。ファイル名も決める。

このスナップショットを使用してAttack Path解析が可能

取得したスナップショットは.dat

ここでは、us-techcorp.localとtechcorp.localでスナップショットを取得した。

ADExplorer to ??? or ???

ADExplorerのスナップショットは、変換ツールを使うことで最終的にBloodHound CEAdalancheに読み込むことができる。

BloodHound CEに良い感じに変換できたら最高だし、Adalancheだったら新たな発見があるかもしれない。(使ったことないし)

という淡い期待を込めて始まった手順の確認が今回のお話です。

ADExplorer to BloodHound CE

使用するのはADExplorerSnapshot.pyBOFHound

ADExplorerSnapshot.pyだけでも一応ADExplorerのスナップショットをBloodHound CEにインポートできる形式にはなるが、中途半端なものができる。

ADExplorer→BOFHound→BloodHoundという感じで、絶対にBOFHoundを経由した方が良い。

ADExplorerSnapshot.py

公式githubからクローンして、venvで動かす。

git clone https://github.com/c3c/ADExplorerSnapshot
cd ADExplorerSnapshot/
python3 -m venv ADEx2BLD
source ADEx2BLD/bin/activate
pip install -r requirements.txt

動作確認

$ python3 ADExplorerSnapshot.py 
usage: ADExplorerSnapshot.py [-h] [-o OUTPUT] [-m {BOFHound,BloodHound,Objects}] [-e] snapshot
ADExplorerSnapshot.py: error: the following arguments are required: snapshot

使い方

python3 ADExplorerSnapshot.py <スナップショットファイルのパス> -o <出力ディレクトリのパス> -m BloodHound

さて、動作確認で表示された通りBloodHound形式の出力が可能ではあるが、絶対止めた方が良い。

例えば「us-techcorp.dat」を読み込ませてみる。

$ python3 ADExplorerSnapshot.py /tmp/us-techcorp.dat -o ./output/ -m BloodHound
[14:01:15] INFO     Server: US-DC.us.techcorp.local                                                                                                                                     
           INFO     Time of snapshot: 2026-01-09T12:40:02                                                                                                                               
           INFO     Metadata offset: 0x763ea5                                                                                                                                           
           INFO     Object count: 7419                                                                                                                                                  
           INFO     Parsed 3952 properties                                                                                                                                              
[14:01:16] INFO     Parsed 1691 classes                                                                                                                                                 
           INFO     Parsed 7419 object offsets                                                                                                                                          
           WARNING  The BloodHound mode gives incomplete output. Please use the BOFHound mode instead.                                                                                  
Preprocessing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:05
✓ Cache saved to /tmp/us-techcorp.cache
✓ Preprocessing complete
Processing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━  95% 0:00:01[14:01:27] WARNING  Unable to find sid for delegation target: CIFS/us-mssql                                                                                                             
Processing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:05
[14:01:28] INFO     Found 76 users                                                                                                                                                      
           INFO     Found 29 computers                                                                                                                                                  
           INFO     Found 52 groups                                                                                                                                                     
           INFO     Found 1 domains                                                                                                                                                     
           INFO     Found 37 gpos                                                                                                                                                       
           INFO     Found 36 templates                                                                                                                                                  
           INFO     Found 1 cas                                                                                                                                                         
✓ Output written to US-DC.us.techcorp.local_1767930002_*.json files

WARNINGでBloodHound形式への変換はおススメしないと出力されているものの、処理されているように見える。
ここでは、以下のjsonが作成された。

(ADEx2BLD) $ ls output
US-DC.us.techcorp.local_1767930002_cert_bh.json
US-DC.us.techcorp.local_1767930002_cert_ly4k_cas.json
US-DC.us.techcorp.local_1767930002_cert_ly4k_tpls.json
US-DC.us.techcorp.local_1767930002_computers.json
US-DC.us.techcorp.local_1767930002_domains.json
US-DC.us.techcorp.local_1767930002_groups.json
US-DC.us.techcorp.local_1767930002_users.json

だが、BloodHoundに2つインジェストできず。

何かBloodHoundで読み込めるjsonの形式なってないらしい???

「cert_ly4k_tpls.json(証明書テンプレート)」、「cert_ly4k_cas.json(認証局(CA)情報)」が読み込めていない。
そんで、読み込んだデータがどんななのか、Data Qualityを見ると。

ADExplorerSnapshotの直インジェストのデータ数

以前の検証のus.techcorp.localのAllに比べると明らかに減っている。
ユーザ、グループ、コンピュータがそれっぽく読み込めていても、その他はダメ。
ADExplorerSnapshot.pyから直接BloodHoundに変換しない方が良いというのはこういうことか。

ところで、ADExplorerSnapshot.pyの結果表示とBloodHoundで読み込んだオブジェクト数は異なるようだ。
結局、BloodHoundで解析するからBloodHoundの表示結果が一番信じられるか?

ちなみに、「techcorp.local」のスナップショットも試したが同じような状態。

(ADEx2BLD)$ python3 ADExplorerSnapshot.py /tmp/techcorp.dat -o /tmp/output-techcorp/ -m BloodHound
[14:54:12] INFO     Server: Techcorp-DC.techcorp.local                                     
           INFO     Time of snapshot: 2026-01-09T12:49:36                                  
           INFO     Metadata offset: 0x716936                                              
           INFO     Object count: 7303                                                     
           INFO     Parsed 3952 properties                                                 
[14:54:13] INFO     Parsed 1691 classes                                                    
           INFO     Parsed 7303 object offsets                                             
           WARNING  The BloodHound mode gives incomplete output. Please use the BOFHound   
                    mode instead.                                                          
✓ Using cached data for preprocessing
Processing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:05
[14:54:19] INFO     Found 17 users                                                         
           INFO     Found 2 computers                                                      
           INFO     Found 72 groups                                                        
           INFO     Found 1 domains                                                        
           INFO     Found 37 gpos                                                          
           INFO     Found 36 templates                                                     
           INFO     Found 1 cas                                                            
✓ Output written to Techcorp-DC.techcorp.local_1767930576_*.json files

cert_ly4k_tpls.jsonとcert_ly4k_cas.jsonがアップロードできず。
ADCS関係が読み込めていないせいで、存在するはずのESC1脆弱性が検出できない。脆弱性を発見できないとなると良くないなぁ。
これでは絶対に見逃しが発生する。

BOFHound

実は、BOFHoundって名前から、C2とかで使うSharpHoundのBOF版かと思ってた。
ldapsearchやCobalt Strikeログ、BRc4ログ、Havocログ等をパースしてBloodHound形式にしてくれる。

インストールは簡単

pip3 install bofhound

しかしながら、ADExplorerSnapshot.pyと同じvenvで動かそうとするとライブラリのバージョン違いでエラーになる。なので、新しいvenvにすべき。

python3 -m venv BOFHound-venv
source BOFHound-venv/bin/activate
pip3 install bofhound

まずは、ADExplorerSnapshot.pyでBOFHound形式にする。

(ADEx2BLD)$ python3 ADExplorerSnapshot.py /tmp/us-techcorp.dat -o /tmp/output-bofhound/ -m BOFHound
[14:37:18] INFO     Server: US-DC.us.techcorp.local                                        
           INFO     Time of snapshot: 2026-01-09T12:40:02                                  
           INFO     Metadata offset: 0x763ea5                                              
           INFO     Object count: 7419                                                     
[14:37:19] INFO     Parsed 3952 properties                                                 
[14:37:20] INFO     Parsed 1691 classes                                                    
           INFO     Parsed 7419 object offsets                                             
Dumping objects ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
✓ Output written to US-DC.us.techcorp.local_1767930002_bofhound.log

BOFHoundはbofhound -i <読み込むデータのディレクトリ> -o <出力ファイルのディレクトリ>で実行。
BOFHoundでBloodHound形式にする。

(BOFHound-venv)$ bofhound -i /tmp/output-bofhound/ -o /tmp/output-bofhound-bloodhound

 _____________________________ __    __    ______    __    __   __   __   _______
|   _   /  /  __   / |   ____/|  |  |  |  /  __  \  |  |  |  | |  \ |  | |       \
|  |_)  | |  |  |  | |  |__   |  |__|  | |  |  |  | |  |  |  | |   \|  | |  .--.  |
|   _  <  |  |  |  | |   __|  |   __   | |  |  |  | |  |  |  | |  . `  | |  |  |  |
|  |_)  | |  `--'  | |  |     |  |  |  | |  `--'  | |  `--'  | |  |\   | |  '--'  |
|______/   \______/  |__|     |__|  |___\_\________\_\________\|__| \___\|_________\

                            << @coffeegist | @Tw1sm >>
    
[14:39:35] INFO     Parsed 7418 LDAP objects                                               
[14:39:35] INFO     Parsed 0 local group/session objects                                   
[14:39:35] INFO     Sorting parsed objects by type...                                      
[14:39:35] INFO     Parsed 76 Users                                                        
[14:39:35] INFO     Parsed 51 Groups                                                       
[14:39:35] INFO     Parsed 29 Computers                                                    
[14:39:35] INFO     Parsed 1 Domains                                                       
[14:39:35] INFO     Parsed 2 Trust Accounts                                                
[14:39:35] INFO     Parsed 7 OUs                                                           
[14:39:35] INFO     Parsed 314 Containers                                                  
[14:39:35] INFO     Parsed 7 GPOs                                                          
[14:39:35] INFO     Parsed 1 Enterprise CAs                                                
[14:39:35] INFO     Parsed 1 AIA CAs                                                       
[14:39:35] INFO     Parsed 1 Root CAs                                                      
[14:39:35] INFO     Parsed 1 NTAuth Stores                                                 
[14:39:35] INFO     Parsed 3 Issuance Policies                                             
[14:39:35] INFO     Parsed 36 Cert Templates                                               
[14:39:35] INFO     Parsed 4535 Schemas                                                    
[14:39:35] INFO     Parsed 2 Referrals                                                     
[14:39:35] INFO     Parsed 2226 Unknown Objects                                            
[14:39:35] INFO     Parsed 0 Sessions                                                      
[14:39:35] INFO     Parsed 0 Privileged Sessions                                           
[14:39:35] INFO     Parsed 0 Registry Sessions                                             
[14:39:35] INFO     Parsed 0 Local Group Memberships                                       
[14:39:36] INFO     Parsed 6470 ACL relationships                                          
[14:39:36] INFO     Created default users                                                  
[14:39:36] INFO     Created default groups                                                 
[14:39:36] INFO     Resolved group memberships                                             
[14:39:36] INFO     Resolved delegation relationships                                      
[14:39:36] INFO     Resolved OU memberships                                                
[14:39:36] INFO     Linked GPOs to OUs                                                     
[14:39:36] INFO     Resolved domain trusts                                                 
[14:39:36] INFO     Built CA certificate chains                                            
[14:39:36] INFO     Resolved enabled templates per CA                                      
[14:39:36] WARNING  Could not resolve CA hosting computer: Techcorp-DC.techcorp.local      
[14:39:36] INFO     Resolved hosting computers of CAs                                      
[14:39:36] INFO     JSON files written to /tmp/output-bofhound-bloodhound

よく見ると、不足情報取得のために勝手にldapする機能もあるようなので気をつけよう。
あと、何故かグループ数が減ってる?

作成されたjsonファイル。

$ ls /tmp/output-bofhound-bloodhound
aiacas_20260109_143936.json         groups_20260109_143936.json
certtemplates_20260109_143936.json  issuancepolicies_20260109_143936.json
computers_20260109_143936.json      ntauthstores_20260109_143936.json
containers_20260109_143936.json     ous_20260109_143936.json
domains_20260109_143936.json        rootcas_20260109_143936.json
enterprisecas_20260109_143936.json  users_20260109_143936.json
gpos_20260109_143936.json

これらは、問題無くBloodHound CEにインジェストできた。

さて、データはどうか。

BOFHoundを経由したBloodHound形式のデータ数

おぉ~。以前のものに近いものになっている。ちょっと数字違うものあるけど、共同で使用する環境の所為もあるハズ。
ADExplorerSnapshot.pyがBOFHound経由なら良くなるってのが意味わからんかったが、本当にちゃんと良くなってる。
あと、オブジェクト数とかBloodHoundで見た数字が正解で、途中で出て来たログは当てにならんな。

us.techcorp.localから取得したものだが、ちゃんとtechcorp.localのオブジェクトは分かりやすくなってる。ADCSの脆弱性もちゃんと確認できる。

ESC1を確認できた

techcorpバージョンも試した。

techcorp.datの変換記録

(ADEx2BLD) bld@bld-BloodHound-CE:~/ADExplorerSnapshot$ python3 ADExplorerSnapshot.py /tmp/techcorp.dat -o /tmp/output-bofhound-techcorp/ -m BOFHound
[15:00:27] INFO     Server: Techcorp-DC.techcorp.local                                     
           INFO     Time of snapshot: 2026-01-09T12:49:36                                  
           INFO     Metadata offset: 0x716936                                              
           INFO     Object count: 7303                                                     
           INFO     Parsed 3952 properties                                                 
[15:00:28] INFO     Parsed 1691 classes                                                    
           INFO     Parsed 7303 object offsets                                             
Dumping objects ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:05
✓ Output written to Techcorp-DC.techcorp.local_1767930576_bofhound.log


(BOFHound-venv) bld@bld-BloodHound-CE:~/BOFHound$ bofhound -i /tmp/output-bofhound-techcorp/ -o /tmp/output-bofhound-bloodhound-techcorp/

 _____________________________ __    __    ______    __    __   __   __   _______
|   _   /  /  __   / |   ____/|  |  |  |  /  __  \  |  |  |  | |  \ |  | |       \
|  |_)  | |  |  |  | |  |__   |  |__|  | |  |  |  | |  |  |  | |   \|  | |  .--.  |
|   _  <  |  |  |  | |   __|  |   __   | |  |  |  | |  |  |  | |  . `  | |  |  |  |
|  |_)  | |  `--'  | |  |     |  |  |  | |  `--'  | |  `--'  | |  |\   | |  '--'  |
|______/   \______/  |__|     |__|  |___\_\________\_\________\|__| \___\|_________\

                            << @coffeegist | @Tw1sm >>
    
[15:00:37] INFO     Parsed 7302 LDAP objects                                               
[15:00:37] INFO     Parsed 0 local group/session objects                                   
[15:00:37] INFO     Sorting parsed objects by type...                                      
[15:00:37] INFO     Parsed 17 Users                                                        
[15:00:37] INFO     Parsed 71 Groups                                                       
[15:00:37] INFO     Parsed 2 Computers                                                     
[15:00:37] INFO     Parsed 1 Domains                                                       
[15:00:37] INFO     Parsed 3 Trust Accounts                                                
[15:00:37] INFO     Parsed 2 OUs                                                           
[15:00:37] INFO     Parsed 314 Containers                                                  
[15:00:37] INFO     Parsed 2 GPOs                                                          
[15:00:37] INFO     Parsed 1 Enterprise CAs                                                
[15:00:37] INFO     Parsed 1 AIA CAs                                                       
[15:00:37] INFO     Parsed 1 Root CAs                                                      
[15:00:37] INFO     Parsed 1 NTAuth Stores                                                 
[15:00:37] INFO     Parsed 3 Issuance Policies                                             
[15:00:37] INFO     Parsed 36 Cert Templates                                               
[15:00:37] INFO     Parsed 4535 Schemas                                                    
[15:00:37] INFO     Parsed 2 Referrals                                                     
[15:00:37] INFO     Parsed 2194 Unknown Objects                                            
[15:00:37] INFO     Parsed 0 Sessions                                                      
[15:00:37] INFO     Parsed 0 Privileged Sessions                                           
[15:00:37] INFO     Parsed 0 Registry Sessions                                             
[15:00:37] INFO     Parsed 0 Local Group Memberships                                       
[15:00:38] INFO     Parsed 4597 ACL relationships                                          
[15:00:38] INFO     Created default users                                                  
[15:00:38] INFO     Created default groups                                                 
[15:00:38] INFO     Resolved group memberships                                             
[15:00:38] INFO     Resolved delegation relationships                                      
[15:00:38] INFO     Resolved OU memberships                                                
[15:00:38] INFO     Linked GPOs to OUs                                                     
[15:00:38] INFO     Resolved domain trusts                                                 
[15:00:38] INFO     Built CA certificate chains                                            
[15:00:38] INFO     Resolved enabled templates per CA                                      
[15:00:38] INFO     Resolved hosting computers of CAs                                      
[15:00:38] INFO     JSON files written to /tmp/output-bofhound-bloodhound-techcorp/

問題無さそう。

問題無くインジェストも完了。データ数から見ても問題無さそうだった。

ちなみに、先ほどと同じESC1の脆弱性をtechcorp.local側のBloodHoundのグラフでみるとこうなっている。

ESC1をtechcorp.localから見た

ドメインでとりあえず取ったADExplorerのデータには子ドメインの情報は、全てが含まれている訳ではないよね。

ADExplorer to Adalanche

AdalancheはBloodHoundみたいな感じと聞き、使ったことが無かったのでワクワクしていた。
が、その期待は裏切られた。

公式githubにはビルド済みバイナリがあるので、それを使用する。

wget https://github.com/lkarlslund/Adalanche/releases/download/v2025.2.6/adalanche-linux-x64-v2025.2.6
chmod 500 adalanche-linux-x64-v2025.2.6

AdalancheでADExplorerのスナップショットを使用するときには、特に他のツールで変換する必要はAdalancheで完結する。
使い方

./adalanche collect activedirectory --adexplorerfile=/path/to/snapshot.dat
./adalanche --datapath=/path/to/data analyze

動作確認

$ ./adalanche-linux-x64-v2025.2.6 
v2025.2.6 (commit f6ef22a)

Usage:
  adalanche [command]

Available Commands:
  analyze     Lanunches the interactive discovery tool in your browser
  collect     collect modules for various platforms (try "adalanche help dump")
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  persistence Maintenance tools for the persistence database
  quick       
  version     Show adalanche version information

Flags:
      --cpuprofile                Save CPU profile from start to end of processing in datapath
      --cpuprofiletimeout int32   CPU profiling timeout in seconds (0 means no timeout)
      --datapath string           folder to store and read data (default "data")
      --embeddedprofiler          Start embedded Go profiler on localhost:6060
      --fgprof                    Save CPU fgprof start to end of processing in datapath
      --fgtrace                   Save CPU fgtrace start to end of processing in datapath
  -h, --help                      help for adalanche
      --logfile string            File to log to
      --logfilelevel string       Log file log level (default "info")
      --loglevel string           Console log level (default "info")
      --logzerotime               Logged timestamps start from zero when program launches
      --memprofile                Save CPU profile from start to end of processing in datapath
      --memprofiletimeout int32   CPU profiling timeout in seconds (0 means no timeout)

Use "adalanche [command] --help" for more information about a command.
15:08:40.970  INFORMA  Terminating successfully

では、まずは変換的なこと。

$ ./adalanche-linux-x64-v2025.2.6 collect activedirectory --adexplorerfile=/tmp/us-techcorp.dat
15:13:29.159  INFORMA  No settings loaded from open data/configuration.yaml: no such file or directory: %!v(MISSING)
15:13:29.159  INFORMA  Adalanche Open Source v2025.2.6 (commit f6ef22a), (c) 2020-2024 Lars Karlslund, This program comes with ABSOLUTELY NO WARRANTY
15:13:29.159  INFORMA  Collecting objects from AD Explorer snapshot /tmp/us-techcorp.dat ...
15:13:29.159  INFORMA  Loading raw AD Explorer snapshot into memory
15:13:29.233  INFORMA  Reading header (takes a while) ...
15:13:29.623  INFORMA  Collecting group policy files from \\us.techcorp.local\SysVol\us.techcorp.local\Policies\{AFC6881A-5AB6-41D0-91C6-F2390899F102} ...                              
15:13:29.623  WARNING  Can't access path, aborting this GPO ...
15:13:29.623  INFORMA  Collecting group policy files from \\us.techcorp.local\SysVol\us.techcorp.local\Policies\{FCE16496-C744-4E46-AC89-2D01D76EAD68} ...
15:13:29.623  WARNING  Can't access path, aborting this GPO ...
15:13:29.623  INFORMA  Collecting group policy files from \\us.techcorp.local\SysVol\us.techcorp.local\Policies\{B78BFC6B-76DB-4AA4-9CF6-26260697A8F9} ...
15:13:29.623  WARNING  Can't access path, aborting this GPO ...
15:13:29.623  INFORMA  Collecting group policy files from \\us.techcorp.local\sysvol\us.techcorp.local\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9} ...
15:13:29.623  WARNING  Can't access path, aborting this GPO ...
15:13:29.623  INFORMA  Collecting group policy files from \\us.techcorp.local\sysvol\us.techcorp.local\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9} ...
15:13:29.623  WARNING  Can't access path, aborting this GPO ...
15:13:29.623  INFORMA  Collecting group policy files from \\us.techcorp.local\SysVol\us.techcorp.local\Policies\{7162874B-E6F0-45AD-A3BF-0858DA4FA02F} ...
15:13:29.623  WARNING  Can't access path, aborting this GPO ...
15:13:29.623  INFORMA  Collecting group policy files from \\us.techcorp.local\SysVol\us.techcorp.local\Policies\{5269764B-0FBA-43B6-82F7-C1E3B1007FFF} ...
15:13:29.623  WARNING  Can't access path, aborting this GPO ...
15:13:29.624  INFORMA  Terminating successfully

こいつも勝手にアクセスしようとする機能がついてるな。気をつけねば。

そして、こんなものができました。

$ ls
adalanche-linux-x64-v2025.2.6  data
$ ls data/
us-techcorp.dat.objects.msgp.lz4

次は、WebUIの起動。http://127.0.0.1:8080を使用する。

$ ./adalanche-linux-x64-v2025.2.6 --datapath=./data analyze
15:19:16.392  INFORMA  No settings loaded from open data/configuration.yaml: no such file or directory: %!v(MISSING)
15:19:16.392  INFORMA  Adalanche Open Source v2025.2.6 (commit f6ef22a), (c) 2020-2024 Lars Karlslund, This program comes with ABSOLUTELY NO WARRANTY
15:19:16.399  INFORMA  Adalanche Web Service listening at http://127.0.0.1:8080/ ... (ctrl-c or similar to quit)
15:19:16.401  INFORMA  Scanning for data files from ./data ...
15:19:16.401  INFORMA  Will process 2 files
15:19:16.476  INFORMA  Loaded 1 files, skipped 1 files                                                                                                                                  
15:19:16.604  INFORMA  Loader Active Directory produced 7360 objects in 1 collections
15:19:16.604  INFORMA  Loader Group Policy produced 0 objects in 0 collections
15:19:16.604  INFORMA  Loader Local Machine produced 0 objects in 0 collections
15:19:16.604  INFORMA  We produced a total of 7360 objects from ./data
15:19:16.694  INFORMA  Domain us.techcorp.local has a bidirectional trust with eu.local                                                                                                 
15:19:16.702  INFORMA  Domain us.techcorp.local has a bidirectional trust with techcorp.local
15:19:16.808  INFORMA  GET / (200) 98.411µs, 23439 bytes                                                                                                                                
15:19:16.887  INFORMA  GET /external/bootstrap/css/bootstrap.css (200) 6.919866ms, 281046 bytes
15:19:16.887  INFORMA  GET /external/bootstrap-icons/bootstrap-icons.css (200) 4.862032ms, 98255 bytes
15:19:16.887  INFORMA  GET /external/jquery-ui-1.13.2.custom/jquery-ui.css (200) 4.861704ms, 18896 bytes
15:19:16.887  INFORMA  GET /external/graph/cytoscape-context-menus.css (200) 4.864796ms, 1017 bytes
15:19:16.887  INFORMA  GET /external/spinkit.css (200) 4.891272ms, 14998 bytes
15:19:16.887  INFORMA  GET /external/toastify.min.css (200) 4.849438ms, 1523 bytes
15:19:16.894  INFORMA  GET /external/jquery-3.7.1.min.js (200) 201.47µs, 87533 bytes
15:19:16.894  INFORMA  GET /adalanche.css (200) 23.078µs, 4252 bytes
15:19:16.894  INFORMA  GET /external/jstree/themes/default-dark/style.min.css (200) 34.192µs, 29959 bytes
15:19:16.894  INFORMA  GET /external/tippy.css (200) 13.162µs, 1636 bytes
15:19:16.895  INFORMA  GET /external/tippy.min.js (200) 32.617µs, 25717 bytes
15:19:16.895  INFORMA  GET /external/popper.min.js (200) 126.535µs, 20095 bytes
15:19:16.896  INFORMA  GET /external/jstree/jstree.min.js (200) 109.65µs, 141222 bytes
15:19:16.897  INFORMA  GET /external/interact.min.js (200) 75.607µs, 98204 bytes
15:19:16.897  INFORMA  GET /external/graph/cytoscape-expand-collapse.js (200) 102.834µs, 31284 bytes
15:19:16.897  INFORMA  GET /external/graph/cytoscape-popper.js (200) 27.748µs, 10395 bytes
15:19:16.897  INFORMA  GET /external/graph/cytoscape-context-menus.js (200) 23.906µs, 26168 bytes
15:19:16.898  INFORMA  GET /external/graph/cytoscape.umd.js (200) 685.317µs, 1106653 bytes
15:19:16.898  INFORMA  GET /external/autosize.js (200) 32.902µs, 7843 bytes
15:19:16.898  INFORMA  GET /external/graph/d3-force.v3.js (200) 22.142µs, 8300 bytes
15:19:16.898  INFORMA  GET /external/graph/d3-timer.v3.js (200) 8.45µs, 1947 bytes
15:19:16.898  INFORMA  GET /external/graph/d3-quadtree.v3.js (200) 16.733µs, 5279 bytes
15:19:16.898  INFORMA  GET /external/graph/d3-dispatch.v3.js (200) 12.302µs, 1901 bytes
15:19:16.898  INFORMA  GET /external/graph/layout-base.js (200) 86.818µs, 147898 bytes
15:19:16.898  INFORMA  GET /external/graph/cytoscape-fcose.js (200) 48.071µs, 62858 bytes
15:19:16.898  INFORMA  GET /external/graph/cytoscape-d3-force-sampled.js (200) 32.686µs, 18242 bytes
15:19:16.898  INFORMA  GET /external/graph/d3-force-sampled.js (200) 22.138µs, 6868 bytes
15:19:16.898  INFORMA  GET /external/graph/d3-force-reuse.js (200) 39.748µs, 4812 bytes
15:19:16.899  INFORMA  GET /external/graph/cytoscape-dagre.js (200) 57.762µs, 11830 bytes
15:19:16.899  INFORMA  GET /external/graph/dagre.min.js (200) 162.739µs, 323755 bytes
15:19:16.899  INFORMA  GET /external/graph/cytoscape-cose-bilkent.js (200) 23.834µs, 21395 bytes
15:19:16.899  INFORMA  GET /extrafuncs.js (200) 7.27µs, 125 bytes
15:19:16.899  INFORMA  GET /anonymizer.js (200) 22.869µs, 14511 bytes
15:19:16.909  INFORMA  GET /custom.js (200) 72.817µs, 24212 bytes
15:19:16.909  INFORMA  GET /themes.js (200) 11.143µs, 1475 bytes
15:19:16.911  INFORMA  GET /external/graph/cose-base.js (200) 12.201017ms, 118906 bytes
15:19:16.911  INFORMA  GET /preferences.js (200) 17.322µs, 3533 bytes
15:19:16.911  INFORMA  GET /graph.js (200) 57.759µs, 44738 bytes
15:19:16.911  INFORMA  GET /external/toastify.js (200) 16.598µs, 6776 bytes
15:19:16.911  INFORMA  GET /external/bootstrap/js/bootstrap.min.js (200) 36.759µs, 60635 bytes
15:19:16.952  INFORMA  Initiating merge with a total of 7491 objects
15:19:16.953  INFORMA  Merging 7491 objects into the object metaverse
15:19:16.953  INFORMA  GET /icons/mastodon.svg (200) 22.095µs, 1397 bytes                                                                                                               
15:19:16.953  INFORMA  GET /icons/bluesky-logo.svg (200) 21.953µs, 744 bytes
15:19:16.953  INFORMA  GET /icons/adalanche-logo.svg (200) 22.32µs, 3632 bytes
15:19:16.953  INFORMA  GET /icons/adalanche-logo-black.svg (200) 12.958µs, 3614 bytes
15:19:17.061  INFORMA  After merge we have 7492 objects in the metaverse (merge eliminated -1 objects)                                                                                  
15:19:17.090  WARNING  Detected 67 orphan objects in final results
15:19:17.103  INFORMA  GET /icons/adalanche-favicon.png (200) 50.444µs, 1273 bytes
15:19:17.111  WARNING  Possible hardening? CN=US-EXCHANGE,OU=HybridConnect,DC=us,DC=techcorp,DC=local is a member of CN=Managed Availability Servers,OU=Microsoft Exchange Security Groups,DC=techcorp,DC=local, which is not found - adding synthetic group. Your analysis will be degraded, try dumping with Domain Admin rights.
15:19:17.113  WARNING  Possible hardening? CN=US-EXCHANGE,OU=HybridConnect,DC=us,DC=techcorp,DC=local is a member of CN=Exchange Trusted Subsystem,OU=Microsoft Exchange Security Groups,DC=techcorp,DC=local, which is not found - adding synthetic group. Your analysis will be degraded, try dumping with Domain Admin rights.
15:19:17.113  INFORMA  GET /external/Oswald-VariableFont_wght.ttf (200) 150.143µs, 126336 bytes
15:19:17.113  WARNING  Possible hardening? CN=US-EXCHANGE,OU=HybridConnect,DC=us,DC=techcorp,DC=local is a member of CN=Exchange Servers,OU=Microsoft Exchange Security Groups,DC=techcorp,DC=local, which is not found - adding synthetic group. Your analysis will be degraded, try dumping with Domain Admin rights.
15:19:17.113  WARNING  Possible hardening? CN=Enterprise Admins,CN=Users,DC=techcorp,DC=local is a member of CN=Administrators,CN=Builtin,DC=us,DC=techcorp,DC=local, which is not found - adding synthetic member. Your analysis will be degraded, try dumping with Domain Admin rights.
15:19:17.117  INFORMA  GET /external/bootstrap-icons/fonts/bootstrap-icons.woff2 (200) 114.405µs, 130396 bytes
15:19:17.119  WARNING  Possible hardening? CN=Schema Admins,CN=Users,DC=techcorp,DC=local is a member of CN=Denied RODC Password Replication Group,CN=Users,DC=us,DC=techcorp,DC=local, which is not found - adding synthetic member. Your analysis will be degraded, try dumping with Domain Admin rights.
15:19:17.122  WARNING  Possible hardening? CN=exchange manager,CN=Users,DC=us,DC=techcorp,DC=local is a member of CN=Organization Management,OU=Microsoft Exchange Security Groups,DC=techcorp,DC=local, which is not found - adding synthetic group. Your analysis will be degraded, try dumping with Domain Admin rights.
15:19:17.122  INFORMA  Time to finish post-processing 11.230496ms
15:19:17.137  INFORMA  GET /api/backend/statistics (200) 71.033µs, 171 bytes
15:19:17.138  INFORMA  GET /api/backend/queries (200) 159.702µs, 7871 bytes
15:19:17.138  INFORMA  GET /api/preferences (200) 20.368µs, 2 bytes
15:19:17.149  WARNING  Couldn't locate dnsHostName Techcorp-DC.techcorp.local acting as enrollmentservice                                                                               
15:19:17.171  INFORMA  Time to finish post-processing 25.16817ms
15:19:17.230  INFORMA  Time to finish post-processing 21.26166ms                                                                                                                        
15:19:17.254  INFORMA  Time to finish post-processing 122.349µs
15:19:17.279  INFORMA  Time to UI done in 878.045481ms

とりあえず、思ったこと。始めて使ったが、BloodHoundよりも分かりにくくて、使いにくい。

Adalancheちょっと使ってみた

矢印は攻撃経路となるものだが、クリックしてもBloodHoundのように攻撃方法が出てくるのではない。何らかのヒント?的なものが出てくる。うーむ、よく分からん。

個人的に良かったのは、ADExplorerのようにオブジェクトを確認できる、くらい……。

良いところ............???

BloodHoundってやっぱり最高の出来なんだな。
techcorp分を入れてみようとは思わなかった……。

もう使わん。

ADExplorer OPSECの悪足搔きをちょっと考えてみる(試してない)

ネットワークとエンドポイントのOPSECごちゃ混ぜになってるが。

[ネットワーク]スナップショット取得を遅くする

ADExplorerのThrottleを変えると良くなるハズ。デフォルトが100%なので、小さくすれば良いと思われ。

throttleの調整

[エンドポイント]ファイル名変更

ADExplorer.exeじゃない名前にしとく。他にもメタデータを変えとくのもより良くなる。
こういうルールとかがあるので。
Active Directory Database Snapshot Via ADExplorer - Detection rules | ManageEngine Log360

[エンドポイント]SOCKSプロキシ経由とかで実行する

ターゲット環境のホストで実行しない。

[ネットワーク]ADWS経由で情報取得

本当に真面目ネットワークOPSEC考えるならLDAPじゃなくてADWS
SOAPHoundとかデメリットがあることは以前に確認している。一気にできてしまうのはOPSEC的に問題があることも分かるので、気になるものは適宜丁寧に詳細を取りに行く方針にすべきというのも理解できる。

SpectorOps公式のSoaPyってのもあるらしい。

その他(メモ)

色々あるだろうけど、そのうち気が向いたら確認する。
SilentHound
Recon-AD

かなり古くても、古過ぎる方が検知されないこともある。

所感

ADExplorer->BOFHound->BloodHound CEがヨシ!!!

なんで、ADExplorerのスナップショットからBOFHoundを経由してBloodHound形式にするのがまとまっているツールが無いんだろうか。
既に機能を持っているツールがあるから要らないけど。