19 package org.sleuthkit.autopsy.coreutils;
21 import java.util.Arrays;
22 import java.util.Collection;
23 import java.util.Collections;
24 import java.util.List;
25 import java.util.logging.Level;
26 import org.apache.commons.lang3.StringUtils;
31 import org.
sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
33 import org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE;
127 this.dbAbstractFile = dbFile;
149 public AppDBParserHelper(String moduleName, AbstractFile dbFile, Account.Type
accountsType, Account.Type selfAccountType, Account.Address selfAccountAddress) throws TskCoreException {
152 this.dbAbstractFile = dbFile;
170 this.dbAbstractFile = dbFile;
171 this.selfAccountInstance = null;
192 public BlackboardArtifact
addContact(String contactAccountUniqueID, String contactName,
193 String phoneNumber, String homePhoneNumber,
194 String mobilePhoneNumber, String emailAddr) {
195 return addContact(contactAccountUniqueID, contactName,phoneNumber,
196 homePhoneNumber,mobilePhoneNumber, emailAddr,
197 Collections.<BlackboardAttribute>emptyList() );
219 public BlackboardArtifact
addContact(String contactAccountUniqueID, String contactName,
220 String phoneNumber, String homePhoneNumber,
221 String mobilePhoneNumber, String emailAddr,
222 Collection<BlackboardAttribute> additionalAttributes) {
224 BlackboardArtifact contactArtifact = null;
227 contactArtifact = this.dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_CONTACT);
230 contactArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, moduleName, contactName));
232 if (!StringUtils.isEmpty(phoneNumber)) {
233 contactArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER, moduleName, phoneNumber));
235 if (!StringUtils.isEmpty(homePhoneNumber)) {
236 contactArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_HOME, moduleName, homePhoneNumber));
238 if (!StringUtils.isEmpty(mobilePhoneNumber)) {
239 contactArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_MOBILE, moduleName, mobilePhoneNumber));
241 if (!StringUtils.isEmpty(emailAddr)) {
242 contactArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_EMAIL, moduleName, emailAddr));
246 for (BlackboardAttribute additionalAttribute: additionalAttributes) {
247 contactArtifact.addAttribute(additionalAttribute);
253 if (selfAccountInstance != null) {
254 addRelationship (selfAccountInstance, contactAccountInstance, contactArtifact, Relationship.Type.CONTACT, 0 );
259 }
catch (TskCoreException ex) {
260 logger.log(Level.SEVERE,
"Unable to add contact artifact", ex);
263 catch (Blackboard.BlackboardException ex) {
264 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((contactArtifact != null)? contactArtifact.getArtifactID() :
"")), ex);
267 return contactArtifact;
278 private AccountFileInstance
createAccountInstance(Account.Type accountType, String accountUniqueID )
throws TskCoreException {
292 private void addRelationship(AccountFileInstance selfAccountInstance, AccountFileInstance otherAccountInstance,
293 BlackboardArtifact sourceArtifact, Relationship.Type relationshipType,
long dateTime) {
295 if (selfAccountInstance.getAccount() != otherAccountInstance.getAccount()) {
297 Collections.singletonList(otherAccountInstance), sourceArtifact, relationshipType, dateTime);
299 }
catch (TskCoreException | TskDataException ex) {
300 logger.log(Level.SEVERE, String.format(
"Unable to add relationship between account %s and account %s", selfAccountInstance.toString(), otherAccountInstance.toString()), ex);
326 Account.Address fromAddress,
327 Account.Address toAddress,
329 String subject, String messageText, String threadId) {
331 fromAddress, toAddress, dateTime, readStatus,
332 subject, messageText, threadId,
333 Collections.<BlackboardAttribute>emptyList());
358 Account.Address fromAddress,
359 Account.Address toAddress,
361 String messageText, String threadId,
362 Collection<BlackboardAttribute> otherAttributesList) {
366 Arrays.asList(toAddress),
367 dateTime, readStatus,
368 subject, messageText, threadId,
369 otherAttributesList);
395 Account.Address fromAddress,
396 List<Account.Address> recipientsList,
398 String subject, String messageText, String threadId) {
400 fromAddress, recipientsList,
401 dateTime, readStatus,
402 subject, messageText, threadId,
403 Collections.<BlackboardAttribute>emptyList());
409 Account.Address fromAddress,
410 List<Account.Address> recipientsList,
412 String subject, String messageText,
414 Collection<BlackboardAttribute> otherAttributesList) {
417 BlackboardArtifact msgArtifact = null;
420 msgArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_MESSAGE);
422 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, moduleName, dateTime));
425 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_READ_STATUS, moduleName, (readStatus ==
MessageReadStatusEnum.
READ) ? 1 : 0));
429 if (!StringUtils.isEmpty(messageType)) {
430 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE, moduleName, messageType));
433 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DIRECTION, moduleName, direction.
getString()));
435 if (fromAddress != null && !StringUtils.isEmpty(fromAddress.getDisplayName())) {
436 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM, moduleName, fromAddress.getDisplayName()));
440 if (toAddresses != null && !StringUtils.isEmpty(toAddresses)) {
441 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO, moduleName, toAddresses));
444 if (!StringUtils.isEmpty(subject)) {
445 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_SUBJECT, moduleName, subject));
447 if (!StringUtils.isEmpty(messageText)) {
448 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TEXT, moduleName, messageText));
450 if (!StringUtils.isEmpty(threadId)) {
451 msgArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_THREAD_ID, moduleName, threadId));
455 for (BlackboardAttribute otherAttribute: otherAttributesList) {
456 msgArtifact.addAttribute(otherAttribute);
460 if (fromAddress != null) {
464 if (selfAccountInstance != null) {
465 addRelationship (selfAccountInstance, senderAccountInstance, msgArtifact, Relationship.Type.MESSAGE, dateTime );
470 if (recipientsList != null) {
471 for(Account.Address recipient : recipientsList) {
476 if (selfAccountInstance != null) {
477 addRelationship (selfAccountInstance, recipientAccountInstance, msgArtifact, Relationship.Type.MESSAGE, dateTime );
484 }
catch (TskCoreException ex) {
485 logger.log(Level.SEVERE,
"Unable to add message artifact", ex);
488 catch (Blackboard.BlackboardException ex) {
489 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((msgArtifact != null)? msgArtifact.getArtifactID() :
"")), ex);
511 Account.Address fromAddress, Account.Address toAddress,
512 long startDateTime,
long endDateTime) {
513 return addCalllog(direction, fromAddress, toAddress,
514 startDateTime, endDateTime,
534 Account.Address fromAddress, Account.Address toAddress,
535 long startDateTime,
long endDateTime,
CallMediaType mediaType) {
536 return addCalllog(direction, fromAddress, toAddress,
537 startDateTime, endDateTime, mediaType,
538 Collections.<BlackboardAttribute>emptyList());
558 Account.Address fromAddress,
559 Account.Address toAddress,
560 long startDateTime,
long endDateTime,
562 Collection<BlackboardAttribute> otherAttributesList) {
565 Arrays.asList(toAddress),
566 startDateTime, endDateTime,
568 otherAttributesList);
587 Account.Address fromAddress,
588 Collection<Account.Address> toAddressList,
589 long startDateTime,
long endDateTime) {
591 return addCalllog(direction, fromAddress, toAddressList,
592 startDateTime, endDateTime,
613 Account.Address fromAddress,
614 Collection<Account.Address> toAddressList,
615 long startDateTime,
long endDateTime,
618 return addCalllog(direction, fromAddress, toAddressList,
619 startDateTime, endDateTime,
621 Collections.<BlackboardAttribute>emptyList());
642 Account.Address fromAddress,
643 Collection<Account.Address> toAddressList,
644 long startDateTime,
long endDateTime,
646 Collection<BlackboardAttribute> otherAttributesList) {
647 BlackboardArtifact callLogArtifact = null;
650 callLogArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_CALLLOG);
653 if (startDateTime > 0) {
654 callLogArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_START, moduleName, startDateTime));
656 if (endDateTime > 0) {
657 callLogArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_END, moduleName, endDateTime));
661 callLogArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DIRECTION, moduleName, direction.
getString()));
663 if (fromAddress != null) {
664 callLogArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM, moduleName, fromAddress.getUniqueID()));
665 if (!StringUtils.isEmpty(fromAddress.getDisplayName())) {
666 callLogArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, moduleName, fromAddress.getDisplayName()));
672 if (!StringUtils.isEmpty(toAddresses)) {
673 callLogArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO, moduleName, toAddresses));
677 for (BlackboardAttribute otherAttribute: otherAttributesList) {
678 callLogArtifact.addAttribute(otherAttribute);
682 if (fromAddress != null) {
684 if (selfAccountInstance != null) {
685 addRelationship (selfAccountInstance, callerAccountInstance, callLogArtifact, Relationship.Type.CALL_LOG, (startDateTime > 0) ? startDateTime : 0 );
690 if (toAddressList != null) {
691 for(Account.Address callee : toAddressList) {
693 if (selfAccountInstance != null) {
694 addRelationship (selfAccountInstance, calleeAccountInstance, callLogArtifact, Relationship.Type.CALL_LOG, (startDateTime > 0) ? startDateTime : 0 );
701 }
catch (TskCoreException ex) {
702 logger.log(Level.SEVERE,
"Unable to add calllog artifact", ex);
705 catch (Blackboard.BlackboardException ex) {
706 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((callLogArtifact != null)? callLogArtifact.getArtifactID() :
"")), ex);
710 return callLogArtifact;
724 public BlackboardArtifact
addWebBookmark(String url, String title,
long creationTime, String progName) {
726 Collections.<BlackboardAttribute>emptyList());
740 public BlackboardArtifact
addWebBookmark(String url, String title,
long creationTime, String progName,
741 Collection<BlackboardAttribute> otherAttributesList) {
743 BlackboardArtifact bookMarkArtifact = null;
746 bookMarkArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_WEB_BOOKMARK);
749 bookMarkArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL, moduleName, url));
750 if (creationTime > 0) {
751 bookMarkArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED, moduleName, creationTime));
754 if (!StringUtils.isEmpty(title)) {
755 bookMarkArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE, moduleName, title));
757 if (!StringUtils.isEmpty(url)) {
758 bookMarkArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN, moduleName,
NetworkUtils.
extractDomain(url)));
760 if (!StringUtils.isEmpty(progName)) {
761 bookMarkArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, moduleName, progName));
765 for (BlackboardAttribute otherAttribute: otherAttributesList) {
766 bookMarkArtifact.addAttribute(otherAttribute);
771 }
catch (TskCoreException ex) {
772 logger.log(Level.SEVERE,
"Unable to add bookmark artifact", ex);
775 catch (Blackboard.BlackboardException ex) {
776 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((bookMarkArtifact != null)? bookMarkArtifact.getArtifactID() :
"")), ex);
780 return bookMarkArtifact;
796 String name, String value, String programName) {
798 return addWebCookie(url, creationTime, name, value, programName,
799 Collections.<BlackboardAttribute>emptyList());
816 long creationTime, String name, String value, String programName,
817 Collection<BlackboardAttribute> otherAttributesList) {
820 BlackboardArtifact cookieArtifact = null;
823 cookieArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_WEB_COOKIE);
826 cookieArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL, moduleName, url));
827 if (creationTime > 0) {
828 cookieArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, moduleName, creationTime));
831 if (!StringUtils.isEmpty(name)) {
832 cookieArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, moduleName, name));
834 if (!StringUtils.isEmpty(value)) {
835 cookieArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE, moduleName, value));
837 if (!StringUtils.isEmpty(url)) {
838 cookieArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN, moduleName,
NetworkUtils.
extractDomain(url)));
840 if (!StringUtils.isEmpty(programName)) {
841 cookieArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, moduleName, programName));
845 for (BlackboardAttribute otherAttribute: otherAttributesList) {
846 cookieArtifact.addAttribute(otherAttribute);
851 }
catch (TskCoreException ex) {
852 logger.log(Level.SEVERE,
"Unable to add bookmark artifact", ex);
855 catch (Blackboard.BlackboardException ex) {
856 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((cookieArtifact != null)? cookieArtifact.getArtifactID() :
"")), ex);
860 return cookieArtifact;
875 String referrer, String title, String programName) {
876 return addWebHistory(url, accessTime, referrer, title, programName,
877 Collections.<BlackboardAttribute>emptyList());
895 String referrer, String title, String programName,
896 Collection<BlackboardAttribute> otherAttributesList) {
898 BlackboardArtifact webHistoryArtifact = null;
901 webHistoryArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_WEB_HISTORY);
904 webHistoryArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL, moduleName, url));
905 if (accessTime > 0) {
906 webHistoryArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED, moduleName, accessTime));
909 if (!StringUtils.isEmpty(title)) {
910 webHistoryArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_TITLE, moduleName, title));
912 if (!StringUtils.isEmpty(referrer)) {
913 webHistoryArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_REFERRER, moduleName, referrer));
916 if (!StringUtils.isEmpty(programName)) {
917 webHistoryArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, moduleName, programName));
919 if (!StringUtils.isEmpty(url)) {
920 webHistoryArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN, moduleName,
NetworkUtils.
extractDomain(url)));
924 for (BlackboardAttribute otherAttribute: otherAttributesList) {
925 webHistoryArtifact.addAttribute(otherAttribute);
930 }
catch (TskCoreException ex) {
931 logger.log(Level.SEVERE,
"Unable to add bookmark artifact", ex);
934 catch (Blackboard.BlackboardException ex) {
935 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((webHistoryArtifact != null)? webHistoryArtifact.getArtifactID() :
"")), ex);
939 return webHistoryArtifact;
952 public BlackboardArtifact
addWebDownload(String path,
long startTime, String url, String progName) {
953 return addWebDownload(path, startTime, url, progName, Collections.<BlackboardAttribute>emptyList() );
968 public BlackboardArtifact
addWebDownload(String path,
long startTime, String url, String programName,
969 Collection<BlackboardAttribute> otherAttributesList ) {
971 BlackboardArtifact webDownloadArtifact = null;
974 webDownloadArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD);
977 webDownloadArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_URL, moduleName, url));
979 webDownloadArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED, moduleName, startTime));
981 webDownloadArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PATH, moduleName, path));
989 if (!StringUtils.isEmpty(programName)) {
990 webDownloadArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, moduleName, programName));
992 if (!StringUtils.isEmpty(url)) {
993 webDownloadArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DOMAIN, moduleName,
NetworkUtils.
extractDomain(url)));
997 for (BlackboardAttribute otherAttribute: otherAttributesList) {
998 webDownloadArtifact.addAttribute(otherAttribute);
1003 }
catch (TskCoreException ex) {
1004 logger.log(Level.SEVERE,
"Unable to add web download artifact", ex);
1007 catch (Blackboard.BlackboardException ex) {
1008 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((webDownloadArtifact != null)? webDownloadArtifact.getArtifactID() :
"")), ex);
1012 return webDownloadArtifact;
1028 long creationTime,
long accessTime,
int count) {
1030 Collections.<BlackboardAttribute>emptyList() );
1046 long creationTime,
long accessTime,
int count,
1047 Collection<BlackboardAttribute> otherAttributesList ) {
1048 BlackboardArtifact webFormAutofillArtifact = null;
1051 webFormAutofillArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_WEB_FORM_AUTOFILL);
1054 webFormAutofillArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, moduleName, name));
1055 webFormAutofillArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_VALUE, moduleName, value));
1056 if (creationTime > 0) {
1057 webFormAutofillArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED, moduleName, creationTime));
1059 if (accessTime > 0) {
1060 webFormAutofillArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED, moduleName, accessTime));
1063 webFormAutofillArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COUNT, moduleName, count));
1067 for (BlackboardAttribute otherAttribute: otherAttributesList) {
1068 webFormAutofillArtifact.addAttribute(otherAttribute);
1073 }
catch (TskCoreException ex) {
1074 logger.log(Level.SEVERE,
"Unable to add web form autofill artifact", ex);
1077 catch (Blackboard.BlackboardException ex) {
1078 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((webFormAutofillArtifact != null)? webFormAutofillArtifact.getArtifactID() :
"")), ex);
1082 return webFormAutofillArtifact;
1100 String phoneNumber, String mailingAddress,
1101 long creationTime,
long accessTime,
int count ) {
1103 mailingAddress, creationTime, accessTime, count,
1104 Collections.<BlackboardAttribute>emptyList() );
1122 String phoneNumber, String mailingAddress,
1123 long creationTime,
long accessTime,
int count,
1124 Collection<BlackboardAttribute> otherAttributesList ) {
1126 BlackboardArtifact webFormAddressArtifact = null;
1129 webFormAddressArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_WEB_FORM_AUTOFILL);
1132 webFormAddressArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, moduleName, personName));
1133 if (creationTime > 0) {
1134 webFormAddressArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED, moduleName, creationTime));
1136 if (accessTime > 0) {
1137 webFormAddressArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED, moduleName, accessTime));
1140 webFormAddressArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COUNT, moduleName, count));
1143 if (!StringUtils.isEmpty(email)) {
1144 webFormAddressArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_EMAIL, moduleName, email));
1146 if (!StringUtils.isEmpty(phoneNumber)) {
1147 webFormAddressArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER, moduleName, phoneNumber));
1149 if (!StringUtils.isEmpty(mailingAddress)) {
1150 webFormAddressArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_LOCATION, moduleName, mailingAddress));
1154 for (BlackboardAttribute otherAttribute: otherAttributesList) {
1155 webFormAddressArtifact.addAttribute(otherAttribute);
1160 }
catch (TskCoreException ex) {
1161 logger.log(Level.SEVERE,
"Unable to add web form address artifact", ex);
1164 catch (Blackboard.BlackboardException ex) {
1165 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((webFormAddressArtifact != null)? webFormAddressArtifact.getArtifactID() :
"")), ex);
1169 return webFormAddressArtifact;
1182 Collections.<BlackboardAttribute>emptyList() );
1195 Collection<BlackboardAttribute> otherAttributesList ) {
1197 BlackboardArtifact installedProgramArtifact = null;
1200 installedProgramArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_INSTALLED_PROG);
1203 installedProgramArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, moduleName, programName));
1204 if (dateInstalled > 0) {
1205 installedProgramArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, moduleName, dateInstalled));
1209 for (BlackboardAttribute otherAttribute: otherAttributesList) {
1210 installedProgramArtifact.addAttribute(otherAttribute);
1215 }
catch (TskCoreException ex) {
1216 logger.log(Level.SEVERE,
"Unable to add installed program artifact", ex);
1219 catch (Blackboard.BlackboardException ex) {
1220 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((installedProgramArtifact != null)? installedProgramArtifact.getArtifactID() :
"")), ex);
1224 return installedProgramArtifact;
1240 long timeStamp, String poiName, String programName) {
1242 return addGPSLocation(latitude, longitude, timeStamp, poiName, programName,
1243 Collections.<BlackboardAttribute>emptyList());
1258 public BlackboardArtifact
addGPSLocation(
double latitude,
double longitude,
long timeStamp, String name, String programName,
1259 Collection<BlackboardAttribute> otherAttributesList) {
1261 BlackboardArtifact gpsTrackpointArtifact = null;
1264 gpsTrackpointArtifact = dbAbstractFile.newArtifact(ARTIFACT_TYPE.TSK_GPS_TRACKPOINT);
1267 gpsTrackpointArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_GEO_LATITUDE, moduleName, latitude));
1268 gpsTrackpointArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE, moduleName, longitude));
1269 if (timeStamp > 0) {
1270 gpsTrackpointArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_DATETIME, moduleName, timeStamp));
1273 if (!StringUtils.isEmpty(name)) {
1274 gpsTrackpointArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, moduleName, name));
1277 if (!StringUtils.isEmpty(programName)) {
1278 gpsTrackpointArtifact.addAttribute(
new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_PROG_NAME, moduleName, programName));
1282 for (BlackboardAttribute otherAttribute: otherAttributesList) {
1283 gpsTrackpointArtifact.addAttribute(otherAttribute);
1288 }
catch (TskCoreException ex) {
1289 logger.log(Level.SEVERE,
"Unable to add GPS trackpoint artifact", ex);
1292 catch (Blackboard.BlackboardException ex) {
1293 logger.log(Level.SEVERE, String.format(
"Unable to post artifact %s", ((gpsTrackpointArtifact != null)? gpsTrackpointArtifact.getArtifactID() :
"")), ex);
1297 return gpsTrackpointArtifact;
1309 String toAddresses =
"";
1310 if (addressList != null && (!addressList.isEmpty())) {
1311 StringBuilder toAddressesSb =
new StringBuilder();
1312 for(Account.Address address : addressList) {
1313 String displayAddress = !StringUtils.isEmpty(address.getDisplayName()) ? address.getDisplayName() : address.getUniqueID();
1314 toAddressesSb = toAddressesSb.length() > 0 ? toAddressesSb.append(
",").append(displayAddress) : toAddressesSb.append(displayAddress);
1316 toAddresses = toAddressesSb.toString();
BlackboardArtifact addGPSLocation(double latitude, double longitude, long timeStamp, String poiName, String programName)
BlackboardArtifact addMessage(String messageType, CommunicationDirection direction, Account.Address fromAddress, Account.Address toAddress, long dateTime, MessageReadStatusEnum readStatus, String subject, String messageText, String threadId, Collection< BlackboardAttribute > otherAttributesList)
BlackboardArtifact addCalllog(CommunicationDirection direction, Account.Address fromAddress, Collection< Account.Address > toAddressList, long startDateTime, long endDateTime, CallMediaType mediaType, Collection< BlackboardAttribute > otherAttributesList)
AppDBParserHelper(String moduleName, AbstractFile dbFile)
BlackboardArtifact addContact(String contactAccountUniqueID, String contactName, String phoneNumber, String homePhoneNumber, String mobilePhoneNumber, String emailAddr)
BlackboardArtifact addWebBookmark(String url, String title, long creationTime, String progName)
BlackboardArtifact addCalllog(CommunicationDirection direction, Account.Address fromAddress, Account.Address toAddress, long startDateTime, long endDateTime, CallMediaType mediaType)
final AccountFileInstance selfAccountInstance
static String extractDomain(String urlString)
AppDBParserHelper(String moduleName, AbstractFile dbFile, Account.Type accountsType, Account.Type selfAccountType, Account.Address selfAccountAddress)
String addressListToString(Collection< Account.Address > addressList)
UNREAD
read status is unknown
BlackboardArtifact addWebFormAddress(String personName, String email, String phoneNumber, String mailingAddress, long creationTime, long accessTime, int count, Collection< BlackboardAttribute > otherAttributesList)
BlackboardArtifact addWebHistory(String url, long accessTime, String referrer, String title, String programName, Collection< BlackboardAttribute > otherAttributesList)
BlackboardArtifact addCalllog(CommunicationDirection direction, Account.Address fromAddress, Collection< Account.Address > toAddressList, long startDateTime, long endDateTime, CallMediaType mediaType)
final AbstractFile dbAbstractFile
BlackboardArtifact addWebDownload(String path, long startTime, String url, String programName, Collection< BlackboardAttribute > otherAttributesList)
BlackboardArtifact addWebHistory(String url, long accessTime, String referrer, String title, String programName)
BlackboardArtifact addInstalledProgram(String programName, long dateInstalled)
BlackboardArtifact addCalllog(CommunicationDirection direction, Account.Address fromAddress, Account.Address toAddress, long startDateTime, long endDateTime)
CommunicationDirection(String dir)
static final Logger logger
BlackboardArtifact addContact(String contactAccountUniqueID, String contactName, String phoneNumber, String homePhoneNumber, String mobilePhoneNumber, String emailAddr, Collection< BlackboardAttribute > additionalAttributes)
AccountFileInstance createAccountInstance(Account.Type accountType, String accountUniqueID)
BlackboardArtifact addWebBookmark(String url, String title, long creationTime, String progName, Collection< BlackboardAttribute > otherAttributesList)
final Account.Type accountsType
BlackboardArtifact addGPSLocation(double latitude, double longitude, long timeStamp, String name, String programName, Collection< BlackboardAttribute > otherAttributesList)
BlackboardArtifact addCalllog(CommunicationDirection direction, Account.Address fromAddress, Account.Address toAddress, long startDateTime, long endDateTime, CallMediaType mediaType, Collection< BlackboardAttribute > otherAttributesList)
void addRelationship(AccountFileInstance selfAccountInstance, AccountFileInstance otherAccountInstance, BlackboardArtifact sourceArtifact, Relationship.Type relationshipType, long dateTime)
AppDBParserHelper(String moduleName, AbstractFile dbFile, Account.Type accountsType)
SleuthkitCase getSleuthkitCase()
BlackboardArtifact addMessage(String messageType, CommunicationDirection direction, Account.Address fromAddress, Account.Address toAddress, long dateTime, MessageReadStatusEnum readStatus, String subject, String messageText, String threadId)
BlackboardArtifact addWebFormAutofill(String name, String value, long creationTime, long accessTime, int count, Collection< BlackboardAttribute > otherAttributesList)
static Case getCurrentCase()
synchronized static Logger getLogger(String name)
BlackboardArtifact addMessage(String messageType, CommunicationDirection direction, Account.Address fromAddress, List< Account.Address > recipientsList, long dateTime, MessageReadStatusEnum readStatus, String subject, String messageText, String threadId)
BlackboardArtifact addMessage(String messageType, CommunicationDirection direction, Account.Address fromAddress, List< Account.Address > recipientsList, long dateTime, MessageReadStatusEnum readStatus, String subject, String messageText, String threadId, Collection< BlackboardAttribute > otherAttributesList)
BlackboardArtifact addInstalledProgram(String programName, long dateInstalled, Collection< BlackboardAttribute > otherAttributesList)
READ
message has not been read
BlackboardArtifact addWebFormAutofill(String name, String value, long creationTime, long accessTime, int count)
BlackboardArtifact addWebCookie(String url, long creationTime, String name, String value, String programName, Collection< BlackboardAttribute > otherAttributesList)
BlackboardArtifact addWebFormAddress(String personName, String email, String phoneNumber, String mailingAddress, long creationTime, long accessTime, int count)
BlackboardArtifact addWebCookie(String url, long creationTime, String name, String value, String programName)
BlackboardArtifact addWebDownload(String path, long startTime, String url, String progName)
BlackboardArtifact addCalllog(CommunicationDirection direction, Account.Address fromAddress, Collection< Account.Address > toAddressList, long startDateTime, long endDateTime)