#! c:\perl\bin\perl.exe #----------------------------------------------------------- # Registry Ripper # Parse a Registry hive file for data pertinent to an investigation # # Adv version...provides the basic functionality. All plugins # can be used with both the basic version and the full-featured # version # # Change History: # 20130429 - minor updates, including not adding .txt files to Profile list # 20130425 - added alertMsg() functionality, updated to v2.8 # 20120505 - Updated to v2.5 # 20081111 - Updated code in setUpEnv() to parse the file paths for # output files (log, etc) so that they paths were handled # properly; updated Perl2Exe include statements to support # Parse::Win32Registry 0.40 # 20080512 - Consolidated Basic and Advanced versions into a single # track # 20080429 - Fixed issue with output report and log files having the # same (.log) file extension # 20080422 - Added ComboBox to choose plugins file # 20080414 - updated code to check for a selected hive file; set # default plugin file to "ntuser" if none selected; check # for plugins file with no plugins or all plugins commented # out; keep track of plugins w/ hard errors generated via # this GUI. # 20080412 - added listbox; populate with list of plugin files # from plugin dir # - Log file now based on report file name and location # 20080226 - added eval{} to wrap require pragma in go_Click() # # # Functionality: # - plugins file is selectable # # copyright 2013 Quantum Research Analytics, LLC # Author: H. Carvey, keydet89@yahoo.com # # This software is released via the GPL v3.0 license: # http://www.gnu.org/licenses/gpl.html #----------------------------------------------------------- #use strict; use Win32::GUI(); use Parse::Win32Registry qw(:REG_); # Included to permit compiling via Perl2Exe #perl2exe_include "Parse/Win32Registry.pm"; #perl2exe_include "Parse/Win32Registry/Key.pm"; #perl2exe_include "Parse/Win32Registry/Entry.pm"; #perl2exe_include "Parse/Win32Registry/Value.pm"; #perl2exe_include "Parse/Win32Registry/File.pm"; #perl2exe_include "Parse/Win32Registry/Win95/File.pm"; #perl2exe_include "Parse/Win32Registry/Win95/Key.pm"; #perl2exe_include "Encode.pm"; #perl2exe_include "Encode/Byte.pm"; #perl2exe_include "Encode/Unicode.pm"; #perl2exe_include "utf8.pm"; #perl2exe_include "unicore/Heavy.pl"; #perl2exe_include "unicore/To/Upper.pl"; #----------------------------------------------------------- # Global variables #----------------------------------------------------------- my $VERSION = "2\.8"; my %env; my @alerts = (); #----------------------------------------------------------- # GUI #----------------------------------------------------------- # create our menu my $menu = Win32::GUI::MakeMenu( "&File" => "File", " > O&pen..." => { -name => "Open"}, " > -" => 0, " > E&xit" => { -name => "Exit", -onClick => sub {exit 1;}}, "&Help" => "Help", " > &About" => { -name => "About", -onClick => \&RR_OnAbout}, ); # Create Main Window my $main = new Win32::GUI::Window ( -name => "Main", -title => "RegRipper, v.".$VERSION, -pos => [200, 200], # Format: [width, height] -maxsize => [500, 420], -size => [500, 420], -menu => $menu, -dialogui => 1, ) or die "Could not create a new Window: $!\n"; my $icon_file = "q\.ico"; my $icon = new Win32::GUI::Icon($icon_file); $main->SetIcon($icon); $main->AddLabel( -text => "Hive File:", -left => 20, -top => 10); my $ntuserfile = $main->AddTextfield( -name => "ntuserdat", -tabstop => 1, -left => 100, -top => 10, -width => 250, -height => 22, -tabstop => 1, -foreground => "#000000", -background => "#FFFFFF"); my $browse1 = $main->AddButton( -name => 'browse1', -left => 375, -top => 10, -width => 50, -height => 22, -tabstop => 1, -text => "Browse"); $main->AddLabel( -text => "Report File:", -left => 20, -top => 50); my $rptfile = $main->AddTextfield( -name => "rptfile", -tabstop => 1, -left => 100, -top => 50, -width => 250, -height => 22, -tabstop => 1, -foreground => "#000000", -background => "#FFFFFF"); my $browse2 = $main->AddButton( -name => 'browse2', -left => 375, -top => 50, -width => 50, -height => 22, -tabstop => 1, -text => "Browse"); $main->AddLabel( -text => "Profile:", -left => 20, -top => 90); # http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=combobox my $combo = $main->AddCombobox( -name => "Combobox", # -dropdown => 1, -dropdownlist => 1, -top => 90, -left => 100, -width => 120, -height => 110, -tabstop=> 1, ); my $testlabel = $main->AddLabel( -text => "", -name => "TestLabel", -pos => [10,140], -size => [445,160], -frame => etched, -sunken => 1 ); my $report = $main->AddTextfield( -name => "Report", -pos => [20,150], -size => [425,140], -multiline => 1, -vscroll => 1, -autohscroll => 1, -autovscroll => 1, -keepselection => 1 , -tabstop => 1, ); my $go = $main->AddButton( -name => 'go', -left => 320, -top => 310, -width => 50, -height => 25, -tabstop => 1, -text => "Rip It"); $main->AddButton( -name => 'close', -left => 390, -top => 310, -width => 50, -height => 25, -tabstop => 1, -text => "Close"); my $status = new Win32::GUI::StatusBar($main, -text => "RegRipper v.".$VERSION." opened\.", ); populatePluginsList(); $combo->Text("