Skip to content

Commit cf8644f

Browse files
authored
Add a get_filesystem_timeline_tsk action.
1 parent 693bba8 commit cf8644f

File tree

19 files changed

+1557
-3
lines changed

19 files changed

+1557
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
- name: 'Install Linux dependencies'
2222
if: ${{ runner.os == 'Linux' }}
2323
run: sudo apt install attr e2fsprogs libfuse-dev
24+
- name: 'Install macOS dependencies'
25+
if: ${{ runner.os == 'macOS' }}
26+
run: brew install autoconf automake libtool
2427
- name: 'Checkout the repository'
2528
uses: actions/checkout@v2
2629
with:
@@ -33,7 +36,7 @@ jobs:
3336
rustc --version
3437
cargo --version
3538
- name: 'Build RRG executable'
36-
run: cargo build
39+
run: cargo build --features 'action-get_filesystem_timeline_tsk'
3740
# TODO: Add a step that runs tests with all action features disabled.
3841
- name: 'Run RRG tests'
39-
run: cargo test --features 'test-chattr test-setfattr test-fuse test-wtmp'
42+
run: cargo test --features 'test-chattr test-setfattr test-fuse test-wtmp action-get_filesystem_timeline_tsk'

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "vendor/sleuthkit"]
2+
path = vendor/sleuthkit
3+
url = https://github.com/sleuthkit/sleuthkit

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ members = [
33
"./crates/ospect",
44
"./crates/rrg",
55
"./crates/rrg-proto",
6+
"./crates/tsk",
7+
"./crates/tsk-sys",
68
"./crates/winreg",
79
"./crates/wmi",
810
]

crates/ospect/src/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ where
189189
}
190190

191191
/// Information about a mounted filesystem.
192-
#[derive(Debug)]
192+
#[derive(Debug, Clone, PartialEq, Eq)]
193193
pub struct Mount {
194194
/// Name of the mounted device.
195195
pub name: String,

crates/rrg-proto/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const PROTOS: &'static [&'static str] = &[
1919
"../../proto/rrg/action/get_file_hash.proto",
2020
"../../proto/rrg/action/get_file_metadata.proto",
2121
"../../proto/rrg/action/get_filesystem_timeline.proto",
22+
"../../proto/rrg/action/get_filesystem_timeline_tsk.proto",
2223
"../../proto/rrg/action/get_system_metadata.proto",
2324
"../../proto/rrg/action/get_tcp_response.proto",
2425
"../../proto/rrg/action/get_winreg_value.proto",

crates/rrg/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ action-get_file_metadata-sha256 = ["action-get_file_metadata", "dep:sha2"]
3636
action-get_file_contents = ["dep:sha2"]
3737
action-grep_file_contents = []
3838
action-get_filesystem_timeline = ["dep:flate2", "dep:sha2"]
39+
action-get_filesystem_timeline_tsk = ["action-get_filesystem_timeline", "dep:tsk"]
3940
action-get_tcp_response = []
4041
action-list_connections = []
4142
action-list_interfaces = []
@@ -65,6 +66,10 @@ path = "../ospect"
6566
[dependencies.rrg-proto]
6667
path = "../rrg-proto"
6768

69+
[dependencies.tsk]
70+
path = "../tsk"
71+
optional = true
72+
6873
[dependencies.winreg]
6974
path = "../winreg"
7075

crates/rrg/src/action.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ pub mod grep_file_contents;
3030
#[cfg(feature = "action-get_filesystem_timeline")]
3131
pub mod get_filesystem_timeline;
3232

33+
#[cfg(feature = "action-get_filesystem_timeline_tsk")]
34+
pub mod get_filesystem_timeline_tsk;
35+
3336
#[cfg(feature = "action-get_tcp_response")]
3437
pub mod get_tcp_response;
3538

@@ -109,6 +112,10 @@ where
109112
GetFilesystemTimeline => {
110113
handle(session, request, self::get_filesystem_timeline::handle)
111114
}
115+
#[cfg(feature = "action-get_filesystem_timeline_tsk")]
116+
GetFilesystemTimelineTsk => {
117+
handle(session, request, self::get_filesystem_timeline_tsk::handle)
118+
}
112119
#[cfg(feature = "action-get_tcp_response")]
113120
GetTcpResponse => {
114121
handle(session, request, self::get_tcp_response::handle)

0 commit comments

Comments
 (0)