Skip to content

Commit

Permalink
Worked on script to check artifact definitions (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Mar 20, 2022
1 parent 5f29245 commit a5dc58a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
19 changes: 19 additions & 0 deletions artifactsrc/formats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ layout:
- data_type: scca_compressed_file_header
offset: 0
---
name: sqlite
type: format
description: SQLite database file format
attributes:
byte_order: little-endian
layout:
- data_type: sqlite_file_header
offset: 0
---
name: byte
type: integer
attributes:
Expand Down Expand Up @@ -364,3 +373,13 @@ members:
value: "MAM\x04"
- name: uncompressed_data_size
data_type: uint32
---
name: sqlite_file_header
type: structure
description: SQLite database file header
members:
- name: signature
type: stream
element_data_type: byte
elements_data_size: 16
value: "SQLite format 3\x00"
2 changes: 1 addition & 1 deletion artifactsrc/volume_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def ScanForOperatingSystemVolumes(self, source_path, options=None):
if relative_path:
system_directories.append(relative_path.lower())

if system_directories:
if system_directories or len(base_path_specs) == 1:
self._file_system_searcher = file_system_searcher
self._file_system = file_system
self._mount_point = mount_point
Expand Down
14 changes: 13 additions & 1 deletion data/checks.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Artifact checks.
# Artifact definition checks.
---
name: MacOSBluetoothPlistFile
formats: ['binary_plist']
Expand All @@ -21,6 +21,18 @@ formats: ['binary_plist']
name: MacOSLoginWindowPlistFile
formats: ['binary_plist']
---
name: MacOSNotificationCenterSQLiteDatabaseFile
formats: ['sqlite']
---
name: MacOSQuarantineEventsSQLiteDatabaseFile
formats: ['sqlite']
---
name: MacOSRecentItemsPlistFile
formats: ['binary_plist']
---
name: MacOSSidebarListsPlistFile
formats: ['binary_plist']
---
name: MacOSSystemConfigurationPreferencesPlistFile
formats: ['binary_plist']
---
Expand Down

0 comments on commit a5dc58a

Please sign in to comment.