@port139 Blog

基本的にはデジタル・フォレンジックの技術について取り扱っていますが、記載内容には高確率で誤りが含まれる可能性があります。

Jumplist and Clear File Explorer history

Note:I translated Japanese into English using Google Translate.
Thank you, Google. 

Hop Step Jumplist.

Display file 5f7b5f1e01b83767.automaticDestinations-ms with HEX.
Only 'DestList' exists in this file.

f:id:hideakii:20180805162651p:plain

I started explorer and I looked up 4 image files with E: drive.

f:id:hideakii:20180805162911p:plain

Check the contents of the JumpList file. Four records that refer to the image file are displayed.

f:id:hideakii:20180805164519p:plain

Delete the history of Explorer.

f:id:hideakii:20180805163906p:plain

 

Check the contents of the JumpList file. Four records in JumpList have disappeared.

f:id:hideakii:20180805165432p:plain

However, stream data seems to remain in the JumpList file. I have studied the structure of automaticdestinations in past blog.

f:id:hideakii:20180805165732p:plain

Save the range of LNK data as binary and try to parse with LEcmd.

f:id:hideakii:20180805172629p:plain

Carving the Jump List file using Bulk_Extractor 'winlnk' option.

f:id:hideakii:20180805170023p:plain

Two records indicating the JPGE file name have been reported.

f:id:hideakii:20180805171006p:plain

I try Carving by PhotoRec. Change PhotoRec options.

f:id:hideakii:20180805201447p:plain

For geometry options, set the sector size to 1.

f:id:hideakii:20180805201638p:plain

In File Opt setting, only lnk is selected.

f:id:hideakii:20180805201818p:plain

Three files were extracted.

f:id:hideakii:20180805202003p:plain

Validate the restored LNK file.

f:id:hideakii:20180805202432p:plain

File f0003776.lnk is broken, but you can check the link destination.

f:id:hideakii:20180805202920p:plain

Testing environment:Windows 10 1803

Reference URL:

www.hecfblog.com

port139.hatenablog.com

http://www.mitec.cz/ssv.html

articles.forensicfocus.com

f:id:hideakii:20180805155622p:plain

Jumplist and File copy

Note:I translated Japanese into English using Google Translate.
Thank you, Google.

I did not know about the artifacts in the Jumplist mentioned below. 

http://www.hecfblog.com/2018/07/daily-blog-426-directory-copy-and-paste.html

So new as of at least Windows 10 (this needs to be tested on Windows 7 and Windows 8) there is a now a jumplist that is capturing the full path of every directory that is copy and pasted.

Let's try it.
The copy source folder C:\Pictures has three JPEG image files.

f:id:hideakii:20180729203941p:plain

Delete all files in AutomaticDestinations folder.

f:id:hideakii:20180729195253p:plain

 Using Explorer, copy the C:\Picture folder to E:\.

f:id:hideakii:20180729195653p:plain

When you execute copy, you can see that two files were created.  

f:id:hideakii:20180729195849p:plain

I refer to these contents by using JumpListExplorer. (I took a copy and confirmed it later.)

f01b4d95cf55d32a.automaticDestinations-ms has no related information.

f:id:hideakii:20180729202241p:plain

5f7b5f1e01b83767.automaticDestinations-ms contains information on the C:\Pictures folder. 
I deleted the file and then operated it, but I noticed that it contains the data before deleting it. 

f:id:hideakii:20180729202444p:plain

Paste the C:\Pictures folder into E:\.

f:id:hideakii:20180729200129p:plain

 Check the contents of the JumpList file. Records of the E:\Pictures folder have been added to f01b4d95cf55d32a.automaticDestinations-ms.

f:id:hideakii:20180729204535p:plain

 5f7b5f1e01b83767.automaticDestinations-ms There is no change in the contents of the file.

f:id:hideakii:20180729205055p:plain

Open Example2.jpg under the E:\Pictures folder. 

f:id:hideakii:20180729205945p:plain

How will JumpList change?

f01b4d95cf55d32a.automaticDestinations-ms

f:id:hideakii:20180729210213p:plain

5f7b5f1e01b83767.automaticDestinations-ms

f:id:hideakii:20180729210324p:plain

The record of Example 2.jpg was added to the 5f7b5f1e01b83767.automaticDestinations-ms file.

It's an interesting file.

HM, I feel that I need to do a bit more testing.

 

<2018/07/31 add>

 

</add>

 

ps

Unfortunately I am not familiar with content that Google Translate can not use.
That is why I appreciate being posted on the blog.

 

Reference URL:

www.hecfblog.com

https://www.syntricate.com/files/computer-forensics/WINDOWS%2010%20ARTIFACT%20LIST.pdf

f:id:hideakii:20180729211616p:plain

NTFS $REPARSE_POINT and Symbolic link(2)

 Note:I translated Japanese into English using Google Translate.
Thank you, Google.

Last week I checked the symbolic link using the mklink command.  The Symbolic link reparse data has a field of Print name, but the mklink command can not set the Print name.

Using CreateNtfsSymlink included in symboliclink-testing-tools, you can specify Print name.

Without specifying Print name, create a symbolic link and check the result. AS a result of the DIR command, the contents of <SYMLINK> shows [example.png].

f:id:hideakii:20180722094325p:plain

Next, specify the Print name and create a symbolic link. The reference destination information of <SIMLINK> is test_print_name, it is not the information of the destination.

f:id:hideakii:20180722094758p:plain

The FILE record number is 58.
By the way, Reparse Point is displayed in Flags of $ SIA. I did not notice it last week.

f:id:hideakii:20180722095724p:plain

Look at offset 59392 in $ MFT.

f:id:hideakii:20180722100321p:plain

0C 00 00 A0 Reparse point tag ⇒ Symbolic link
4C 00 Reparse data size ⇒ 76
00 00 Reserved
00 00 Substitute name offset ⇒ 00
1E 00 Substitute name size ⇒ 30
20 00 Print name offset ⇒ 32
1E 00 Print name size ⇒ 30
00 00 00 00 Symbolic link flags
5C003F003F005C006500780061006D0070006C0065002E0070006E006700 \??\example.png
0000
74006500730074005F007000720069006E0074005F006E0061006D006500 test_print_name 

Let's create Junction or mount point reparse data. If Print name is not specified, the link destination is displayed. 

f:id:hideakii:20180722101718p:plain

Create the mount point by specifying Print name.

f:id:hideakii:20180722102301p:plain

f:id:hideakii:20180722103722p:plain

Using MFTECmd Version 0.2.9.1, confirm the parsing result of $MFT.

f:id:hideakii:20180722103345p:plain

 

Sample VHD Disk.

Reference URL:

tyranidslair.blogspot.com

 

github.com

A simple way to access Shadow Copies in Vista – Antimail

f:id:hideakii:20180721133936p:plain

NTFS $REPARSE_POINT and Symbolic link

Note:I translated Japanese into English using Google Translate.
Thank you, Google.

Today, I would like to confirm the NTFS symbolic link.
Copy the JPEG file to the sample VHD Disk.

f:id:hideakii:20180716073732p:plain

Use the mklink command for this JPEG file to create a symbolic link.
The link name is exempl.jpg.

f:id:hideakii:20180716073949p:plain

When browsed from the explorer, it can be identified by the icon image.

f:id:hideakii:20180716074218p:plain

Use Autopsy to browse this volume. It seems difficult to identify a symbolic link from the file list.

f:id:hideakii:20180716074639p:plain

You can find $REPARSE_POINT in the Attributes field.

f:id:hideakii:20180716075054p:plain

Let's look at $REPARSE_POINT (0xC0) in the FILE record.
Display offset 44032 in $ MFT. The range enclosed in red color starting from 0xC0 is $REPARSE_POINT.

f:id:hideakii:20180716075936p:plain

The range of 0C0000A0 enclosed in light blue is Reparse point tag. 0xa000000c means Symbolic link.

0C 00 00 A0 Reparse point tag ⇒ Symbolic link
34 00 Reparse data size ⇒ 52
00 00 Reserved
14 00 Substitute name offset ⇒ 20
14 00 Substitute name size ⇒ 20
00 00 Print name offset
14 00 Print name size ⇒ 20
01 00 00 00 Symbolic link flags
730061006D0070006C0065002E006A0070006700 sample.jpg
730061006D0070006C0065002E006A0070006700 sample.jpg
00000000

 Using MFTECmd is simpler than visual inspection. 

f:id:hideakii:20180716083133p:plain

 I do not know what "g" means....Interesting....The character at the end of the file is at the beginning.

<2018/07/17 add >

 </add>

 

Delete sample.jpg and overwrite the FILE record.

f:id:hideakii:20180716084734p:plain 

f:id:hideakii:20180716084937p:plain

By creating sample.txt, sample.jpg can not be confirmed.
If you use MFTECmd, you can find example.jpg with the value of ReparseTarget.

f:id:hideakii:20180716090052p:plain

When you find a symbolic link, let's check the reference.

 

Sample VHD Disk.

 

Reference URL:

github.com

Local Privilege Escalation in Emsisoft Anti-Malware by abusing NTFS Directory Junctions #AVGater » #bogner.sh

 

f:id:hideakii:20180716072237j:plain

$ATTRIBUTE_LIST and deleted record

Note:I translated Japanese into English using Google Translate.

Thank you, Google.

I will use the sample VHD Disk created last week.

$ATTRIBUTE_LIST of FILE record 39 is as follows. Several $FILE_NAME saved in FILE record number 40.

f:id:hideakii:20180706073154p:plain

Filename00000001.txt is saved in FILE record number 40. At the end of this FILE record, the $DATA attribute is stored.

f:id:hideakii:20180706073811p:plain

 Delete filename00000001.txt and confirm the FILE record 40.

f:id:hideakii:20180706074121p:plain

f:id:hideakii:20180706074327p:plain

You can check the character string of filename00000001.txt with Slack of FILE record number 40.
However, since only one $FILE_NAME attribute has been deleted, we can not find filename00000001.txt as a deleted file.

f:id:hideakii:20180706074744p:plain

Is it possible to delete two FILE records referenced by $ATTRIBUTE_LIST at the same time? I'd like to verify whether an inconsistency occurs due to deleting and overwriting the FILE record referenced by $ATTRIBUTE_LIST.

To test another scenario, return the VHD disk to its original state.
Delete all files.

f:id:hideakii:20180706152006p:plain

 Let's check the state after deletion....Unfortunately, it was different from what I expected.

f:id:hideakii:20180706162326p:plain

Is it the result of the Del command sequentially deleting files? , Only filename 00000007.txt file will be displayed.

I will try another method.

f:id:hideakii:20180706170328p:plain

Check the status of $ATTRIBUTE_LIST.
FILE records 40 and 41 are used.

f:id:hideakii:20180706170615p:plain

Delete folder1.

f:id:hideakii:20180706164259p:plain

The following figure is the result I was expecting.....Aaaa, I misunderstood the result.

f:id:hideakii:20180706165550p:plain

The above figure contained $I30 parsing result. When referenced by other tools, only filename0000007.txt is displayed in the deleted file.

f:id:hideakii:20180707070929p:plain

I have created another VHD disk.
$SIA of filename00000006.txt is stored in FILE record 39, and $FILE_NAME is stored in FILE record 40.

f:id:hideakii:20180707073345p:plain

Create a new file and overwrite the FILE record 39.

f:id:hideakii:20180707073533p:plain

FILE record 40 remains, but Autopsy can not refer to filename00000006.txt.

f:id:hideakii:20180707073925p:plain

Export $MFT and parse it with fte tool. I can find filename00000006.txt. Thank you fte, I wanted to confirm this result.

f:id:hideakii:20180707074236p:plain

Sample VHD disk(Atrribute8).

 

Overwrite the FILE record with another pattern.

f:id:hideakii:20180707075225p:plain

$SIA is stored in FILE record 40, $FILE_NAME is stored in FILE record 39.

f:id:hideakii:20180707075524p:plain

Delete files other than filename00000001.txt.

f:id:hideakii:20180707075643p:plain

f:id:hideakii:20180707075747p:plain

Create a file and overwrite the FILE record 39. $SIA is in FILE record 40, but $FILE_NAME does not exist. Some tools do not display $SIA in FILE record 40.

Does your favorite tool display $SIA of FILE record 40?

f:id:hideakii:20180707080151p:plain

 Sample VHD disk(Atrribute9).

 

Well, how do I visualize the FILE record 40?
For example, there is a way to use Plas MFT parser.

>log2timeline.exe --parsers mft --artifact_filters NTFSMFTFiles c:\case\mft.plaso c:\case\Atrribute9.vhd

>psort -o l2tcsv -w c:\case\mft_timeline.csv c:\case\mft.plaso

FILE Record 40 $SIA was confirmed.

f:id:hideakii:20180707112309p:plain

 

by the way,
 Google Translate shows multiple candidates for a single word, but suffers from choosing which one is right. For example, check and confirm.

 

Reference URL:

http://www.kazamiya.net/en/fte

 

f:id:hideakii:20180707085502j:plain

 

$MFT と $ATTRIBUTE_LIST

Note:
For experimental purposes, I use Google Translate to convert Blog to English.Unfortunately, I do not know whether it was translated into an appropriate English expression.

Please let me know if there is a more appropriate expression.

 There are many tools to parse $MFT, but the processing result of $ATTRIBUTE_LIST varies depending on the tool.
I would like to confirm about $ATTRIBUTE_LIST.

Create a test file in the sample VHD disk.

f:id:hideakii:20180701125141p:plain

Use the fsutil command to create several hard links.By executing the following command, the attribute will not fit all in one FILE record.

f:id:hideakii:20180701125757p:plain

In the $MFT file, reference the FILE record of Filename 00000001.txt.
You can see that there is a $ ATTRIBUTE_LIST (0x20) attribute in the FILE record.
In the example below, this attribute is Resident.

f:id:hideakii:20180701130345p:plain

When you refer to the same file with Autopsy, it becomes as follows.
The MFT record number of Filename 00000001.txt is 39. In addition, you can check that this file is using record number 40 as well.
(Type 48 (0x30) is the $FILE_NAME attribute.)

f:id:hideakii:20180701130724p:plain

Reference record number 40 in the $ MFT file.
"File reference to the base FILE record" indicates 39 (0x27).

f:id:hideakii:20180701133104p:plain

When parsing this $MFT file with fte tool, it becomes as follows.
The $FILE_NAME attribute stored in record number 40 is also displayed.

f:id:hideakii:20180701131418p:plain

The result of parsing the same $MFT file with MFTECmd is as follows.

f:id:hideakii:20180701133943p:plain

Both tools display seven sample files. 

However, when parsing the $MFT file, depending on the tool, all file names are not displayed due to $ATTRIBUTE_LIST.

 

<Added 2018/7/3>

There are several tools affected by $ATTRIBUTE_LIST. One example is Plaso MFT parser.

I will try parsing $MFT using the MFT parser of plaso-20180630.

Artifacts filter is available in Plaso-20180630. I'm not familiar with it yet, but it's a very interesting feature.

c:\case\plaso-20180630-amd64>log2timeline.exe --parsers mft --artifact_filters NTFSMFTFiles c:\case\mft.plaso c:\case\Atrribute1.vhd

f:id:hideakii:20180703182738p:plain

Use the psort command to output the timeline in l2tcsv format.

f:id:hideakii:20180703183456p:plain

You can find file names 2 and 7, but you can not find file names 1, 3, 4, 5, and 6.

f:id:hideakii:20180703183555p:plain

</Added>

 

Sample VHD file.

 

By the way, I did not know that the fsutil command has a layout option.

The Layout option seems to be available from Win 10 ver 1803.

f:id:hideakii:20180701160459p:plain

参考URL:

flatcap.org

github.com

binaryforay.blogspot.com

f:id:hideakii:20180701124616j:plain

MFTECmd と $EA

NTFSの$MFTファイルをパースするツール”MFTECmd”をEricさんがリリースしています。素晴らしいツールをありがとうございます!

<2018/6/27 Add>v0.2.6.0がリリースされています</add>

 

 セキュリティキャンプ2018でE6トラックを選択する若者達には、ぜひ調査で利用していただきたいツールです。

初めて利用するので、ツール利用方法の確認と、$EA属性が確認できるかを見てみます。

まず、サンプルの画像ファイルを準備します。 ファイルサイズは33.2KBです。

f:id:hideakii:20180623093110p:plain

この画像ファイルを、EaToolsを利用してNTFSの$EA属性へ保存します。 

f:id:hideakii:20180623094354p:plain

$MFTでFILEレコードを確認します。$EA属性が追加されている事を確認できます。

f:id:hideakii:20180623100551p:plain

DataRunの値から、クラスタ2009にデータが保存されている事が分かります。

Autopsy 4.7.0でも確認してみます。ストリームの名前が確認できないようですが、データが存在する事は識別できます。

f:id:hideakii:20180623102312p:plain

 

$MFTファイルをエクスポートし、MFTECmd 0.2.5.0でパースします。

f:id:hideakii:20180623095007p:plain

結果を確認します。SiFlags値が数字?

f:id:hideakii:20180623095439p:plain

<6/24 added>

SiFlags値が262176となっていました、$SI を参照すると下記の状態になっています。

f:id:hideakii:20180624073615p:plain

00 04 00 20

File attribute flagsを参照すると0x00000020 FILE_ATTRIBUTE_ARCHIVEは確認できますが、04 00 00は記載がありません。PowerMftの説明では、ea = 0x00040000となっていますね。

 

次のリリースではHasEAフラグが登場ということです。これは便利です!

 

 --deオプションを利用すれば、EA属性を確認できる事に気が付いていませんでした。

f:id:hideakii:20180624071426p:plain

MFTECmd.exe -f c:\case\MFT\$MFT --de 39-1

f:id:hideakii:20180624071639p:plain

 次のバージョンでは下記のようになるそうです。楽しみですね!

</added> 

 

もしかすると、私だけかもしれませんが、属性一覧と、DataRun値のパース結果が、MFTECmdの出力結果に含まれていると便利ではないでしょうか。

 

※上記で作成したサンプルVHDディスク  

 

参考URL:

  

binaryforay.blogspot.com

github.com

github.com

f:id:hideakii:20180623092515j:plain

ActivitiesCache.dbとアクティビティ削除(3)

先週の続きです。

OSの日付を6月25日へ変更し、レコード削除を発生させます。

f:id:hideakii:20180610093550p:plain

OSを再起動し、-wal ファイルがActivitiesCache.dbへ反映された状態にします。

f:id:hideakii:20180610094210p:plain

ActivitiesCache.dbファイルをHEXで参照し、ファイル名を検索してみます。

DeleteSample.jpgを発見できます。

f:id:hideakii:20180610094732p:plain

 更に古い情報もまだ残っていますね。

f:id:hideakii:20180610100929p:plain

 さて、これらの削除レコードを復元するにはどうするのが良いでしょうか?

削除レコードを復元できるツールは幾つかありますので、今後色々と試してみたいと思います。

f:id:hideakii:20180610102943p:plain

 

 

参考URL:

SQLite database format - ForensicsWiki

 

github.com

 

sandersonforensics.com

 

f:id:hideakii:20180610093502j:plain

ActivitiesCache.dbとアクティビティ削除(2)

先週の続きです。

テスト環境は先週からずっとシャットダウンしていましたので、先ほど起動しました。

アクティビティの状態を確認します、アクティビティには何も表示されません。

f:id:hideakii:20180602080838p:plain

ActivitiesCache.dbファイルをエクスポートします。
ActivitiesCache.dbファイルの最終更新日時は5月26日のままです。(-walファイルは現在の日付)

f:id:hideakii:20180602081157p:plain

ジャーナルを含めてActivitiesCache.dbファイルを参照します。

最初に、Activityテーブルを参照します。38番レコードが、先週削除したサンプルですが、レコード内容を確認できます。 

f:id:hideakii:20180602082148p:plain

 ActivityOperationテーブルも同様に確認すると、レコードを確認できます。

f:id:hideakii:20180602082613p:plain

 日付を変更してから、OS[を再起動します。(ExpirationTime⇒1529875249⇒Mon, 25 June 2018 06:20:49 +0900)

f:id:hideakii:20180602083022p:plain

ActivitiesCache.dbファイルをエクスポートし、ジャーナルを含めて参照します。

この日時では、レコードが削除されている事を確認できます。

f:id:hideakii:20180602084834p:plain

テストファイルのタイムスタンプを確認します、ジャーナルだけが新しい日付です。

f:id:hideakii:20180602085334p:plain

 ジャーナルファイルを削除し、ActivitiesCache.dbファイルだけを参照してみます。

削除前のレコードを確認できます。 

f:id:hideakii:20180602085525p:plain

ジャーナルが反映されていない状況では、ジャーナル無しでファイルを参照する必要がありますね。

削除レコードの復元が可能かは確認していません。

参考URL:

 Write-Ahead Logging

 

f:id:hideakii:20180602080608j:plain

ActivitiesCache.dbとアクティビティ削除

アクティビティを削除し、ActivitiesCache.db内でどのような変化が発生するかを確認します。テスト環境は Win 10 1803 です。

 サンプルのJPEG画像ファイルを参照し、アクティビティを作成します。

f:id:hideakii:20180526062232p:plain

Activityテーブルでレコードを確認します。38番レコードにJPEG画像ファイルの情報があります。

f:id:hideakii:20180526063200p:plain

アクティビティから項目を削除します。

f:id:hideakii:20180526063510p:plain

 Activityテーブルで38番レコードを再度確認します。(ジャーナルファイルを含めてデータベースファイルを参照)

f:id:hideakii:20180526063959p:plain

レコードが残っており、情報を確認する事ができます。

また、ActivityOperationテーブルに、レコードが追加されている事を確認できます。

f:id:hideakii:20180526065029p:plain

ActivityOperationテーブルには、OperationTypeというカラムがあります。3は削除操作という意味でしょうか?

f:id:hideakii:20180526065723p:plain

アクティビティを一つ削除しましたが、このテーブルには2つのレコードが登録されています。

また、これら2件のレコードについては、Etag値はActivityテーブルとActivityOperationテーブルで異なるようです。

先週テストしたアクティビティのデータを削除してみます。

f:id:hideakii:20180526070643p:plain

 

f:id:hideakii:20180526070728p:plain

Activityテーブルでは、削除したアクティビティに関する情報を確認できます。

f:id:hideakii:20180526071318p:plain

 ActivityOperationテーブルを確認します。AppActivityIdは同じですが、ActivityType 6のレコードだけが追加されています。ActivityType 5 のレコードは追加されていません。

f:id:hideakii:20180526071751p:plain

いずれのレコードも、OperationTypeは3になっています。

 

これらのレコードが本当に削除されるのは何時でしょうか?

 

参考URL:

 

 

f:id:hideakii:20180526061902j:plain