23 package org.sleuthkit.autopsy.recentactivity;
25 import com.google.gson.JsonArray;
26 import com.google.gson.JsonElement;
27 import com.google.gson.JsonIOException;
28 import com.google.gson.JsonObject;
29 import com.google.gson.JsonParser;
30 import com.google.gson.JsonSyntaxException;
31 import org.openide.util.NbBundle;
34 import java.util.logging.Level;
37 import java.io.FileNotFoundException;
38 import java.io.FileReader;
39 import java.io.IOException;
46 import org.
sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
48 import org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
50 import org.
sleuthkit.datamodel.ReadContentInputStream.ReadContentInputStreamException;
57 class Chrome
extends Extract {
59 private static final String HISTORY_QUERY =
"SELECT urls.url, urls.title, urls.visit_count, urls.typed_count, "
60 +
"last_visit_time, urls.hidden, visits.visit_time, (SELECT urls.url FROM urls WHERE urls.id=visits.url) AS from_visit, visits.transition FROM urls, visits WHERE urls.id = visits.url";
61 private static final String COOKIE_QUERY =
"SELECT name, value, host_key, expires_utc,last_access_utc, creation_utc FROM cookies";
62 private static final String DOWNLOAD_QUERY =
"SELECT full_path, url, start_time, received_bytes FROM downloads";
63 private static final String DOWNLOAD_QUERY_V30 =
"SELECT current_path AS full_path, url, start_time, received_bytes FROM downloads, downloads_url_chains WHERE downloads.id=downloads_url_chains.id";
64 private static final String LOGIN_QUERY =
"SELECT origin_url, username_value, signon_realm from logins";
66 private Content dataSource;
70 moduleName = NbBundle.getMessage(Chrome.class,
"Chrome.moduleName");
75 this.dataSource = dataSource;
76 this.context = context;
88 private void getHistory() {
89 FileManager fileManager = currentCase.getServices().getFileManager();
90 List<AbstractFile> historyFiles;
92 historyFiles = fileManager.
findFiles(dataSource,
"History",
"Chrome");
93 }
catch (TskCoreException ex) {
94 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getHistory.errMsg.errGettingFiles");
95 logger.log(Level.SEVERE, msg, ex);
96 this.addErrorMessage(this.getName() +
": " + msg);
101 List<AbstractFile> allocatedHistoryFiles =
new ArrayList<>();
102 for (AbstractFile historyFile : historyFiles) {
103 if (historyFile.isMetaFlagSet(TskData.TSK_FS_META_FLAG_ENUM.ALLOC)) {
104 allocatedHistoryFiles.add(historyFile);
109 if (allocatedHistoryFiles.isEmpty()) {
110 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getHistory.errMsg.couldntFindAnyFiles");
111 logger.log(Level.INFO, msg);
116 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
118 while (j < historyFiles.size()) {
120 final AbstractFile historyFile = historyFiles.get(j++);
121 if (historyFile.getSize() == 0) {
126 }
catch (ReadContentInputStreamException ex) {
127 logger.log(Level.WARNING, String.format(
"Error reading Chrome web history artifacts file '%s' (id=%d).",
128 historyFile.getName(), historyFile.getId()), ex);
129 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getHistory.errMsg.errAnalyzingFile",
130 this.getName(), historyFile.getName()));
132 }
catch (IOException ex) {
133 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome web history artifacts file '%s' (id=%d).",
134 temps, historyFile.getName(), historyFile.getId()), ex);
135 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getHistory.errMsg.errAnalyzingFile",
136 this.getName(), historyFile.getName()));
139 File dbFile =
new File(temps);
144 List<HashMap<String, Object>> tempList;
145 tempList = this.dbConnect(temps, HISTORY_QUERY);
146 logger.log(Level.INFO,
"{0}- Now getting history from {1} with {2}artifacts identified.",
new Object[]{moduleName, temps, tempList.size()});
147 for (HashMap<String, Object> result : tempList) {
148 Collection<BlackboardAttribute> bbattributes =
new ArrayList<BlackboardAttribute>();
149 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
150 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
151 ((result.get(
"url").toString() != null) ? result.get(
"url").toString() :
"")));
152 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
153 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
154 (Long.valueOf(result.get(
"last_visit_time").toString()) / 1000000) - Long.valueOf(
"11644473600")));
155 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER,
156 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
157 ((result.get(
"from_visit").toString() != null) ? result.get(
"from_visit").toString() :
"")));
158 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE,
159 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
160 ((result.get(
"title").toString() != null) ? result.get(
"title").toString() :
"")));
161 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
162 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
163 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
164 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
165 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
166 (Util.extractDomain((result.get(
"url").toString() != null) ? result.get(
"url").toString() :
""))));
168 BlackboardArtifact bbart = this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, historyFile, bbattributes);
170 bbartifacts.add(bbart);
177 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
178 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY, bbartifacts));
184 private void getBookmark() {
185 FileManager fileManager = currentCase.getServices().getFileManager();
186 List<AbstractFile> bookmarkFiles;
188 bookmarkFiles = fileManager.
findFiles(dataSource,
"Bookmarks",
"Chrome");
189 }
catch (TskCoreException ex) {
190 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getBookmark.errMsg.errGettingFiles");
191 logger.log(Level.SEVERE, msg, ex);
192 this.addErrorMessage(this.getName() +
": " + msg);
196 if (bookmarkFiles.isEmpty()) {
197 logger.log(Level.INFO,
"Didn't find any Chrome bookmark files.");
202 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
205 while (j < bookmarkFiles.size()) {
206 AbstractFile bookmarkFile = bookmarkFiles.get(j++);
207 if (bookmarkFile.getSize() == 0) {
213 }
catch (ReadContentInputStreamException ex) {
214 logger.log(Level.WARNING, String.format(
"Error reading Chrome bookmark artifacts file '%s' (id=%d).",
215 bookmarkFile.getName(), bookmarkFile.getId()), ex);
216 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzingFile",
217 this.getName(), bookmarkFile.getName()));
219 }
catch (IOException ex) {
220 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome bookmark artifacts file '%s' (id=%d).",
221 temps, bookmarkFile.getName(), bookmarkFile.getId()), ex);
222 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzingFile",
223 this.getName(), bookmarkFile.getName()));
227 logger.log(Level.INFO,
"{0}- Now getting Bookmarks from {1}",
new Object[]{moduleName, temps});
228 File dbFile =
new File(temps);
234 FileReader tempReader;
236 tempReader =
new FileReader(temps);
237 }
catch (FileNotFoundException ex) {
238 logger.log(Level.SEVERE,
"Error while trying to read into the Bookmarks for Chrome.", ex);
239 this.addErrorMessage(
240 NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzeFile", this.getName(),
241 bookmarkFile.getName()));
245 final JsonParser parser =
new JsonParser();
246 JsonElement jsonElement;
247 JsonObject jElement, jRoot, jBookmark;
248 JsonArray jBookmarkArray;
251 jsonElement = parser.parse(tempReader);
252 jElement = jsonElement.getAsJsonObject();
253 jRoot = jElement.get(
"roots").getAsJsonObject();
254 jBookmark = jRoot.get(
"bookmark_bar").getAsJsonObject();
255 jBookmarkArray = jBookmark.getAsJsonArray(
"children");
256 }
catch (JsonIOException | JsonSyntaxException | IllegalStateException ex) {
257 logger.log(Level.WARNING,
"Error parsing Json from Chrome Bookmark.", ex);
258 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzingFile3",
259 this.getName(), bookmarkFile.getName()));
263 for (JsonElement result : jBookmarkArray) {
264 JsonObject address = result.getAsJsonObject();
265 if (address == null) {
268 JsonElement urlEl = address.get(
"url");
271 url = urlEl.getAsString();
276 JsonElement nameEl = address.get(
"name");
277 if (nameEl != null) {
278 name = nameEl.getAsString();
283 JsonElement dateEl = address.get(
"date_added");
284 if (dateEl != null) {
285 date = dateEl.getAsLong();
287 date = Long.valueOf(0);
289 String domain = Util.extractDomain(url);
291 BlackboardArtifact bbart = bookmarkFile.newArtifact(ARTIFACT_TYPE.TSK_WEB_BOOKMARK);
292 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
294 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
295 NbBundle.getMessage(
this.getClass(),
296 "Chrome.parentModuleName"), url));
297 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE,
298 NbBundle.getMessage(
this.getClass(),
299 "Chrome.parentModuleName"), name));
300 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED,
301 NbBundle.getMessage(
this.getClass(),
302 "Chrome.parentModuleName"), (date / 1000000) - Long.valueOf(
"11644473600")));
303 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
304 NbBundle.getMessage(
this.getClass(),
305 "Chrome.parentModuleName"),
306 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
307 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
308 NbBundle.getMessage(
this.getClass(),
309 "Chrome.parentModuleName"), domain));
310 bbart.addAttributes(bbattributes);
313 this.indexArtifact(bbart);
314 bbartifacts.add(bbart);
315 }
catch (TskCoreException ex) {
316 logger.log(Level.SEVERE,
"Error while trying to insert Chrome bookmark artifact{0}", ex);
317 this.addErrorMessage(
318 NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzingFile4",
319 this.getName(), bookmarkFile.getName()));
326 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
327 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK, bbartifacts));
333 private void getCookie() {
335 FileManager fileManager = currentCase.getServices().getFileManager();
336 List<AbstractFile> cookiesFiles;
338 cookiesFiles = fileManager.
findFiles(dataSource,
"Cookies",
"Chrome");
339 }
catch (TskCoreException ex) {
340 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getCookie.errMsg.errGettingFiles");
341 logger.log(Level.SEVERE, msg, ex);
342 this.addErrorMessage(this.getName() +
": " + msg);
346 if (cookiesFiles.isEmpty()) {
347 logger.log(Level.INFO,
"Didn't find any Chrome cookies files.");
352 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
354 while (j < cookiesFiles.size()) {
355 AbstractFile cookiesFile = cookiesFiles.get(j++);
356 if (cookiesFile.getSize() == 0) {
362 }
catch (ReadContentInputStreamException ex) {
363 logger.log(Level.WARNING, String.format(
"Error reading Chrome cookie artifacts file '%s' (id=%d).",
364 cookiesFile.getName(), cookiesFile.getId()), ex);
365 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getCookie.errMsg.errAnalyzeFile",
366 this.getName(), cookiesFile.getName()));
368 }
catch (IOException ex) {
369 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome cookie artifacts file '%s' (id=%d).",
370 temps, cookiesFile.getName(), cookiesFile.getId()), ex);
371 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getCookie.errMsg.errAnalyzeFile",
372 this.getName(), cookiesFile.getName()));
375 File dbFile =
new File(temps);
381 List<HashMap<String, Object>> tempList = this.dbConnect(temps, COOKIE_QUERY);
382 logger.log(Level.INFO,
"{0}- Now getting cookies from {1} with {2}artifacts identified.",
new Object[]{moduleName, temps, tempList.size()});
383 for (HashMap<String, Object> result : tempList) {
384 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
385 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
386 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
387 ((result.get(
"host_key").toString() != null) ? result.get(
"host_key").toString() :
"")));
388 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME,
389 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
390 (Long.valueOf(result.get(
"last_access_utc").toString()) / 1000000) - Long.valueOf(
"11644473600")));
392 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME,
393 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
394 ((result.get(
"name").toString() != null) ? result.get(
"name").toString() :
"")));
395 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE,
396 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
397 ((result.get(
"value").toString() != null) ? result.get(
"value").toString() :
"")));
398 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
399 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
400 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
401 String domain = result.get(
"host_key").toString();
402 domain = domain.replaceFirst(
"^\\.+(?!$)",
"");
403 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
404 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"), domain));
406 BlackboardArtifact bbart = this.addArtifact(ARTIFACT_TYPE.TSK_WEB_COOKIE, cookiesFile, bbattributes);
408 bbartifacts.add(bbart);
416 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
417 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE, bbartifacts));
423 private void getDownload() {
424 FileManager fileManager = currentCase.getServices().getFileManager();
425 List<AbstractFile> downloadFiles;
427 downloadFiles = fileManager.
findFiles(dataSource,
"History",
"Chrome");
428 }
catch (TskCoreException ex) {
429 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getDownload.errMsg.errGettingFiles");
430 logger.log(Level.SEVERE, msg, ex);
431 this.addErrorMessage(this.getName() +
": " + msg);
435 if (downloadFiles.isEmpty()) {
436 logger.log(Level.INFO,
"Didn't find any Chrome download files.");
441 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
443 while (j < downloadFiles.size()) {
444 AbstractFile downloadFile = downloadFiles.get(j++);
445 if (downloadFile.getSize() == 0) {
451 }
catch (ReadContentInputStreamException ex) {
452 logger.log(Level.WARNING, String.format(
"Error reading Chrome download artifacts file '%s' (id=%d).",
453 downloadFile.getName(), downloadFile.getId()), ex);
454 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getDownload.errMsg.errAnalyzeFiles1",
455 this.getName(), downloadFile.getName()));
457 }
catch (IOException ex) {
458 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome download artifacts file '%s' (id=%d).",
459 temps, downloadFile.getName(), downloadFile.getId()), ex);
460 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getDownload.errMsg.errAnalyzeFiles1",
461 this.getName(), downloadFile.getName()));
464 File dbFile =
new File(temps);
470 List<HashMap<String, Object>> tempList;
472 if (isChromePreVersion30(temps)) {
473 tempList = this.dbConnect(temps, DOWNLOAD_QUERY);
475 tempList = this.dbConnect(temps, DOWNLOAD_QUERY_V30);
478 logger.log(Level.INFO,
"{0}- Now getting downloads from {1} with {2}artifacts identified.",
new Object[]{moduleName, temps, tempList.size()});
479 for (HashMap<String, Object> result : tempList) {
480 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
481 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH,
482 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"), (result.get(
"full_path").toString())));
483 long pathID = Util.findID(dataSource, (result.get(
"full_path").toString()));
485 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH_ID,
486 NbBundle.getMessage(
this.getClass(),
487 "Chrome.parentModuleName"), pathID));
489 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
490 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
491 ((result.get(
"url").toString() != null) ? result.get(
"url").toString() :
"")));
493 Long time = (Long.valueOf(result.get(
"start_time").toString()) / 1000000) - Long.valueOf(
"11644473600");
497 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
498 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"), time));
499 String domain = Util.extractDomain((result.get(
"url").toString() != null) ? result.get(
"url").toString() :
"");
500 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
501 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"), domain));
502 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
503 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
504 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
506 BlackboardArtifact bbart = this.addArtifact(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD, downloadFile, bbattributes);
508 bbartifacts.add(bbart);
516 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
517 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD, bbartifacts));
523 private void getLogin() {
524 FileManager fileManager = currentCase.getServices().getFileManager();
525 List<AbstractFile> signonFiles;
527 signonFiles = fileManager.
findFiles(dataSource,
"signons.sqlite",
"Chrome");
528 }
catch (TskCoreException ex) {
529 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getLogin.errMsg.errGettingFiles");
530 logger.log(Level.SEVERE, msg, ex);
531 this.addErrorMessage(this.getName() +
": " + msg);
535 if (signonFiles.isEmpty()) {
536 logger.log(Level.INFO,
"Didn't find any Chrome signon files.");
541 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
543 while (j < signonFiles.size()) {
544 AbstractFile signonFile = signonFiles.get(j++);
545 if (signonFile.getSize() == 0) {
551 }
catch (ReadContentInputStreamException ex) {
552 logger.log(Level.WARNING, String.format(
"Error reading Chrome login artifacts file '%s' (id=%d).",
553 signonFile.getName(), signonFile.getId()), ex);
554 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getLogin.errMsg.errAnalyzingFiles",
555 this.getName(), signonFile.getName()));
557 }
catch (IOException ex) {
558 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome login artifacts file '%s' (id=%d).",
559 temps, signonFile.getName(), signonFile.getId()), ex);
560 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getLogin.errMsg.errAnalyzingFiles",
561 this.getName(), signonFile.getName()));
564 File dbFile =
new File(temps);
569 List<HashMap<String, Object>> tempList = this.dbConnect(temps, LOGIN_QUERY);
570 logger.log(Level.INFO,
"{0}- Now getting login information from {1} with {2}artifacts identified.",
new Object[]{moduleName, temps, tempList.size()});
571 for (HashMap<String, Object> result : tempList) {
572 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
573 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
574 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
575 ((result.get(
"origin_url").toString() != null) ? result.get(
"origin_url").toString() :
"")));
579 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
580 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
581 (Long.valueOf(result.get(
"last_visit_time").toString()) / 1000000) - Long.valueOf(
"11644473600")));
582 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER,
583 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
584 ((result.get(
"from_visit").toString() != null) ? result.get(
"from_visit").toString() :
"")));
585 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME,
586 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
587 ((result.get(
"title").toString() != null) ? result.get(
"title").toString() :
"")));
588 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
589 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
590 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
591 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED,
592 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
593 (Util.extractDomain((result.get(
"origin_url").toString() != null) ? result.get(
"url").toString() :
""))));
594 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_USER_NAME,
595 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
596 ((result.get(
"username_value").toString() != null) ? result.get(
"username_value").toString().replaceAll(
"'",
"''") :
"")));
597 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
598 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
599 result.get(
"signon_realm").toString()));
601 BlackboardArtifact bbart = this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, signonFile, bbattributes);
603 bbartifacts.add(bbart);
607 Collection<BlackboardAttribute> osAcctAttributes =
new ArrayList<>();
608 osAcctAttributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_USER_NAME,
609 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
610 ((result.get(
"username_value").toString() != null) ? result.get(
"username_value").toString().replaceAll(
"'",
"''") :
"")));
611 this.addArtifact(ARTIFACT_TYPE.TSK_OS_ACCOUNT, signonFile, osAcctAttributes);
618 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
619 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY, bbartifacts));
622 private boolean isChromePreVersion30(String temps) {
623 String query =
"PRAGMA table_info(downloads)";
624 List<HashMap<String, Object>> columns = this.dbConnect(temps, query);
625 for (HashMap<String, Object> col : columns) {
626 if (col.get(
"name").equals(
"url")) {
static String getRATempPath(Case a_case, String mod)
static< T > long writeToFile(Content content, java.io.File outputFile, ProgressHandle progress, Future< T > worker, boolean source)
void fireModuleDataEvent(ModuleDataEvent moduleDataEvent)
boolean dataSourceIngestIsCancelled()
synchronized List< AbstractFile > findFiles(String fileName)
synchronized static Logger getLogger(String name)
static synchronized IngestServices getInstance()