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;
47 import org.
sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
49 import org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
51 import org.
sleuthkit.datamodel.ReadContentInputStream.ReadContentInputStreamException;
58 class Chrome
extends Extract {
60 private static final String HISTORY_QUERY =
"SELECT urls.url, urls.title, urls.visit_count, urls.typed_count, "
61 +
"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";
62 private static final String COOKIE_QUERY =
"SELECT name, value, host_key, expires_utc,last_access_utc, creation_utc FROM cookies";
63 private static final String DOWNLOAD_QUERY =
"SELECT full_path, url, start_time, received_bytes FROM downloads";
64 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";
65 private static final String LOGIN_QUERY =
"SELECT origin_url, username_value, signon_realm from logins";
67 private Content dataSource;
71 moduleName = NbBundle.getMessage(Chrome.class,
"Chrome.moduleName");
76 this.dataSource = dataSource;
77 this.context = context;
89 private void getHistory() {
90 FileManager fileManager = currentCase.getServices().getFileManager();
91 List<AbstractFile> historyFiles;
93 historyFiles = fileManager.
findFiles(dataSource,
"History",
"Chrome");
94 }
catch (TskCoreException ex) {
95 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getHistory.errMsg.errGettingFiles");
96 logger.log(Level.SEVERE, msg, ex);
97 this.addErrorMessage(this.getName() +
": " + msg);
102 List<AbstractFile> allocatedHistoryFiles =
new ArrayList<>();
103 for (AbstractFile historyFile : historyFiles) {
104 if (historyFile.isMetaFlagSet(TskData.TSK_FS_META_FLAG_ENUM.ALLOC)) {
105 allocatedHistoryFiles.add(historyFile);
110 if (allocatedHistoryFiles.isEmpty()) {
111 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getHistory.errMsg.couldntFindAnyFiles");
112 logger.log(Level.INFO, msg);
117 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
119 while (j < historyFiles.size()) {
121 final AbstractFile historyFile = historyFiles.get(j++);
122 if (historyFile.getSize() == 0) {
127 }
catch (ReadContentInputStreamException ex) {
128 logger.log(Level.WARNING, String.format(
"Error reading Chrome web history artifacts file '%s' (id=%d).",
129 historyFile.getName(), historyFile.getId()), ex);
130 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getHistory.errMsg.errAnalyzingFile",
131 this.getName(), historyFile.getName()));
133 }
catch (IOException ex) {
134 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome web history artifacts file '%s' (id=%d).",
135 temps, historyFile.getName(), historyFile.getId()), ex);
136 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getHistory.errMsg.errAnalyzingFile",
137 this.getName(), historyFile.getName()));
140 File dbFile =
new File(temps);
145 List<HashMap<String, Object>> tempList;
146 tempList = this.dbConnect(temps, HISTORY_QUERY);
147 logger.log(Level.INFO,
"{0}- Now getting history from {1} with {2}artifacts identified.",
new Object[]{moduleName, temps, tempList.size()});
148 for (HashMap<String, Object> result : tempList) {
149 Collection<BlackboardAttribute> bbattributes =
new ArrayList<BlackboardAttribute>();
150 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
151 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
152 ((result.get(
"url").toString() != null) ? result.get(
"url").toString() :
"")));
153 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
154 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
155 (Long.valueOf(result.get(
"last_visit_time").toString()) / 1000000) - Long.valueOf(
"11644473600")));
156 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER,
157 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
158 ((result.get(
"from_visit").toString() != null) ? result.get(
"from_visit").toString() :
"")));
159 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE,
160 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
161 ((result.get(
"title").toString() != null) ? result.get(
"title").toString() :
"")));
162 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
163 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
164 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
165 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
166 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
169 BlackboardArtifact bbart = this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, historyFile, bbattributes);
171 bbartifacts.add(bbart);
178 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
179 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY, bbartifacts));
185 private void getBookmark() {
186 FileManager fileManager = currentCase.getServices().getFileManager();
187 List<AbstractFile> bookmarkFiles;
189 bookmarkFiles = fileManager.
findFiles(dataSource,
"Bookmarks",
"Chrome");
190 }
catch (TskCoreException ex) {
191 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getBookmark.errMsg.errGettingFiles");
192 logger.log(Level.SEVERE, msg, ex);
193 this.addErrorMessage(this.getName() +
": " + msg);
197 if (bookmarkFiles.isEmpty()) {
198 logger.log(Level.INFO,
"Didn't find any Chrome bookmark files.");
203 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
206 while (j < bookmarkFiles.size()) {
207 AbstractFile bookmarkFile = bookmarkFiles.get(j++);
208 if (bookmarkFile.getSize() == 0) {
214 }
catch (ReadContentInputStreamException ex) {
215 logger.log(Level.WARNING, String.format(
"Error reading Chrome bookmark artifacts file '%s' (id=%d).",
216 bookmarkFile.getName(), bookmarkFile.getId()), ex);
217 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzingFile",
218 this.getName(), bookmarkFile.getName()));
220 }
catch (IOException ex) {
221 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome bookmark artifacts file '%s' (id=%d).",
222 temps, bookmarkFile.getName(), bookmarkFile.getId()), ex);
223 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzingFile",
224 this.getName(), bookmarkFile.getName()));
228 logger.log(Level.INFO,
"{0}- Now getting Bookmarks from {1}",
new Object[]{moduleName, temps});
229 File dbFile =
new File(temps);
235 FileReader tempReader;
237 tempReader =
new FileReader(temps);
238 }
catch (FileNotFoundException ex) {
239 logger.log(Level.SEVERE,
"Error while trying to read into the Bookmarks for Chrome.", ex);
240 this.addErrorMessage(
241 NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzeFile", this.getName(),
242 bookmarkFile.getName()));
246 final JsonParser parser =
new JsonParser();
247 JsonElement jsonElement;
248 JsonObject jElement, jRoot, jBookmark;
249 JsonArray jBookmarkArray;
252 jsonElement = parser.parse(tempReader);
253 jElement = jsonElement.getAsJsonObject();
254 jRoot = jElement.get(
"roots").getAsJsonObject();
255 jBookmark = jRoot.get(
"bookmark_bar").getAsJsonObject();
256 jBookmarkArray = jBookmark.getAsJsonArray(
"children");
257 }
catch (JsonIOException | JsonSyntaxException | IllegalStateException ex) {
258 logger.log(Level.WARNING,
"Error parsing Json from Chrome Bookmark.", ex);
259 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzingFile3",
260 this.getName(), bookmarkFile.getName()));
264 for (JsonElement result : jBookmarkArray) {
265 JsonObject address = result.getAsJsonObject();
266 if (address == null) {
269 JsonElement urlEl = address.get(
"url");
272 url = urlEl.getAsString();
277 JsonElement nameEl = address.get(
"name");
278 if (nameEl != null) {
279 name = nameEl.getAsString();
284 JsonElement dateEl = address.get(
"date_added");
285 if (dateEl != null) {
286 date = dateEl.getAsLong();
288 date = Long.valueOf(0);
292 BlackboardArtifact bbart = bookmarkFile.newArtifact(ARTIFACT_TYPE.TSK_WEB_BOOKMARK);
293 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
295 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
296 NbBundle.getMessage(
this.getClass(),
297 "Chrome.parentModuleName"), url));
298 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE,
299 NbBundle.getMessage(
this.getClass(),
300 "Chrome.parentModuleName"), name));
301 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED,
302 NbBundle.getMessage(
this.getClass(),
303 "Chrome.parentModuleName"), (date / 1000000) - Long.valueOf(
"11644473600")));
304 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
305 NbBundle.getMessage(
this.getClass(),
306 "Chrome.parentModuleName"),
307 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
308 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
309 NbBundle.getMessage(
this.getClass(),
310 "Chrome.parentModuleName"), domain));
311 bbart.addAttributes(bbattributes);
314 this.indexArtifact(bbart);
315 bbartifacts.add(bbart);
316 }
catch (TskCoreException ex) {
317 logger.log(Level.SEVERE,
"Error while trying to insert Chrome bookmark artifact{0}", ex);
318 this.addErrorMessage(
319 NbBundle.getMessage(
this.getClass(),
"Chrome.getBookmark.errMsg.errAnalyzingFile4",
320 this.getName(), bookmarkFile.getName()));
327 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
328 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_BOOKMARK, bbartifacts));
334 private void getCookie() {
336 FileManager fileManager = currentCase.getServices().getFileManager();
337 List<AbstractFile> cookiesFiles;
339 cookiesFiles = fileManager.
findFiles(dataSource,
"Cookies",
"Chrome");
340 }
catch (TskCoreException ex) {
341 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getCookie.errMsg.errGettingFiles");
342 logger.log(Level.SEVERE, msg, ex);
343 this.addErrorMessage(this.getName() +
": " + msg);
347 if (cookiesFiles.isEmpty()) {
348 logger.log(Level.INFO,
"Didn't find any Chrome cookies files.");
353 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
355 while (j < cookiesFiles.size()) {
356 AbstractFile cookiesFile = cookiesFiles.get(j++);
357 if (cookiesFile.getSize() == 0) {
363 }
catch (ReadContentInputStreamException ex) {
364 logger.log(Level.WARNING, String.format(
"Error reading Chrome cookie artifacts file '%s' (id=%d).",
365 cookiesFile.getName(), cookiesFile.getId()), ex);
366 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getCookie.errMsg.errAnalyzeFile",
367 this.getName(), cookiesFile.getName()));
369 }
catch (IOException ex) {
370 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome cookie artifacts file '%s' (id=%d).",
371 temps, cookiesFile.getName(), cookiesFile.getId()), ex);
372 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getCookie.errMsg.errAnalyzeFile",
373 this.getName(), cookiesFile.getName()));
376 File dbFile =
new File(temps);
382 List<HashMap<String, Object>> tempList = this.dbConnect(temps, COOKIE_QUERY);
383 logger.log(Level.INFO,
"{0}- Now getting cookies from {1} with {2}artifacts identified.",
new Object[]{moduleName, temps, tempList.size()});
384 for (HashMap<String, Object> result : tempList) {
385 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
386 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
387 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
388 ((result.get(
"host_key").toString() != null) ? result.get(
"host_key").toString() :
"")));
389 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME,
390 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
391 (Long.valueOf(result.get(
"last_access_utc").toString()) / 1000000) - Long.valueOf(
"11644473600")));
393 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME,
394 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
395 ((result.get(
"name").toString() != null) ? result.get(
"name").toString() :
"")));
396 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE,
397 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
398 ((result.get(
"value").toString() != null) ? result.get(
"value").toString() :
"")));
399 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
400 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
401 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
402 String domain = result.get(
"host_key").toString();
403 domain = domain.replaceFirst(
"^\\.+(?!$)",
"");
404 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
405 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"), domain));
407 BlackboardArtifact bbart = this.addArtifact(ARTIFACT_TYPE.TSK_WEB_COOKIE, cookiesFile, bbattributes);
409 bbartifacts.add(bbart);
417 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
418 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_COOKIE, bbartifacts));
424 private void getDownload() {
425 FileManager fileManager = currentCase.getServices().getFileManager();
426 List<AbstractFile> downloadFiles;
428 downloadFiles = fileManager.
findFiles(dataSource,
"History",
"Chrome");
429 }
catch (TskCoreException ex) {
430 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getDownload.errMsg.errGettingFiles");
431 logger.log(Level.SEVERE, msg, ex);
432 this.addErrorMessage(this.getName() +
": " + msg);
436 if (downloadFiles.isEmpty()) {
437 logger.log(Level.INFO,
"Didn't find any Chrome download files.");
442 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
444 while (j < downloadFiles.size()) {
445 AbstractFile downloadFile = downloadFiles.get(j++);
446 if (downloadFile.getSize() == 0) {
452 }
catch (ReadContentInputStreamException ex) {
453 logger.log(Level.WARNING, String.format(
"Error reading Chrome download artifacts file '%s' (id=%d).",
454 downloadFile.getName(), downloadFile.getId()), ex);
455 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getDownload.errMsg.errAnalyzeFiles1",
456 this.getName(), downloadFile.getName()));
458 }
catch (IOException ex) {
459 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome download artifacts file '%s' (id=%d).",
460 temps, downloadFile.getName(), downloadFile.getId()), ex);
461 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getDownload.errMsg.errAnalyzeFiles1",
462 this.getName(), downloadFile.getName()));
465 File dbFile =
new File(temps);
471 List<HashMap<String, Object>> tempList;
473 if (isChromePreVersion30(temps)) {
474 tempList = this.dbConnect(temps, DOWNLOAD_QUERY);
476 tempList = this.dbConnect(temps, DOWNLOAD_QUERY_V30);
479 logger.log(Level.INFO,
"{0}- Now getting downloads from {1} with {2}artifacts identified.",
new Object[]{moduleName, temps, tempList.size()});
480 for (HashMap<String, Object> result : tempList) {
481 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
482 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH,
483 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"), (result.get(
"full_path").toString())));
484 long pathID = Util.findID(dataSource, (result.get(
"full_path").toString()));
486 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH_ID,
487 NbBundle.getMessage(
this.getClass(),
488 "Chrome.parentModuleName"), pathID));
490 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
491 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
492 ((result.get(
"url").toString() != null) ? result.get(
"url").toString() :
"")));
494 Long time = (Long.valueOf(result.get(
"start_time").toString()) / 1000000) - Long.valueOf(
"11644473600");
498 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
499 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"), time));
501 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
502 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"), domain));
503 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
504 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
505 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
507 BlackboardArtifact bbart = this.addArtifact(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD, downloadFile, bbattributes);
509 bbartifacts.add(bbart);
517 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
518 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD, bbartifacts));
524 private void getLogin() {
525 FileManager fileManager = currentCase.getServices().getFileManager();
526 List<AbstractFile> signonFiles;
528 signonFiles = fileManager.
findFiles(dataSource,
"signons.sqlite",
"Chrome");
529 }
catch (TskCoreException ex) {
530 String msg = NbBundle.getMessage(this.getClass(),
"Chrome.getLogin.errMsg.errGettingFiles");
531 logger.log(Level.SEVERE, msg, ex);
532 this.addErrorMessage(this.getName() +
": " + msg);
536 if (signonFiles.isEmpty()) {
537 logger.log(Level.INFO,
"Didn't find any Chrome signon files.");
542 Collection<BlackboardArtifact> bbartifacts =
new ArrayList<>();
544 while (j < signonFiles.size()) {
545 AbstractFile signonFile = signonFiles.get(j++);
546 if (signonFile.getSize() == 0) {
552 }
catch (ReadContentInputStreamException ex) {
553 logger.log(Level.WARNING, String.format(
"Error reading Chrome login artifacts file '%s' (id=%d).",
554 signonFile.getName(), signonFile.getId()), ex);
555 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getLogin.errMsg.errAnalyzingFiles",
556 this.getName(), signonFile.getName()));
558 }
catch (IOException ex) {
559 logger.log(Level.SEVERE, String.format(
"Error writing temp sqlite db file '%s' for Chrome login artifacts file '%s' (id=%d).",
560 temps, signonFile.getName(), signonFile.getId()), ex);
561 this.addErrorMessage(NbBundle.getMessage(
this.getClass(),
"Chrome.getLogin.errMsg.errAnalyzingFiles",
562 this.getName(), signonFile.getName()));
565 File dbFile =
new File(temps);
570 List<HashMap<String, Object>> tempList = this.dbConnect(temps, LOGIN_QUERY);
571 logger.log(Level.INFO,
"{0}- Now getting login information from {1} with {2}artifacts identified.",
new Object[]{moduleName, temps, tempList.size()});
572 for (HashMap<String, Object> result : tempList) {
573 Collection<BlackboardAttribute> bbattributes =
new ArrayList<>();
574 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL,
575 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
576 ((result.get(
"origin_url").toString() != null) ? result.get(
"origin_url").toString() :
"")));
580 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED,
581 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
582 (Long.valueOf(result.get(
"last_visit_time").toString()) / 1000000) - Long.valueOf(
"11644473600")));
583 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER,
584 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
585 ((result.get(
"from_visit").toString() != null) ? result.get(
"from_visit").toString() :
"")));
586 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME,
587 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
588 ((result.get(
"title").toString() != null) ? result.get(
"title").toString() :
"")));
589 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME,
590 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
591 NbBundle.getMessage(
this.getClass(),
"Chrome.moduleName")));
592 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL_DECODED,
593 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
595 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_USER_NAME,
596 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
597 ((result.get(
"username_value").toString() != null) ? result.get(
"username_value").toString().replaceAll(
"'",
"''") :
"")));
598 bbattributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN,
599 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
600 result.get(
"signon_realm").toString()));
602 BlackboardArtifact bbart = this.addArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY, signonFile, bbattributes);
604 bbartifacts.add(bbart);
608 Collection<BlackboardAttribute> osAcctAttributes =
new ArrayList<>();
609 osAcctAttributes.add(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_USER_NAME,
610 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
611 ((result.get(
"username_value").toString() != null) ? result.get(
"username_value").toString().replaceAll(
"'",
"''") :
"")));
612 this.addArtifact(ARTIFACT_TYPE.TSK_OS_ACCOUNT, signonFile, osAcctAttributes);
619 NbBundle.getMessage(
this.getClass(),
"Chrome.parentModuleName"),
620 BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_HISTORY, bbartifacts));
623 private boolean isChromePreVersion30(String temps) {
624 String query =
"PRAGMA table_info(downloads)";
625 List<HashMap<String, Object>> columns = this.dbConnect(temps, query);
626 for (HashMap<String, Object> col : columns) {
627 if (col.get(
"name").equals(
"url")) {
static String extractDomain(String urlString)
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()