Security & Forensic

반응형

웹 분석 - IE

 

분석 대상

웹 캐시, 접속 히스토리, 검색 키워드, 쿠키, 파일 다운로드 목록, 아이콘 캐시, 세션복원 정보, 호환성 목록, DOM 저장소 내용, 북마크 

 

웹 캐시

• 행위의 동기, 목적, 수단, 방법 등 많은 정보 획득 가능
• 웹 브라우저에서 열람한 파일도 저장이 되어 내용 확인이 가능
• 특히 html 캐시 파일을 통해 웹 메일 내용 분석이 가능할 수 있다.

접속 히스토리
• 사용자가 방문한 웹 사이트 접속 정보 저장
• 방문 사이트 URL, 방문 시간, 방문 횟수, 사이트 제목 등
• 저장 형식
  직접 접근 – URL 입력 창에 직접 주소 입력
  간접 접근 – URL 링크를 통해서 접근


쿠키
웹 사이트 방문 시 자동으로 사용자 저장장치에 저장되는 텍스트 데이터
자동 로그인 기능 -> 로그인 아이디 저장 옵션 활성화 시 로그인 아이디 획득 가능
쇼핑몰 열람한 물건, 장바구니 물건
웹 하드 찜 해놓은 자료, 다운받은 자료 등 획득 가능

 

IE 웹 브라우저 위치
Location of Internet Explorer history
Windows 7, 8, 10
C:\Users\<username>\Favorites
C:\Users\<username>\AppData\Local\Microsoft\Windows\WebCache
C:\Users\<username>\AppData\Local\Microsoft\Internet Explorer\Recovery

OS별, IE 버전별로 다를 수 있음

Format of Internet Explorer history
Bookmarks
Internet Explorer Bookmarks are stored in separate Internet Shortcut (.url) files within the 'Favorites' folder.

Cache
Internet Explorer Cache records are stored in the 'WebCacheV01.dat' ESE database, within the 'Content' containers. The cached files are stored as separate files in locations specified within the ESE database.

Cookies
Internet Explorer Cookie records are stored in the 'WebCacheV01.dat' ESE database, within the 'Cookies' containers. The cookie files are stored as separate files in locations specified within the ESE database.

Downloads
Internet Explorer Downloads are stored in the 'WebCacheV01.dat' ESE database, within the 'iedownload' containers.

Session Data
Internet Explorer Session Data is stored in a number of .dat files within the 'Recovery' folder.

Website Visits
Internet Explorer Website Visits are stored in the 'WebCacheV01.dat' ESE database, within the 'History' containers.

 

C:\Users\chohb\AppData\Local\Microsoft\Windows\WebCache 디렉터리
2020-03-10  오전 09:50       297,795,584 WebCacheV01.dat   <- Windows EDB(Extensible Storage Engine DB) Format
2020-03-10  오전 09:48            16,384 WebCacheV01.jfm

 

분석

F:\>forecopy.exe -f C:\Users\chohb\AppData\Local\Microsoft\Windows\WebCache\WebCacheV01.dat f:\test

F:\temp>dir f:\test\WebCacheV01.dat
2020-03-10  오전 10:07       297,795,584 WebCacheV01.dat

 

F:\temp>C:\Windows\SysWOW64\esentutl.exe /mh f:\test\WebCacheV01.dat

F:\temp>C:\Windows\SysWOW64\esentutl.exe /mh f:\test\WebCacheV01.dat | findstr /i /c:"state" 
            State: Dirty Shutdown

 

메타데이터 확인, Dirty Shutdown 상태 확인, 만약 Dirty Shutdown 상태이면 아래 명령으로 Clean Shutdown 상태로 변경

 

F:\temp>C:\Windows\SysWOW64\esentutl.exe /p f:\test\WebCacheV01.dat

F:\temp>C:\Windows\SysWOW64\esentutl.exe /mh f:\test\WebCacheV01.dat | findstr /i /c:"state"
            State: Clean Shutdown


ESEDatabaseView Tool

GUI

<컨테이너 설명>

ㆍ각 정보들은 Container_N 형식의 이를을 가진 테이블에 저장되어 있고 분석 대상 항목별로 각 테이블이 존재한다.
ㆍ각 Container_N 테이블에 저장되는 정보의 종류는 Containers 테이블의 ContainerId 칼럼과 Name 칼럼을 참조
ㆍHistory는 ContainerID 40, 341, 344, 79. 10, 62 등 name 이 history인 ContainerId에 저장

예를 들어 ContainerID 35, History Table 내역이다.

 

CLI

F:\temp>F:\tool\forensic\esedatabaseview\ESEDatabaseView.exe /table "f:\temp\WebCacheV01.dat" * /sxml "f:\test\WebCacheExportIE\webcache_*.xml"

 

내보내기 파일 이름에 '*' 문자를 사용하면 테이블 이름이 Container1 인 경우 내 보낸 파일 이름은 webcache_Container1.csv가 됩니다. 이때 주의할 점은 읽어들이는 WebCache 파일 폴더와 Export 하고자 하는 폴더가 서로 달라야 한다.

 

각 테이블(컨테이너) 설명은 webcache_Containers.??? 파일에 존재한다.
F:\Test\WebCacheExportIE>LogParser.exe -i:xml "select containerid, name, directory from 'F:\Test\WebCacheExportIE\webcache_Containers.xml' [where name like '%download%']"

이 작업은 다소 시간이 걸릴 수 있다. 아래 명령으로 작업 종료 여부를 확인하면 된다.

F:\temp>tasklist |findstr /i /c:"ESEDatabaseView.exe"

F:\temp>dir f:\test\WebCacheExportIE

Connect History

F:\temp>LogParser.exe -i:csv "select containerid, name, extract_token(directory, -2, '\\'), rownumber from 
'F:\Test\WebCacheExportIE\webcache_Containers.csv' where directory like '%History%' order by name "

위에서 하얀색이 Connect History이다. 이에 해당되는 Container_XX(ID) 를 분석하면 된다.

 

F:\temp>LogParser.exe -h -i:xml "f:\test\WebCacheExportIE\webcache_Container_35.xml" -headerRow:on

Fields: <- Field도 당연히 테이블마다 다르다. 조회해야할 컨테이너 번호는 <컨테이너 설명> 참고
  entryid (I)         containerid (I)  cacheid (I)         urlhash (I)  securedirectory (I) filesize (I)     type (I)            flags (I)
  accesscount (I)     synctime (I)     creationtime (I)    expirytime (I)  modifiedtime (I)    accessedtime (I) 

  postchecktime (I)   synccount (I)   exemptiondelta (I)  url (S)          responseheaders (S)

F:\temp>LogParser.exe -i:xml "select accessedtime, url from 'F:\Test\WebCacheExportIE\webcache_Container_35.xml'"

Download Lists

F:\temp>LogParser.exe -i:csv "select containerid, name, extract_token(directory, -2, '\\'), rownumber
from 'F:\Test\WebCacheExportIE\webcache_Containers.csv' where directory like '%download%' order by name "

위에서 하얀색이 Download  이다. 이에 해당되는 Container_XX(ID) 를 분석하면 된다.

F:\temp>LogParser.exe -h -i:xml "f:\test\WebCacheExportIE\webcache_Container_28.xml" -headerRow:on

Fields:
  entryid (I)         containerid (I)  cacheid (I)         urlhash (I)  securedirectory (I) filesize (I)     type (I)            flags (I)
  accesscount (I)     synctime (I)     creationtime (I)    expirytime (I)  modifiedtime (I)    accessedtime (I) 
  postchecktime (I)   synccount (I)   exemptiondelta (I)  url (S)          responseheaders (S)

 

F:\temp>LogParser.exe -i:xml "select accessedtime, url from 'F:\Test\WebCacheExportIE\webcache_Container_28.xml'"
-> 조회해야할 컨테이너 번호는 <컨테이너 설명> 참고
accessedtime       url
------------------ -------------------------------------------------
131605413646823263 iedownload:{64953B9E-FA60-11E7-9BCC-BCAEC53A859B}
131605413718460058 iedownload:{64953B9F-FA60-11E7-9BCC-BCAEC53A859B}
131605413837932764 iedownload:{7195ED56-FA60-11E7-9BCC-BCAEC53A859B}

...... <- Download 내역은 바로 알기가 어렵다. 아래 IE10Analyzer처럼 별도 도구를 이용하여 분석

 

Web Cache
logparser에서 extract_token 함수를 적용하기 위해 Export Format을 csv로 변경
F:\temp>ESEDatabaseView.exe /table "f:\temp\WebCacheV01.dat" * /scomma "f:\test\WebCacheExportIE\webcache_*.csv"  


F:\temp>LogParser.exe -i:csv "select containerid, name, extract_token(directory, -2, '\\'), rownumber, directory from 
'F:\Test\WebCacheExportIE\webcache_Containers.csv' where directory like '%cache%' order by Directory "

위에서 하얀색이 Web Cache 이다. 이에 해당되는 Container_XX(ID) 를 분석하면 된다.

 

Cookies

F:\temp>LogParser.exe -i:csv "select containerid, name, extract_token(directory, -2, '\\'), rownumber from 
'F:\Test\WebCacheExportIE\webcache_Containers.csv' where directory like '%cookie%' order by name "

위에서 하얀색이 Cookie 이다. 이에 해당되는 Container_XX(ID) 를 분석하면 된다.

 

BrowsingHistoryView Tool
Internet Explorer, MicroSoft Edge, Mozilla Firefox, Google Chrome, Opera and Safari 통합 히스토리 분석

GUI

CLI

F:\temp>BrowsingHistoryView.exe /LoadIE 1 /LoadFirefox 0 /LoadSafari 0 /LoadChrome 0 /HistorySource 1 /scomma "f:\test\ie-back.csv"

F:\tool\forensic\browsinghistoryview-x64>dir "f:\test\IE-back.csv" 
2020-03-10  오후 02:05         137,401 IE-back.csv


F:\temp>F:\tool\forensic\LogParser\LogParser.exe -h -i:csv "f:\test\IE-back.csv" -headerRow:on

Fields: 
  Filename (S)    RowNumber (I)    URL (S)          Title (S) 
  Visit Time (S)  Visit Count (I)  Visited From (S) Visit Type (S) 
  Web Browser (S) History File (S) User Profile (S) Browser Profile (S) 
  URL Length (I)  Typed Count (I)  Record ID (I) 

F:\temp>F:\tool\forensic\LogParser\LogParser.exe -i:csv -iDQuotes:auto "select * from 'f:\test\IE-back.csv'"

<참고>

Visit Type 값은 없다

 

IE10Analyzer Tool

<참고>

기타 분석 항목별 다양한 오픈소스 분석 도구들이 존재한다. 

분석 목적, 분석 방법, 설치 여부(Setup 수행 ? Portable ?), 실행 형태(GUi/CLI ?) 등에 따라 분석 항목별로 2 - 3개의 도구들로 분석하여 Cross Check 해본다.  포렌식 분석 시 대상 시스템에 변화를 주어서는 안된다. 무결성의 문제가 발생한다.

만약 어쩔 수 없다면 시스템 영역이 아닌 별도 사용자 영역에 최소한의 변화만 발생시키도록 한다. 예를 들어 레지스트리를 변경시키는 Setup 설치 도구 보다는 CLI를 지원하는 도구를 USB에서 실행하여 실행 결과를 USB에 저장하는 것이 더 좋은 것이다.

 

<참고>

ESEDatabaseView가 분석할 수 있는 ESE Databases
.  contacts.edb - Stores contacts information in Microsoft live products.
.  WLCalendarStore.edb - Stores calendar information in Microsoft Windows Live Mail.
.  Mail.MSMessageStore - Stores messages information in Microsoft Windows Live Mail.
.  WebCacheV24.dat and WebCacheV01.dat - Stores cache, history, and cookies information in Internet Explorer 10.
.  Mailbox Database.edb and Public Folder Database.edb - Stores mail data in Microsoft Exchange Server.
.  Windows.edb - Stores index information (for Windows search) by Windows operating system.
.  DataStore.edb - Windows updates information (Located under C:\windows\SoftwareDistribution\DataStore )
. spartan.edb - Stores the Favorites of Internet Explorer 10/11. (Stored under

                    %LOCALAPPDATA%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\

                    User\Default\DataStore\Data\nouser1\120712-0049)

 

 

 

반응형