TRAP::Compare. TRAP - Tool for Regex Analysis with Perl
version 0.0.1
use TRAP::Compare;
my @directories = ("TRAP_*", "report_*");
my $reports = analysis \@directories;
report($reports);
~# perl TRAP.pm -f "forensic_files*,other_files*"
~# perl TRAP/Compare.pm
~# perl TRAP/Compare.pm "custom_report_directories*" "second_report_directory*"
A forensic tool to extract some informations from files.
I created this tool following an investigation of an infected backup file. This file was only part of a backup and it was necessary to identify the server to which this piece of backup corresponded. I finally found the server by analyzing the file, strings after strings. Some strings allowed the absolute identification of the server. I chose to create this tool in order to avoid long search to other people in a similar case.
It was also important to find out why the file was detected as infected. This tool will allow you to identify certain payloads or abnormal elements on a server.
I make this tool in perl because it is pre-integrated on all Linux systems and it is particularly optimized for regular expression.
This file compare reports by filename and saves and prints matches with multiple filenames.
perl
- Perl (v5.26)
perl standard library
- Perl Standard Library
Modules used:
strict
- strict
Text::CSV
- Text::CSV
~# git clone https://github.com/MauriceLambert/TRAP.git
use TRAP::Compare;
my @directories = ("TRAP_*", "report_*");
my $reports = analysis \@directories;
report($reports);
This method returns a HASH of HASHES -> {match => {filename => 1}}.
directories
- Array of glob syntax of report directories to be analysed.
This method analyses reports to extract matches with multiple filenames.
any
Forensic/Investigation
Please report any bugs or feature requests through the issue tracker at https://github.com/MauriceLambert/TRAP/issues. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://github.com/MauriceLambert/TRAP
git clone https://github.com/MauriceLambert/TRAP.git
Maurice LAMBERT <mauricelambert434@gmail.com>
TRAP Copyright (C) 2022 Maurice Lambert This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.
https://www.gnu.org/licenses/ - Licensed under the GPL, version 3. (GPL-3.0 License)