Forensic event reconstruction and timeline correlation for SADFC-style data
Project description
reconsadfc
Forensic event reconstruction and relationship analysis for SADFC-style footprint data.
This project provides a DataFrame-first pipeline to:
- filter and preprocess forensic footprint data,
- extract subjects, objects, and events,
- build support and entity-event relationships,
- compute event correlations over time,
- analyze and visualize inferred timelines.
Features
- Data ingestion and filtering from CSV files (
source == WEBHIST) - Entity extraction for common event types (web visit, process creation, search activity, file activity)
- Relationship modeling:
- footprint-to-entity/event support
- participation (subject-event)
- usage (event-object)
- Temporal and contextual correlation scoring
- Timeline filtering based on type-level correlation statistics
- Built-in timeline plotting with Matplotlib
Installation
From PyPI
After publishing, install with:
pip install reconsadfc
From source (local development)
git clone <your-repository-url>
cd temp-reconformal
pip install -e .
Requirements
- Python 3.9+
- pandas
- matplotlib
Quick Start
from reconformal import (
DataProcessor,
KnowledgeRepresentation,
TimelineReconstruction,
RelationshipAnalysis,
)
# 1) Load and filter footprints
processor = DataProcessor(file_dir="./data", save_json=False)
combined_df = processor.process_files()
# 2) Build knowledge representation
kr = KnowledgeRepresentation(combined_df)
kr.sort_data()
kr.extract_entities()
# 3) Reconstruct timeline and compute correlations
timeline_builder = TimelineReconstruction(kr)
timeline_df = timeline_builder.reconstruct_timeline()
correlation_df = timeline_builder.calculate_correlation(timeline_df)
# 4) Analyze timeline quality
analysis = RelationshipAnalysis(kr)
scored_timeline_df = analysis.filter_events_based_on_avg_correlation(
correlation_df=correlation_df,
timeline_df=timeline_df,
threshold=0.0,
)
updated_timeline_df = analysis.update_timeline_df(scored_timeline_df)
# Optional plot
analysis.draw_timeline_graph(updated_timeline_df)
# Optional metrics
counts = analysis.count_classification_groups(updated_timeline_df)
print(counts)
CLI Usage
After installation, run from PowerShell or any shell:
reconformal-cli --input-dir .\data --output-dir .\outputs --threshold 0.0 --draw-graph
You can also run as a Python module:
python -m reconformal --input-dir .\data --output-dir .\outputs
Generated outputs are written as CSV files, including timeline, correlation, relationship, summary, and metrics artifacts.
Main Components
DataProcessor- Reads CSV files from a directory
- Filters rows where
sourceisWEBHIST
EntityExtractor- Converts footprint rows into normalized subject/object/event records
RelationshipManager- Deduplicates entities and builds relationship tables
KnowledgeRepresentation- Orchestrates extraction and stores all derived DataFrames
TimelineReconstruction- Builds deduplicated timeline and computes pairwise correlations
RelationshipAnalysis- Aggregates correlation scores, filters events, enriches timeline, and plots results
Data Assumptions
Input footprint data is expected to include fields commonly used by the pipeline, such as:
idtypesourcedate_time_min- optional event metadata (for example
keys,plugin,files,filename)
PyPI Publishing Checklist
Before publishing, ensure you have:
- Package metadata configured (
pyproject.tomlpreferred). - This README referenced as the long description.
- Version bumped correctly.
- License file included.
- Source distribution and wheel built successfully.
Typical commands:
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
Project Structure
Current minimal structure:
reconformal/reconformal.py- core implementationreconformal/cli.py- CLI parser and command runnerreconformal/__main__.py- module execution entry pointreconformal/__init__.py- package exportspyproject.toml- packaging metadata and console scriptsREADME.md- project documentationLICENSE- MIT licensefer-sadfc.ipynb- notebook exploration
License
MIT License. See LICENSE.
Contributing
Contributions are welcome. Recommended workflow:
- Open an issue describing the change.
- Create a feature branch.
- Add tests and documentation updates.
- Submit a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reconsadfc-0.1.0.tar.gz.
File metadata
- Download URL: reconsadfc-0.1.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
052cfdf1c7a7e342d1edb4a9ac13d37a625bfe9003a84bbb8fcc052923f0b7b5
|
|
| MD5 |
508c526e615c6d430a8a8076c1671344
|
|
| BLAKE2b-256 |
29960b5ccf95e5dabaf4c1b072ad7bfd4507b3a5fdf9d8716928c5c62ea9dcbe
|
Provenance
The following attestation bundles were made for reconsadfc-0.1.0.tar.gz:
Publisher:
publish.yml on forensic-timeline/reconsadfc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reconsadfc-0.1.0.tar.gz -
Subject digest:
052cfdf1c7a7e342d1edb4a9ac13d37a625bfe9003a84bbb8fcc052923f0b7b5 - Sigstore transparency entry: 1383166587
- Sigstore integration time:
-
Permalink:
forensic-timeline/reconsadfc@a56af59159efce1f5a18f2296be23c28386169e1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/forensic-timeline
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a56af59159efce1f5a18f2296be23c28386169e1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reconsadfc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reconsadfc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d6d9cf5ee1758648b04cef4f70bad10b2b35cfbb84e6a9035d4eb3d69eda965
|
|
| MD5 |
74764622ba3d1cb2e13b624b776ca78e
|
|
| BLAKE2b-256 |
1fd314e5a1d59a660938a75cc2e01fa7b4027c3d218bfa051b5679008a877cb5
|
Provenance
The following attestation bundles were made for reconsadfc-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on forensic-timeline/reconsadfc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reconsadfc-0.1.0-py3-none-any.whl -
Subject digest:
6d6d9cf5ee1758648b04cef4f70bad10b2b35cfbb84e6a9035d4eb3d69eda965 - Sigstore transparency entry: 1383166612
- Sigstore integration time:
-
Permalink:
forensic-timeline/reconsadfc@a56af59159efce1f5a18f2296be23c28386169e1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/forensic-timeline
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a56af59159efce1f5a18f2296be23c28386169e1 -
Trigger Event:
push
-
Statement type: