23 package org.sleuthkit.autopsy.recentactivity;
27 import java.text.ParseException;
28 import java.text.SimpleDateFormat;
30 import java.util.logging.Level;
31 import javax.xml.parsers.DocumentBuilder;
32 import javax.xml.parsers.DocumentBuilderFactory;
33 import javax.xml.parsers.ParserConfigurationException;
34 import org.openide.modules.InstalledFileLocator;
35 import org.openide.util.NbBundle;
44 import org.
sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
45 import org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
46 import org.w3c.dom.Document;
47 import org.w3c.dom.Element;
48 import org.w3c.dom.Node;
49 import org.w3c.dom.NodeList;
50 import org.xml.sax.InputSource;
51 import org.xml.sax.SAXException;
52 import java.nio.file.Path;
53 import org.openide.util.Lookup;
58 import org.
sleuthkit.datamodel.ReadContentInputStream.ReadContentInputStreamException;
67 "RegRipperNotFound=Autopsy RegRipper executable not found.",
68 "RegRipperFullNotFound=Full version RegRipper executable not found."
70 class ExtractRegistry extends Extract {
72 private final Logger logger = Logger.getLogger(this.getClass().getName());
73 private String RR_PATH;
74 private String RR_FULL_PATH;
76 private Path rrFullHome;
77 private Content dataSource;
78 private IngestJobContext context;
79 final private static UsbDeviceIdMapper USB_MAPPER =
new UsbDeviceIdMapper();
80 final private static String RIP_EXE =
"rip.exe";
81 final private static String RIP_PL =
"rip.pl";
82 private final List<String> rrCmd =
new ArrayList<>();
83 private final List<String> rrFullCmd=
new ArrayList<>();
86 ExtractRegistry() throws IngestModuleException {
87 moduleName = NbBundle.getMessage(ExtractIE.class,
"ExtractRegistry.moduleName.text");
89 final File rrRoot = InstalledFileLocator.getDefault().locate(
"rr", ExtractRegistry.class.getPackage().getName(),
false);
91 throw new IngestModuleException(Bundle.RegRipperNotFound());
94 final File rrFullRoot = InstalledFileLocator.getDefault().locate(
"rr-full", ExtractRegistry.class.getPackage().getName(),
false);
95 if (rrFullRoot == null) {
96 throw new IngestModuleException(Bundle.RegRipperFullNotFound());
99 String executableToRun = RIP_EXE;
100 if (!PlatformUtil.isWindowsOS()) {
101 executableToRun = RIP_PL;
103 rrHome = rrRoot.toPath();
104 RR_PATH = rrHome.resolve(executableToRun).toString();
105 rrFullHome = rrFullRoot.toPath();
106 RR_FULL_PATH = rrFullHome.resolve(executableToRun).toString();
108 if (!(
new File(RR_PATH).exists())) {
109 throw new IngestModuleException(Bundle.RegRipperNotFound());
111 if (!(
new File(RR_FULL_PATH).exists())) {
112 throw new IngestModuleException(Bundle.RegRipperFullNotFound());
114 if(PlatformUtil.isWindowsOS()){
116 rrFullCmd.add(RR_FULL_PATH);
119 File usrBin =
new File(
"/usr/bin/perl");
120 File usrLocalBin =
new File(
"/usr/local/bin/perl");
121 if(usrBin.canExecute() && usrBin.exists() && !usrBin.isDirectory()){
122 perl =
"/usr/bin/perl";
123 }
else if(usrLocalBin.canExecute() && usrLocalBin.exists() && !usrLocalBin.isDirectory()){
124 perl =
"/usr/local/bin/perl";
126 throw new IngestModuleException(
"perl not found in your system");
131 rrFullCmd.add(RR_FULL_PATH);
137 private List<AbstractFile> findRegistryFiles() {
138 List<AbstractFile> allRegistryFiles =
new ArrayList<>();
143 allRegistryFiles.addAll(fileManager.findFiles(dataSource,
"ntuser.dat"));
144 }
catch (TskCoreException ex) {
145 logger.log(Level.WARNING,
"Error fetching 'ntuser.dat' file.");
149 String[] regFileNames =
new String[]{
"system",
"software",
"security",
"sam"};
150 for (String regFileName : regFileNames) {
152 allRegistryFiles.addAll(fileManager.findFiles(dataSource, regFileName,
"/system32/config"));
153 }
catch (TskCoreException ex) {
154 String msg = NbBundle.getMessage(this.getClass(),
155 "ExtractRegistry.findRegFiles.errMsg.errReadingFile", regFileName);
156 logger.log(Level.WARNING, msg);
157 this.addErrorMessage(this.getName() +
": " + msg);
160 return allRegistryFiles;
167 private void analyzeRegistryFiles() {
168 List<AbstractFile> allRegistryFiles = findRegistryFiles();
171 FileWriter logFile = null;
173 logFile =
new FileWriter(RAImageIngestModule.getRAOutputPath(currentCase,
"reg") + File.separator +
"regripper-info.txt");
174 }
catch (IOException ex) {
175 logger.log(Level.SEVERE, null, ex);
178 for (AbstractFile regFile : allRegistryFiles) {
179 String regFileName = regFile.getName();
180 long regFileId = regFile.getId();
181 String regFileNameLocal = RAImageIngestModule.getRATempPath(currentCase,
"reg") + File.separator + regFileName;
182 String outputPathBase = RAImageIngestModule.getRAOutputPath(currentCase,
"reg") + File.separator + regFileName +
"-regripper-" + Long.toString(regFileId);
183 File regFileNameLocalFile =
new File(regFileNameLocal);
185 ContentUtils.writeToFile(regFile, regFileNameLocalFile, context::dataSourceIngestIsCancelled);
186 }
catch (ReadContentInputStreamException ex) {
187 logger.log(Level.WARNING, String.format(
"Error reading registry file '%s' (id=%d).",
188 regFile.getName(), regFileId), ex);
189 this.addErrorMessage(
190 NbBundle.getMessage(
this.getClass(),
"ExtractRegistry.analyzeRegFiles.errMsg.errWritingTemp",
191 this.getName(), regFileName));
193 }
catch (IOException ex) {
194 logger.log(Level.SEVERE, String.format(
"Error writing temp registry file '%s' for registry file '%s' (id=%d).",
195 regFileNameLocal, regFile.getName(), regFileId), ex);
196 this.addErrorMessage(
197 NbBundle.getMessage(
this.getClass(),
"ExtractRegistry.analyzeRegFiles.errMsg.errWritingTemp",
198 this.getName(), regFileName));
202 if (context.dataSourceIngestIsCancelled()) {
207 if (logFile != null) {
208 logFile.write(Long.toString(regFileId) +
"\t" + regFile.getUniquePath() +
"\n");
210 }
catch (TskCoreException | IOException ex) {
211 logger.log(Level.SEVERE, null, ex);
214 logger.log(Level.INFO,
"{0}- Now getting registry information from {1}",
new Object[]{moduleName, regFileNameLocal});
215 RegOutputFiles regOutputFiles = ripRegistryFile(regFileNameLocal, outputPathBase);
216 if (context.dataSourceIngestIsCancelled()) {
221 if (regOutputFiles.autopsyPlugins.isEmpty() ==
false) {
222 if (parseAutopsyPluginOutput(regOutputFiles.autopsyPlugins, regFile) ==
false) {
223 this.addErrorMessage(
224 NbBundle.getMessage(
this.getClass(),
"ExtractRegistry.analyzeRegFiles.failedParsingResults",
225 this.getName(), regFileName));
230 if (!regOutputFiles.fullPlugins.isEmpty()) {
232 Report report = currentCase.addReport(regOutputFiles.fullPlugins,
233 NbBundle.getMessage(
this.getClass(),
"ExtractRegistry.parentModuleName.noSpace"),
234 "RegRipper " + regFile.getUniquePath(), regFile);
237 KeywordSearchService searchService = Lookup.getDefault().lookup(KeywordSearchService.class);
238 if (null == searchService) {
239 logger.log(Level.WARNING,
"Keyword search service not found. Report will not be indexed");
241 searchService.index(report);
243 }
catch (TskCoreException e) {
244 this.addErrorMessage(
"Error adding regripper output as Autopsy report: " + e.getLocalizedMessage());
249 regFileNameLocalFile.delete();
253 if (logFile != null) {
256 }
catch (IOException ex) {
257 logger.log(Level.SEVERE, null, ex);
263 public String autopsyPlugins =
"";
264 public String fullPlugins =
"";
274 private RegOutputFiles ripRegistryFile(String regFilePath, String outFilePathBase) {
275 String autopsyType =
"";
280 if (regFilePath.toLowerCase().contains(
"system")) {
281 autopsyType =
"autopsysystem";
283 }
else if (regFilePath.toLowerCase().contains(
"software")) {
284 autopsyType =
"autopsysoftware";
285 fullType =
"software";
286 }
else if (regFilePath.toLowerCase().contains(
"ntuser")) {
287 autopsyType =
"autopsyntuser";
289 }
else if (regFilePath.toLowerCase().contains(
"sam")) {
291 }
else if (regFilePath.toLowerCase().contains(
"security")) {
292 fullType =
"security";
294 return regOutputFiles;
298 if (!autopsyType.isEmpty()) {
300 String errFilePath = outFilePathBase +
"-autopsy.err.txt";
301 logger.log(Level.INFO,
"Writing RegRipper results to: {0}", regOutputFiles.
autopsyPlugins);
302 executeRegRipper(rrCmd, rrHome, regFilePath, autopsyType, regOutputFiles.
autopsyPlugins, errFilePath);
304 if (context.dataSourceIngestIsCancelled()) {
305 return regOutputFiles;
309 if (!fullType.isEmpty()) {
310 regOutputFiles.
fullPlugins = outFilePathBase +
"-full.txt";
311 String errFilePath = outFilePathBase +
"-full.err.txt";
312 logger.log(Level.INFO,
"Writing Full RegRipper results to: {0}", regOutputFiles.
fullPlugins);
313 executeRegRipper(rrFullCmd, rrFullHome, regFilePath, fullType, regOutputFiles.
fullPlugins, errFilePath);
315 return regOutputFiles;
318 private void executeRegRipper(List<String> regRipperPath, Path regRipperHomeDir, String hiveFilePath, String hiveFileType, String outputFile, String errFile) {
320 List<String> commandLine =
new ArrayList<>();
321 for(String cmd: regRipperPath){
322 commandLine.add(cmd);
324 commandLine.add(
"-r");
325 commandLine.add(hiveFilePath);
326 commandLine.add(
"-f");
327 commandLine.add(hiveFileType);
329 ProcessBuilder processBuilder =
new ProcessBuilder(commandLine);
330 processBuilder.directory(regRipperHomeDir.toFile());
331 processBuilder.redirectOutput(
new File(outputFile));
332 processBuilder.redirectError(
new File(errFile));
333 ExecUtil.execute(processBuilder,
new DataSourceIngestModuleProcessTerminator(context));
334 }
catch (IOException ex) {
335 logger.log(Level.SEVERE,
"Unable to run RegRipper", ex);
336 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"ExtractRegistry.execRegRip.errMsg.failedAnalyzeRegFile", this.getName()));
349 private boolean parseAutopsyPluginOutput(String regFilePath, AbstractFile regFile) {
350 FileInputStream fstream = null;
352 SleuthkitCase tempDb = currentCase.getSleuthkitCase();
355 File regfile =
new File(regFilePath);
356 fstream =
new FileInputStream(regfile);
358 String regString =
new Scanner(fstream,
"UTF-8").useDelimiter(
"\\Z").next();
359 String startdoc =
"<?xml version=\"1.0\"?><document>";
360 String result = regString.replaceAll(
"----------------------------------------",
"");
361 result = result.replaceAll(
"\\n",
"");
362 result = result.replaceAll(
"\\r",
"");
363 result = result.replaceAll(
"'",
"'");
364 result = result.replaceAll(
"&",
"&");
365 result = result.replace(
'\0',
' ');
366 String enddoc =
"</document>";
367 String stringdoc = startdoc + result + enddoc;
368 DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
369 Document doc = builder.parse(
new InputSource(
new StringReader(stringdoc)));
372 Element oroot = doc.getDocumentElement();
373 NodeList children = oroot.getChildNodes();
374 int len = children.getLength();
377 Collection<BlackboardArtifact> usbBBartifacts =
new ArrayList<>();
379 for (
int i = 0; i < len; i++) {
380 Element tempnode = (Element) children.item(i);
382 String dataType = tempnode.getNodeName();
384 NodeList timenodes = tempnode.getElementsByTagName(
"mtime");
386 if (timenodes.getLength() > 0) {
387 Element timenode = (Element) timenodes.item(0);
388 String etime = timenode.getTextContent();
390 Long epochtime =
new SimpleDateFormat(
"EEE MMM d HH:mm:ss yyyy").parse(etime).getTime();
392 String Tempdate = mtime.toString();
393 mtime = Long.valueOf(Tempdate) / 1000;
394 }
catch (ParseException ex) {
395 logger.log(Level.WARNING,
"Failed to parse epoch time when parsing the registry.");
399 NodeList artroots = tempnode.getElementsByTagName(
"artifacts");
400 if (artroots.getLength() == 0) {
405 Element artroot = (Element) artroots.item(0);
406 NodeList myartlist = artroot.getChildNodes();
407 String parentModuleName = NbBundle.getMessage(this.getClass(),
"ExtractRegistry.parentModuleName.noSpace");
414 String systemRoot =
"";
415 String productId =
"";
416 String regOwner =
"";
418 Long installtime = null;
419 for (
int j = 0; j < myartlist.getLength(); j++) {
420 Node artchild = myartlist.item(j);
422 if (artchild.hasAttributes()) {
423 Element artnode = (Element) artchild;
425 String value = artnode.getTextContent().trim();
426 String name = artnode.getAttribute(
"name");
433 version = version +
" " + value;
441 case "RegisteredOwner":
444 case "RegisteredOrganization":
449 Long epochtime =
new SimpleDateFormat(
"EEE MMM d HH:mm:ss yyyy").parse(value).getTime();
450 installtime = epochtime;
451 String Tempdate = installtime.toString();
452 installtime = Long.valueOf(Tempdate) / 1000;
453 }
catch (ParseException e) {
454 logger.log(Level.SEVERE,
"RegRipper::Conversion on DateTime -> ", e);
463 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
464 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, parentModuleName, version));
465 if (installtime != null) {
466 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, parentModuleName, installtime));
468 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH, parentModuleName, systemRoot));
469 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PRODUCT_ID, parentModuleName, productId));
470 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_OWNER, parentModuleName, regOwner));
471 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_ORGANIZATION, parentModuleName, regOrg));
474 ArrayList<BlackboardArtifact> results = tempDb.getBlackboardArtifacts(ARTIFACT_TYPE.TSK_OS_INFO, regFile.getId());
475 if (results.isEmpty()) {
476 BlackboardArtifact bbart = regFile.newArtifact(ARTIFACT_TYPE.TSK_OS_INFO);
477 bbart.addAttributes(bbattributes);
480 this.indexArtifact(bbart);
482 results.get(0).addAttributes(bbattributes);
485 }
catch (TskCoreException ex) {
486 logger.log(Level.SEVERE,
"Error adding installed program artifact to blackboard.");
491 String procArch =
"";
494 for (
int j = 0; j < myartlist.getLength(); j++) {
495 Node artchild = myartlist.item(j);
497 if (artchild.hasAttributes()) {
498 Element artnode = (Element) artchild;
500 String value = artnode.getTextContent().trim();
501 String name = artnode.getAttribute(
"name");
506 case "PROCESSOR_ARCHITECTURE":
509 case "PROCESSOR_IDENTIFIER":
521 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
522 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VERSION, parentModuleName, os));
523 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROCESSOR_ARCHITECTURE, parentModuleName, procArch));
524 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TEMP_DIR, parentModuleName, tempDir));
527 ArrayList<BlackboardArtifact> results = tempDb.getBlackboardArtifacts(ARTIFACT_TYPE.TSK_OS_INFO, regFile.getId());
528 if (results.isEmpty()) {
529 BlackboardArtifact bbart = regFile.newArtifact(ARTIFACT_TYPE.TSK_OS_INFO);
530 bbart.addAttributes(bbattributes);
533 this.indexArtifact(bbart);
535 results.get(0).addAttributes(bbattributes);
537 }
catch (TskCoreException ex) {
538 logger.log(Level.SEVERE,
"Error adding os info artifact to blackboard.");
542 String compName =
"";
544 for (
int j = 0; j < myartlist.getLength(); j++) {
545 Node artchild = myartlist.item(j);
547 if (artchild.hasAttributes()) {
548 Element artnode = (Element) artchild;
550 String value = artnode.getTextContent().trim();
551 String name = artnode.getAttribute(
"name");
553 if (name.equals(
"ComputerName")) {
555 }
else if (name.equals(
"Domain")) {
561 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
562 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, parentModuleName, compName));
563 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN, parentModuleName, domain));
566 ArrayList<BlackboardArtifact> results = tempDb.getBlackboardArtifacts(ARTIFACT_TYPE.TSK_OS_INFO, regFile.getId());
567 if (results.isEmpty()) {
568 BlackboardArtifact bbart = regFile.newArtifact(ARTIFACT_TYPE.TSK_OS_INFO);
569 bbart.addAttributes(bbattributes);
572 this.indexArtifact(bbart);
574 results.get(0).addAttributes(bbattributes);
576 }
catch (TskCoreException ex) {
577 logger.log(Level.SEVERE,
"Error adding os info artifact to blackboard.");
581 for (
int j = 0; j < myartlist.getLength(); j++) {
582 Node artchild = myartlist.item(j);
584 if (artchild.hasAttributes()) {
585 Element artnode = (Element) artchild;
587 String value = artnode.getTextContent().trim();
588 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
601 Long usbMtime = Long.parseLong(artnode.getAttribute(
"mtime"));
602 usbMtime = Long.valueOf(usbMtime.toString());
604 BlackboardArtifact bbart = regFile.newArtifact(ARTIFACT_TYPE.TSK_DEVICE_ATTACHED);
605 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, parentModuleName, usbMtime));
606 String dev = artnode.getAttribute(
"dev");
609 if (dev.toLowerCase().contains(
"vid")) {
610 USBInfo info = USB_MAPPER.parseAndLookup(dev);
611 if (info.getVendor() != null) {
612 make = info.getVendor();
614 if (info.getProduct() != null) {
615 model = info.getProduct();
618 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DEVICE_MAKE, parentModuleName, make));
619 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DEVICE_MODEL, parentModuleName, model));
620 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DEVICE_ID, parentModuleName, value));
621 bbart.addAttributes(bbattributes);
624 this.indexArtifact(bbart);
626 usbBBartifacts.add(bbart);
627 }
catch (TskCoreException ex) {
628 logger.log(Level.SEVERE,
"Error adding device attached artifact to blackboard.");
632 Long itemMtime = null;
634 Long epochtime =
new SimpleDateFormat(
"EEE MMM d HH:mm:ss yyyy").parse(artnode.getAttribute(
"mtime")).getTime();
635 itemMtime = epochtime;
636 itemMtime = itemMtime / 1000;
637 }
catch (ParseException e) {
638 logger.log(Level.WARNING,
"Failed to parse epoch time for installed program artifact.");
642 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, parentModuleName, value));
643 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, parentModuleName, itemMtime));
644 BlackboardArtifact bbart = regFile.newArtifact(ARTIFACT_TYPE.TSK_INSTALLED_PROG);
645 bbart.addAttributes(bbattributes);
648 this.indexArtifact(bbart);
649 }
catch (TskCoreException ex) {
650 logger.log(Level.SEVERE,
"Error adding installed program artifact to blackboard.");
654 String officeName = artnode.getAttribute(
"name");
657 BlackboardArtifact bbart = regFile.newArtifact(ARTIFACT_TYPE.TSK_RECENT_OBJECT);
660 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED, parentModuleName, mtime));
662 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, parentModuleName, officeName));
663 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE, parentModuleName, value));
664 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, parentModuleName, artnode.getNodeName()));
665 bbart.addAttributes(bbattributes);
668 this.indexArtifact(bbart);
669 }
catch (TskCoreException ex) {
670 logger.log(Level.SEVERE,
"Error adding recent object artifact to blackboard.");
674 case "ProcessorArchitecture":
692 String homeDir = value;
693 String sid = artnode.getAttribute(
"sid");
694 String username = artnode.getAttribute(
"username");
695 BlackboardArtifact bbart = regFile.newArtifact(ARTIFACT_TYPE.TSK_OS_ACCOUNT);
696 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_USER_NAME,
697 parentModuleName, username));
698 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_USER_ID,
699 parentModuleName, sid));
700 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH,
701 parentModuleName, homeDir));
703 bbart.addAttributes(bbattributes);
705 this.indexArtifact(bbart);
706 }
catch (TskCoreException ex) {
707 logger.log(Level.SEVERE,
"Error adding account artifact to blackboard.");
711 case "NtuserNetwork":
713 String localPath = artnode.getAttribute(
"localPath");
714 String remoteName = value;
715 BlackboardArtifact bbart = regFile.newArtifact(ARTIFACT_TYPE.TSK_REMOTE_DRIVE);
716 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_LOCAL_PATH,
717 parentModuleName, localPath));
718 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REMOTE_PATH,
719 parentModuleName, remoteName));
720 bbart.addAttributes(bbattributes);
722 this.indexArtifact(bbart);
723 }
catch (TskCoreException ex) {
724 logger.log(Level.SEVERE,
"Error adding network artifact to blackboard.");
735 logger.log(Level.WARNING,
"Unrecognized node name: {0}", dataType);
743 if (!usbBBartifacts.isEmpty()) {
744 IngestServices.getInstance().fireModuleDataEvent(
new ModuleDataEvent(moduleName, BlackboardArtifact.ARTIFACT_TYPE.TSK_DEVICE_ATTACHED, usbBBartifacts));
747 }
catch (FileNotFoundException ex) {
748 logger.log(Level.SEVERE,
"Error finding the registry file.");
749 }
catch (SAXException ex) {
750 logger.log(Level.SEVERE,
"Error parsing the registry XML: {0}", ex);
751 }
catch (IOException ex) {
752 logger.log(Level.SEVERE,
"Error building the document parser: {0}", ex);
753 }
catch (ParserConfigurationException ex) {
754 logger.log(Level.SEVERE,
"Error configuring the registry parser: {0}", ex);
757 if (fstream != null) {
760 }
catch (IOException ex) {
767 public void process(Content dataSource, IngestJobContext context) {
768 this.dataSource = dataSource;
769 this.context = context;
770 analyzeRegistryFiles();