Package me.mthw.forge.cracker
Class BruteCrackerOffice
java.lang.Object
me.mthw.forge.cracker.BruteCracker
me.mthw.forge.cracker.BruteCrackerOffice
- All Implemented Interfaces:
Runnable
The
BruteCrackerOffice class extends the BruteCracker class and provides functionality for brute-forcing passwords for encrypted Office files. It
utilizes a Decryptor to verify passwords and manage decryption operations.
This class is specifically designed to handle Office file decryption and integrates with the Apache POI library for processing encrypted Office documents.
This class requires the Apache POI library for handling Office file encryption.- See Also:
-
BruteCrackerDecryptorPOIFSFileSystemEncryptionInfo
-
Field Summary
Fields inherited from class me.mthw.forge.cracker.BruteCracker
cancelled, control, decryptPath, file, foundPassword, logger, passwordList, randomPassword, randomPasswordCharSet, randomPasswordEndIndex, randomPasswordStartIndex, REPORT_FREQ -
Constructor Summary
ConstructorsConstructorDescriptionBruteCrackerOffice(org.sleuthkit.datamodel.AbstractFile file, AtomicBoolean cancelled, AtomicReference<String> foundPassword, CrackerControl control) -
Method Summary
Modifier and TypeMethodDescriptionvoiddecryptFile(String password) Decrypts a file using the provided password and saves the decrypted content to a specified path.getName()Retrieves the name of the cracker.protected booleanverifyPassword(String password) Verifies the provided password by delegating to the decryptor's verifyPassword method.Methods inherited from class me.mthw.forge.cracker.BruteCracker
addDerivedFile, clean, enableRandomPassword, getDecryptFilePath, run, setPasswordList
-
Constructor Details
-
BruteCrackerOffice
public BruteCrackerOffice(org.sleuthkit.datamodel.AbstractFile file, AtomicBoolean cancelled, AtomicReference<String> foundPassword, CrackerControl control) throws IOException - Throws:
IOException
-
-
Method Details
-
verifyPassword
Verifies the provided password by delegating to the decryptor's verifyPassword method.- Specified by:
verifyPasswordin classBruteCracker- Parameters:
password- the password to be verified- Returns:
trueif the password is verified successfully,falseotherwise- Throws:
GeneralSecurityException- if an error occurs during the verification process
-
decryptFile
public void decryptFile(String password) throws GeneralSecurityException, IOException, org.sleuthkit.datamodel.TskCoreException, org.sleuthkit.autopsy.casemodule.NoCurrentCaseException Decrypts a file using the provided password and saves the decrypted content to a specified path.- Specified by:
decryptFilein classBruteCracker- Parameters:
password- The password used to decrypt the file.- Throws:
GeneralSecurityException- If a security-related error occurs during decryption.IOException- If an I/O error occurs while reading or writing the file.org.sleuthkit.datamodel.TskCoreException- If an error occurs related to the forensic framework.org.sleuthkit.autopsy.casemodule.NoCurrentCaseException
-
getName
Retrieves the name of the cracker.- Specified by:
getNamein classBruteCracker- Returns:
- A string representing the name of the cracker.
-