+ All Categories
Home > Technology > (130622) #fitalk the stealing windows password

(130622) #fitalk the stealing windows password

Date post: 18-Jan-2017
Category:
Upload: insight-forensic
View: 45 times
Download: 7 times
Share this document with a friend
53
FORENSIC INSIGHT; DIGITAL FORENSICS COMMUNITY IN KOREA The Stealing Windows Password blueangel [email protected] forensic-note.blogspot.kr Junghoon Oh
Transcript
Page 1: (130622) #fitalk   the stealing windows password

FORENSIC INSIGHT;DIGITAL FORENSICS COMMUNITY IN KOREA

The Stealing Windows Password

blueangel

[email protected]

forensic-note.blogspot.kr

Junghoon Oh

Page 2: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 2

Index

1. Introduction

2. Password Hash Dump in Registry

3. Password Hash Dump in NTDS.DIT

4. Password History Dump

5. LSA Secret Dump in Registry

6. Cached Domain Logon Information Dump in Registry

7. Password Hash Dump in Logon Session

8. Network service authentication credentials Dump

9. The Forensic Artifacts

10. Conclusion

Page 3: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 3

Introduction

Page 4: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 4

Introduction

์ถœ์ฒ˜ : Dump Windows password hashes efficiently โ€“ Part 1 ~ 6

โ€ข Bernardo Damele A. G. โ€˜s Blog( http://bernardodamele.blogspot.kr )

Page 5: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 5

Password Hash Dump in Registry

Page 6: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 6

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข ์ปดํ“จํ„ฐ ์žฌ๋ถ€ํŒ… ํ›„, USB ๋‚˜ Live CD๋กœ ๋ถ€ํŒ…ํ•˜์—ฌ SAM ํŒŒ์ผ ์ˆ˜์ง‘

SAM ํŒŒ์ผ์— ์ ‘๊ทผํ•˜์—ฌ Hash ๊ฐ’์„ ๊ฐ€์ ธ์˜ค๋Š” ๋„๊ตฌ ์‚ฌ์šฉ

โ€ข bkhive : dumps the syskey(bootkey) from a Windows system hive.

โ€ข smdump2 : dumps Windows 2k/NT/XP/Vista password hashes.

SAM ํŒŒ์ผ ์ˆ˜์ง‘ ํ›„, Can & Abel, creddump, mimikatz ๋„๊ตฌ๋ฅผ ํ†ตํ•ด ์˜คํ”„๋ผ์ธ ๊ณต๊ฒฉ

Page 7: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 7

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข Logon Prompt ์šฐํšŒ ํ›„, ํŒŒ์ผ ์ˆ˜์ง‘

BootRoot( http://www.eeye.com/Resources/Security-Center/Research/Tools/BootRoot )

โ€ข ์ปค์Šคํ…€ ๋ถ€ํŠธ ์„นํ„ฐ ์ฝ”๋“œ๋ฅผ ํ†ตํ•ด ์ปค๋„์ด ๋กœ๋”ฉ๋  ๋•Œ ์ˆ˜์ •ํ•˜์—ฌ ๋กœ๊ทธ์ธ ํ”„๋กฌํ”„ํŠธ ์šฐํšŒ

SysRQ2( http://www.eeye.com/Resources/Security-Center/Research/Tools/SysRQ2 )

โ€ข Bootable CD

โ€ข SYSTEM ๊ถŒํ•œ์˜ ์ปค๋งจ๋“œ ํ”„๋กฌํ”„ํŠธ ์ œ๊ณต

Kon-Boot( http://www.piotrbania.com/all/kon-boot/ )

โ€ข ์ƒ์šฉ ์†Œํ”„ํŠธ์›จ์–ด, CD๋‚˜ USB์— ์„ค์น˜ํ•จ

โ€ข ๋ถ€ํŒ… ์ค‘์— ๋ฆฌ๋ˆ…์Šค or ์œˆ๋„์šฐ์ฆˆ ์ปค๋„์„ ์ˆ˜์ •ํ•˜์—ฌ ํŒจ์Šค์›Œ๋“œ๋ฅผ ์ž…๋ ฅํ•˜์ง€ ์•Š์•„๋„(์•„๋ฌด๊ฑฐ๋‚˜ ์ณ๋„) ๊ด€๋ฆฌ์ž

๊ถŒํ•œ์œผ๋กœ ๋กœ๊ทธ์ธํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•จ

Page 8: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 8

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข Password ์ดˆ๊ธฐํ™” ํ›„, ํŒŒ์ผ ์ˆ˜์ง‘

Bootable CD or USB

โ€ข bootdisk ( http://pogostick.net/~pnh/ntpasswd/bootdisk.html )

โ€ข chntpw ( http://pogostick.net/~pnh/ntpasswd/walkthrough.html )

โ€ข ๋ฐฑ์—… ๋„๊ตฌ๋ฅผ ํ†ตํ•œ ํŒŒ์ผ ์ˆ˜์ง‘

Ntbackup( http://technet.microsoft.com/en-us/library/bb490952.aspx )

โ€ข MS-DOS subsystem ์˜ ์œ ํ‹ธ๋ฆฌํ‹ฐ

โ€ข ์‹œ์Šคํ…œ ์ƒํƒœ๋ฅผ ๋ฐฑ์—…ํ•˜์—ฌ ํŒŒ์ผ๋กœ ์ €์žฅ

โ€ข ๋ฐฑ์—…๋œ ํŒŒ์ผ์„ ๋‹ค์‹œ ์‹œ์Šคํ…œ์— ๋ณต๊ตฌํ•  ์ˆ˜ ์žˆ์Œ

โ€ข Windows XP ์—์„œ ์ง€์›๋จ

Wbadmin( http://technet.microsoft.com/en-us/library/cc754015%28v=ws.10%29.aspx )

โ€ข Windows Vistat ๋ถ€ํ„ฐ ์ง€์›

โ€ข Ntbackup ๋Œ€์ฒด

Page 9: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 9

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข ๋ฐฑ์—… ๋„๊ตฌ๋ฅผ ํ†ตํ•œ ํŒŒ์ผ ์ˆ˜์ง‘(๊ณ„์†)

Wbadmin( http://technet.microsoft.com/en-us/library/cc754015%28v=ws.10%29.aspx )

โ€ข Windows Vistat ๋ถ€ํ„ฐ ์ง€์›

โ€ข Ntbackup ๋Œ€์ฒด

regback( http://technet.microsoft.com/en-us/library/cc758453(WS.10).aspx )

โ€ข Windows 2000 Resource Kit Tools ์— ํฌํ•จ๋จ

โ€ข ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ๋ฐฑ์—… ์ง€์›

โ€ข Windows 2000 ๊นŒ์ง€ ์ง€์›๋จ

Page 10: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 10

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข ๋ฐฑ์—… ๋„๊ตฌ๋ฅผ ํ†ตํ•œ ํŒŒ์ผ ์ˆ˜์ง‘(๊ณ„์†)

reg( http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-

us/reg.mspx?mfr=true )

regedit( http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-

us/tools_regeditors.mspx?mfr=true )

Page 11: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 11

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข ๋ฐฑ์—… ๋””๋ ‰ํ„ฐ๋ฆฌ์—์„œ ํŒŒ์ผ ์ˆ˜์ง‘

Win XP ํ™˜๊ฒฝ์—์„œ์˜ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ์ž๋™ ๋ฐฑ์—… ๊ฒฝ๋กœ( C:\Windows\repair )

C:\Windows\System32\config ์•„๋ž˜ ํŒŒ์ผ์„ ๋ฐฑ์—…ํ•จ

Page 12: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 12

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข Volume Shadow Copy ๊ธฐ์ˆ ์„ ํ†ตํ•œ ํŒŒ์ผ ์ˆ˜์ง‘

Volume Shadow Copy ์˜ ๋ฐฑ์—… ๊ธฐ๋Šฅ์„ ํ†ตํ•ด SAM, SYSTEM ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

vssown ์Šคํฌ๋ฆฝํŠธ ์‚ฌ์šฉ ( http://ptscripts.googlecode.com/svn/trunk/windows/vssown.vbs )

์ˆ˜ํ–‰ ๊ณผ์ •

1. VSS(Volume Shadow Service) ์ƒํƒœ ํ™•์ธ, ์„œ๋น„์Šค๊ฐ€ ์‹คํ–‰ ์ค‘์ด์ง€ ์•Š๋‹ค๋ฉด ์‹คํ–‰ํ•จ

2. ์ƒˆ๋กœ์šด VSC ์ƒ์„ฑ

Page 13: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 13

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข Volume Shadow Copy ๊ธฐ์ˆ ์„ ํ†ตํ•œ ํŒŒ์ผ ์ˆ˜์ง‘(๊ณ„์†)

์ˆ˜ํ–‰ ๊ณผ์ •(๊ณ„์†)

3. ์ƒ์„ฑํ•œ VSC์˜ ID, Device Object ๊ฐ’ ํ™•์ธ

Page 14: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 14

Password Hash Dump in Registry

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ˆ˜์ง‘

โ€ข Volume Shadow Copy ๊ธฐ์ˆ ์„ ํ†ตํ•œ ํŒŒ์ผ ์ˆ˜์ง‘(๊ณ„์†)

์ˆ˜ํ–‰ ๊ณผ์ •(๊ณ„์†)

4. ์ƒ์„ฑํ•œ VSC ์˜ Device Object ๊ฐ’์„ ํ†ตํ•ด SAM, SYSTEM ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ๋ณต์‚ฌ

5. ์ƒ์„ฑํ•œ VSC ์˜ ID ๊ฐ’์„ ํ†ตํ•ด VSC ์‚ญ์ œ

Page 15: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 15

Password Hash Dump in Registry

Hash ์ˆ˜์ง‘ ๋„๊ตฌ ์‚ฌ์šฉ

โ€ข pwdump7( http://www.tarasco.org/security/pwdump_7/index.html )

32/64bit ๋ฐ ๋ชจ๋“  OS ๋ฒ„์ „ ์ง€์›

์ˆ˜์ง‘๋œ ํŒŒ์ผ ํ˜น์€ ํŒŒ์ผ ์‹œ์Šคํ…œ์„ ํ†ตํ•ด SAM, SYSTEM ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ์— ์ง์ ‘ ์ ‘๊ทผํ•˜์—ฌ Hash ์ถ”์ถœ

โ€ข gsecdump( http://www.truesec.se/sakerhet/verktyg/saakerhet/gsecdump_v2.0b5 )

32/64bit ๋ฐ ๋ชจ๋“  OS ๋ฒ„์ „ ์ง€์›

ํŒŒ์ผ, ๋ฉ”๋ชจ๋ฆฌ ์ถ”์ถœ ๋ชจ๋‘ ์ง€์›

โ€ข PWDumpX( http://packetstormsecurity.com/files/62371/PWDumpX14.zip )

32bit ๋งŒ ์ง€์›

ํ˜„์žฌ ์‹œ์Šคํ…œ์˜ Password Hash, LSA Secret, domain password cache ์ถ”์ถœ

โ€ข Cain & Abel

SAM, SYSTEM(syskey) ํŒŒ์ผ์„ ํ†ตํ•ด Hash ๊ฐ’ ์ถ”์ถœ

์ถ”์ถœํ•œ Hash Cracking ์ง€์›(Brute Force, Rainbow Table)

Page 16: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 16

Password Hash Dump in NTDS.DIT

Page 17: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 17

Password Hash Dump in NTDS.DIT

NTDS.DIT ?

โ€ข Active Directory ํ™˜๊ฒฝ์—์„œ ๋„๋ฉ”์ธ ์‚ฌ์šฉ์ž๋“ค์˜ ํŒจ์Šค์›Œ๋“œ Hash๋ฅผ ์ €์žฅํ•˜๊ณ  ์žˆ๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค

โ€ข Domain Controller ์— ์œ„์น˜( %SystemRoot%\ntds\NTDS.DIT )

โ€ข SAM ํŒŒ์ผ๊ณผ ๋™์ผํ•˜๊ฒŒ Hash ๊ฐ’์„ ํš๋“ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” SYSTEM ํŒŒ์ผ์˜ syskey(BOOT KEY) ๊ฐ€ ํ•„์š”

โ€ข ESE DB ํฌ๋ฉง

Page 18: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 18

Password Hash Dump in NTDS.DIT

Hash ์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข Widows Password Recovery( http://www.passcape.com/windows_password_recovery )

์ƒ์šฉ๋„๊ตฌ

NTDS.DIT ํŒŒ์ผ๋กœ๋ถ€ํ„ฐ Hash ์ถ”์ถœ

โ€ข ntds_dump_hash( http://www.ntdsxtract.com/downloads/ntds_dump_hash.zip )

1. ๋„๊ตฌ ์ปดํŒŒ์ผ

2. esedbdumphash ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ datatable ํŒŒ์ผ ์ถ”์ถœ

3. dsdump.py ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ hash ์ถ”์ถœ( with SYSTEM ํŒŒ์ผ )

Page 19: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 19

Password Hash Dump in NTDS.DIT

Hash ์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข NTDSXtract( http://www.ntdsxtract.com/en/ntdsxtract.html )

ntds_dump_hash ์˜ ์—…๊ทธ๋ ˆ์ด๋“œ ๋ฒ„์ „

libesedb( https://code.google.com/p/libesedb/ ) ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ NTDS.DIT ํŒŒ์ผ๋กœ ๋ถ€ํ„ฐ ์ถ”์ถœํ•œ

database table์„ ์ž…๋ ฅ์œผ๋กœ ์‚ฌ์šฉ

์‚ฌ์šฉ๋ฒ•

1. libesedb ์˜ esedbdexport ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ database table ์ถ”์ถœ

Page 20: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 20

Password Hash Dump in NTDS.DIT

Hash ์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข NTDSXtract( http://www.ntdsxtract.com/en/ntdsxtract.html ) ( ๊ณ„์† )

์‚ฌ์šฉ๋ฒ•(๊ณ„์†)

2. ์ถ”์ถœํ•œ database table ํŒŒ์ผ์„ NTDSXtract์˜ dsusers.py ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์‹ฑ

3. ntdstopwdum.py( https://raw.github.com/inquisb/miscellaneous/master/ntdstopwdump.py ) ๋ฅผ ์‚ฌ

์šฉํ•˜์—ฌ dsusers.py ์˜ ์ถœ๋ ฅ์„ ๋ณด๊ธฐ ์ข‹๊ฒŒ ๋ณ€ํ™˜

Page 21: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 21

Password History Dump

Page 22: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 22

Password History Dump

Password History

โ€ข "Password Policy" ์„ค์ •์„ ํ†ตํ•ด ์ด์ „์— ์‚ฌ์šฉํ–ˆ๋˜ ํŒจ์Šค์›Œ๋“œ๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์žˆ์Œ(Hash ํ˜•ํƒœ๋กœ ์ €์žฅ

๋จ)

โ€ข ๊ธฐ๋ณธ์ ์œผ๋กœ Domain Controller ๋Š” 24๊ฐœ, ์ผ๋ฐ˜ ์„œ๋ฒ„๋Š” 0๊ฐœ๋ฅผ ์ €์žฅ

โ€ข NTDS.DIT, SAM ํŒŒ์ผ์— ์ €์žฅ๋จ

โ€ข ์ด๋Ÿฌํ•œ ์ •๋ณด๋ฅผ ํ†ตํ•ด Password Cracking ์‹œ, ์‚ฌ์šฉ์ž์˜ ํŒจ์Šค์›Œ๋“œ ํŒจํ„ด์„ ์•Œ ์ˆ˜ ์žˆ์Œ

Page 23: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 23

Password History Dump

Password History ์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข Cain & Abel( http://www.oxid.it/cain.html )

โ€ข PWDumpX( http://packetstormsecurity.com/files/62371/PWDumpX14.zip )

โ€ข pwhist( http://www.toolcrypt.org/tools/pwhist/index.html )

Page 24: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 24

LSA Secret Dump in Registry

Page 25: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 25

LSA Secret Dump in Registry

LSA Secret ?

โ€ข ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์— ์ €์žฅ๋˜์–ด ์žˆ๋Š” ์ •๋ณด(LSASS.EXE ํ”„๋กœ์„ธ์Šค์— DLL ์ธ์ ์…˜ํ•˜์—ฌ ๊ตฌํ•  ์ˆ˜๋„ ์žˆ์Œ)

โ€ข ์ €์žฅ ์ •๋ณด

์‚ฌ์šฉ์ž ๊ณ„์ •์œผ๋กœ ๋™์ž‘ํ•˜๋Š” ์„œ๋น„์Šค์˜ ๊ณ„์ • ํŒจ์Šค์›Œ๋“œ(Local System, Network Service, Local Service

์ œ์™ธ)

์ž๋™ ๋กœ๊ทธ์ธ ํ™œ์„ฑํ™” ์‹œ, ์‚ฌ์šฉ๋˜๋Š” ํŒจ์Šค์›Œ๋“œ

โ€ข ์ €์žฅ ์œ„์น˜

HKEY_LOCAL_MACHINE/Security/Policy/Secrets ์•„๋ž˜ ๊ฐ Secret ํ‚ค ๋“ค์ด ์žˆ์Œ

๊ฐ Secret ํ‚ค์˜ ์„œ๋ธŒํ‚ค ๊ฐ’

โ€ข CurrVal : ์•”ํ˜ธํ™”๋œ secret ๋ฐ์ดํ„ฐ( LSA Key ๋กœ ์•”ํ˜ธํ™”๋˜์–ด ์žˆ์Œ )

โ€ข OldVal : ์ด์ „ ์•”ํ˜ธํ™”๋œ secret ๋ฐ์ดํ„ฐ

โ€ข CupdTime : ๋งˆ์ง€๋ง‰ ์—…๋ฐ์ดํŠธ ์‹œ๊ฐ„(FILETIME)

โ€ข OupdTime : ์ด์ „ ์—…๋ฐ์ดํŠธ ์‹œ๊ฐ„(FILETIME)

โ€ข SecDesc : Security Descriptor

Page 26: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 26

LSA Secret Dump in Registry

LSA Secret ?(๊ณ„์†)

โ€ข LSA Secret ๋ณตํ˜ธํ™”

CurrVal ๋Š” LSA Key ๋กœ ์•”ํ˜ธํ™” ๋˜์–ด ์žˆ์Œ

์ž์„ธํ•œ ๋ณตํ˜ธํ™” ๋ฐฉ๋ฒ•์€ ์•„๋ž˜ URL์—์„œ ํ™•์ธ

โ€ข http://moyix.blogspot.kr/2008/02/decrypting-lsa-secrets.html

โ€ข http://www.passcape.com/index.php?section=docsys&cmd=details&id=23

๋ณตํ˜ธํ™”ํ•œ ๋ฐ์ดํ„ฐ๋Š” ์œ ๋‹ˆ์ฝ”๋“œ์ž„

Page 27: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 27

LSA Secret Dump in Registry

LSA Secret Dump ๋„๊ตฌ

โ€ข Cain & Abel ( http://www.oxid.it/cain.html )

Page 28: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 28

LSA Secret Dump in Registry

LSA Secret Dump ๋„๊ตฌ

โ€ข gsecdump( http://www.truesec.se/sakerhet/verktyg/saakerhet/gsecdump_v2.0b5 )

โ€ข lsadump2 ( http://packetstormsecurity.com/files/10457/lsadump2.zip ) : 32๋น„ํŠธ๋งŒ ์ง€์›

โ€ข LSASecretsDump( http://www.nirsoft.net/utils/lsa_secrets_dump.html )

โ€ข LSASecretsView( http://www.nirsoft.net/utils/lsa_secrets_view.html)

Page 29: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 29

LSA Secret Dump in Registry

๊ณต๊ฒฉ ์‹œ๋‚˜๋ฆฌ์˜ค

โ€ข ํŠน์ • ์‹œ์Šคํ…œ์„ ์žฅ์•…ํ•œ ๊ณต๊ฒฉ์ž๋Š” ํ•ด๋‹น ์‹œ์Šคํ…œ์˜ LSA Secret ๋ณตํ˜ธํ™”๋ฅผ ํ†ตํ•ด ์‹ค์ œ ์‚ฌ์šฉ์ž ๊ณ„์ •์˜ ํŒจ์Šค์›Œ๋“œ๋ฅผ ํš๋“

ํ•  ์ˆ˜ ์žˆ์Œ

โ€ข ์‚ฌ์šฉ์ž ๊ณ„์ •์„ ์‚ฌ์šฉํ•˜๋Š” ์„œ๋น„์Šค๋Š” ์•„๋ž˜์™€ ๊ฐ™์ด services.msc ์—์„œ "Log On As" ์ •๋ณด์—์„œ ํ™•์ธ ๊ฐ€๋Šฅ

Page 30: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 30

Cached Domain Logon Information Dump in Registry

Page 31: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 31

Cached Domain Logon Information Dump in Registry

Cached Domain Logon Information ?

โ€ข ๋„๋ฉ”์ธ ์ปจํŠธ๋กค๋Ÿฌ ํ™˜๊ฒฝ์—์„œ, ์‚ฌ์šฉ์ž๊ฐ€ ๋กœ๊ทธ์ธํ•œ ๋กœ์ปฌ ์‹œ์Šคํ…œ์— ์บ์‰ฌ๋œ Credentials(user+domain+hash) ์ •๋ณด

โ€ข SECURITY ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ํŒŒ์ผ ์ €์žฅ๋จ(LSASS.EXE ํ”„๋กœ์„ธ์Šค์— DLL ์ธ์ ์…˜ํ•˜์—ฌ ๊ตฌํ•  ์ˆ˜๋„ ์žˆ์Œ)

โ€ข Credentials ์ •๋ณด๋ฅผ ๋กœ์ปฌ ์‹œ์Šคํ…œ์— ์บ์‰ฌํ•˜๋Š” ์ด์œ ? ๋„๋ฉ”์ธ ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ ๊ณ ์žฅ๋‚ฌ์„ ๊ฒฝ์šฐ๋ฅผ ๋Œ€๋น„ํ•˜๊ธฐ ์œ„ํ•ด์„œ ์ •๋ณด๋ฅผ

์ €์žฅ(Off-line ์ ‘๊ทผ)

HKEY_LOCAL_MACHINE/Security/CACHE/NL$X ์— ์ €์žฅ๋จ

Page 32: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 32

Cached Domain Logon Information Dump in Registry

Cached Domain Logon Information ? (๊ณ„์†)

โ€ข Server 2008์„ ์ œ์™ธํ•œ OS์—์„œ๋Š” ๋กœ๊ทธ์ธํ•œ 10๋ช…์˜ Credentials ์ •๋ณด๋ฅผ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์— ์œ ์ง€, Server 2008์—์„œ๋Š” 25

๋ช…

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CachedLogonsCount

์— ์„ค์ • ์ •๋ณด ์ €์žฅ

โ€ข username์„ salt๋กœ ์‚ฌ์šฉํ•˜์—ฌ "Pass the Hash" ๊ณต๊ฒฉ์—๋Š” ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์Œ

"Cachedump","Cain and Abel" or "creddump" ์™€ ๊ฐ™์€ ๋„๊ตฌ๋ฅผ ํ†ตํ•ด Password Cracking ๊ณต๊ฒฉ ์ˆ˜ํ–‰ ๊ฐ€๋Šฅ

Page 33: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 33

Cached Domain Logon Information Dump in Registry

์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข Cain & Abel ( http://www.oxid.it/cain.html )

Page 34: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 34

Cached Domain Logon Information Dump in Registry

์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข creddump( https://code.google.com/p/creddump/ )

โ€ข Windows Password Recovery ( http://www.passcape.com/windows_password_recovery ) : ์ƒ์šฉ

โ€ข cachedump( http://http://www.openwall.com/john/contrib/cachedump-1.2.zip )

โ€ข fgdump( http://www.foofus.net/~fizzgig/fgdump/ )

โ€ข PWDumpX( http://packetstormsecurity.org/files/62371/PWDumpX14.zip )

Page 35: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 35

Password Hash Dump in Logon Session

Page 36: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 36

Password Hash Dump in Logon Session

Password Hash in Logon Session ?

โ€ข Windows ์ธ์ฆ ์š”์†Œ

Logon Processes(WINLOGON.EXE)

โ€ข ๊ธฐ๋ณธ Logon Process

โ€ข ๋กœ๊ทธ์ธ ์‹œ๋„ I/O๋ฅผ ๊ฐ์ง€ํ•จ

LSA(Local Security Authority, LSASS.EXE)

โ€ข ์œ ์ €๋ชจ๋“œ ํ”„๋กœ์„ธ์Šค, ๋กœ์ปฌ ์‹œ์Šคํ…œ ๋ณด์•ˆ ์ •์ฑ…๊ณผ ์‚ฌ์šฉ์ž ์ธ์ฆ์„ ๊ด€๋ฆฌํ•จ

โ€ข ๋กœ๊ทธ์ธ ์„ธ์…˜ ์œ ์ง€

Authentication Packages(MSV1_0.DLL)

โ€ข NTLM Authentication Packages

โ€ข ์‹ค์ œ ์‚ฌ์šฉ์ž ์ธ์ฆ์„ ์ˆ˜ํ–‰ํ•˜๋Š” DLL, ๋กœ๊ทธ์ธ ์„ธ์…˜ ์ƒ์„ฑ์„ ์ˆ˜ํ–‰, LSA๊ฐ€ ์‹œ์ž‘ ์‹œ, ๋กœ๋”ฉ๋จ

Page 37: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 37

Password Hash Dump in Logon Session

Password Hash in Logon Session ?

โ€ข NTLM ์ธ์ฆ ๊ณผ์ •

1. ์‚ฌ์šฉ์ž ๋กœ๊ทธ์ธ ์‹œ๋„๋ฅผ WINLOGON.EXE๊ฐ€ ๊ฐ์ง€ํ•˜์—ฌ LSASS.EXE๊ฐ€ ๋กœ๋“œํ•œ DLL์ธ MSV1_O.DLL์˜LsaLogonUser() ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœ

2. LsaLogonUser()๋Š” ์‚ฌ์šฉ์ž ์ธ์ฆ์„ ์ˆ˜ํ–‰, ๋กœ๊ทธ์ธ ์„ธ์…˜์„ ์ƒ์„ฑํ•˜๊ณ  ํ•ด๋‹น ์„ธ์…˜์— Credentials๋ฅผ ์ถ”๊ฐ€

*Credentials : UserName, Domain, LM Hash, NT Hash๋กœ ๊ตฌ์„ฑ๋œ ๊ฐ’

โ€ข ๋กœ๊ทธ์ธ ์„ธ์…˜ ๋‚ด์˜ Credentials

LSASS.EXE๋Š” ์ƒ์„ฑ๋œ ๋กœ๊ทธ์ธ ์„ธ์…˜์„ ์œ ์ง€/๊ด€๋ฆฌํ•˜๋ฉฐ ๊ฐ ์„ธ์…˜์€ NTLM Credentials์„ ๊ฐ€์ง€๊ณ  ์žˆ์Œ

๊ฐ ์„ธ์…˜์ด ๊ฐ€์ง€๊ณ  ์žˆ๋Š” Credentials ๊ฐ’์€ ํ•ด๋‹น ์„ธ์…˜์ด ์ธ์ฆ์ด ํ•„์š”ํ•œ ์ž‘์—…(ex : ๋ฆฌ์†Œ์Šค ์ ‘๊ทผ)์„ ์ˆ˜ํ–‰ํ•  ์‹œ ์‚ฌ์šฉ๋จ

๋”ฐ๋ผ์„œ ๋งค๋ฒˆ ์‚ฌ์šฉ์ž๊ฐ€ ํŒจ์Šค์›Œ๋“œ๋ฅผ ์ž…๋ ฅํ•  ํ•„์š” ์—†์Œ : SSO(Single Sign-On)

Page 38: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 38

Password Hash Dump in Logon Session

์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข LSASS ํ”„๋กœ์„ธ์Šค์— DLL์„ ์ธ์ ์…˜ํ•˜๋Š” ๋ฐฉ๋ฒ• => BSoD(Blue Screen of Death) ์˜ ์œ„ํ—˜์„ฑ์ด ์กด์žฌ

pwdump6( http://www.foofus.net/~fizzgig/pwdump/ )

โ€ข Windows 2000/XP/2003/Vista/2008 ์ง€์›

fgdump( http://www.foofus.net/~fizzgig/fgdump/ )

โ€ข Windows 2000/XP/2003/Vista/2008 ์ง€์›

โ€ข pwdump6 ์˜ ์—…๊ทธ๋ ˆ์ด๋“œ ๋ฒ„์ „

msvctl( http://www.truesec.se/sakerhet/verktyg/saakerhet/msvctl_v0.3 )

gsecdump( http://www.truesec.se/sakerhet/verktyg/saakerhet/gsecdump_v2.0b5 )

โ€ข Windows 2000/XP/2003/Vista/7/2008 ์ง€์›

lslsass( http://www.truesec.se/sakerhet/verktyg/saakerhet/lslsass_v1.0_(x86) )

โ€ข Windows Vista/7/2008 ์ง€์›

โ€ข 32๋น„ํŠธ๋งŒ ์ง€์›

Page 39: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 39

Password Hash Dump in Logon Session

์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข ๋ฉ”๋ชจ๋ฆฌ ๋‚ด์—์„œ ๊ตฌ์กฐ์ฒด์˜ ์‹œ๊ทธ๋‹ˆ์ฒ˜๋ฅผ ํ†ตํ•ด ์นด๋น™ํ•˜๋Š” ๋ฐฉ๋ฒ•

wce( http://www.ampliasecurity.com/research/wcefaq.html )

โ€ข Windows 2000/XP/2003/Vista/2008 ์ง€์›

โ€ข ๋กœ๊ทธ์ธ ์„ธ์…˜์˜ ๊ณ„์ • Credential ํ™•์ธ

โ€ข ํš๋“ํ•œ Credential ๋กœ CMD.EXE ์‹คํ–‰

Page 40: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 40

Network Service Authentication Credentials Dump

Page 41: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 41

Network Service Authentication Credentials Dump

Credential Manger & Protected Storage

โ€ข Credential Manger

Windows XP ๋ถ€ํ„ฐ ์กด์žฌ

๋„คํŠธ์›Œํฌ ์ž์›์— ๋Œ€ํ•œ SSO(Single Sine-On) ์ง€์›

"vaults" ๋ผ ๋ถˆ๋ฆฌ์šฐ๋Š” ํŠน์ˆ˜ ํด๋”์— ๋ฐ์ดํ„ฐ ์ €์žฅ

DPAPI ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ ์•”ํ˜ธํ™” => ํ‰๋ฌธ์œผ๋กœ ๋ณตํ˜ธํ™”๋„ ๊ฐ€๋Šฅ~

Vista ์ดํ›„ ๋ถ€ํ„ฐ Control Panel\User Accounts and Family Safety\Credential Manager ์—์„œ ํ™œ์„ฑ

ํ™” ๊ฐ€๋Šฅ

โ€ข Protected Storage

IE, Outlook ์—์„œ ์ด๋ฉ”์ผ ์ •๋ณด ์ €์žฅ

CryptoAPI ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ ์•”ํ˜ธํ™”, ํ‚ค๋Š” ์‚ฌ์šฉ์ž ํŒจ์Šค์›Œ๋“œ

Page 42: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 42

Network Service Authentication Credentials Dump

์ˆ˜์ง‘ ๋„๊ตฌ

โ€ข Credential Manger

netpass( http://www.nirsoft.net/utils/netpass-x64.zip )

Cain & Abel ( http://www.oxid.it/cain.html )

โ€ข Protected Storage

pspv( http://www.nirsoft.net/utils/pspv.zip )

Cain & Abel ( http://www.oxid.it/cain.html )

Network Password Recovery( http://www.passcape.com/network_password_recovery ) : ์ƒ์šฉ๋„๊ตฌ

Page 43: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 43

Network Service Authentication Credentials Dump

๊ณต๊ฒฉ ์‹œ๋‚˜๋ฆฌ์˜ค

โ€ข ์ผ๋ฐ˜์ ์œผ๋กœ ํšŒ์‚ฌ ๋‚ด ์—…๋ฌด์šฉ PC์˜ Credential Manger, Protected Storage ์—๋Š” ์ด๋ฉ”์ผ, ๋‚ด๋ถ€ ์‚ฌ์ด

ํŠธ ๊ณ„์ •์— ๋Œ€ํ•œ ์ •๋ณด๊ฐ€ ์ €์žฅ๋˜์–ด์žˆ์„ ๊ฐ€๋Šฅ์„ฑ์ด ๋†’์Œ

โ€ข ๊ทธ๋ฆฌ๊ณ  ์ด๋Ÿฌํ•œ ๊ณ„์ • ์ •๋ณด๋Š” ๋„๋ฉ”์ธ ๊ณ„์ • ํ˜น์€ ๋„คํŠธ์›Œํฌ ๊ณต์œ  ํŒจ์Šค์›Œ๋“œ์™€ ๋™์ผํ•  ๊ฐ€๋Šฅ์„ฑ์ด ๋†’์Œ~

โ€ข ๋”ฐ๋ผ์„œ ๊ณต๊ฒฉ์ž๋Š” ์ด๋Ÿฌํ•œ ์ •๋ณด๋ฅผ ํ†ตํ•ด ํƒ€ ์‹œ์Šคํ…œ์œผ๋กœ ๊ณต๊ฒฉ ๊ฐ€๋Šฅ~!!

Page 44: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 44

The Forensic Artifacts

Page 45: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 45

The Forensic Artifacts

ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ํ”์ (in ๊ณต๊ฒฉํ•˜๋Š” ์‹œ์Šคํ…œ)

โ€ข ํ”„๋ฆฌํŒจ์น˜(๋‹จ, ์„œ๋ฒ„๊ตฐ ์ œํ’ˆ์—์„œ๋Š” ํ”„๋ฆฌํŒจ์น˜ ๊ธฐ๋Šฅ์ด ๊บผ์ ธ ์žˆ์Œ)

โ€ข ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ์‘์šฉํ”„๋กœ๊ทธ๋žจ ํ˜ธํ™˜์„ฑ ์บ์‹œ

โ€ข ๋ฉ”๋ชจ๋ฆฌ ๋‚ด์— ๋‚จ์€ ํ”์ 

Page 46: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 46

The Forensic Artifacts

ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ํ”์ (in ๊ณต๊ฒฉํ•˜๋Š” ์‹œ์Šคํ…œ)

โ€ข RecentFileCache.bcf

๊ฒฝ๋กœ : \Windows\AppCompat\Programs\RecentFileCache.bcf

์•„์ง๊นŒ์ง„ Server 2008 ์—์„œ๋งŒ ๋ฐœ๊ฒฌ๋จ;;

๋ฐ”์ด๋„ˆ๋ฆฌ ํŒŒ์ผ(BinText๋กœ ๋ณด๋ฉด ๋ฌธ์ž์—ด๋งŒ ๋ณผ ์ˆ˜ ์žˆ์Œ)

๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์˜ ์‘์šฉํ”„๋กœ๊ทธ๋žจํ˜ธํ™˜์„ฑ ์บ์‹œ์— ์žˆ๋Š” ๋ฐ์ดํ„ฐ์™€ ๋น„์Šทํ•˜๋‚˜ ์™„์ „ํžˆ ์ผ์น˜ํ•˜์ง€ ์•Š์Œ.

์‹คํ–‰๋œ ํ”„๋กœ๊ทธ๋žจ ์ˆœ์„œ๋Œ€๋กœ ๊ธฐ๋ก๋จ. ์ •ํ™•ํ•œ ์‹คํ–‰ ์‹œ๊ฐ„์„ ์•Œ ์ˆ˜ ์—†์Œ

์ด๋ฅผ ํ†ตํ•ด ํŠน์ • ์•…์„ฑ์ฝ”๋“œ์˜ ํ”์ ์„ ์ฐพ์„ ์ˆ˜ ์žˆ์Œ

Page 47: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 47

The Forensic Artifacts

ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ํ”์ (in ๊ณต๊ฒฉํ•˜๋Š” ์‹œ์Šคํ…œ)

โ€ข ์•…์„ฑ์ฝ”๋“œ ๋‚ด ์ŠคํŠธ๋ง

์•…์„ฑ์ฝ”๋“œ ๋‚ด Export ํ•จ์ˆ˜๋ช…์œผ๋กœ ์‚ฌ์šฉ๋  ์ˆ˜ ์žˆ์Œ

Page 48: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 48

The Forensic Artifacts

๋„คํŠธ์›Œํฌ ๊ณต์œ  ํ”์ (in ๊ณต๊ฒฉ๋‹นํ•œ ์‹œ์Šคํ…œ)

โ€ข ๋„คํŠธ์›Œํฌ ๋กœ๊ทธ์ธ( in Security.evtx )

๋กœ๊ทธ์ธ ID : 3

์ธ์ฆ ํŒจํ‚ค์ง€ : NTLM

Page 49: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 49

The Forensic Artifacts

์ž‘์—… ์Šค์ผ€์ฅด์„ ํ†ตํ•œ ์‹คํ–‰(in ๊ณต๊ฒฉ๋‹นํ•œ ์‹œ์Šคํ…œ)

At ๋ช…๋ น์„ ํ†ตํ•œ ์ž‘์—… ๋“ฑ๋ก ํ”์  ( in Microsoft-Windows-TaskScheduler%40Operational.evtx )

์ž‘์—… ๋“ฑ๋ก ํ”์ (ID:140)

Page 50: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 50

The Forensic Artifacts

Psexec ์‹คํ–‰ ํ”์ (in ๊ณต๊ฒฉ๋‹นํ•œ ์‹œ์Šคํ…œ)

โ€ข ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์˜ ์‘์šฉํ”„๋กœ๊ทธ๋žจ ํ˜ธํ™˜์„ฑ ์บ์‹œ

โ€ข PsExec ์„œ๋น„์Šค ์‹คํ–‰

Page 51: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 51

Conclusion

Page 52: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 52

Conclusion

Windows Password ์ •๋ณด๋ฅผ ํ›”์น  ์ˆ˜ ์žˆ๋Š” ๋‹ค์–‘ํ•œ ๋ฐฉ๋ฒ•์ด ์กด์žฌ

๋Œ€๋ถ€๋ถ„์˜ ๊ณต๊ฒฉ ๋ฐฉ์‹์ด ๊ด€๋ฆฌ์ž ๊ณ„์ •์˜ ๊ถŒํ•œ์ด ํ•„์š”ํ•จ

โ€ข ๋กœ์ปฌ ๊ด€๋ฆฌ์ž ๊ถŒํ•œ ๋ณดํ˜ธ

Windows 7 ์ด์ƒ ์‚ฌ์šฉ

UAC ์‚ฌ์šฉ

์ผ๋ฐ˜ ์‚ฌ์šฉ์ž ๊ณ„์ •์„ ๊ด€๋ฆฌ์ž ๊ทธ๋ฃน์— ํฌํ•จ์‹œํ‚ค์ง€ ์•Š์Œ

๊ด€๋ฆฌ ๋ชฉ์ ์ƒ, ๋™์ผํ•œ ID/PW ์˜ ๊ด€๋ฆฌ์ž ๊ณ„์ • ์‚ฌ์šฉํ•˜์ง€ ์•Š์Œ

โ€ข AD ๊ด€๋ฆฌ์ž ๊ถŒํ•œ ๋ณดํ˜ธ

AD ๊ด€๋ฆฌ์ž ๊ณ„์ •์œผ๋กœ DC ์™ธ ์„œ๋ฒ„ ์ ‘์†๊ธˆ์ง€

์ผ๋‹จ ๊ณต๊ฒฉ ์„ฑ๊ณตํ•˜๋ฉด ํ•ด๋‹น ๊ณ„์ •์˜ ID/PW๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ํ–‰์œ„๋Š” ์ผ๋ฐ˜ ํ–‰์œ„์™€ ๊ตฌ๋ถ„ํ•˜๊ธฐ ํž˜๋“ฌ

โ€ข ๋ณด์•ˆ ๊ด€๋ฆฌ์ž์˜ ์ง€์†์ ์ธ ์ด์ƒ ์ง•ํ›„ ๋ชจ๋‹ˆํ„ฐ๋ง๊ณผ ๋น ๋ฅธ ๋Œ€์ฒ˜๊ฐ€ ํ•„์š”ํ•จ

Page 53: (130622) #fitalk   the stealing windows password

forensicinsight.org Page 53

Question and Answer


Recommended