forked from Velocidex/velociraptor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow parse_ntfs() to operate on an image file. (Velocidex#1610)
Previously it could only operate on the raw device in live mode.
- Loading branch information
Showing
7 changed files
with
203 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Queries: | ||
# parse_ntfs can use an image file. | ||
- SELECT parse_ntfs( | ||
filename=srcDir+'/artifacts/testdata/files/test.ntfs.dd', | ||
inode="46-128-0").FullPath AS FullPath | ||
FROM scope() | ||
|
||
# Parsing the MFT from a raw image requires extracting it using the | ||
# raw_ntfs accessor because parse_mft() expect an $MFT file to read. | ||
- SELECT * FROM parse_mft( | ||
filename=pathspec( | ||
Path="$MFT", | ||
DelegateAccessor="file", | ||
DelegatePath=srcDir+'/artifacts/testdata/files/test.ntfs.dd'), | ||
accessor="raw_ntfs") | ||
WHERE FullPath =~ "document.txt:goodbye.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
SELECT parse_ntfs( filename=srcDir+'/artifacts/testdata/files/test.ntfs.dd', inode="46-128-0").FullPath AS FullPath FROM scope()[ | ||
{ | ||
"FullPath": "/Folder A/Folder B/Hello world text document.txt" | ||
} | ||
]SELECT * FROM parse_mft( filename=pathspec( Path="$MFT", DelegateAccessor="file", DelegatePath=srcDir+'/artifacts/testdata/files/test.ntfs.dd'), accessor="raw_ntfs") WHERE FullPath =~ "document.txt:goodbye.txt"[ | ||
{ | ||
"EntryNumber": 46, | ||
"SequenceNumber": 1, | ||
"InUse": true, | ||
"ParentEntryNumber": 45, | ||
"ParentSequenceNumber": 1, | ||
"FullPath": "/Folder A/Folder B/Hello world text document.txt:goodbye.txt", | ||
"FileName": "Hello world text document.txt", | ||
"FileNames": [ | ||
"Hello world text document.txt:goodbye.txt" | ||
], | ||
"FileNameTypes": "POSIX", | ||
"FileSize": 12, | ||
"ReferenceCount": 1, | ||
"IsDir": false, | ||
"HasADS": true, | ||
"SI_Lt_FN": false, | ||
"Copied": false, | ||
"SIFlags": "2080 (ARCHIVE,COMPRESSED)", | ||
"Created0x10": "2018-09-24T07:55:29.7664719Z", | ||
"Created0x30": "2018-09-24T07:55:29.7664719Z", | ||
"LastModified0x10": "2018-09-24T07:56:35.3135567Z", | ||
"LastModified0x30": "2018-09-24T07:55:29.7664719Z", | ||
"LastRecordChange0x10": "2018-09-24T07:56:35.3135567Z", | ||
"LastRecordChange0x30": "2018-09-24T07:55:29.7664719Z", | ||
"LastAccess0x10": "2018-09-24T07:56:35.3135567Z", | ||
"LastAccess0x30": "2018-09-24T07:55:29.7664719Z", | ||
"LogFileSeqNum": 1096672 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters