mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge branch 'develop', remote-tracking branch 'upstream' into Prefetch-SRU-Update
This commit is contained in:
commit
b1598fca9e
@ -136,12 +136,12 @@
|
|||||||
tofile="${ext.dir}/sleuthkit-${TSK_VERSION}.jar"/>
|
tofile="${ext.dir}/sleuthkit-${TSK_VERSION}.jar"/>
|
||||||
<copy file="${env.TSK_HOME}/bindings/java/lib/sqlite-jdbc-3.42.0.1.jar"
|
<copy file="${env.TSK_HOME}/bindings/java/lib/sqlite-jdbc-3.42.0.1.jar"
|
||||||
tofile="${ext.dir}/sqlite-jdbc-3.42.0.1.jar"/>
|
tofile="${ext.dir}/sqlite-jdbc-3.42.0.1.jar"/>
|
||||||
<copy file="${env.TSK_HOME}/bindings/java/lib/postgresql-42.3.5.jar"
|
<copy file="${env.TSK_HOME}/bindings/java/lib/postgresql-42.7.3.jar"
|
||||||
tofile="${ext.dir}/postgresql-42.3.5.jar"/>
|
tofile="${ext.dir}/postgresql-42.7.3.jar"/>
|
||||||
<copy file="${env.TSK_HOME}/bindings/java/lib/c3p0-0.9.5.5.jar"
|
<copy file="${env.TSK_HOME}/bindings/java/lib/c3p0-0.9.5.5.jar"
|
||||||
tofile="${ext.dir}/c3p0-0.9.5.5.jar"/>
|
tofile="${ext.dir}/c3p0-0.9.5.5.jar"/>
|
||||||
<copy file="${env.TSK_HOME}/bindings/java/lib/mchange-commons-java-0.2.20.jar"
|
<copy file="${env.TSK_HOME}/bindings/java/lib/mchange-commons-java-0.3.0.jar"
|
||||||
tofile="${ext.dir}/mchange-commons-java-0.2.20.jar"/>
|
tofile="${ext.dir}/mchange-commons-java-0.3.0.jar"/>
|
||||||
<copy file="${env.TSK_HOME}/bindings/java/lib/SparseBitSet-1.1.jar"
|
<copy file="${env.TSK_HOME}/bindings/java/lib/SparseBitSet-1.1.jar"
|
||||||
tofile="${ext.dir}/SparseBitSet-1.1.jar"/>
|
tofile="${ext.dir}/SparseBitSet-1.1.jar"/>
|
||||||
<copy file="${env.TSK_HOME}/case-uco/java/dist/sleuthkit-caseuco-${TSK_VERSION}.jar"
|
<copy file="${env.TSK_HOME}/case-uco/java/dist/sleuthkit-caseuco-${TSK_VERSION}.jar"
|
||||||
|
@ -65,7 +65,7 @@ file.reference.license4j-runtime-library-4.7.1.jar=release/modules/ext/license4j
|
|||||||
file.reference.listenablefuture-1.0.jar=release/modules/ext/listenablefuture-1.0.jar
|
file.reference.listenablefuture-1.0.jar=release/modules/ext/listenablefuture-1.0.jar
|
||||||
file.reference.logback-classic-1.2.10.jar=release/modules/ext/logback-classic-1.2.10.jar
|
file.reference.logback-classic-1.2.10.jar=release/modules/ext/logback-classic-1.2.10.jar
|
||||||
file.reference.logback-core-1.2.10.jar=release/modules/ext/logback-core-1.2.10.jar
|
file.reference.logback-core-1.2.10.jar=release/modules/ext/logback-core-1.2.10.jar
|
||||||
file.reference.mchange-commons-java-0.2.20.jar=release/modules/ext/mchange-commons-java-0.2.20.jar
|
file.reference.mchange-commons-java-0.3.0.jar=release/modules/ext/mchange-commons-java-0.3.0.jar
|
||||||
file.reference.metadata-extractor-2.18.0.jar=release/modules/ext/metadata-extractor-2.18.0.jar
|
file.reference.metadata-extractor-2.18.0.jar=release/modules/ext/metadata-extractor-2.18.0.jar
|
||||||
file.reference.netty-buffer-4.1.73.Final.jar=release/modules/ext/netty-buffer-4.1.73.Final.jar
|
file.reference.netty-buffer-4.1.73.Final.jar=release/modules/ext/netty-buffer-4.1.73.Final.jar
|
||||||
file.reference.netty-codec-4.1.73.Final.jar=release/modules/ext/netty-codec-4.1.73.Final.jar
|
file.reference.netty-codec-4.1.73.Final.jar=release/modules/ext/netty-codec-4.1.73.Final.jar
|
||||||
@ -80,7 +80,7 @@ file.reference.netty-transport-native-epoll-4.1.73.Final.jar=release/modules/ext
|
|||||||
file.reference.netty-transport-native-unix-common-4.1.73.Final.jar=release/modules/ext/netty-transport-native-unix-common-4.1.73.Final.jar
|
file.reference.netty-transport-native-unix-common-4.1.73.Final.jar=release/modules/ext/netty-transport-native-unix-common-4.1.73.Final.jar
|
||||||
file.reference.okhttp-2.7.5.jar=release/modules/ext/okhttp-2.7.5.jar
|
file.reference.okhttp-2.7.5.jar=release/modules/ext/okhttp-2.7.5.jar
|
||||||
file.reference.okio-1.6.0.jar=release/modules/ext/okio-1.6.0.jar
|
file.reference.okio-1.6.0.jar=release/modules/ext/okio-1.6.0.jar
|
||||||
file.reference.postgresql-42.3.5.jar=release/modules/ext/postgresql-42.3.5.jar
|
file.reference.postgresql-42.7.3.jar=release/modules/ext/postgresql-42.7.3.jar
|
||||||
file.reference.Rejistry-1.1-SNAPSHOT.jar=release/modules/ext/Rejistry-1.1-SNAPSHOT.jar
|
file.reference.Rejistry-1.1-SNAPSHOT.jar=release/modules/ext/Rejistry-1.1-SNAPSHOT.jar
|
||||||
file.reference.serializer-2.7.2.jar=release/modules/ext/serializer-2.7.2.jar
|
file.reference.serializer-2.7.2.jar=release/modules/ext/serializer-2.7.2.jar
|
||||||
file.reference.sevenzipjbinding-AllPlatforms.jar=release/modules/ext/sevenzipjbinding-AllPlatforms.jar
|
file.reference.sevenzipjbinding-AllPlatforms.jar=release/modules/ext/sevenzipjbinding-AllPlatforms.jar
|
||||||
|
@ -638,8 +638,8 @@
|
|||||||
<binary-origin>release/modules/ext/logback-core-1.2.10.jar</binary-origin>
|
<binary-origin>release/modules/ext/logback-core-1.2.10.jar</binary-origin>
|
||||||
</class-path-extension>
|
</class-path-extension>
|
||||||
<class-path-extension>
|
<class-path-extension>
|
||||||
<runtime-relative-path>ext/mchange-commons-java-0.2.20.jar</runtime-relative-path>
|
<runtime-relative-path>ext/mchange-commons-java-0.3.0.jar</runtime-relative-path>
|
||||||
<binary-origin>release/modules/ext/mchange-commons-java-0.2.20.jar</binary-origin>
|
<binary-origin>release/modules/ext/mchange-commons-java-00.3.0.jar</binary-origin>
|
||||||
</class-path-extension>
|
</class-path-extension>
|
||||||
<class-path-extension>
|
<class-path-extension>
|
||||||
<runtime-relative-path>ext/metadata-extractor-2.18.0.jar</runtime-relative-path>
|
<runtime-relative-path>ext/metadata-extractor-2.18.0.jar</runtime-relative-path>
|
||||||
@ -698,8 +698,8 @@
|
|||||||
<binary-origin>release/modules/ext/okio-1.6.0.jar</binary-origin>
|
<binary-origin>release/modules/ext/okio-1.6.0.jar</binary-origin>
|
||||||
</class-path-extension>
|
</class-path-extension>
|
||||||
<class-path-extension>
|
<class-path-extension>
|
||||||
<runtime-relative-path>ext/postgresql-42.3.5.jar</runtime-relative-path>
|
<runtime-relative-path>ext/postgresql-42.7.3.jar</runtime-relative-path>
|
||||||
<binary-origin>release/modules/ext/postgresql-42.3.5.jar</binary-origin>
|
<binary-origin>release/modules/ext/postgresql-42.7.3.jar</binary-origin>
|
||||||
</class-path-extension>
|
</class-path-extension>
|
||||||
<class-path-extension>
|
<class-path-extension>
|
||||||
<runtime-relative-path>ext/Rejistry-1.1-SNAPSHOT.jar</runtime-relative-path>
|
<runtime-relative-path>ext/Rejistry-1.1-SNAPSHOT.jar</runtime-relative-path>
|
||||||
|
@ -239,7 +239,7 @@ abstract class AddTagAction extends AbstractAction implements Presenter.Popup {
|
|||||||
*/
|
*/
|
||||||
private JMenuItem createMenutItem(TagName tagName) {
|
private JMenuItem createMenutItem(TagName tagName) {
|
||||||
String tagDisplayName = tagName.getDisplayName();
|
String tagDisplayName = tagName.getDisplayName();
|
||||||
String notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tagName.getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
JMenuItem tagNameItem = new JMenuItem(tagDisplayName + notableString);
|
JMenuItem tagNameItem = new JMenuItem(tagDisplayName + notableString);
|
||||||
|
|
||||||
if (tagDisplayName.equals(TagsManager.getBookmarkTagDisplayName())) {
|
if (tagDisplayName.equals(TagsManager.getBookmarkTagDisplayName())) {
|
||||||
|
@ -174,10 +174,10 @@ public class GetTagNameDialog extends JDialog {
|
|||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final String description;
|
private final String description;
|
||||||
private final TskData.FileKnown status;
|
private final TskData.TagType status;
|
||||||
private final TagName.HTML_COLOR color;
|
private final TagName.HTML_COLOR color;
|
||||||
|
|
||||||
AddTagNameWorker(String name, String description, TskData.FileKnown status, TagName.HTML_COLOR color) {
|
AddTagNameWorker(String name, String description, TskData.TagType status, TagName.HTML_COLOR color) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
@ -375,7 +375,7 @@ public class GetTagNameDialog extends JDialog {
|
|||||||
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
|
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
|
||||||
String tagDisplayName = tagNameField.getText();
|
String tagDisplayName = tagNameField.getText();
|
||||||
String userTagDescription = descriptionTextArea.getText();
|
String userTagDescription = descriptionTextArea.getText();
|
||||||
TskData.FileKnown status = notableCheckbox.isSelected() ? TskData.FileKnown.BAD : TskData.FileKnown.UNKNOWN;
|
TskData.TagType status = notableCheckbox.isSelected() ? TskData.TagType.BAD : TskData.TagType.SUSPICIOUS;
|
||||||
if (tagDisplayName.isEmpty()) {
|
if (tagDisplayName.isEmpty()) {
|
||||||
JOptionPane.showMessageDialog(this,
|
JOptionPane.showMessageDialog(this,
|
||||||
NbBundle.getMessage(this.getClass(),
|
NbBundle.getMessage(this.getClass(),
|
||||||
|
@ -226,7 +226,7 @@ abstract class ReplaceTagAction<T extends Tag> extends AbstractAction implements
|
|||||||
*/
|
*/
|
||||||
private JMenuItem createMenutItem(TagName tagName, Set<String> tagNamesToDisable, Collection<? extends T> selectedTags) {
|
private JMenuItem createMenutItem(TagName tagName, Set<String> tagNamesToDisable, Collection<? extends T> selectedTags) {
|
||||||
String tagDisplayName = tagName.getDisplayName();
|
String tagDisplayName = tagName.getDisplayName();
|
||||||
String notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tagName.getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
JMenuItem tagNameItem = new JMenuItem(tagDisplayName + notableString);
|
JMenuItem tagNameItem = new JMenuItem(tagDisplayName + notableString);
|
||||||
|
|
||||||
if (tagDisplayName.equals(TagsManager.getBookmarkTagDisplayName())) {
|
if (tagDisplayName.equals(TagsManager.getBookmarkTagDisplayName())) {
|
||||||
|
@ -107,6 +107,12 @@ Case.servicesException.notificationTitle={0} Error
|
|||||||
Case.servicesException.serviceResourcesCloseError=Could not close case resources for {0} service: {1}
|
Case.servicesException.serviceResourcesCloseError=Could not close case resources for {0} service: {1}
|
||||||
Case_caseType_multiUser=Multi-user case
|
Case_caseType_multiUser=Multi-user case
|
||||||
Case_caseType_singleUser=Single-user case
|
Case_caseType_singleUser=Single-user case
|
||||||
|
Case_checkImagePaths_exceptionOccurred=An exception occurred while checking if image paths are present
|
||||||
|
# {0} - paths
|
||||||
|
Case_checkImagePaths_noPaths=The following images had no associated paths: {0}
|
||||||
|
# {0} - appplicationName
|
||||||
|
Case_throwIfConcurrentDbAccessException_fileLock_concurrentAccessException=The case is open in {0}. Please close it before attempting to open it in Autopsy.
|
||||||
|
Case_throwIfConcurrentDbAccessException_fileLock_concurrentAccessException_defaultApp=another application
|
||||||
CaseDetailsPanel.casePanel.border.title=Case
|
CaseDetailsPanel.casePanel.border.title=Case
|
||||||
CaseDetailsPanel.examinerLabel.text=Name:
|
CaseDetailsPanel.examinerLabel.text=Name:
|
||||||
CaseDetailsPanel.examinerPanel.border.title=Examiner
|
CaseDetailsPanel.examinerPanel.border.title=Examiner
|
||||||
|
@ -41,6 +41,7 @@ import java.sql.ResultSet;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Statement;
|
import java.sql.Statement;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -64,6 +65,7 @@ import javax.annotation.concurrent.GuardedBy;
|
|||||||
import javax.annotation.concurrent.ThreadSafe;
|
import javax.annotation.concurrent.ThreadSafe;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openide.util.Lookup;
|
import org.openide.util.Lookup;
|
||||||
import org.openide.util.NbBundle;
|
import org.openide.util.NbBundle;
|
||||||
@ -143,6 +145,7 @@ import org.sleuthkit.autopsy.timeline.OpenTimelineAction;
|
|||||||
import org.sleuthkit.autopsy.timeline.events.TimelineEventAddedEvent;
|
import org.sleuthkit.autopsy.timeline.events.TimelineEventAddedEvent;
|
||||||
import org.sleuthkit.datamodel.BlackboardArtifactTag;
|
import org.sleuthkit.datamodel.BlackboardArtifactTag;
|
||||||
import org.sleuthkit.datamodel.CaseDbConnectionInfo;
|
import org.sleuthkit.datamodel.CaseDbConnectionInfo;
|
||||||
|
import org.sleuthkit.datamodel.ConcurrentDbAccessException;
|
||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.ContentStreamProvider;
|
import org.sleuthkit.datamodel.ContentStreamProvider;
|
||||||
import org.sleuthkit.datamodel.ContentTag;
|
import org.sleuthkit.datamodel.ContentTag;
|
||||||
@ -194,8 +197,6 @@ public class Case {
|
|||||||
private final SleuthkitEventListener sleuthkitEventListener;
|
private final SleuthkitEventListener sleuthkitEventListener;
|
||||||
private CollaborationMonitor collaborationMonitor;
|
private CollaborationMonitor collaborationMonitor;
|
||||||
private Services caseServices;
|
private Services caseServices;
|
||||||
// matches something like '\\.\PHYSICALDRIVE0'
|
|
||||||
private static final String PLACEHOLDER_DS_PATH_REGEX = "^\\s*\\\\\\\\\\.\\\\PHYSICALDRIVE\\d*\\s*$";
|
|
||||||
|
|
||||||
private volatile boolean hasDataSource = false;
|
private volatile boolean hasDataSource = false;
|
||||||
private volatile boolean hasData = false;
|
private volatile boolean hasData = false;
|
||||||
@ -1307,13 +1308,6 @@ public class Case {
|
|||||||
String path = entry.getValue();
|
String path = entry.getValue();
|
||||||
boolean fileExists = (new File(path).exists()|| DriveUtils.driveExists(path));
|
boolean fileExists = (new File(path).exists()|| DriveUtils.driveExists(path));
|
||||||
if (!fileExists) {
|
if (!fileExists) {
|
||||||
// CT-7336: ignore relocating datasources if file provider is present and placeholder path is used.
|
|
||||||
if (newCurrentCase.getMetadata() != null
|
|
||||||
&& !StringUtils.isBlank(newCurrentCase.getMetadata().getContentProviderName())
|
|
||||||
&& (path == null || path.matches(PLACEHOLDER_DS_PATH_REGEX))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
DataSource ds = newCurrentCase.getSleuthkitCase().getDataSource(obj_id);
|
DataSource ds = newCurrentCase.getSleuthkitCase().getDataSource(obj_id);
|
||||||
String hostName = StringUtils.defaultString(ds.getHost() == null ? "" : ds.getHost().getName());
|
String hostName = StringUtils.defaultString(ds.getHost() == null ? "" : ds.getHost().getName());
|
||||||
@ -2293,6 +2287,8 @@ public class Case {
|
|||||||
checkForCancellation();
|
checkForCancellation();
|
||||||
openCommunicationChannels(progressIndicator);
|
openCommunicationChannels(progressIndicator);
|
||||||
checkForCancellation();
|
checkForCancellation();
|
||||||
|
checkImagePaths();
|
||||||
|
checkForCancellation();
|
||||||
openFileSystemsInBackground();
|
openFileSystemsInBackground();
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@ -2312,6 +2308,40 @@ public class Case {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if content provider is present, all images have paths, or throw an error.
|
||||||
|
* @throws CaseActionException
|
||||||
|
*/
|
||||||
|
@Messages({
|
||||||
|
"# {0} - paths",
|
||||||
|
"Case_checkImagePaths_noPaths=The following images had no associated paths: {0}",
|
||||||
|
"Case_checkImagePaths_exceptionOccurred=An exception occurred while checking if image paths are present"
|
||||||
|
})
|
||||||
|
private void checkImagePaths() throws CaseActionException {
|
||||||
|
// if there is a content provider, images don't necessarily need paths
|
||||||
|
if (StringUtils.isNotBlank(this.metadata.getContentProviderName())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// identify images without paths
|
||||||
|
try {
|
||||||
|
List<Image> noPathImages = new ArrayList<>();
|
||||||
|
List<Image> images = this.caseDb.getImages();
|
||||||
|
for (Image img: images) {
|
||||||
|
if (ArrayUtils.isEmpty(img.getPaths())) {
|
||||||
|
noPathImages.add(img);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!noPathImages.isEmpty()) {
|
||||||
|
String imageListStr = noPathImages.stream().map(Image::getName).collect(Collectors.joining(", "));
|
||||||
|
throw new CaseActionException(Bundle.Case_checkImagePaths_noPaths(imageListStr));
|
||||||
|
}
|
||||||
|
} catch (TskCoreException ex) {
|
||||||
|
throw new CaseActionException(Bundle.Case_checkImagePaths_exceptionOccurred(), ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a background task that reads a sector from each file system of
|
* Starts a background task that reads a sector from each file system of
|
||||||
* each image of a case to do an eager open of the filesystems in the case.
|
* each image of a case to do an eager open of the filesystems in the case.
|
||||||
@ -2707,7 +2737,7 @@ public class Case {
|
|||||||
* with a standard name, physically located in the case
|
* with a standard name, physically located in the case
|
||||||
* directory.
|
* directory.
|
||||||
*/
|
*/
|
||||||
caseDb = SleuthkitCase.newCase(Paths.get(metadata.getCaseDirectory(), SINGLE_USER_CASE_DB_NAME).toString());
|
caseDb = SleuthkitCase.newCase(Paths.get(metadata.getCaseDirectory(), SINGLE_USER_CASE_DB_NAME).toString(), (ContentStreamProvider) null, APP_NAME);
|
||||||
metadata.setCaseDatabaseName(SINGLE_USER_CASE_DB_NAME);
|
metadata.setCaseDatabaseName(SINGLE_USER_CASE_DB_NAME);
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
@ -2719,6 +2749,7 @@ public class Case {
|
|||||||
metadata.setCaseDatabaseName(caseDb.getDatabaseName());
|
metadata.setCaseDatabaseName(caseDb.getDatabaseName());
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
|
throwIfConcurrentDbAccessException(ex);
|
||||||
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotCreateCaseDatabase(ex.getLocalizedMessage()), ex);
|
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotCreateCaseDatabase(ex.getLocalizedMessage()), ex);
|
||||||
} catch (UserPreferencesException ex) {
|
} catch (UserPreferencesException ex) {
|
||||||
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotGetDbServerConnectionInfo(ex.getLocalizedMessage()), ex);
|
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotGetDbServerConnectionInfo(ex.getLocalizedMessage()), ex);
|
||||||
@ -2759,7 +2790,7 @@ public class Case {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CaseType.SINGLE_USER_CASE == metadata.getCaseType()) {
|
if (CaseType.SINGLE_USER_CASE == metadata.getCaseType()) {
|
||||||
caseDb = SleuthkitCase.openCase(metadata.getCaseDatabasePath(), contentProvider);
|
caseDb = SleuthkitCase.openCase(metadata.getCaseDatabasePath(), contentProvider, APP_NAME);
|
||||||
} else if (UserPreferences.getIsMultiUserModeEnabled()) {
|
} else if (UserPreferences.getIsMultiUserModeEnabled()) {
|
||||||
caseDb = SleuthkitCase.openCase(databaseName, UserPreferences.getDatabaseConnectionInfo(), metadata.getCaseDirectory(), contentProvider);
|
caseDb = SleuthkitCase.openCase(databaseName, UserPreferences.getDatabaseConnectionInfo(), metadata.getCaseDirectory(), contentProvider);
|
||||||
} else {
|
} else {
|
||||||
@ -2771,11 +2802,46 @@ public class Case {
|
|||||||
} catch (UserPreferencesException ex) {
|
} catch (UserPreferencesException ex) {
|
||||||
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotGetDbServerConnectionInfo(ex.getLocalizedMessage()), ex);
|
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotGetDbServerConnectionInfo(ex.getLocalizedMessage()), ex);
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
|
throwIfConcurrentDbAccessException(ex);
|
||||||
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotOpenCaseDatabase(ex.getLocalizedMessage()), ex);
|
throw new CaseActionException(Bundle.Case_exceptionMessage_couldNotOpenCaseDatabase(ex.getLocalizedMessage()), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Throws a CaseActionException if the exception or any nested exception is a ConcurrentDbAccessException (max depth of 10)
|
||||||
|
* @param ex The exception.
|
||||||
|
* @throws CaseActionException Thrown if there is a concurrent db access exception.
|
||||||
|
*/
|
||||||
|
@Messages({
|
||||||
|
"# {0} - appplicationName",
|
||||||
|
"Case_throwIfConcurrentDbAccessException_fileLock_concurrentAccessException=The case is open in {0}. Please close it before attempting to open it in Autopsy.",
|
||||||
|
"Case_throwIfConcurrentDbAccessException_fileLock_concurrentAccessException_defaultApp=another application"
|
||||||
|
})
|
||||||
|
private void throwIfConcurrentDbAccessException(Exception ex) throws CaseActionException {
|
||||||
|
ConcurrentDbAccessException concurrentEx = null;
|
||||||
|
Throwable curEx = ex;
|
||||||
|
// max depth search for a concurrent db access exception will be 10
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
if (curEx == null) {
|
||||||
|
break;
|
||||||
|
} else if (curEx instanceof ConcurrentDbAccessException foundEx) {
|
||||||
|
concurrentEx = foundEx;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
curEx = curEx.getCause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (concurrentEx != null) {
|
||||||
|
throw new CaseActionException(Bundle.Case_throwIfConcurrentDbAccessException_fileLock_concurrentAccessException(
|
||||||
|
StringUtils.defaultIfBlank(concurrentEx.getConflictingApplicationName(),
|
||||||
|
Bundle.Case_throwIfConcurrentDbAccessException_fileLock_concurrentAccessException_defaultApp())
|
||||||
|
), concurrentEx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attempts to load a content provider for the provided arguments. Returns
|
* Attempts to load a content provider for the provided arguments. Returns
|
||||||
* null if no content provider for the arguments can be identified.
|
* null if no content provider for the arguments can be identified.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Autopsy Forensic Browser
|
* Autopsy Forensic Browser
|
||||||
*
|
*
|
||||||
* Copyright 2011-2018 Basis Technology Corp.
|
* Copyright 2011-2024 Basis Technology Corp.
|
||||||
* Contact: carrier <at> sleuthkit <dot> org
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -54,20 +54,20 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
private static final String TAGS_SETTINGS_NAME = "Tags"; //NON-NLS
|
private static final String TAGS_SETTINGS_NAME = "Tags"; //NON-NLS
|
||||||
private static final String TAG_NAMES_SETTING_KEY = "TagNames"; //NON-NLS
|
private static final String TAG_NAMES_SETTING_KEY = "TagNames"; //NON-NLS
|
||||||
private static final String TAG_SETTING_VERSION_KEY = "CustomTagNameVersion";
|
private static final String TAG_SETTING_VERSION_KEY = "CustomTagNameVersion";
|
||||||
private static final int TAG_SETTINGS_VERSION = 1;
|
private static final int TAG_SETTINGS_VERSION = 2; // Changed tag type from TskData.FileKnown to TskData.TagType
|
||||||
|
|
||||||
private final String displayName;
|
private final String displayName;
|
||||||
private final String description;
|
private final String description;
|
||||||
private final TagName.HTML_COLOR color;
|
private final TagName.HTML_COLOR color;
|
||||||
private final TskData.FileKnown knownStatus;
|
private final TskData.TagType tagType;
|
||||||
|
|
||||||
private static final List<TagNameDefinition> STANDARD_TAGS_DEFINITIONS = new ArrayList<>();
|
private static final List<TagNameDefinition> STANDARD_TAGS_DEFINITIONS = new ArrayList<>();
|
||||||
private static final List<String> PROJECT_VIC_NAMES_NO_LONGER_USED = new ArrayList<>();
|
private static final List<String> PROJECT_VIC_NAMES_NO_LONGER_USED = new ArrayList<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_bookmark_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN));
|
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_bookmark_text(), "", TagName.HTML_COLOR.NONE, TskData.TagType.SUSPICIOUS));
|
||||||
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_followUp_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN));
|
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_followUp_text(), "", TagName.HTML_COLOR.NONE, TskData.TagType.SUSPICIOUS));
|
||||||
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_notableItem_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.BAD));
|
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_notableItem_text(), "", TagName.HTML_COLOR.NONE, TskData.TagType.BAD));
|
||||||
|
|
||||||
PROJECT_VIC_NAMES_NO_LONGER_USED.add("CAT-1: Child Exploitation (Illegal)");
|
PROJECT_VIC_NAMES_NO_LONGER_USED.add("CAT-1: Child Exploitation (Illegal)");
|
||||||
PROJECT_VIC_NAMES_NO_LONGER_USED.add("CAT-2: Child Exploitation (Non-Illegal/Age Difficult)");
|
PROJECT_VIC_NAMES_NO_LONGER_USED.add("CAT-2: Child Exploitation (Non-Illegal/Age Difficult)");
|
||||||
@ -79,18 +79,27 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a tag name definition consisting of a display name,
|
* Constructs a tag name definition consisting of a display name,
|
||||||
* description, color and knownStatus.
|
* description, color and tag type.
|
||||||
*
|
*
|
||||||
* @param displayName The display name for the tag name.
|
* @param displayName The display name for the tag name.
|
||||||
* @param description The description for the tag name.
|
* @param description The description for the tag name.
|
||||||
* @param color The color for the tag name.
|
* @param color The color for the tag name.
|
||||||
* @param status The status denoted by the tag name.
|
* @param status The status denoted by the tag name.
|
||||||
|
* @deprecated TagNameDefinition(String displayName, String description, TagName.HTML_COLOR color, TskData.TagType status) should be used instead.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public TagNameDefinition(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown status) {
|
public TagNameDefinition(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown status) {
|
||||||
this.displayName = displayName;
|
this.displayName = displayName;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.color = color;
|
this.color = color;
|
||||||
this.knownStatus = status;
|
this.tagType = TskData.TagType.convertFileKnownToTagType(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TagNameDefinition(String displayName, String description, TagName.HTML_COLOR color, TskData.TagType status) {
|
||||||
|
this.displayName = displayName;
|
||||||
|
this.description = description;
|
||||||
|
this.color = color;
|
||||||
|
this.tagType = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Collection<TagNameDefinition> getStandardTagNameDefinitions() {
|
static Collection<TagNameDefinition> getStandardTagNameDefinitions() {
|
||||||
@ -164,10 +173,21 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
/**
|
/**
|
||||||
* The status which will be applied to items with this tag.
|
* The status which will be applied to items with this tag.
|
||||||
*
|
*
|
||||||
* @return a value of TskData.FileKnown which is associated with this tag
|
* @return a value of TskData.TagType which is associated with this tag
|
||||||
*/
|
*/
|
||||||
|
public TskData.TagType getTagType() {
|
||||||
|
return tagType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The status which will be applied to items with this tag.
|
||||||
|
*
|
||||||
|
* @return a value of TskData.FileKnown which is associated with this tag
|
||||||
|
* @deprecated getTagType() should be used instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public TskData.FileKnown getKnownStatus() {
|
public TskData.FileKnown getKnownStatus() {
|
||||||
return knownStatus;
|
return TskData.TagType.convertTagTypeToFileKnown(tagType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -212,7 +232,7 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
boolean sameName = this.getDisplayName().equals(((TagNameDefinition) obj).getDisplayName());
|
boolean sameName = this.getDisplayName().equals(((TagNameDefinition) obj).getDisplayName());
|
||||||
boolean sameStatus = this.getKnownStatus().equals(((TagNameDefinition) obj).getKnownStatus());
|
boolean sameStatus = this.getTagType().equals(((TagNameDefinition) obj).getTagType());
|
||||||
return sameName && sameStatus;
|
return sameName && sameStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,13 +251,13 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
* that is used by the tags settings file.
|
* that is used by the tags settings file.
|
||||||
*/
|
*/
|
||||||
private String toSettingsFormat() {
|
private String toSettingsFormat() {
|
||||||
return displayName + "," + description + "," + color.name() + "," + knownStatus.toString();
|
return displayName + "," + description + "," + color.name() + "," + tagType.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
TagName saveToCase(SleuthkitCase caseDb) {
|
TagName saveToCase(SleuthkitCase caseDb) {
|
||||||
TagName tagName = null;
|
TagName tagName = null;
|
||||||
try {
|
try {
|
||||||
tagName = caseDb.getTaggingManager().addOrUpdateTagName(displayName, description, color, knownStatus);
|
tagName = caseDb.getTaggingManager().addOrUpdateTagName(displayName, description, color, tagType);
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Error saving tag name definition", ex);
|
LOGGER.log(Level.SEVERE, "Error saving tag name definition", ex);
|
||||||
}
|
}
|
||||||
@ -251,7 +271,7 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
* The currently custom tags properties are stored in one string property
|
* The currently custom tags properties are stored in one string property
|
||||||
* value separated by ;. The properties of an individual tag are comma
|
* value separated by ;. The properties of an individual tag are comma
|
||||||
* separated in the format of:
|
* separated in the format of:
|
||||||
* tag_name,tag_description,tag_color,known_status
|
* tag_name,tag_description,tag_color,tag_type
|
||||||
*
|
*
|
||||||
* In prior versions of autopsy the known_status was stored in the central
|
* In prior versions of autopsy the known_status was stored in the central
|
||||||
* repository, therefore the properties file only had three values.
|
* repository, therefore the properties file only had three values.
|
||||||
@ -279,7 +299,7 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
String[] attributes = tagProps.split(",");
|
String[] attributes = tagProps.split(",");
|
||||||
|
|
||||||
definitions.add(new TagNameDefinition(attributes[0], attributes[1],
|
definitions.add(new TagNameDefinition(attributes[0], attributes[1],
|
||||||
TagName.HTML_COLOR.valueOf(attributes[2]), TskData.FileKnown.valueOf(attributes[3])));
|
TagName.HTML_COLOR.valueOf(attributes[2]), TskData.TagType.valueOf(attributes[3])));
|
||||||
}
|
}
|
||||||
|
|
||||||
return definitions;
|
return definitions;
|
||||||
@ -316,7 +336,7 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
Integer version = getPropertyFileVersion();
|
Integer version = getPropertyFileVersion();
|
||||||
List<TagNameDefinition> definitions = new ArrayList<>();
|
List<TagNameDefinition> definitions = new ArrayList<>();
|
||||||
|
|
||||||
if (version == null) {
|
if (version == null || version == 1) {
|
||||||
String tagsProperty = ModuleSettings.getConfigSetting(TAGS_SETTINGS_NAME, TAG_NAMES_SETTING_KEY);
|
String tagsProperty = ModuleSettings.getConfigSetting(TAGS_SETTINGS_NAME, TAG_NAMES_SETTING_KEY);
|
||||||
if (tagsProperty == null || tagsProperty.isEmpty()) {
|
if (tagsProperty == null || tagsProperty.isEmpty()) {
|
||||||
ModuleSettings.setConfigSetting(TAGS_SETTINGS_NAME, TAG_SETTING_VERSION_KEY, Integer.toString(TAG_SETTINGS_VERSION));
|
ModuleSettings.setConfigSetting(TAGS_SETTINGS_NAME, TAG_SETTING_VERSION_KEY, Integer.toString(TAG_SETTINGS_VERSION));
|
||||||
@ -332,22 +352,27 @@ final public class TagNameDefinition implements Comparable<TagNameDefinition> {
|
|||||||
List<String> notableTagList = null;
|
List<String> notableTagList = null;
|
||||||
for (String tagProps : individualTags) {
|
for (String tagProps : individualTags) {
|
||||||
String[] attributes = tagProps.split(",");
|
String[] attributes = tagProps.split(",");
|
||||||
TskData.FileKnown fileKnown = TskData.FileKnown.UNKNOWN;
|
TskData.TagType tagType = TskData.TagType.SUSPICIOUS;
|
||||||
if (attributes.length == 3) {
|
if (attributes.length == 3) {
|
||||||
// If notableTagList is null load it from the CR.
|
// If notableTagList is null load it from the CR.
|
||||||
if (notableTagList == null) {
|
if (notableTagList == null) {
|
||||||
notableTagList = getCRNotableList();
|
notableTagList = getCRNotableList();
|
||||||
} else {
|
} else {
|
||||||
if (notableTagList.contains(attributes[0])) {
|
if (notableTagList.contains(attributes[0])) {
|
||||||
fileKnown = TskData.FileKnown.BAD;
|
tagType = TskData.TagType.BAD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fileKnown = TskData.FileKnown.valueOf(attributes[3]);
|
if (version == 1) {
|
||||||
|
// handle backwards compatibility
|
||||||
|
tagType = TskData.TagType.convertFileKnownToTagType(TskData.FileKnown.valueOf(attributes[3]));
|
||||||
|
} else {
|
||||||
|
tagType = TskData.TagType.valueOf(attributes[3]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
definitions.add(new TagNameDefinition(attributes[0], attributes[1],
|
definitions.add(new TagNameDefinition(attributes[0], attributes[1],
|
||||||
TagName.HTML_COLOR.valueOf(attributes[2]), fileKnown));
|
TagName.HTML_COLOR.valueOf(attributes[2]), tagType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ final class TagNameDialog extends javax.swing.JDialog {
|
|||||||
initComponents();
|
initComponents();
|
||||||
tagNameTextField.setText(tagNameToEdit.getDisplayName());
|
tagNameTextField.setText(tagNameToEdit.getDisplayName());
|
||||||
descriptionTextArea.setText(tagNameToEdit.getDescription());
|
descriptionTextArea.setText(tagNameToEdit.getDescription());
|
||||||
notableCheckbox.setSelected(tagNameToEdit.getKnownStatus() == TskData.FileKnown.BAD);
|
notableCheckbox.setSelected(tagNameToEdit.getTagType() == TskData.TagType.BAD);
|
||||||
tagNameTextField.setEnabled(false);
|
tagNameTextField.setEnabled(false);
|
||||||
this.display();
|
this.display();
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
|||||||
TagNameDialog dialog = new TagNameDialog();
|
TagNameDialog dialog = new TagNameDialog();
|
||||||
TagNameDialog.BUTTON_PRESSED result = dialog.getResult();
|
TagNameDialog.BUTTON_PRESSED result = dialog.getResult();
|
||||||
if (result == TagNameDialog.BUTTON_PRESSED.OK) {
|
if (result == TagNameDialog.BUTTON_PRESSED.OK) {
|
||||||
TskData.FileKnown status = dialog.isTagNotable() ? TskData.FileKnown.BAD : TskData.FileKnown.UNKNOWN;
|
TskData.TagType status = dialog.isTagNotable() ? TskData.TagType.BAD : TskData.TagType.SUSPICIOUS;
|
||||||
TagNameDefinition newTagType = new TagNameDefinition(dialog.getTagName(), dialog.getTagDesciption(), DEFAULT_COLOR, status);
|
TagNameDefinition newTagType = new TagNameDefinition(dialog.getTagName(), dialog.getTagDesciption(), DEFAULT_COLOR, status);
|
||||||
/*
|
/*
|
||||||
* If tag name already exists, don't add the tag name.
|
* If tag name already exists, don't add the tag name.
|
||||||
@ -348,7 +348,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
|||||||
TagNameDialog dialog = new TagNameDialog(originalTagName);
|
TagNameDialog dialog = new TagNameDialog(originalTagName);
|
||||||
TagNameDialog.BUTTON_PRESSED result = dialog.getResult();
|
TagNameDialog.BUTTON_PRESSED result = dialog.getResult();
|
||||||
if (result == TagNameDialog.BUTTON_PRESSED.OK) {
|
if (result == TagNameDialog.BUTTON_PRESSED.OK) {
|
||||||
TskData.FileKnown status = dialog.isTagNotable() ? TskData.FileKnown.BAD : TskData.FileKnown.UNKNOWN;
|
TskData.TagType status = dialog.isTagNotable() ? TskData.TagType.BAD : TskData.TagType.SUSPICIOUS;
|
||||||
TagNameDefinition newTagType = new TagNameDefinition(dialog.getTagName(), dialog.getTagDesciption(), DEFAULT_COLOR, status);
|
TagNameDefinition newTagType = new TagNameDefinition(dialog.getTagName(), dialog.getTagDesciption(), DEFAULT_COLOR, status);
|
||||||
/*
|
/*
|
||||||
* If tag name already exists, don't add the tag name.
|
* If tag name already exists, don't add the tag name.
|
||||||
@ -359,7 +359,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
|||||||
tagNamesList.setSelectedValue(newTagType, true);
|
tagNamesList.setSelectedValue(newTagType, true);
|
||||||
updatePanel();
|
updatePanel();
|
||||||
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
|
||||||
if (originalTagName.getKnownStatus() != newTagType.getKnownStatus() && Case.isCaseOpen()) {
|
if (originalTagName.getTagType() != newTagType.getTagType() && Case.isCaseOpen()) {
|
||||||
updatedStatusTags.add(newTagType.getDisplayName());
|
updatedStatusTags.add(newTagType.getDisplayName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -449,7 +449,7 @@ final class TagOptionsPanel extends javax.swing.JPanel implements OptionsPanel {
|
|||||||
deleteTagNameButton.setEnabled(enableEdit);
|
deleteTagNameButton.setEnabled(enableEdit);
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
descriptionTextArea.setText(tagNamesList.getSelectedValue().getDescription());
|
descriptionTextArea.setText(tagNamesList.getSelectedValue().getDescription());
|
||||||
if (tagNamesList.getSelectedValue().getKnownStatus() == TskData.FileKnown.BAD) {
|
if (tagNamesList.getSelectedValue().getTagType() == TskData.TagType.BAD) {
|
||||||
notableYesOrNoLabel.setText("Yes");
|
notableYesOrNoLabel.setText("Yes");
|
||||||
} else {
|
} else {
|
||||||
notableYesOrNoLabel.setText("No");
|
notableYesOrNoLabel.setText("No");
|
||||||
|
@ -188,7 +188,7 @@ public class TagsManager implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the set of display names of notable (TskData.FileKnown.BAD) tag
|
* Gets the set of display names of notable (TskData.TagType.BAD) tag
|
||||||
* types. If a case is not open the list will only include only the user
|
* types. If a case is not open the list will only include only the user
|
||||||
* defined custom tags. Otherwise the list will include all notable tags.
|
* defined custom tags. Otherwise the list will include all notable tags.
|
||||||
*
|
*
|
||||||
@ -197,7 +197,7 @@ public class TagsManager implements Closeable {
|
|||||||
public static List<String> getNotableTagDisplayNames() {
|
public static List<String> getNotableTagDisplayNames() {
|
||||||
List<String> tagDisplayNames = new ArrayList<>();
|
List<String> tagDisplayNames = new ArrayList<>();
|
||||||
for (TagNameDefinition tagDef : TagNameDefinition.getTagNameDefinitions()) {
|
for (TagNameDefinition tagDef : TagNameDefinition.getTagNameDefinitions()) {
|
||||||
if (tagDef.getKnownStatus() == TskData.FileKnown.BAD) {
|
if (tagDef.getTagType() == TskData.TagType.BAD) {
|
||||||
tagDisplayNames.add(tagDef.getDisplayName());
|
tagDisplayNames.add(tagDef.getDisplayName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -205,7 +205,7 @@ public class TagsManager implements Closeable {
|
|||||||
try {
|
try {
|
||||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||||
for (TagName tagName : tagsManager.getAllTagNames()) {
|
for (TagName tagName : tagsManager.getAllTagNames()) {
|
||||||
if (tagName.getKnownStatus() == TskData.FileKnown.BAD
|
if (tagName.getTagType() == TskData.TagType.BAD
|
||||||
&& !tagDisplayNames.contains(tagName.getDisplayName())) {
|
&& !tagDisplayNames.contains(tagName.getDisplayName())) {
|
||||||
tagDisplayNames.add(tagName.getDisplayName());
|
tagDisplayNames.add(tagName.getDisplayName());
|
||||||
}
|
}
|
||||||
@ -303,14 +303,14 @@ public class TagsManager implements Closeable {
|
|||||||
|
|
||||||
// add the standard tag names
|
// add the standard tag names
|
||||||
for (TagNameDefinition def : TagNameDefinition.getStandardTagNameDefinitions()) {
|
for (TagNameDefinition def : TagNameDefinition.getStandardTagNameDefinitions()) {
|
||||||
taggingMgr.addOrUpdateTagName(def.getDisplayName(), def.getDescription(), def.getColor(), def.getKnownStatus());
|
taggingMgr.addOrUpdateTagName(def.getDisplayName(), def.getDescription(), def.getColor(), def.getTagType());
|
||||||
}
|
}
|
||||||
|
|
||||||
//Assume new case and add all tag sets
|
//Assume new case and add all tag sets
|
||||||
for (TagSetDefinition setDef : TagSetDefinition.readTagSetDefinitions()) {
|
for (TagSetDefinition setDef : TagSetDefinition.readTagSetDefinitions()) {
|
||||||
List<TagName> tagNamesInSet = new ArrayList<>();
|
List<TagName> tagNamesInSet = new ArrayList<>();
|
||||||
for (TagNameDefinition tagNameDef : setDef.getTagNameDefinitions()) {
|
for (TagNameDefinition tagNameDef : setDef.getTagNameDefinitions()) {
|
||||||
tagNamesInSet.add(taggingMgr.addOrUpdateTagName(tagNameDef.getDisplayName(), tagNameDef.getDescription(), tagNameDef.getColor(), tagNameDef.getKnownStatus()));
|
tagNamesInSet.add(taggingMgr.addOrUpdateTagName(tagNameDef.getDisplayName(), tagNameDef.getDescription(), tagNameDef.getColor(), tagNameDef.getTagType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tagNamesInSet.isEmpty()) {
|
if (!tagNamesInSet.isEmpty()) {
|
||||||
@ -505,7 +505,7 @@ public class TagsManager implements Closeable {
|
|||||||
* name to the case database.
|
* name to the case database.
|
||||||
*/
|
*/
|
||||||
public TagName addTagName(String displayName) throws TagNameAlreadyExistsException, TskCoreException {
|
public TagName addTagName(String displayName) throws TagNameAlreadyExistsException, TskCoreException {
|
||||||
return addTagName(displayName, "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN);
|
return addTagName(displayName, "", TagName.HTML_COLOR.NONE, TskData.TagType.SUSPICIOUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -524,7 +524,7 @@ public class TagsManager implements Closeable {
|
|||||||
* name to the case database.
|
* name to the case database.
|
||||||
*/
|
*/
|
||||||
public TagName addTagName(String displayName, String description) throws TagNameAlreadyExistsException, TskCoreException {
|
public TagName addTagName(String displayName, String description) throws TagNameAlreadyExistsException, TskCoreException {
|
||||||
return addTagName(displayName, description, TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN);
|
return addTagName(displayName, description, TagName.HTML_COLOR.NONE, TskData.TagType.SUSPICIOUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -543,7 +543,23 @@ public class TagsManager implements Closeable {
|
|||||||
* name to the case database.
|
* name to the case database.
|
||||||
*/
|
*/
|
||||||
public TagName addTagName(String displayName, String description, TagName.HTML_COLOR color) throws TagNameAlreadyExistsException, TskCoreException {
|
public TagName addTagName(String displayName, String description, TagName.HTML_COLOR color) throws TagNameAlreadyExistsException, TskCoreException {
|
||||||
return addTagName(displayName, description, color, TskData.FileKnown.UNKNOWN);
|
return addTagName(displayName, description, color, TskData.TagType.SUSPICIOUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param displayName
|
||||||
|
* @param description
|
||||||
|
* @param color
|
||||||
|
* @param knownStatus
|
||||||
|
* @return
|
||||||
|
* @throws org.sleuthkit.autopsy.casemodule.services.TagsManager.TagNameAlreadyExistsException
|
||||||
|
* @throws TskCoreException
|
||||||
|
* @deprecated addTagName(String displayName, String description, TagName.HTML_COLOR color, TskData.TagType tagType) should be used instead
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public TagName addTagName(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown knownStatus) throws TagNameAlreadyExistsException, TskCoreException {
|
||||||
|
return addTagName(displayName, description, color, TskData.TagType.convertFileKnownToTagType(knownStatus));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -553,8 +569,8 @@ public class TagsManager implements Closeable {
|
|||||||
* @param displayName The display name for the new tag type.
|
* @param displayName The display name for the new tag type.
|
||||||
* @param description The description for the new tag type.
|
* @param description The description for the new tag type.
|
||||||
* @param color The color to associate with the new tag type.
|
* @param color The color to associate with the new tag type.
|
||||||
* @param knownStatus The knownStatus to be used for the tag when
|
* @param tagType The tagType to be used for the tag when
|
||||||
* correlating on the tagged item
|
correlating on the tagged item
|
||||||
*
|
*
|
||||||
* @return A TagName object that can be used to add instances of the tag
|
* @return A TagName object that can be used to add instances of the tag
|
||||||
* type to the case database.
|
* type to the case database.
|
||||||
@ -563,12 +579,12 @@ public class TagsManager implements Closeable {
|
|||||||
* @throws TskCoreException If there is an error adding the tag
|
* @throws TskCoreException If there is an error adding the tag
|
||||||
* name to the case database.
|
* name to the case database.
|
||||||
*/
|
*/
|
||||||
public TagName addTagName(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown knownStatus) throws TagNameAlreadyExistsException, TskCoreException {
|
public TagName addTagName(String displayName, String description, TagName.HTML_COLOR color, TskData.TagType tagType) throws TagNameAlreadyExistsException, TskCoreException {
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
try {
|
try {
|
||||||
TagName tagName = caseDb.getTaggingManager().addOrUpdateTagName(displayName, description, color, knownStatus);
|
TagName tagName = caseDb.getTaggingManager().addOrUpdateTagName(displayName, description, color, tagType);
|
||||||
Set<TagNameDefinition> customTypes = TagNameDefinition.getTagNameDefinitions();
|
Set<TagNameDefinition> customTypes = TagNameDefinition.getTagNameDefinitions();
|
||||||
customTypes.add(new TagNameDefinition(displayName, description, color, knownStatus));
|
customTypes.add(new TagNameDefinition(displayName, description, color, tagType));
|
||||||
TagNameDefinition.setTagNameDefinitions(customTypes);
|
TagNameDefinition.setTagNameDefinitions(customTypes);
|
||||||
return tagName;
|
return tagName;
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
|
@ -167,8 +167,8 @@ public final class OtherOccurrences {
|
|||||||
if (newNode.getKnown() != TskData.FileKnown.BAD) {
|
if (newNode.getKnown() != TskData.FileKnown.BAD) {
|
||||||
List<ContentTag> fileMatchTags = autopsyCase.getServices().getTagsManager().getContentTagsByContent(newFile);
|
List<ContentTag> fileMatchTags = autopsyCase.getServices().getTagsManager().getContentTagsByContent(newFile);
|
||||||
for (ContentTag tag : fileMatchTags) {
|
for (ContentTag tag : fileMatchTags) {
|
||||||
TskData.FileKnown tagKnownStatus = tag.getName().getKnownStatus();
|
TskData.TagType tagType = tag.getName().getTagType();
|
||||||
if (tagKnownStatus.equals(TskData.FileKnown.BAD)) {
|
if (tagType.equals(TskData.TagType.BAD)) {
|
||||||
newNode.updateKnown(TskData.FileKnown.BAD);
|
newNode.updateKnown(TskData.FileKnown.BAD);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,7 @@ public class CentralRepoDbUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Conver thte Type's DbTableName string to the *_instances table name.
|
* Convert the Type's DbTableName string to the *_instances table name.
|
||||||
*
|
*
|
||||||
* @param type Correlation Type
|
* @param type Correlation Type
|
||||||
*
|
*
|
||||||
|
@ -482,10 +482,11 @@ public final class CaseEventListener implements PropertyChangeListener {
|
|||||||
for (BlackboardArtifactTag bbTag : artifactTags) {
|
for (BlackboardArtifactTag bbTag : artifactTags) {
|
||||||
//start with assumption that none of the other tags applied to this Correlation Attribute will prevent it's status from being changed
|
//start with assumption that none of the other tags applied to this Correlation Attribute will prevent it's status from being changed
|
||||||
boolean hasTagWithConflictingKnownStatus = false;
|
boolean hasTagWithConflictingKnownStatus = false;
|
||||||
// if the status of the tag has been changed to TskData.FileKnown.UNKNOWN
|
// if the status of the tag has been changed to TskData.TagType.UNKNOWN or TskData.TagType.SUSPICIOUS
|
||||||
// we need to check the status of all other tags on this correlation attribute before changing
|
// we need to check the status of all other tags on this correlation attribute before changing
|
||||||
// the status of the correlation attribute in the central repository
|
// the status of the correlation attribute in the central repository
|
||||||
if (tagName.getKnownStatus() == TskData.FileKnown.UNKNOWN) {
|
if (tagName.getTagType() == TskData.TagType.UNKNOWN
|
||||||
|
|| tagName.getTagType() == TskData.TagType.SUSPICIOUS) {
|
||||||
Content content = bbTag.getContent();
|
Content content = bbTag.getContent();
|
||||||
// If the content which this Blackboard Artifact Tag is linked to is an AbstractFile with KNOWN status then
|
// If the content which this Blackboard Artifact Tag is linked to is an AbstractFile with KNOWN status then
|
||||||
// it's status in the central reporsitory should not be changed to UNKNOWN
|
// it's status in the central reporsitory should not be changed to UNKNOWN
|
||||||
@ -503,7 +504,7 @@ public final class CaseEventListener implements PropertyChangeListener {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//if any other tags on this artifact are Notable in status then this artifact can not have its status changed
|
//if any other tags on this artifact are Notable in status then this artifact can not have its status changed
|
||||||
if (TskData.FileKnown.BAD == t.getName().getKnownStatus()) {
|
if (TskData.TagType.BAD == t.getName().getTagType()) {
|
||||||
//a tag with a conflicting status has been found, the status of this correlation attribute can not be modified
|
//a tag with a conflicting status has been found, the status of this correlation attribute can not be modified
|
||||||
hasTagWithConflictingKnownStatus = true;
|
hasTagWithConflictingKnownStatus = true;
|
||||||
break;
|
break;
|
||||||
@ -522,10 +523,11 @@ public final class CaseEventListener implements PropertyChangeListener {
|
|||||||
for (ContentTag contentTag : fileTags) {
|
for (ContentTag contentTag : fileTags) {
|
||||||
//start with assumption that none of the other tags applied to this ContentTag will prevent it's status from being changed
|
//start with assumption that none of the other tags applied to this ContentTag will prevent it's status from being changed
|
||||||
boolean hasTagWithConflictingKnownStatus = false;
|
boolean hasTagWithConflictingKnownStatus = false;
|
||||||
// if the status of the tag has been changed to TskData.FileKnown.UNKNOWN
|
// if the status of the tag has been changed to TskData.TagType.UNKNOWN or TskData.TagType.SUSPICIOUS
|
||||||
// we need to check the status of all other tags on this file before changing
|
// we need to check the status of all other tags on this file before changing
|
||||||
// the status of the file in the central repository
|
// the status of the file in the central repository
|
||||||
if (tagName.getKnownStatus() == TskData.FileKnown.UNKNOWN) {
|
if (tagName.getTagType() == TskData.TagType.UNKNOWN
|
||||||
|
|| tagName.getTagType() == TskData.TagType.SUSPICIOUS) {
|
||||||
Content content = contentTag.getContent();
|
Content content = contentTag.getContent();
|
||||||
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
TagsManager tagsManager = Case.getCurrentCaseThrows().getServices().getTagsManager();
|
||||||
List<ContentTag> tags = tagsManager.getContentTagsByContent(content);
|
List<ContentTag> tags = tagsManager.getContentTagsByContent(content);
|
||||||
@ -536,7 +538,7 @@ public final class CaseEventListener implements PropertyChangeListener {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//if any other tags on this file are Notable in status then this file can not have its status changed
|
//if any other tags on this file are Notable in status then this file can not have its status changed
|
||||||
if (TskData.FileKnown.BAD == t.getName().getKnownStatus()) {
|
if (TskData.TagType.BAD == t.getName().getTagType()) {
|
||||||
//a tag with a conflicting status has been found, the status of this file can not be modified
|
//a tag with a conflicting status has been found, the status of this file can not be modified
|
||||||
hasTagWithConflictingKnownStatus = true;
|
hasTagWithConflictingKnownStatus = true;
|
||||||
break;
|
break;
|
||||||
@ -556,7 +558,7 @@ public final class CaseEventListener implements PropertyChangeListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Cannot update known status in central repository for tag: " + modifiedTagName, ex); //NON-NLS
|
LOGGER.log(Level.SEVERE, "Cannot update tag type in central repository for tag: " + modifiedTagName, ex); //NON-NLS
|
||||||
} catch (CentralRepoException ex) {
|
} catch (CentralRepoException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Cannot get central repository for tag: " + modifiedTagName, ex); //NON-NLS
|
LOGGER.log(Level.SEVERE, "Cannot get central repository for tag: " + modifiedTagName, ex); //NON-NLS
|
||||||
} catch (NoCurrentCaseException ex) {
|
} catch (NoCurrentCaseException ex) {
|
||||||
|
@ -175,7 +175,8 @@ public class AnalysisResultsViewModel {
|
|||||||
"AnalysisResultsViewModel_displayAttributes_score=Score",
|
"AnalysisResultsViewModel_displayAttributes_score=Score",
|
||||||
"AnalysisResultsViewModel_displayAttributes_type=Type",
|
"AnalysisResultsViewModel_displayAttributes_type=Type",
|
||||||
"AnalysisResultsViewModel_displayAttributes_configuration=Configuration",
|
"AnalysisResultsViewModel_displayAttributes_configuration=Configuration",
|
||||||
"AnalysisResultsViewModel_displayAttributes_conclusion=Conclusion"
|
"AnalysisResultsViewModel_displayAttributes_conclusion=Conclusion",
|
||||||
|
"AnalysisResultsViewModel_displayAttributes_justification=Justification"
|
||||||
})
|
})
|
||||||
private ResultDisplayAttributes getDisplayAttributes(AnalysisResult analysisResult) {
|
private ResultDisplayAttributes getDisplayAttributes(AnalysisResult analysisResult) {
|
||||||
// The type of BlackboardArtifact.Type of the analysis result.
|
// The type of BlackboardArtifact.Type of the analysis result.
|
||||||
@ -195,7 +196,9 @@ public class AnalysisResultsViewModel {
|
|||||||
Pair.of(Bundle.AnalysisResultsViewModel_displayAttributes_configuration(),
|
Pair.of(Bundle.AnalysisResultsViewModel_displayAttributes_configuration(),
|
||||||
normalizeAttr(analysisResult.getConfiguration())),
|
normalizeAttr(analysisResult.getConfiguration())),
|
||||||
Pair.of(Bundle.AnalysisResultsViewModel_displayAttributes_conclusion(),
|
Pair.of(Bundle.AnalysisResultsViewModel_displayAttributes_conclusion(),
|
||||||
normalizeAttr(analysisResult.getConclusion()))
|
normalizeAttr(analysisResult.getConclusion())),
|
||||||
|
Pair.of(Bundle.AnalysisResultsViewModel_displayAttributes_justification(),
|
||||||
|
normalizeAttr(analysisResult.getJustification()))
|
||||||
);
|
);
|
||||||
|
|
||||||
// The BlackboardAttributes sorted by type display name.
|
// The BlackboardAttributes sorted by type display name.
|
||||||
|
@ -8,5 +8,6 @@ AnalysisResultsContentViewer_title=Analysis Results
|
|||||||
AnalysisResultsContentViewer_tooltip=Viewer for Analysis Results related to the selected node.
|
AnalysisResultsContentViewer_tooltip=Viewer for Analysis Results related to the selected node.
|
||||||
AnalysisResultsViewModel_displayAttributes_conclusion=Conclusion
|
AnalysisResultsViewModel_displayAttributes_conclusion=Conclusion
|
||||||
AnalysisResultsViewModel_displayAttributes_configuration=Configuration
|
AnalysisResultsViewModel_displayAttributes_configuration=Configuration
|
||||||
|
AnalysisResultsViewModel_displayAttributes_justification=Justification
|
||||||
AnalysisResultsViewModel_displayAttributes_score=Score
|
AnalysisResultsViewModel_displayAttributes_score=Score
|
||||||
AnalysisResultsViewModel_displayAttributes_type=Type
|
AnalysisResultsViewModel_displayAttributes_type=Type
|
||||||
|
@ -66,11 +66,17 @@ public class Installer extends ModuleInstall {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private static final String JAVA_TEMP = "java.io.tmpdir";
|
||||||
|
private static final String AUTOPSY_TEMP_DIR = "autopsy_temp";
|
||||||
|
private static final String TSK_TEMP = "tsk.tmpdir";
|
||||||
|
|
||||||
private final List<ModuleInstall> packageInstallers;
|
private final List<ModuleInstall> packageInstallers;
|
||||||
private static final Logger logger = Logger.getLogger(Installer.class.getName());
|
private static final Logger logger = Logger.getLogger(Installer.class.getName());
|
||||||
private static volatile boolean javaFxInit = false;
|
private static volatile boolean javaFxInit = false;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
setTskTemp();
|
||||||
|
|
||||||
loadDynLibraries();
|
loadDynLibraries();
|
||||||
|
|
||||||
// This call was moved from MediaViewImagePanel so that it is
|
// This call was moved from MediaViewImagePanel so that it is
|
||||||
@ -81,6 +87,24 @@ public class Installer extends ModuleInstall {
|
|||||||
OpenCvLoader.openCvIsLoaded();
|
OpenCvLoader.openCvIsLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set TSK temp directory to de-conflict with other programs using TSK libs.
|
||||||
|
*/
|
||||||
|
private static void setTskTemp() {
|
||||||
|
try {
|
||||||
|
String curTemp = System.getProperty(JAVA_TEMP, "");
|
||||||
|
String tskTemp = curTemp + (curTemp.endsWith(File.separator) ? "" : File.separator) + AUTOPSY_TEMP_DIR;
|
||||||
|
System.setProperty(TSK_TEMP, tskTemp);
|
||||||
|
File tskTempDir = new File(tskTemp);
|
||||||
|
tskTempDir.mkdirs();
|
||||||
|
if (!tskTempDir.isDirectory()) {
|
||||||
|
throw new IOException("Unable to create directory at " + tskTemp);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logger.log(Level.WARNING, "There was an error setting up tsk temp directory", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void loadDynLibraries() {
|
private static void loadDynLibraries() {
|
||||||
/*
|
/*
|
||||||
* On Windows, we distribute dlls that libtsk_jni depend on. If
|
* On Windows, we distribute dlls that libtsk_jni depend on. If
|
||||||
@ -551,11 +575,6 @@ public class Installer extends ModuleInstall {
|
|||||||
|
|
||||||
logger.log(Level.INFO, "close()"); //NON-NLS
|
logger.log(Level.INFO, "close()"); //NON-NLS
|
||||||
|
|
||||||
//exit JavaFx plat
|
|
||||||
if (javaFxInit) {
|
|
||||||
Platform.exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ModuleInstall mi : packageInstallers) {
|
for (ModuleInstall mi : packageInstallers) {
|
||||||
logger.log(Level.INFO, "{0} close()", mi.getClass().getName()); //NON-NLS
|
logger.log(Level.INFO, "{0} close()", mi.getClass().getName()); //NON-NLS
|
||||||
try {
|
try {
|
||||||
@ -567,5 +586,10 @@ public class Installer extends ModuleInstall {
|
|||||||
for (Handler h : logger.getHandlers()) {
|
for (Handler h : logger.getHandlers()) {
|
||||||
h.close(); //must call h.close or a .LCK file will remain.
|
h.close(); //must call h.close or a .LCK file will remain.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//exit JavaFx plat
|
||||||
|
if (javaFxInit) {
|
||||||
|
Platform.exit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,6 +169,8 @@ ImageNode.createSheet.type.displayName=Type
|
|||||||
ImageNode.createSheet.type.name=Type
|
ImageNode.createSheet.type.name=Type
|
||||||
ImageNode.createSheet.type.text=Image
|
ImageNode.createSheet.type.text=Image
|
||||||
ImageNode.getActions.openFileSearchByAttr.text=Open File Search by Attributes
|
ImageNode.getActions.openFileSearchByAttr.text=Open File Search by Attributes
|
||||||
|
Installer_validate_tskLibLock_description=<html>Another forensics application is running that uses The Sleuth Kit.<br/>You must close that application before launching Autopsy.<br/>If that application is Cyber Triage, then you should upgrade it so that it can run at the same time as Autopsy.</html>
|
||||||
|
Installer_validate_tskLibLock_title=Error calling Sleuth Kit library
|
||||||
KeyValueNode.menuItemText.viewFileInDir=View Source File in Directory
|
KeyValueNode.menuItemText.viewFileInDir=View Source File in Directory
|
||||||
KeywordHits.createNodeForKey.accessTime.desc=Access Time
|
KeywordHits.createNodeForKey.accessTime.desc=Access Time
|
||||||
KeywordHits.createNodeForKey.accessTime.displayName=Access Time
|
KeywordHits.createNodeForKey.accessTime.displayName=Access Time
|
||||||
|
@ -26,6 +26,9 @@ import org.sleuthkit.autopsy.coreutils.Logger;
|
|||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import org.openide.LifecycleManager;
|
import org.openide.LifecycleManager;
|
||||||
import org.openide.modules.ModuleInstall;
|
import org.openide.modules.ModuleInstall;
|
||||||
|
import org.openide.util.NbBundle.Messages;
|
||||||
|
import org.sleuthkit.datamodel.LibraryLock;
|
||||||
|
import org.sleuthkit.datamodel.LibraryLock.LockState;
|
||||||
import org.sleuthkit.datamodel.SleuthkitJNI;
|
import org.sleuthkit.datamodel.SleuthkitJNI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,8 +49,14 @@ public class Installer extends ModuleInstall {
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Messages({
|
||||||
|
"Installer_validate_tskLibLock_title=Error calling Sleuth Kit library",
|
||||||
|
"Installer_validate_tskLibLock_description=<html>Another forensics application is running that uses The Sleuth Kit.<br/>You must close that application before launching Autopsy.<br/>If that application is Cyber Triage, then you should upgrade it so that it can run at the same time as Autopsy.</html>"
|
||||||
|
})
|
||||||
@Override
|
@Override
|
||||||
public void validate() throws IllegalStateException {
|
public void validate() throws IllegalStateException {
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The NetBeans API specifies that a module should throw an
|
* The NetBeans API specifies that a module should throw an
|
||||||
* IllegalStateException if it can't be initalized, but NetBeans doesn't
|
* IllegalStateException if it can't be initalized, but NetBeans doesn't
|
||||||
@ -59,7 +68,13 @@ public class Installer extends ModuleInstall {
|
|||||||
|
|
||||||
// Check that the the Sleuth Kit JNI is working by getting the Sleuth Kit version number
|
// Check that the the Sleuth Kit JNI is working by getting the Sleuth Kit version number
|
||||||
Logger logger = Logger.getLogger(Installer.class.getName());
|
Logger logger = Logger.getLogger(Installer.class.getName());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
LibraryLock libLock = LibraryLock.acquireLibLock();
|
||||||
|
if (libLock != null && libLock.getLockState() == LockState.HELD_BY_OLD) {
|
||||||
|
throw new OldAppLockException("A lock on the libtsk_jni lib is already held by an old application. " + (libLock.getLibTskJniFile() != null ? libLock.getLibTskJniFile().getAbsolutePath() : ""));
|
||||||
|
}
|
||||||
|
|
||||||
String skVersion = SleuthkitJNI.getVersion();
|
String skVersion = SleuthkitJNI.getVersion();
|
||||||
|
|
||||||
if (skVersion == null) {
|
if (skVersion == null) {
|
||||||
@ -71,15 +86,25 @@ public class Installer extends ModuleInstall {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception | UnsatisfiedLinkError e) {
|
} catch (Exception | UnsatisfiedLinkError e) {
|
||||||
logger.log(Level.SEVERE, "Error calling Sleuth Kit library (test call failed)", e); //NON-NLS
|
|
||||||
logger.log(Level.SEVERE, "Is Autopsy or Cyber Triage already running?)", e); //NON-NLS
|
|
||||||
|
|
||||||
// Normal error box log handler won't be loaded yet, so show error here.
|
// Normal error box log handler won't be loaded yet, so show error here.
|
||||||
final Component parentComponent = null; // Use default window frame.
|
final Component parentComponent = null; // Use default window frame.
|
||||||
final String message = NbBundle.getMessage(this.getClass(), "Installer.tskLibErr.msg", e.toString());
|
|
||||||
final String title = NbBundle.getMessage(this.getClass(), "Installer.tskLibErr.err");
|
|
||||||
final int messageType = JOptionPane.ERROR_MESSAGE;
|
final int messageType = JOptionPane.ERROR_MESSAGE;
|
||||||
|
|
||||||
|
final String message;
|
||||||
|
final String title;
|
||||||
|
|
||||||
|
if (e instanceof OldAppLockException ex) {
|
||||||
|
logger.log(Level.SEVERE, "An older application already holds a lock on the libtsk_jni lib", ex);
|
||||||
|
message = Bundle.Installer_validate_tskLibLock_description();
|
||||||
|
title = Bundle.Installer_validate_tskLibLock_title();
|
||||||
|
} else {
|
||||||
|
logger.log(Level.SEVERE, "Error calling Sleuth Kit library (test call failed)", e); //NON-NLS
|
||||||
|
logger.log(Level.SEVERE, "Is Autopsy or Cyber Triage already running?)", e); //NON-NLS
|
||||||
|
message = NbBundle.getMessage(this.getClass(), "Installer.tskLibErr.msg", e.toString());
|
||||||
|
title = NbBundle.getMessage(this.getClass(), "Installer.tskLibErr.err");
|
||||||
|
}
|
||||||
|
|
||||||
JOptionPane.showMessageDialog(
|
JOptionPane.showMessageDialog(
|
||||||
parentComponent,
|
parentComponent,
|
||||||
message,
|
message,
|
||||||
@ -91,4 +116,38 @@ public class Installer extends ModuleInstall {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close() {
|
||||||
|
try {
|
||||||
|
LibraryLock.removeLibLock();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Logger logger = Logger.getLogger(Installer.class.getName());
|
||||||
|
logger.log(Level.WARNING, "There was an error removing the TSK lib lock.", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uninstalled() {
|
||||||
|
try {
|
||||||
|
LibraryLock.removeLibLock();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Logger logger = Logger.getLogger(Installer.class.getName());
|
||||||
|
logger.log(Level.WARNING, "There was an error removing the TSK lib lock.", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An exception when an older application (Autopsy
|
||||||
|
*/
|
||||||
|
static class OldAppLockException extends Exception {
|
||||||
|
|
||||||
|
public OldAppLockException(String message) {
|
||||||
|
super(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ final class ReportVisualPanel2 extends JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (TagName tagName : tagNamesInUse) {
|
for (TagName tagName : tagNamesInUse) {
|
||||||
String notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tagName.getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
tagStates.put(tagName.getDisplayName() + notableString, Boolean.FALSE);
|
tagStates.put(tagName.getDisplayName() + notableString, Boolean.FALSE);
|
||||||
}
|
}
|
||||||
tags.addAll(tagStates.keySet());
|
tags.addAll(tagStates.keySet());
|
||||||
|
@ -94,7 +94,7 @@ class TableReportGenerator {
|
|||||||
|
|
||||||
String notableString = "";
|
String notableString = "";
|
||||||
for (TagName tagName : tagNamesInUse) {
|
for (TagName tagName : tagNamesInUse) {
|
||||||
notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
notableString = tagName.getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
tagNames.add(tagName.getDisplayName() + notableString);
|
tagNames.add(tagName.getDisplayName() + notableString);
|
||||||
}
|
}
|
||||||
tagNamesFilter = new HashSet<>(tagNames);
|
tagNamesFilter = new HashSet<>(tagNames);
|
||||||
@ -369,7 +369,7 @@ class TableReportGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// skip tags that we are not reporting on
|
// skip tags that we are not reporting on
|
||||||
String notableString = tag.getName().getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tag.getName().getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
if (passesTagNamesFilter(tag.getName().getDisplayName() + notableString) == false) {
|
if (passesTagNamesFilter(tag.getName().getDisplayName() + notableString) == false) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -461,7 +461,7 @@ class TableReportGenerator {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String notableString = tag.getName().getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tag.getName().getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
if (passesTagNamesFilter(tag.getName().getDisplayName() + notableString) == false) {
|
if (passesTagNamesFilter(tag.getName().getDisplayName() + notableString) == false) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1193,7 +1193,7 @@ class TableReportGenerator {
|
|||||||
try {
|
try {
|
||||||
List<ContentTag> contentTags = Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsByContent(content);
|
List<ContentTag> contentTags = Case.getCurrentCaseThrows().getServices().getTagsManager().getContentTagsByContent(content);
|
||||||
for (ContentTag ct : contentTags) {
|
for (ContentTag ct : contentTags) {
|
||||||
String notableString = ct.getName().getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = ct.getName().getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
allTags.add(ct.getName().getDisplayName() + notableString);
|
allTags.add(ct.getName().getDisplayName() + notableString);
|
||||||
}
|
}
|
||||||
} catch (TskCoreException | NoCurrentCaseException ex) {
|
} catch (TskCoreException | NoCurrentCaseException ex) {
|
||||||
@ -1239,7 +1239,7 @@ class TableReportGenerator {
|
|||||||
List<BlackboardArtifactTag> tags = Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsByArtifact(artifact);
|
List<BlackboardArtifactTag> tags = Case.getCurrentCaseThrows().getServices().getTagsManager().getBlackboardArtifactTagsByArtifact(artifact);
|
||||||
HashSet<String> uniqueTagNames = new HashSet<>();
|
HashSet<String> uniqueTagNames = new HashSet<>();
|
||||||
for (BlackboardArtifactTag tag : tags) {
|
for (BlackboardArtifactTag tag : tags) {
|
||||||
String notableString = tag.getName().getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tag.getName().getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
uniqueTagNames.add(tag.getName().getDisplayName() + notableString);
|
uniqueTagNames.add(tag.getName().getDisplayName() + notableString);
|
||||||
}
|
}
|
||||||
if (failsTagFilter(uniqueTagNames, tagNamesFilter)) {
|
if (failsTagFilter(uniqueTagNames, tagNamesFilter)) {
|
||||||
|
@ -954,7 +954,7 @@ public class HTMLReport implements TableReportModule {
|
|||||||
}
|
}
|
||||||
for (int i = 0; i < contentTags.size(); i++) {
|
for (int i = 0; i < contentTags.size(); i++) {
|
||||||
ContentTag tag = contentTags.get(i);
|
ContentTag tag = contentTags.get(i);
|
||||||
String notableString = tag.getName().getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tag.getName().getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
linkToThumbnail.append(tag.getName().getDisplayName()).append(notableString);
|
linkToThumbnail.append(tag.getName().getDisplayName()).append(notableString);
|
||||||
if (i != contentTags.size() - 1) {
|
if (i != contentTags.size() - 1) {
|
||||||
linkToThumbnail.append(", ");
|
linkToThumbnail.append(", ");
|
||||||
|
@ -344,7 +344,7 @@ public class PortableCaseReportModule implements ReportModule {
|
|||||||
progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_generateReport_copyingTags());
|
progressPanel.updateStatusLabel(Bundle.PortableCaseReportModule_generateReport_copyingTags());
|
||||||
try {
|
try {
|
||||||
for (TagName tagName : tagNames) {
|
for (TagName tagName : tagNames) {
|
||||||
TagName newTagName = portableSkCase.getTaggingManager().addOrUpdateTagName(tagName.getDisplayName(), tagName.getDescription(), tagName.getColor(), tagName.getKnownStatus());
|
TagName newTagName = portableSkCase.getTaggingManager().addOrUpdateTagName(tagName.getDisplayName(), tagName.getDescription(), tagName.getColor(), tagName.getTagType());
|
||||||
oldTagNameToNewTagName.put(tagName, newTagName);
|
oldTagNameToNewTagName.put(tagName, newTagName);
|
||||||
}
|
}
|
||||||
} catch (TskCoreException ex) {
|
} catch (TskCoreException ex) {
|
||||||
|
@ -64,7 +64,7 @@ public final class TagUtils {
|
|||||||
logger.log(Level.SEVERE, String.format("Failed to get TagSet for TagName '%s' (ID=%d)", tagName.getDisplayName(), tagName.getId()));
|
logger.log(Level.SEVERE, String.format("Failed to get TagSet for TagName '%s' (ID=%d)", tagName.getDisplayName(), tagName.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tagName.getKnownStatus() == TskData.FileKnown.BAD) {
|
if (tagName.getTagType() == TskData.TagType.BAD) {
|
||||||
displayName += " (Notable)";
|
displayName += " (Notable)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,11 +65,11 @@ public class ImageGalleryService implements AutopsyService {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
// NOTE: The colors here are what will be shown in the border
|
// NOTE: The colors here are what will be shown in the border
|
||||||
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT0, "", TagName.HTML_COLOR.GREEN, TskData.FileKnown.UNKNOWN));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT0, "", TagName.HTML_COLOR.GREEN, TskData.TagType.SUSPICIOUS));
|
||||||
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT1, "", TagName.HTML_COLOR.RED, TskData.FileKnown.BAD));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT1, "", TagName.HTML_COLOR.RED, TskData.TagType.BAD));
|
||||||
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT2, "", TagName.HTML_COLOR.YELLOW, TskData.FileKnown.BAD));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT2, "", TagName.HTML_COLOR.YELLOW, TskData.TagType.BAD));
|
||||||
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT3, "", TagName.HTML_COLOR.FUCHSIA, TskData.FileKnown.BAD));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT3, "", TagName.HTML_COLOR.FUCHSIA, TskData.TagType.BAD));
|
||||||
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT4, "", TagName.HTML_COLOR.BLUE, TskData.FileKnown.UNKNOWN));
|
PROJECT_VIC_US_CATEGORIES.add(new TagNameDefinition(PV_US_CAT4, "", TagName.HTML_COLOR.BLUE, TskData.TagType.SUSPICIOUS));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -149,7 +149,7 @@ public class ImageGalleryService implements AutopsyService {
|
|||||||
private void addProjetVicTagSet(Case currentCase) throws TskCoreException {
|
private void addProjetVicTagSet(Case currentCase) throws TskCoreException {
|
||||||
List<TagName> tagNames = new ArrayList<>();
|
List<TagName> tagNames = new ArrayList<>();
|
||||||
for (TagNameDefinition def : PROJECT_VIC_US_CATEGORIES) {
|
for (TagNameDefinition def : PROJECT_VIC_US_CATEGORIES) {
|
||||||
tagNames.add(currentCase.getSleuthkitCase().getTaggingManager().addOrUpdateTagName(def.getDisplayName(), def.getDescription(), def.getColor(), def.getKnownStatus()));
|
tagNames.add(currentCase.getSleuthkitCase().getTaggingManager().addOrUpdateTagName(def.getDisplayName(), def.getDescription(), def.getColor(), def.getTagType()));
|
||||||
}
|
}
|
||||||
currentCase.getServices().getTagsManager().addTagSet(PROJECT_VIC_TAG_SET_NAME, tagNames);
|
currentCase.getServices().getTagsManager().addTagSet(PROJECT_VIC_TAG_SET_NAME, tagNames);
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ public class AddTagAction extends Action {
|
|||||||
this.selectedFileIDs = selectedFileIDs;
|
this.selectedFileIDs = selectedFileIDs;
|
||||||
this.tagName = tagName;
|
this.tagName = tagName;
|
||||||
setGraphic(controller.getTagsManager().getGraphic(tagName));
|
setGraphic(controller.getTagsManager().getGraphic(tagName));
|
||||||
String notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tagName.getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
setText(tagName.getDisplayName() + notableString);
|
setText(tagName.getDisplayName() + notableString);
|
||||||
setEventHandler(actionEvent -> addTagWithComment(""));
|
setEventHandler(actionEvent -> addTagWithComment(""));
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ public class DeleteTagAction extends Action {
|
|||||||
this.tagName = tagName;
|
this.tagName = tagName;
|
||||||
this.contentTag = contentTag;
|
this.contentTag = contentTag;
|
||||||
setGraphic(controller.getTagsManager().getGraphic(tagName));
|
setGraphic(controller.getTagsManager().getGraphic(tagName));
|
||||||
String notableString = tagName.getKnownStatus() == TskData.FileKnown.BAD ? TagsManager.getNotableTagLabel() : "";
|
String notableString = tagName.getTagType() == TskData.TagType.BAD ? TagsManager.getNotableTagLabel() : "";
|
||||||
setText(tagName.getDisplayName() + notableString);
|
setText(tagName.getDisplayName() + notableString);
|
||||||
setEventHandler(actionEvent -> deleteTag());
|
setEventHandler(actionEvent -> deleteTag());
|
||||||
}
|
}
|
||||||
|
@ -320,6 +320,8 @@ class Chromium extends Extract {
|
|||||||
jProfile = jElement.get("profile").getAsJsonObject(); //NON-NLS
|
jProfile = jElement.get("profile").getAsJsonObject(); //NON-NLS
|
||||||
jInfoCache = jProfile.get("info_cache").getAsJsonObject();
|
jInfoCache = jProfile.get("info_cache").getAsJsonObject();
|
||||||
} else {
|
} else {
|
||||||
|
userProfiles.put(browserLocation, "Default");
|
||||||
|
browserLocations.put(browserLocation, browser);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} catch (JsonIOException | JsonSyntaxException | IllegalStateException ex) {
|
} catch (JsonIOException | JsonSyntaxException | IllegalStateException ex) {
|
||||||
@ -854,6 +856,7 @@ class Chromium extends Extract {
|
|||||||
Set<String> bookmarkKeys = jRoot.keySet();
|
Set<String> bookmarkKeys = jRoot.keySet();
|
||||||
for (String bookmarkKey : bookmarkKeys) {
|
for (String bookmarkKey : bookmarkKeys) {
|
||||||
JsonObject jBookmark = jRoot.get(bookmarkKey).getAsJsonObject(); //NON-NLS
|
JsonObject jBookmark = jRoot.get(bookmarkKey).getAsJsonObject(); //NON-NLS
|
||||||
|
if (jBookmark.has("children")) {
|
||||||
JsonArray jBookmarkArray = jBookmark.getAsJsonArray("children"); //NON-NLS
|
JsonArray jBookmarkArray = jBookmark.getAsJsonArray("children"); //NON-NLS
|
||||||
for (JsonElement result : jBookmarkArray) {
|
for (JsonElement result : jBookmarkArray) {
|
||||||
JsonObject address = result.getAsJsonObject();
|
JsonObject address = result.getAsJsonObject();
|
||||||
@ -908,6 +911,7 @@ class Chromium extends Extract {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!context.dataSourceIngestIsCancelled()) {
|
if (!context.dataSourceIngestIsCancelled()) {
|
||||||
postArtifacts(bbartifacts);
|
postArtifacts(bbartifacts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user