Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 24.04 #124

Draft
wants to merge 71 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
16e3b8b
fix(cast): support 24.04 in config
ekristen Jan 10, 2025
d03f763
fix(package/exfat): remove focal support
ekristen Jan 10, 2025
6b2a151
fix(config): remove salt-minion, salt is onedir installed, not an issue
ekristen Jan 10, 2025
ee8a6b1
fix: tests
ekristen Jan 10, 2025
94a9de1
fix(scripts/docker-compose): [email protected] with ARM64 support
ekristen Jan 10, 2025
d787e74
Update defang with virtualenv
digitalsleuth Jan 12, 2025
66cb7ba
Add header documentation
digitalsleuth Jan 12, 2025
7f42c0d
Update analyzemft to use a Virtualenv, point to new repo using python 3
digitalsleuth Jan 13, 2025
01957cf
Merge pull request #127 from digitalsleuth/analyzemft_24
ekristen Jan 14, 2025
65f63ed
Merge pull request #125 from digitalsleuth/support-24.04
ekristen Jan 14, 2025
eab2839
Update bless for 24
digitalsleuth Jan 17, 2025
3014b8e
Merge pull request #130 from digitalsleuth/bless_24
ekristen Jan 17, 2025
8dca764
Update cryptcat for 24
digitalsleuth Jan 17, 2025
aea3700
Remove flasm to support 24 - not available on Jammy or Noble
digitalsleuth Jan 19, 2025
cf8f491
Remove knocker to support 24 - not available on Jammy or Noble
digitalsleuth Jan 19, 2025
0d02512
Update libafflib for 24
digitalsleuth Jan 19, 2025
775dd5d
Update libext2fs2 for 24
digitalsleuth Jan 19, 2025
9eb2023
Update libncurses for 24
digitalsleuth Jan 19, 2025
fa32b6c
Update libpff states for 24
digitalsleuth Jan 19, 2025
60e5549
Update netcat for 24
digitalsleuth Jan 19, 2025
e7ecd37
Update libicu for 24
digitalsleuth Jan 20, 2025
c1e6d80
Update PowerShell for 24
digitalsleuth Jan 20, 2025
3a27f04
Update qemu for 24
digitalsleuth Jan 20, 2025
308af62
Update ioc_writer for 24
digitalsleuth Jan 20, 2025
4d8a4e7
Add mac-apt and ensure support for 24
digitalsleuth Jan 20, 2025
bef1478
Update machinae for 24
digitalsleuth Jan 21, 2025
e0d6d45
Update init for mac-apt
digitalsleuth Jan 21, 2025
5b78ac3
Merge pull request #133 from digitalsleuth/cryptcat_24
ekristen Jan 21, 2025
ec1da94
Merge pull request #134 from digitalsleuth/flasm_24
ekristen Jan 21, 2025
fd43421
Merge pull request #135 from digitalsleuth/knocker_24
ekristen Jan 21, 2025
bb5bbe9
Merge pull request #138 from digitalsleuth/libncurses_24
ekristen Jan 21, 2025
a7cad91
Merge pull request #140 from digitalsleuth/netcat_24
ekristen Jan 21, 2025
294567d
Merge pull request #143 from digitalsleuth/qemu_24
ekristen Jan 21, 2025
5ea1510
Update state to have package names dependent on OS, but state title r…
digitalsleuth Jan 21, 2025
0e17b67
Merge pull request #145 from digitalsleuth/ioc_writer_24
ekristen Jan 22, 2025
ca1a8c3
Merge pull request #136 from digitalsleuth/libafflib_24
ekristen Jan 22, 2025
5636102
Merge pull request #142 from digitalsleuth/powershell_24
ekristen Jan 22, 2025
dbaa656
Merge pull request #149 from digitalsleuth/machinae_24
ekristen Jan 22, 2025
e9f94f2
Update dotnet and zimmerman state
digitalsleuth Jan 22, 2025
335d59a
Update libbz2-dev and zlib1g-dev
digitalsleuth Jan 22, 2025
12df4d8
Fix the naming structure for libicu
digitalsleuth Jan 22, 2025
1ee3962
Add dotnet-backports repo and support for dotnet9 zimmerman tools
digitalsleuth Jan 22, 2025
6aaffa8
Merge pull request #141 from digitalsleuth/libicu_24
ekristen Jan 22, 2025
a96588e
Merge pull request #148 from digitalsleuth/mac_apt_24
ekristen Jan 22, 2025
b9d294f
Merge pull request #153 from digitalsleuth/zimmerman_24
ekristen Jan 22, 2025
bfce77d
Fix package style for libpff
digitalsleuth Jan 22, 2025
6b5e6c2
Update package style for libext2fs2
digitalsleuth Jan 22, 2025
f6280d2
Merge pull request #137 from digitalsleuth/libext2fs2_24
ekristen Jan 22, 2025
61720f8
Merge pull request #139 from digitalsleuth/libpff_24
ekristen Jan 22, 2025
6c9f3bd
Update python-evtx for 24
digitalsleuth Jan 22, 2025
2f318da
Add git requirement
digitalsleuth Jan 22, 2025
2fcbe5f
Merge pull request #157 from digitalsleuth/python_evtx_24
ekristen Jan 22, 2025
3892075
Update amcache script for 24
digitalsleuth Jan 22, 2025
93d630e
Replace parseusn with usnparser, update for 24
digitalsleuth Jan 24, 2025
aa38b8e
Removed python 2 usnparser
digitalsleuth Jan 24, 2025
82988a0
Merge pull request #162 from digitalsleuth/usnparser_24
ekristen Jan 24, 2025
cdb98ef
Merge pull request #160 from digitalsleuth/amcache_24
ekristen Jan 24, 2025
5283960
Update windowsprefetch for 24 (#164)
digitalsleuth Jan 24, 2025
6cc73bd
Update usbdeviceforensics for 24 (#161)
digitalsleuth Jan 24, 2025
22cfcac
Update stix-validator for 24 (#159)
digitalsleuth Jan 24, 2025
96d6b4e
Update sqlite-carver (sqlparser) for 24 (#158)
digitalsleuth Jan 24, 2025
c7a21b4
Update hindsight for 24 (#156)
digitalsleuth Jan 24, 2025
e1b8f2c
Update pe-scanner for 24 (#155)
digitalsleuth Jan 24, 2025
772df57
Update pe-carver for 24 (#154)
digitalsleuth Jan 24, 2025
9cd9f0c
Update packerid for 24 (#150)
digitalsleuth Jan 24, 2025
55b223d
Remove sqlite_miner to support 24 (#170)
digitalsleuth Jan 29, 2025
c80d468
Update regripper for 24 (#169)
digitalsleuth Jan 29, 2025
153c83f
Remove plutil to support 24 (#168)
digitalsleuth Jan 29, 2025
31b61a4
Removes dumbpig to support 24 (#167)
digitalsleuth Jan 29, 2025
ef6dc08
Update docker compose for 24 (#166)
digitalsleuth Jan 29, 2025
ee7e901
Remove afterglow to support 24 (#165)
digitalsleuth Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ manifest:
deprecated: true
replacement: desktop
supported_os:
- id: ubuntu
release: 20.04
- id: ubuntu
release: 22.04
- id: ubuntu
release: 24.04
saltstack:
pillars:
sift_user_template: "{{ .User }}"
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ on:
push:
branches:
- master
- main
- next
pull_request:
branches:
- master
- main
- next

jobs:
Expand All @@ -29,18 +32,18 @@ jobs:
if: ${{ needs.changed_states.outputs.matrix != '[]' }}
strategy:
matrix:
salt: [3006, 3007]
os: [20.04, 22.04]
salt: [3007, 3006]
os: [22.04, 24.04]
state: ${{ fromJson(needs.changed_states.outputs.matrix) }}
include:
- os: 20.04
code: focal
- os: 24.04
code: noble
- os: 22.04
code: jammy
container:
image: docker://ghcr.io/ekristen/cast-tools/saltstack-tester:${{ matrix.code }}-${{ matrix.salt }}
image: docker://ghcr.io/ekristen/cast-tools/saltstack-tester:${{ matrix.os }}-${{ matrix.salt }}
steps:
- uses: actions/checkout@v4
- name: test-state
run: |
salt-call -l info --file-root . --local --retcode-passthrough --state-output=mixed state.sls ${{ matrix.state }} pillar="{sift_user: root}"
salt-call --local -l info --file-root . --retcode-passthrough --state-output=mixed state.sls ${{ matrix.state }} pillar="{sift_user: root}"
2 changes: 0 additions & 2 deletions sift/config/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include:
- sift.config.user
- sift.config.timezone
- sift.config.folders
- sift.config.salt-minion
- sift.config.samba
- sift.config.tools

Expand All @@ -15,7 +14,6 @@ sift-config:
- sls: sift.config.user
- sls: sift.config.timezone
- sls: sift.config.folders
- sls: sift.config.salt-minion
- sls: sift.config.samba
- sls: sift.config.tools

4 changes: 0 additions & 4 deletions sift/config/salt-minion.sls

This file was deleted.

226 changes: 226 additions & 0 deletions sift/files/amcache/amcache.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
#!/usr/bin/env python3
# This file is part of python-registry.
#
# Copyright 2015 Will Ballenthin <[email protected]>
# while at Mandiant <http://www.mandiant.com>Exe
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import logging
import datetime
from collections import namedtuple

import argparse
import csv
from Registry import Registry
from Registry.RegistryParse import parse_windows_timestamp as _parse_windows_timestamp


g_logger = logging.getLogger("amcache")
Field = namedtuple("Field", ["name", "getter"])


def make_value_getter(value_name):
""" return a function that fetches the value from the registry key """
def _value_getter(key):
try:
return key.value(value_name).value()
except Registry.RegistryValueNotFoundException:
return None
return _value_getter


def make_windows_timestamp_value_getter(value_name):
"""
return a function that fetches the value from the registry key
as a Windows timestamp.
"""
f = make_value_getter(value_name)
def _value_getter(key):
try:
return parse_windows_timestamp(f(key) or 0)
except ValueError:
return datetime.datetime.min
return _value_getter


def parse_unix_timestamp(qword):
return datetime.datetime.fromtimestamp(qword)


def parse_windows_timestamp(qword):
try:
return _parse_windows_timestamp(qword)
except ValueError:
return datetime.datetime.min


def make_unix_timestamp_value_getter(value_name):
"""
return a function that fetches the value from the registry key
as a UNIX timestamp.
"""
f = make_value_getter(value_name)
def _value_getter(key):
try:
return parse_unix_timestamp(f(key) or 0)
except ValueError:
return datetime.datetime.min
return _value_getter


UNIX_TIMESTAMP_ZERO = parse_unix_timestamp(0)
WINDOWS_TIMESTAMP_ZERO = parse_windows_timestamp(0)


# via: http://www.swiftforensics.com/2013/12/amcachehve-in-windows-8-goldmine-for.html
#Product Name UNICODE string
#==============================================================================
#0 Product Name UNICODE string
#1 Company Name UNICODE string
#2 File version number only UNICODE string
#3 Language code (1033 for en-US) DWORD
#4 SwitchBackContext QWORD
#5 File Version UNICODE string
#6 File Size (in bytes) DWORD
#7 PE Header field - SizeOfImage DWORD
#8 Hash of PE Header (unknown algorithm) UNICODE string
#9 PE Header field - Checksum DWORD
#a Unknown QWORD
#b Unknown QWORD
#c File Description UNICODE string
#d Unknown, maybe Major & Minor OS version DWORD
#f Linker (Compile time) Timestamp DWORD - Unix time
#10 Unknown DWORD
#11 Last Modified Timestamp FILETIME
#12 Created Timestamp FILETIME
#15 Full path to file UNICODE string
#16 Unknown DWORD
#17 Last Modified Timestamp 2 FILETIME
#100 Program ID UNICODE string
#101 SHA1 hash of file


# note: order here implicitly orders CSV column ordering cause I'm lazy
FIELDS = [
Field("path", make_value_getter("15")),
Field("sha1", make_value_getter("101")),
Field("size", make_value_getter("6")),
Field("file_description", make_value_getter("c")),
Field("source_key_timestamp", lambda key: key.timestamp()),
Field("created_timestamp", make_windows_timestamp_value_getter("12")),
Field("modified_timestamp", make_windows_timestamp_value_getter("11")),
Field("modified_timestamp2", make_windows_timestamp_value_getter("17")),
Field("linker_timestamp", make_unix_timestamp_value_getter("f")),
Field("product", make_value_getter("0")),
Field("company", make_value_getter("1")),
Field("pe_sizeofimage", make_value_getter("7")),
Field("version_number", make_value_getter("2")),
Field("version", make_value_getter("5")),
Field("language", make_value_getter("3")),
Field("header_hash", make_value_getter("8")),
Field("pe_checksum", make_value_getter("9")),
Field("id", make_value_getter("100")),
Field("switchbackcontext", make_value_getter("4")),
]


ExecutionEntry = namedtuple("ExecutionEntry", map(lambda e: e.name, FIELDS))


def parse_execution_entry(key):
return ExecutionEntry(**dict((e.name, e.getter(key)) for e in FIELDS))



class NotAnAmcacheHive(Exception):
pass


def parse_execution_entries(registry):
try:
volumes = registry.open("Root\\File")
except Registry.RegistryKeyNotFoundException:
raise NotAnAmcacheHive()
ret = []
for volumekey in volumes.subkeys():
for filekey in volumekey.subkeys():
ret.append(parse_execution_entry(filekey))
return ret


TimelineEntry = namedtuple("TimelineEntry", ["timestamp", "type", "entry"])


def main():

parser = argparse.ArgumentParser(
description="Parse program execution entries from the Amcache.hve Registry hive")
parser.add_argument("registry_hive", type=str,
help="Path to the Amcache.hve hive to process")
parser.add_argument("-v", action="store_true", dest="verbose",
help="Enable verbose output")
parser.add_argument("-t", action="store_true", dest="do_timeline",
help="Output in simple timeline format")

if len(sys.argv[1:]) == 0:
parser.print_help()
parser.exit()

args = parser.parse_args()

if args.verbose:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)

if sys.platform == "win32":
import os, msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)

r = Registry.Registry(args.registry_hive)

try:
ee = parse_execution_entries(r)
except NotAnAmcacheHive:
g_logger.error("doesn't appear to be an Amcache.hve hive")
return

if args.do_timeline:
entries = []
for e in ee:
for t in ["source_key_timestamp", "created_timestamp", "modified_timestamp",
"modified_timestamp2", "linker_timestamp"]:
ts = getattr(e, t)
if ts == UNIX_TIMESTAMP_ZERO:
continue
if ts == WINDOWS_TIMESTAMP_ZERO:
continue
if ts == datetime.datetime.min:
continue

entries.append(TimelineEntry(ts, t, e))
w = csv.writer(sys.stdout, delimiter="|", quotechar="\"", quoting=csv.QUOTE_MINIMAL)
w.writerow(["timestamp", "timestamp_type", "path", "sha1"])
for e in sorted(entries, key=lambda e: e.timestamp):
w.writerow([e.timestamp, e.type, e.entry.path, e.entry.sha1])
else:
w = csv.writer(sys.stdout, delimiter="|", quotechar="\"", quoting=csv.QUOTE_MINIMAL)
w.writerow(map(lambda e: e.name, FIELDS))
for e in ee:
w.writerow(map(lambda i: getattr(e, i.name), FIELDS))


if __name__ == "__main__":
main()
6 changes: 6 additions & 0 deletions sift/packages/bless.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# Author: Alexandros Frantzis
# License: GNU General Public License v2.0 (https://github.com/afrantzis/bless/blob/master/COPYING)
# Notes: bless
# TODO: fix when package is available

{% if grains['oscodename'] != 'noble' %}
bless:
pkg.installed
{% else %}
Bless is not available on Noble:
test.nop
{% endif %}
6 changes: 6 additions & 0 deletions sift/packages/cryptcat.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# Author: http://cryptcat.sourceforge.net/credits.php
# License: GNU General Public License v2.0
# Notes:
# TODO: fix when package available

{% if grains['oscodename'] != 'noble' %}
cryptcat:
pkg.installed
{% else %}
Cryptcat is not available in Noble:
test.nop
{% endif %}
16 changes: 4 additions & 12 deletions sift/packages/dotnet.sls
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{% if grains['oscodename'] == "focal" %}
include:
- sift.repos.microsoft
- sift.repos.dotnet-backports

dotnet6-install:
sift-package-dotnet9:
pkg.installed:
- name: dotnet-sdk-6.0
- name: dotnet-sdk-9.0
- require:
- sls: sift.repos.microsoft

{% elif grains['oscodename'] == "jammy" %}
sift-package-dotnet6:
pkg.installed:
- name: dotnet-sdk-6.0

{% endif %}
- sls: sift.repos.dotnet-backports
16 changes: 9 additions & 7 deletions sift/packages/exfat-extras.sls
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
include:
- sift.packages.exfat-extras_{{ grains['oscodename'] }}
# Name: exfat-utils
# Website: https://github.com/relan/exfat
# Description: Free exFAT File System Implementation
# Category:
# Author: Relan
# License: GNU General Public License v2 (https://github.com/relan/exfat/blob/master/COPYING)
# Notes:

sift-package-exfat-extras-distro:
test.nop:
- name: sift-package-exfat-extras-distro
- require:
- sls: sift.packages.exfat-extras_{{ grains['oscodename'] }}
exfatprogs:
pkg.installed
10 changes: 0 additions & 10 deletions sift/packages/exfat-extras_focal.sls

This file was deleted.

10 changes: 0 additions & 10 deletions sift/packages/exfat-extras_jammy.sls

This file was deleted.

Loading
Loading