|
Mar 05
2010
|
|
Mar 05
2010
|
|
Apr 05
2009
|
However, there are certain drawbacks. I wish to automate my tasks to a level where I shouldn't have to see encase at all. :) This is supported half way right now, an enscript can be launched from the command line with the -r switch to encase. But unlike regular programs, no parameters for the script can be specified on the command line, as the script cannot access Encase's command line. And that's a big show stopper. :(
The solution I came up with was to create a COM DLL that an enscript could load and one of the functions exposed in the DLL's interface would be the command line. Because the DLL is loaded from the Encase process (by the script), it can access Encase's command line. The DLL, enscript and batch file (for registering it with windows) can be downloaded below. Scroll to the end of article for link.
Usage:
1. The DLL must be registered with windows. To register the DLL, place it somewhere where it won't get moved or deleted like the windows folder.
2. Copy the batch file provided to the same location and execute it, this will register the DLL. Now it's ready for use.
3. Run the enscript in encase.
This now opens up a world of possibilities. We can now have encase launch, start an enscript, load an evidence file, process it, dump out results and quit all from a single command line statement. I can now create a batch file or even an item on the explorer right-click menu which processes my evidence files! The only thing missing is the ability to write back out to StdOut (Console). Because encase is a windows application, it does not attach to a console. :(
As a demo, I created a couple of scripts and integrated them into shell right-click menu items.
Script 1: Get Profile Info.Enscript
This can be run on a single E01 or L01 file.
This performs the following actions:
1. Load the specified E01/L01 file into encase.
2. Recurse through the entries in this file and find all windows profile names.
3. Create output file in the same folder as evidence file.
4. Write all profile information to this output file.
5. Close encase when done. (" -x" command line switch)
Script 2: Verify Evidence File.Enscript
This can be run on a single file or folder containing E01 files and can be either recursive or non-recursive. You can point it to the root of a drive and have it verify all files on that drive and get a single report for it. Similar to the "Get Profile Info" script, the output is stored into a file in the same folder as E01 file (if file is selected) or in the root folder selected.
Registering the Shell Handlers:
This is done by inserting a few keys into the registry. The zip files provided have registry scripts to do this automatically. Before running it, you will have to edit it with notepad to change the path of the script as well as the encase path to wherever they exist on your system. (You need double backslashes (\\) in the path in the .reg file only, not if you edit the registry directly. The same goes for the encase path. Also double-quotes have backslash pre-fixed to them. )
Download files here:
Command Line DLL.zip
Get Profile Info.zip
Verify Evidence File.zip