├── .gitignore ├── .travis.yml ├── Assets └── Cracker.png ├── FileVaultCracker.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── FileVaultCracker.xcscheme ├── FileVaultCracker ├── Classes │ ├── AboutWindowController.h │ ├── AboutWindowController.m │ ├── ApplicationDelegate.h │ ├── ApplicationDelegate.m │ ├── CoreStorageHelper.h │ ├── CoreStorageHelper.m │ ├── FileVaultCracker.h │ ├── FileVaultCracker.m │ ├── MainWindowController.h │ ├── MainWindowController.m │ ├── NSString+FileVaultCracker.h │ ├── NSString+FileVaultCracker.m │ └── Private Headers │ │ ├── CSFDE.h │ │ └── DiskManagement.h ├── Info.plist ├── Interface │ ├── Base.lproj │ │ ├── AboutWindowController.xib │ │ ├── MainMenu.xib │ │ └── MainWindowController.xib │ └── Images │ │ └── Icon.icns ├── Resources │ └── words.txt └── main.m └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac Finder 2 | .DS_Store 3 | .Trashes 4 | Icon? 5 | 6 | # Thumbnails 7 | ._* 8 | 9 | # Files that might appear on external disk 10 | .Spotlight-V100 11 | .Trashes 12 | 13 | # Windows 14 | Thumbs.db 15 | 16 | # Xcode 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | *.xccheckout 22 | *.profraw 23 | !default.pbxuser 24 | !default.mode1v3 25 | !default.mode2v3 26 | !default.perspectivev3 27 | xcuserdata 28 | 29 | # VisualStudio 30 | *.suo 31 | *.sdf 32 | *.opensdf 33 | *.vcxproj.user 34 | *.csproj.user 35 | ipch 36 | 37 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode8.3 3 | install: 4 | - gem install xcpretty 5 | script: 6 | - set -o pipefail && xcodebuild -project "FileVaultCracker.xcodeproj" -scheme "FileVaultCracker" build analyze | xcpretty 7 | notifications: 8 | slack: xs-labs:FXh1yLXNkpcVxKZhZU6icdhI 9 | -------------------------------------------------------------------------------- /Assets/Cracker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macmade/FileVaultCracker/af107f597f946de4ae5a520ce9faec77936d6618/Assets/Cracker.png -------------------------------------------------------------------------------- /FileVaultCracker.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 05213FD71ECF13330093F9F1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 05213FD61ECF13330093F9F1 /* main.m */; }; 11 | 05213FED1ECF13E50093F9F1 /* ApplicationDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 05213FEC1ECF13E50093F9F1 /* ApplicationDelegate.m */; }; 12 | 05213FF11ECF14AC0093F9F1 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 05213FEF1ECF14AC0093F9F1 /* MainMenu.xib */; }; 13 | 05213FF41ECF15140093F9F1 /* AboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 05213FF31ECF15140093F9F1 /* AboutWindowController.m */; }; 14 | 05213FF71ECF15370093F9F1 /* AboutWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 05213FF51ECF15370093F9F1 /* AboutWindowController.xib */; }; 15 | 05213FFA1ECF15EB0093F9F1 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 05213FF91ECF15EB0093F9F1 /* Icon.icns */; }; 16 | 05213FFD1ECF16300093F9F1 /* MainWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 05213FFC1ECF16300093F9F1 /* MainWindowController.m */; }; 17 | 052140001ECF164C0093F9F1 /* MainWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 05213FFE1ECF164C0093F9F1 /* MainWindowController.xib */; }; 18 | 0527C4251ED084FB00E002DC /* words.txt in Resources */ = {isa = PBXBuildFile; fileRef = 0527C4241ED084FB00E002DC /* words.txt */; }; 19 | 05CF78A21ED8785D00A18671 /* NSString+FileVaultCracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 05CF78A11ED8785D00A18671 /* NSString+FileVaultCracker.m */; }; 20 | 05CF78A51ED8789900A18671 /* FileVaultCracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 05CF78A41ED8789900A18671 /* FileVaultCracker.m */; }; 21 | 05CF78AD1ED882E500A18671 /* DiskManagement.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05CF78AC1ED882E500A18671 /* DiskManagement.framework */; }; 22 | 05CF78AF1ED882F200A18671 /* libcsfde.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 05CF78AE1ED882F200A18671 /* libcsfde.dylib */; }; 23 | 05CF78B21ED8933000A18671 /* CoreStorageHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 05CF78B11ED8933000A18671 /* CoreStorageHelper.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 05213FD01ECF13330093F9F1 /* FileVaultCracker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FileVaultCracker.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 05213FD61ECF13330093F9F1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 29 | 05213FE01ECF13330093F9F1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | 05213FEB1ECF13E50093F9F1 /* ApplicationDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationDelegate.h; sourceTree = ""; }; 31 | 05213FEC1ECF13E50093F9F1 /* ApplicationDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApplicationDelegate.m; sourceTree = ""; }; 32 | 05213FF01ECF14AC0093F9F1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 33 | 05213FF21ECF15140093F9F1 /* AboutWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutWindowController.h; sourceTree = ""; }; 34 | 05213FF31ECF15140093F9F1 /* AboutWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutWindowController.m; sourceTree = ""; }; 35 | 05213FF61ECF15370093F9F1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/AboutWindowController.xib; sourceTree = ""; }; 36 | 05213FF91ECF15EB0093F9F1 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; 37 | 05213FFB1ECF16300093F9F1 /* MainWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainWindowController.h; sourceTree = ""; }; 38 | 05213FFC1ECF16300093F9F1 /* MainWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainWindowController.m; sourceTree = ""; }; 39 | 05213FFF1ECF164C0093F9F1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainWindowController.xib; sourceTree = ""; }; 40 | 0527C4241ED084FB00E002DC /* words.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = words.txt; sourceTree = ""; }; 41 | 05CF78A01ED8785D00A18671 /* NSString+FileVaultCracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+FileVaultCracker.h"; sourceTree = ""; }; 42 | 05CF78A11ED8785D00A18671 /* NSString+FileVaultCracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+FileVaultCracker.m"; sourceTree = ""; }; 43 | 05CF78A31ED8789900A18671 /* FileVaultCracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileVaultCracker.h; sourceTree = ""; }; 44 | 05CF78A41ED8789900A18671 /* FileVaultCracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileVaultCracker.m; sourceTree = ""; }; 45 | 05CF78A91ED8820100A18671 /* CSFDE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSFDE.h; sourceTree = ""; }; 46 | 05CF78AA1ED8820100A18671 /* DiskManagement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiskManagement.h; sourceTree = ""; }; 47 | 05CF78AC1ED882E500A18671 /* DiskManagement.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiskManagement.framework; path = ../../../../../../System/Library/PrivateFrameworks/DiskManagement.framework; sourceTree = ""; }; 48 | 05CF78AE1ED882F200A18671 /* libcsfde.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcsfde.dylib; path = ../../../../../../usr/lib/libcsfde.dylib; sourceTree = ""; }; 49 | 05CF78B01ED8933000A18671 /* CoreStorageHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreStorageHelper.h; sourceTree = ""; }; 50 | 05CF78B11ED8933000A18671 /* CoreStorageHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreStorageHelper.m; sourceTree = ""; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | 05213FCD1ECF13330093F9F1 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | 05CF78AF1ED882F200A18671 /* libcsfde.dylib in Frameworks */, 59 | 05CF78AD1ED882E500A18671 /* DiskManagement.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 05213FA21ECED9960093F9F1 = { 67 | isa = PBXGroup; 68 | children = ( 69 | 05213FD11ECF13330093F9F1 /* FileVaultCracker */, 70 | 05213FAC1ECED9960093F9F1 /* Products */, 71 | 05CF78AB1ED882E400A18671 /* Frameworks */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 05213FAC1ECED9960093F9F1 /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 05213FD01ECF13330093F9F1 /* FileVaultCracker.app */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 05213FD11ECF13330093F9F1 /* FileVaultCracker */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 05213FEA1ECF13E50093F9F1 /* Classes */, 87 | 05213FEE1ECF13EF0093F9F1 /* Interface */, 88 | 055488961ECFBA1800907ABA /* Resources */, 89 | 05213FD51ECF13330093F9F1 /* Supporting Files */, 90 | ); 91 | path = FileVaultCracker; 92 | sourceTree = ""; 93 | }; 94 | 05213FD51ECF13330093F9F1 /* Supporting Files */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 05213FE01ECF13330093F9F1 /* Info.plist */, 98 | 05213FD61ECF13330093F9F1 /* main.m */, 99 | ); 100 | name = "Supporting Files"; 101 | sourceTree = ""; 102 | }; 103 | 05213FEA1ECF13E50093F9F1 /* Classes */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 05213FF21ECF15140093F9F1 /* AboutWindowController.h */, 107 | 05213FF31ECF15140093F9F1 /* AboutWindowController.m */, 108 | 05213FEB1ECF13E50093F9F1 /* ApplicationDelegate.h */, 109 | 05213FEC1ECF13E50093F9F1 /* ApplicationDelegate.m */, 110 | 05CF78B01ED8933000A18671 /* CoreStorageHelper.h */, 111 | 05CF78B11ED8933000A18671 /* CoreStorageHelper.m */, 112 | 05CF78A31ED8789900A18671 /* FileVaultCracker.h */, 113 | 05CF78A41ED8789900A18671 /* FileVaultCracker.m */, 114 | 05213FFB1ECF16300093F9F1 /* MainWindowController.h */, 115 | 05213FFC1ECF16300093F9F1 /* MainWindowController.m */, 116 | 05CF78A01ED8785D00A18671 /* NSString+FileVaultCracker.h */, 117 | 05CF78A11ED8785D00A18671 /* NSString+FileVaultCracker.m */, 118 | 05CF78A81ED881A100A18671 /* Private Headers */, 119 | ); 120 | path = Classes; 121 | sourceTree = ""; 122 | }; 123 | 05213FEE1ECF13EF0093F9F1 /* Interface */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 05213FF81ECF15C60093F9F1 /* Images */, 127 | 05213FF51ECF15370093F9F1 /* AboutWindowController.xib */, 128 | 05213FEF1ECF14AC0093F9F1 /* MainMenu.xib */, 129 | 05213FFE1ECF164C0093F9F1 /* MainWindowController.xib */, 130 | ); 131 | path = Interface; 132 | sourceTree = ""; 133 | }; 134 | 05213FF81ECF15C60093F9F1 /* Images */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 05213FF91ECF15EB0093F9F1 /* Icon.icns */, 138 | ); 139 | path = Images; 140 | sourceTree = ""; 141 | }; 142 | 055488961ECFBA1800907ABA /* Resources */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 0527C4241ED084FB00E002DC /* words.txt */, 146 | ); 147 | path = Resources; 148 | sourceTree = ""; 149 | }; 150 | 05CF78A81ED881A100A18671 /* Private Headers */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 05CF78A91ED8820100A18671 /* CSFDE.h */, 154 | 05CF78AA1ED8820100A18671 /* DiskManagement.h */, 155 | ); 156 | path = "Private Headers"; 157 | sourceTree = ""; 158 | }; 159 | 05CF78AB1ED882E400A18671 /* Frameworks */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 05CF78AE1ED882F200A18671 /* libcsfde.dylib */, 163 | 05CF78AC1ED882E500A18671 /* DiskManagement.framework */, 164 | ); 165 | name = Frameworks; 166 | sourceTree = ""; 167 | }; 168 | /* End PBXGroup section */ 169 | 170 | /* Begin PBXNativeTarget section */ 171 | 05213FCF1ECF13330093F9F1 /* FileVaultCracker */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = 05213FE11ECF13330093F9F1 /* Build configuration list for PBXNativeTarget "FileVaultCracker" */; 174 | buildPhases = ( 175 | 05213FCC1ECF13330093F9F1 /* Sources */, 176 | 05213FCD1ECF13330093F9F1 /* Frameworks */, 177 | 05213FCE1ECF13330093F9F1 /* Resources */, 178 | ); 179 | buildRules = ( 180 | ); 181 | dependencies = ( 182 | ); 183 | name = FileVaultCracker; 184 | productName = KeychainCracker; 185 | productReference = 05213FD01ECF13330093F9F1 /* FileVaultCracker.app */; 186 | productType = "com.apple.product-type.application"; 187 | }; 188 | /* End PBXNativeTarget section */ 189 | 190 | /* Begin PBXProject section */ 191 | 05213FA31ECED9960093F9F1 /* Project object */ = { 192 | isa = PBXProject; 193 | attributes = { 194 | LastUpgradeCheck = 0830; 195 | ORGANIZATIONNAME = "XS-Labs"; 196 | TargetAttributes = { 197 | 05213FCF1ECF13330093F9F1 = { 198 | CreatedOnToolsVersion = 8.3.2; 199 | ProvisioningStyle = Automatic; 200 | }; 201 | }; 202 | }; 203 | buildConfigurationList = 05213FA61ECED9960093F9F1 /* Build configuration list for PBXProject "FileVaultCracker" */; 204 | compatibilityVersion = "Xcode 3.2"; 205 | developmentRegion = English; 206 | hasScannedForEncodings = 0; 207 | knownRegions = ( 208 | en, 209 | Base, 210 | ); 211 | mainGroup = 05213FA21ECED9960093F9F1; 212 | productRefGroup = 05213FAC1ECED9960093F9F1 /* Products */; 213 | projectDirPath = ""; 214 | projectRoot = ""; 215 | targets = ( 216 | 05213FCF1ECF13330093F9F1 /* FileVaultCracker */, 217 | ); 218 | }; 219 | /* End PBXProject section */ 220 | 221 | /* Begin PBXResourcesBuildPhase section */ 222 | 05213FCE1ECF13330093F9F1 /* Resources */ = { 223 | isa = PBXResourcesBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | 05213FFA1ECF15EB0093F9F1 /* Icon.icns in Resources */, 227 | 05213FF11ECF14AC0093F9F1 /* MainMenu.xib in Resources */, 228 | 052140001ECF164C0093F9F1 /* MainWindowController.xib in Resources */, 229 | 0527C4251ED084FB00E002DC /* words.txt in Resources */, 230 | 05213FF71ECF15370093F9F1 /* AboutWindowController.xib in Resources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXResourcesBuildPhase section */ 235 | 236 | /* Begin PBXSourcesBuildPhase section */ 237 | 05213FCC1ECF13330093F9F1 /* Sources */ = { 238 | isa = PBXSourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 05CF78A21ED8785D00A18671 /* NSString+FileVaultCracker.m in Sources */, 242 | 05213FFD1ECF16300093F9F1 /* MainWindowController.m in Sources */, 243 | 05213FD71ECF13330093F9F1 /* main.m in Sources */, 244 | 05213FF41ECF15140093F9F1 /* AboutWindowController.m in Sources */, 245 | 05CF78A51ED8789900A18671 /* FileVaultCracker.m in Sources */, 246 | 05CF78B21ED8933000A18671 /* CoreStorageHelper.m in Sources */, 247 | 05213FED1ECF13E50093F9F1 /* ApplicationDelegate.m in Sources */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | /* End PBXSourcesBuildPhase section */ 252 | 253 | /* Begin PBXVariantGroup section */ 254 | 05213FEF1ECF14AC0093F9F1 /* MainMenu.xib */ = { 255 | isa = PBXVariantGroup; 256 | children = ( 257 | 05213FF01ECF14AC0093F9F1 /* Base */, 258 | ); 259 | name = MainMenu.xib; 260 | sourceTree = ""; 261 | }; 262 | 05213FF51ECF15370093F9F1 /* AboutWindowController.xib */ = { 263 | isa = PBXVariantGroup; 264 | children = ( 265 | 05213FF61ECF15370093F9F1 /* Base */, 266 | ); 267 | name = AboutWindowController.xib; 268 | sourceTree = ""; 269 | }; 270 | 05213FFE1ECF164C0093F9F1 /* MainWindowController.xib */ = { 271 | isa = PBXVariantGroup; 272 | children = ( 273 | 05213FFF1ECF164C0093F9F1 /* Base */, 274 | ); 275 | name = MainWindowController.xib; 276 | sourceTree = ""; 277 | }; 278 | /* End PBXVariantGroup section */ 279 | 280 | /* Begin XCBuildConfiguration section */ 281 | 05213FB01ECED9960093F9F1 /* Debug */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ALWAYS_SEARCH_USER_PATHS = NO; 285 | CLANG_ANALYZER_DEADCODE_DEADSTORES = YES; 286 | CLANG_ANALYZER_GCD = YES; 287 | CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; 288 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 289 | CLANG_ANALYZER_MEMORY_MANAGEMENT = YES; 290 | CLANG_ANALYZER_NONNULL = YES; 291 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 292 | CLANG_ANALYZER_OBJC_ATSYNC = YES; 293 | CLANG_ANALYZER_OBJC_COLLECTIONS = YES; 294 | CLANG_ANALYZER_OBJC_DEALLOC = YES; 295 | CLANG_ANALYZER_OBJC_GENERICS = YES; 296 | CLANG_ANALYZER_OBJC_INCOMP_METHOD_TYPES = YES; 297 | CLANG_ANALYZER_OBJC_NSCFERROR = YES; 298 | CLANG_ANALYZER_OBJC_RETAIN_COUNT = YES; 299 | CLANG_ANALYZER_OBJC_SELF_INIT = YES; 300 | CLANG_ANALYZER_OBJC_UNUSED_IVARS = YES; 301 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; 302 | CLANG_ANALYZER_SECURITY_INSECUREAPI_GETPW_GETS = YES; 303 | CLANG_ANALYZER_SECURITY_INSECUREAPI_MKSTEMP = YES; 304 | CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; 305 | CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; 306 | CLANG_ANALYZER_SECURITY_INSECUREAPI_UNCHECKEDRETURN = YES; 307 | CLANG_ANALYZER_SECURITY_INSECUREAPI_VFORK = YES; 308 | CLANG_ANALYZER_SECURITY_KEYCHAIN_API = YES; 309 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 310 | CLANG_CXX_LIBRARY = "libc++"; 311 | CLANG_ENABLE_MODULES = YES; 312 | CLANG_ENABLE_OBJC_ARC = YES; 313 | CLANG_STATIC_ANALYZER_MODE = deep; 314 | CLANG_STATIC_ANALYZER_MODE_ON_ANALYZE_ACTION = deep; 315 | CLANG_WARN_ASSIGN_ENUM = YES; 316 | CLANG_WARN_BOOL_CONVERSION = YES; 317 | CLANG_WARN_CONSTANT_CONVERSION = YES; 318 | CLANG_WARN_CXX0X_EXTENSIONS = YES; 319 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 320 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 321 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 322 | CLANG_WARN_EMPTY_BODY = YES; 323 | CLANG_WARN_ENUM_CONVERSION = YES; 324 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 325 | CLANG_WARN_INFINITE_RECURSION = YES; 326 | CLANG_WARN_INT_CONVERSION = YES; 327 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; 328 | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; 329 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 330 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO; 331 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 334 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 335 | CLANG_WARN_UNREACHABLE_CODE = YES; 336 | CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; 337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 338 | CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; 339 | CODE_SIGN_IDENTITY = "-"; 340 | COPY_PHASE_STRIP = NO; 341 | DEBUG_INFORMATION_FORMAT = dwarf; 342 | ENABLE_STRICT_OBJC_MSGSEND = YES; 343 | ENABLE_TESTABILITY = YES; 344 | GCC_C_LANGUAGE_STANDARD = c99; 345 | GCC_DYNAMIC_NO_PIC = NO; 346 | GCC_NO_COMMON_BLOCKS = YES; 347 | GCC_OPTIMIZATION_LEVEL = 0; 348 | GCC_PREPROCESSOR_DEFINITIONS = ( 349 | "DEBUG=1", 350 | "$(inherited)", 351 | ); 352 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 353 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 354 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 355 | GCC_UNROLL_LOOPS = NO; 356 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 357 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 358 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES; 359 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 360 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 361 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 362 | GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; 363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 364 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; 365 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 366 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; 367 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; 368 | GCC_WARN_INHIBIT_ALL_WARNINGS = NO; 369 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 370 | GCC_WARN_MISSING_PARENTHESES = YES; 371 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 372 | GCC_WARN_PEDANTIC = YES; 373 | GCC_WARN_SHADOW = YES; 374 | GCC_WARN_SIGN_COMPARE = YES; 375 | GCC_WARN_STRICT_SELECTOR_MATCH = YES; 376 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; 377 | GCC_WARN_UNDECLARED_SELECTOR = YES; 378 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 379 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_LABEL = YES; 382 | GCC_WARN_UNUSED_PARAMETER = YES; 383 | GCC_WARN_UNUSED_VALUE = YES; 384 | GCC_WARN_UNUSED_VARIABLE = YES; 385 | LLVM_LTO = NO; 386 | MACOSX_DEPLOYMENT_TARGET = 10.12; 387 | ONLY_ACTIVE_ARCH = YES; 388 | RUN_CLANG_STATIC_ANALYZER = YES; 389 | SDKROOT = macosx; 390 | }; 391 | name = Debug; 392 | }; 393 | 05213FB11ECED9960093F9F1 /* Release */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | ALWAYS_SEARCH_USER_PATHS = NO; 397 | CLANG_ANALYZER_DEADCODE_DEADSTORES = YES; 398 | CLANG_ANALYZER_GCD = YES; 399 | CLANG_ANALYZER_LOCALIZABILITY_EMPTY_CONTEXT = YES; 400 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 401 | CLANG_ANALYZER_MEMORY_MANAGEMENT = YES; 402 | CLANG_ANALYZER_NONNULL = YES; 403 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 404 | CLANG_ANALYZER_OBJC_ATSYNC = YES; 405 | CLANG_ANALYZER_OBJC_COLLECTIONS = YES; 406 | CLANG_ANALYZER_OBJC_DEALLOC = YES; 407 | CLANG_ANALYZER_OBJC_GENERICS = YES; 408 | CLANG_ANALYZER_OBJC_INCOMP_METHOD_TYPES = YES; 409 | CLANG_ANALYZER_OBJC_NSCFERROR = YES; 410 | CLANG_ANALYZER_OBJC_RETAIN_COUNT = YES; 411 | CLANG_ANALYZER_OBJC_SELF_INIT = YES; 412 | CLANG_ANALYZER_OBJC_UNUSED_IVARS = YES; 413 | CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; 414 | CLANG_ANALYZER_SECURITY_INSECUREAPI_GETPW_GETS = YES; 415 | CLANG_ANALYZER_SECURITY_INSECUREAPI_MKSTEMP = YES; 416 | CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES; 417 | CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; 418 | CLANG_ANALYZER_SECURITY_INSECUREAPI_UNCHECKEDRETURN = YES; 419 | CLANG_ANALYZER_SECURITY_INSECUREAPI_VFORK = YES; 420 | CLANG_ANALYZER_SECURITY_KEYCHAIN_API = YES; 421 | CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; 422 | CLANG_CXX_LIBRARY = "libc++"; 423 | CLANG_ENABLE_MODULES = YES; 424 | CLANG_ENABLE_OBJC_ARC = YES; 425 | CLANG_STATIC_ANALYZER_MODE = deep; 426 | CLANG_STATIC_ANALYZER_MODE_ON_ANALYZE_ACTION = deep; 427 | CLANG_WARN_ASSIGN_ENUM = YES; 428 | CLANG_WARN_BOOL_CONVERSION = YES; 429 | CLANG_WARN_CONSTANT_CONVERSION = YES; 430 | CLANG_WARN_CXX0X_EXTENSIONS = YES; 431 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 432 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 433 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 434 | CLANG_WARN_EMPTY_BODY = YES; 435 | CLANG_WARN_ENUM_CONVERSION = YES; 436 | CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; 437 | CLANG_WARN_INFINITE_RECURSION = YES; 438 | CLANG_WARN_INT_CONVERSION = YES; 439 | CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES; 440 | CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES; 441 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 442 | CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO; 443 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES; 444 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 445 | CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; 446 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 447 | CLANG_WARN_UNREACHABLE_CODE = YES; 448 | CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES; 449 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 450 | CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES; 451 | CODE_SIGN_IDENTITY = "-"; 452 | COPY_PHASE_STRIP = NO; 453 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 454 | ENABLE_NS_ASSERTIONS = NO; 455 | ENABLE_STRICT_OBJC_MSGSEND = YES; 456 | GCC_C_LANGUAGE_STANDARD = c99; 457 | GCC_NO_COMMON_BLOCKS = YES; 458 | GCC_OPTIMIZATION_LEVEL = fast; 459 | GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; 460 | GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; 461 | GCC_TREAT_WARNINGS_AS_ERRORS = YES; 462 | GCC_UNROLL_LOOPS = YES; 463 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 464 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 465 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES; 466 | GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; 467 | GCC_WARN_ABOUT_MISSING_NEWLINE = YES; 468 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 469 | GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; 470 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 471 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; 472 | GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; 473 | GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; 474 | GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; 475 | GCC_WARN_INHIBIT_ALL_WARNINGS = NO; 476 | GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; 477 | GCC_WARN_MISSING_PARENTHESES = YES; 478 | GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; 479 | GCC_WARN_PEDANTIC = YES; 480 | GCC_WARN_SHADOW = YES; 481 | GCC_WARN_SIGN_COMPARE = YES; 482 | GCC_WARN_STRICT_SELECTOR_MATCH = YES; 483 | GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; 484 | GCC_WARN_UNDECLARED_SELECTOR = YES; 485 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 486 | GCC_WARN_UNKNOWN_PRAGMAS = YES; 487 | GCC_WARN_UNUSED_FUNCTION = YES; 488 | GCC_WARN_UNUSED_LABEL = YES; 489 | GCC_WARN_UNUSED_PARAMETER = YES; 490 | GCC_WARN_UNUSED_VALUE = YES; 491 | GCC_WARN_UNUSED_VARIABLE = YES; 492 | LLVM_LTO = YES_THIN; 493 | MACOSX_DEPLOYMENT_TARGET = 10.12; 494 | RUN_CLANG_STATIC_ANALYZER = YES; 495 | SDKROOT = macosx; 496 | }; 497 | name = Release; 498 | }; 499 | 05213FE21ECF13330093F9F1 /* Debug */ = { 500 | isa = XCBuildConfiguration; 501 | buildSettings = { 502 | COMBINE_HIDPI_IMAGES = YES; 503 | FRAMEWORK_SEARCH_PATHS = ( 504 | "$(inherited)", 505 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 506 | ); 507 | INFOPLIST_FILE = FileVaultCracker/Info.plist; 508 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 509 | PRODUCT_BUNDLE_IDENTIFIER = "com.xs-labs.FileVaultCracker"; 510 | PRODUCT_NAME = "$(TARGET_NAME)"; 511 | }; 512 | name = Debug; 513 | }; 514 | 05213FE31ECF13330093F9F1 /* Release */ = { 515 | isa = XCBuildConfiguration; 516 | buildSettings = { 517 | COMBINE_HIDPI_IMAGES = YES; 518 | FRAMEWORK_SEARCH_PATHS = ( 519 | "$(inherited)", 520 | "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", 521 | ); 522 | INFOPLIST_FILE = FileVaultCracker/Info.plist; 523 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 524 | PRODUCT_BUNDLE_IDENTIFIER = "com.xs-labs.FileVaultCracker"; 525 | PRODUCT_NAME = "$(TARGET_NAME)"; 526 | }; 527 | name = Release; 528 | }; 529 | /* End XCBuildConfiguration section */ 530 | 531 | /* Begin XCConfigurationList section */ 532 | 05213FA61ECED9960093F9F1 /* Build configuration list for PBXProject "FileVaultCracker" */ = { 533 | isa = XCConfigurationList; 534 | buildConfigurations = ( 535 | 05213FB01ECED9960093F9F1 /* Debug */, 536 | 05213FB11ECED9960093F9F1 /* Release */, 537 | ); 538 | defaultConfigurationIsVisible = 0; 539 | defaultConfigurationName = Release; 540 | }; 541 | 05213FE11ECF13330093F9F1 /* Build configuration list for PBXNativeTarget "FileVaultCracker" */ = { 542 | isa = XCConfigurationList; 543 | buildConfigurations = ( 544 | 05213FE21ECF13330093F9F1 /* Debug */, 545 | 05213FE31ECF13330093F9F1 /* Release */, 546 | ); 547 | defaultConfigurationIsVisible = 0; 548 | defaultConfigurationName = Release; 549 | }; 550 | /* End XCConfigurationList section */ 551 | }; 552 | rootObject = 05213FA31ECED9960093F9F1 /* Project object */; 553 | } 554 | -------------------------------------------------------------------------------- /FileVaultCracker.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FileVaultCracker.xcodeproj/xcshareddata/xcschemes/FileVaultCracker.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 71 | 72 | 73 | 74 | 76 | 77 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/AboutWindowController.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header AboutWindowController.h 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Cocoa; 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | @interface AboutWindowController: NSWindowController 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/AboutWindowController.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @file AboutWindowController.m 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | #import "AboutWindowController.h" 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | @interface AboutWindowController() 35 | 36 | @property( atomic, readwrite, strong ) NSString * name; 37 | @property( atomic, readwrite, strong ) NSString * version; 38 | @property( atomic, readwrite, strong ) NSString * copyright; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | 44 | @implementation AboutWindowController 45 | 46 | - ( instancetype )init 47 | { 48 | return [ self initWithWindowNibName: NSStringFromClass( self.class ) ]; 49 | } 50 | 51 | - ( void )windowDidLoad 52 | { 53 | [ super windowDidLoad ]; 54 | 55 | self.window.titlebarAppearsTransparent = YES; 56 | self.window.titleVisibility = NSWindowTitleHidden; 57 | 58 | self.name = [ [ NSBundle mainBundle ] objectForInfoDictionaryKey: @"CFBundleName" ]; 59 | self.version = [ [ NSBundle mainBundle ] objectForInfoDictionaryKey: @"CFBundleShortVersionString" ]; 60 | self.copyright = [ [ NSBundle mainBundle ] objectForInfoDictionaryKey: @"NSHumanReadableCopyright" ]; 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/ApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header ApplicationDelegate.h 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Cocoa; 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | @interface ApplicationDelegate: NSObject < NSApplicationDelegate > 35 | 36 | - ( IBAction )showAboutWindow: ( nullable id )sender; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/ApplicationDelegate.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @file ApplicationDelegate.m 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | #import "ApplicationDelegate.h" 31 | #import "AboutWindowController.h" 32 | #import "MainWindowController.h" 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | @interface ApplicationDelegate() 37 | 38 | @property( atomic, readwrite, strong, nullable ) AboutWindowController * aboutWindowController; 39 | @property( atomic, readwrite, strong, nullable ) MainWindowController * mainWindowController; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | 45 | @implementation ApplicationDelegate 46 | 47 | - ( void )applicationDidFinishLaunching: ( NSNotification * )notification 48 | { 49 | ( void )notification; 50 | 51 | self.mainWindowController = [ MainWindowController new ]; 52 | 53 | [ self.mainWindowController.window center ]; 54 | [ self.mainWindowController.window makeKeyAndOrderFront: nil ]; 55 | } 56 | 57 | - ( BOOL )applicationShouldTerminateAfterLastWindowClosed: ( NSApplication * )sender 58 | { 59 | ( void )sender; 60 | 61 | return YES; 62 | } 63 | 64 | - ( IBAction )showAboutWindow: ( nullable id )sender 65 | { 66 | @synchronized( self ) 67 | { 68 | if( self.aboutWindowController == nil ) 69 | { 70 | self.aboutWindowController = [ AboutWindowController new ]; 71 | 72 | [ self.aboutWindowController.window center ]; 73 | } 74 | 75 | [ self.aboutWindowController.window makeKeyAndOrderFront: sender ]; 76 | } 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/CoreStorageHelper.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header CoreStorageHelper.h 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Foundation; 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | @interface CoreStorageHelper: NSObject 35 | 36 | + ( instancetype )sharedInstance; 37 | 38 | - ( BOOL )isValidLogicalVolumeUUID: ( NSString * )uuid; 39 | - ( BOOL )isEncryptedLogicalVolumeUUID: ( NSString * )uuid; 40 | - ( BOOL )isLockedLogicalVolumeUUID: ( NSString * )uuid; 41 | - ( BOOL )unlockLogicalVolumeUUID: ( NSString * )volumeUUID withAKSUUID: ( NSString * )aksUUID; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/CoreStorageHelper.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @file CoreStorageHelper.m 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import DiskArbitration; 31 | 32 | #import "CoreStorageHelper.h" 33 | #import "DiskManagement.h" 34 | #import 35 | 36 | NS_ASSUME_NONNULL_BEGIN 37 | 38 | @interface CoreStorageHelper() < DMManagerDelegate, DMManagerClientDelegate > 39 | { 40 | atomic_bool _unlocked; 41 | } 42 | 43 | @property( atomic, readwrite, strong ) DMManager * manager; 44 | @property( atomic, readwrite, strong ) DMCoreStorage * cs; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | 50 | @implementation CoreStorageHelper 51 | 52 | + ( instancetype )sharedInstance 53 | { 54 | static dispatch_once_t once; 55 | static id instance = nil; 56 | 57 | dispatch_once 58 | ( 59 | &once, 60 | ^( void ) 61 | { 62 | instance = [ self new ]; 63 | } 64 | ); 65 | 66 | return instance; 67 | } 68 | 69 | - ( instancetype )init 70 | { 71 | if( ( self = [ super init ] ) ) 72 | { 73 | self.manager = [ DMManager new ]; 74 | self.manager.language = @"English"; 75 | self.manager.delegate = self; 76 | self.manager.clientDelegate = self; 77 | self.cs = [ [ DMCoreStorage alloc ] initWithManager: self.manager ]; 78 | } 79 | 80 | return self; 81 | } 82 | 83 | - ( BOOL )isValidLogicalVolumeUUID: ( NSString * )uuid 84 | { 85 | return [ self.cs logicalVolumeGroupForLogicalVolume: uuid logicalVolumeGroup: NULL ] == 0; 86 | } 87 | 88 | - ( BOOL )isEncryptedLogicalVolumeUUID: ( NSString * )uuid 89 | { 90 | BOOL encrypted; 91 | 92 | if( [ self.cs isEncryptedDiskForLogicalVolume: uuid encrypted: &encrypted locked: NULL type: NULL ] != 0 ) 93 | { 94 | return NO; 95 | } 96 | 97 | return encrypted; 98 | } 99 | 100 | - ( BOOL )isLockedLogicalVolumeUUID: ( NSString * )uuid 101 | { 102 | BOOL locked; 103 | 104 | if( [ self.cs isEncryptedDiskForLogicalVolume: uuid encrypted: NULL locked: &locked type: NULL ] != 0 ) 105 | { 106 | return NO; 107 | } 108 | 109 | return locked; 110 | } 111 | 112 | - ( BOOL )unlockLogicalVolumeUUID: ( NSString * )volumeUUID withAKSUUID: ( NSString * )aksUUID 113 | { 114 | NSMutableDictionary * options; 115 | 116 | atomic_store( &_unlocked, false ); 117 | 118 | if( volumeUUID.length == 0 || aksUUID.length == 0 ) 119 | { 120 | return NO; 121 | } 122 | 123 | options = 124 | @{ 125 | @"lvuuid" : volumeUUID, 126 | @"options" : 127 | @{ 128 | @"AKSPassphraseUUID" : aksUUID 129 | } 130 | } 131 | .mutableCopy; 132 | 133 | [ self.cs unlockLogicalVolume: volumeUUID options: options[ @"options" ] ]; 134 | 135 | CFRunLoopRun(); 136 | 137 | return atomic_load( &_unlocked ); 138 | } 139 | 140 | #pragma mark - DMManagerDelegate 141 | 142 | - ( void )dmInterruptibilityChanged: ( BOOL )value 143 | { 144 | ( void )value; 145 | } 146 | 147 | - ( void )dmAsyncFinishedForDisk: ( DADiskRef )disk mainError: ( int )mainError detailError: ( int )detailError dictionary: ( NSDictionary * )dictionary 148 | { 149 | ( void )disk; 150 | ( void )mainError; 151 | ( void )detailError; 152 | ( void )dictionary; 153 | 154 | CFRunLoopStop( CFRunLoopGetCurrent() ); 155 | } 156 | 157 | - ( void )dmAsyncMessageForDisk: ( DADiskRef )disk string: ( NSString * )str dictionary: ( NSDictionary * )dict 158 | { 159 | NSNumber * n; 160 | 161 | ( void )disk; 162 | ( void )str; 163 | 164 | n = [ dict objectForKey: @"LVFUnlockSuccessful" ]; 165 | 166 | if( n && [ n isKindOfClass: [ NSNumber class ] ] && [ n isEqual: @1 ] ) 167 | { 168 | atomic_store( &_unlocked, true ); 169 | } 170 | } 171 | 172 | - ( void )dmAsyncProgressForDisk: ( DADiskRef )disk barberPole: ( BOOL )barberPole percent: ( float )percent 173 | { 174 | ( void )disk; 175 | ( void )barberPole; 176 | ( void )percent; 177 | } 178 | 179 | - ( void )dmAsyncStartedForDisk: ( DADiskRef )disk 180 | { 181 | ( void )disk; 182 | } 183 | 184 | @end 185 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/FileVaultCracker.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header FileVaultCracker.h 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Foundation; 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | @interface FileVaultCracker: NSObject 35 | 36 | @property( atomic, readonly, nullable ) NSString * message; 37 | @property( atomic, readonly ) double progress; 38 | @property( atomic, readonly ) BOOL progressIsIndeterminate; 39 | @property( atomic, readonly ) NSUInteger secondsRemaining; 40 | @property( atomic, readwrite, assign ) NSUInteger maxThreads; 41 | @property( atomic, readwrite, assign ) NSUInteger maxCharsForCaseVariants; 42 | @property( atomic, readwrite, assign ) NSUInteger maxCharsForCommonSubstitutions; 43 | 44 | - ( nullable instancetype )initWithCoreStorageUUID: ( NSString * )coreStorageUUID passwords: ( NSArray< NSString * > * )passwords NS_DESIGNATED_INITIALIZER; 45 | - ( void )crack: ( void ( ^ )( BOOL volumeMounted, NSString * _Nullable password ) )completion; 46 | - ( void )stop; 47 | 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/FileVaultCracker.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @file FileVaultCracker.m 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Cocoa; 31 | 32 | #import "FileVaultCracker.h" 33 | #import "NSString+FileVaultCracker.h" 34 | #import "CoreStorageHelper.h" 35 | #import "CSFDE.h" 36 | #import 37 | 38 | NS_ASSUME_NONNULL_BEGIN 39 | 40 | @interface FileVaultCracker() 41 | { 42 | atomic_ulong _processed; 43 | atomic_bool _unlocked; 44 | atomic_bool _stopping; 45 | } 46 | 47 | @property( atomic, readwrite, strong ) NSString * coreStorageUUID; 48 | @property( atomic, readwrite, strong ) NSArray< NSString * > * passwords; 49 | @property( atomic, readwrite, assign ) NSUInteger numberOfPasswordsToTest; 50 | @property( atomic, readwrite, strong ) NSMutableArray< NSString * > * foundPasswords; 51 | @property( atomic, readwrite, assign ) NSUInteger threadsRunning; 52 | @property( atomic, readwrite, strong, nullable ) NSString * message; 53 | @property( atomic, readwrite, assign ) BOOL initialized; 54 | @property( atomic, readwrite, assign ) double progress; 55 | @property( atomic, readwrite, assign ) BOOL progressIsIndeterminate; 56 | @property( atomic, readwrite, assign ) NSUInteger lastProcessed; 57 | @property( atomic, readwrite, assign ) NSUInteger secondsRemaining; 58 | @property( atomic, readwrite, strong, nullable ) NSTimer * timer; 59 | @property( atomic, readwrite, strong, nullable ) NSString * password; 60 | @property( atomic, readwrite, strong, nullable ) void ( ^ completion )( BOOL volumeMounted, NSString * _Nullable password ); 61 | 62 | - ( void )crack; 63 | - ( void )generateVariants: ( NSMutableArray< NSString * > * )passwords withSelector: ( SEL )selector maxChars: ( NSUInteger )maxChars message: ( NSString * )message; 64 | - ( void )crackPasswords: ( NSArray< NSString * > * )passwords; 65 | - ( void )checkProgress; 66 | 67 | @end 68 | 69 | NS_ASSUME_NONNULL_END 70 | 71 | @implementation FileVaultCracker 72 | 73 | - ( nullable instancetype )init 74 | { 75 | return [ self initWithCoreStorageUUID: @"" passwords: @[] ]; 76 | } 77 | 78 | - ( nullable instancetype )initWithCoreStorageUUID: ( NSString * )coreStorageUUID passwords: ( NSArray< NSString * > * )passwords 79 | { 80 | CoreStorageHelper * cs; 81 | 82 | if( ( self = [ super init ] ) ) 83 | { 84 | self.coreStorageUUID = coreStorageUUID; 85 | self.passwords = passwords; 86 | self.foundPasswords = [ NSMutableArray new ]; 87 | 88 | if( self.passwords.count == 0 ) 89 | { 90 | return nil; 91 | } 92 | 93 | if( self.coreStorageUUID.length == 0 ) 94 | { 95 | return nil; 96 | } 97 | 98 | cs = [ CoreStorageHelper sharedInstance ]; 99 | 100 | if( [ cs isValidLogicalVolumeUUID: self.coreStorageUUID ] == NO ) 101 | { 102 | return nil; 103 | } 104 | 105 | if( [ cs isEncryptedLogicalVolumeUUID: self.coreStorageUUID ] == NO ) 106 | { 107 | return nil; 108 | } 109 | 110 | if( [ cs isLockedLogicalVolumeUUID: self.coreStorageUUID ] == NO ) 111 | { 112 | return nil; 113 | } 114 | } 115 | 116 | return self; 117 | } 118 | 119 | - ( void )crack: ( void ( ^ )( BOOL volumeMounted, NSString * _Nullable password ) )completion 120 | { 121 | @synchronized( self ) 122 | { 123 | if( self.timer ) 124 | { 125 | @throw [ NSException exceptionWithName: @"com.xs-labs.FileVaultCracker" reason: @"FileVaultCracker is already running" userInfo: nil ]; 126 | } 127 | 128 | self.timer = [ NSTimer scheduledTimerWithTimeInterval: 1 target: self selector: @selector( checkProgress ) userInfo: nil repeats: YES ]; 129 | self.completion = completion; 130 | self.initialized = NO; 131 | self.progressIsIndeterminate = YES; 132 | } 133 | 134 | [ NSThread detachNewThreadSelector: @selector( crack ) toTarget: self withObject: nil ]; 135 | } 136 | 137 | - ( void )stop 138 | { 139 | @synchronized( self ) 140 | { 141 | if( self.timer == nil ) 142 | { 143 | return; 144 | } 145 | 146 | atomic_store( &_stopping, true ); 147 | 148 | self.progressIsIndeterminate = YES; 149 | } 150 | } 151 | 152 | - ( void )crack 153 | { 154 | NSMutableArray< NSString * > * passwords; 155 | NSMutableArray< NSString * > * sub; 156 | NSMutableArray< NSMutableArray< NSString * > * > * groups; 157 | NSUInteger n; 158 | NSUInteger i; 159 | 160 | passwords = self.passwords.mutableCopy; 161 | groups = [ NSMutableArray new ]; 162 | self.secondsRemaining = 0; 163 | 164 | if( self.maxCharsForCaseVariants > 0 ) 165 | { 166 | [ self generateVariants: passwords withSelector: @selector( caseVariants ) maxChars: self.maxCharsForCaseVariants message: @"Generating case variants" ]; 167 | } 168 | 169 | if( atomic_load( &_stopping ) == true ) 170 | { 171 | self.initialized = YES; 172 | 173 | return; 174 | } 175 | 176 | if( self.maxCharsForCommonSubstitutions > 0 ) 177 | { 178 | [ self generateVariants: passwords withSelector: @selector( commonSubstitutions ) maxChars: self.maxCharsForCommonSubstitutions message: @"Generating common substitutions" ]; 179 | } 180 | 181 | if( atomic_load( &_stopping ) == true ) 182 | { 183 | self.initialized = YES; 184 | 185 | return; 186 | } 187 | 188 | self.message = @"Preparing worker threads..."; 189 | self.numberOfPasswordsToTest = passwords.count; 190 | _processed = 0; 191 | self.progress = 0; 192 | n = ( passwords.count / self.maxThreads ); 193 | 194 | for( i = 0; i < self.maxThreads; i++ ) 195 | { 196 | if( passwords.count < n ) 197 | { 198 | break; 199 | } 200 | 201 | sub = [ passwords subarrayWithRange: NSMakeRange( 0, n ) ].mutableCopy; 202 | 203 | [ passwords removeObjectsInRange: NSMakeRange( 0, n ) ]; 204 | [ groups addObject: sub ]; 205 | } 206 | 207 | if( atomic_load( &_stopping ) == true ) 208 | { 209 | self.initialized = YES; 210 | 211 | return; 212 | } 213 | 214 | for( sub in groups ) 215 | { 216 | if( passwords.count == 0 ) 217 | { 218 | break; 219 | } 220 | 221 | [ sub addObject: passwords.firstObject ]; 222 | [ passwords removeObject: passwords.firstObject ]; 223 | } 224 | 225 | if( atomic_load( &_stopping ) == true ) 226 | { 227 | self.initialized = YES; 228 | 229 | return; 230 | } 231 | 232 | for( sub in groups ) 233 | { 234 | if( sub.count == 0 ) 235 | { 236 | continue; 237 | } 238 | 239 | [ NSThread detachNewThreadSelector: @selector( crackPasswords: ) toTarget: self withObject: sub ]; 240 | } 241 | 242 | self.initialized = YES; 243 | self.progressIsIndeterminate = NO; 244 | } 245 | 246 | - ( void )generateVariants: ( NSMutableArray< NSString * > * )passwords withSelector: ( SEL )selector maxChars: ( NSUInteger )maxChars message: ( NSString * )message 247 | { 248 | NSUInteger n; 249 | NSUInteger i; 250 | NSDate * start; 251 | NSString * password; 252 | NSTimeInterval diff; 253 | 254 | n = passwords.count; 255 | self.progress = 0; 256 | self.progressIsIndeterminate = NO; 257 | start = [ NSDate date ]; 258 | 259 | for( i = 0; i < n; i++ ) 260 | { 261 | password = passwords[ 0 ]; 262 | self.progress = ( double )i / ( double )n; 263 | self.message = [ NSString stringWithFormat: @"%@ - %.0f%%", message, self.progress * 100.0 ]; 264 | 265 | [ passwords removeObjectAtIndex: 0 ]; 266 | 267 | if( password.length > maxChars ) 268 | { 269 | [ passwords addObject: password ]; 270 | } 271 | else 272 | { 273 | #pragma clang diagnostic push 274 | #pragma clang diagnostic ignored "-Warc-performSelector-leaks" 275 | [ passwords addObjectsFromArray: [ password performSelector: selector ] ]; 276 | #pragma clang diagnostic pop 277 | } 278 | 279 | diff = -[ start timeIntervalSinceNow ]; 280 | self.secondsRemaining = ( NSUInteger )( ( n - i ) / ( i / diff ) ); 281 | 282 | if( atomic_load( &_stopping ) == true ) 283 | { 284 | self.progressIsIndeterminate = YES; 285 | 286 | return; 287 | } 288 | } 289 | 290 | self.progressIsIndeterminate = YES; 291 | } 292 | 293 | - ( void )crackPasswords: ( NSArray< NSString * > * )passwords 294 | { 295 | NSString * p; 296 | CoreStorageHelper * cs; 297 | CFStringRef aks; 298 | NSString * volumeUUID; 299 | 300 | @autoreleasepool 301 | { 302 | [ NSThread setThreadPriority: 1.0 ]; 303 | 304 | @synchronized( self ) 305 | { 306 | self.threadsRunning = self.threadsRunning + 1; 307 | } 308 | 309 | cs = [ CoreStorageHelper new ]; 310 | volumeUUID = self.coreStorageUUID; 311 | 312 | for( p in passwords ) 313 | { 314 | if( atomic_load( &( self->_unlocked ) ) ) 315 | { 316 | break; 317 | } 318 | 319 | if( atomic_load( &self->_stopping ) == true ) 320 | { 321 | break; 322 | } 323 | 324 | atomic_fetch_add( &( self->_processed ), 1 ); 325 | 326 | aks = CSFDEStorePassphrase( p.UTF8String ); 327 | 328 | if( aks == nil ) 329 | { 330 | @synchronized( self ) 331 | { 332 | if( atomic_load( &_stopping ) == YES ) 333 | { 334 | break; 335 | } 336 | 337 | atomic_store( &( self->_stopping ), true ); 338 | 339 | dispatch_sync 340 | ( 341 | dispatch_get_main_queue(), 342 | ^( void ) 343 | { 344 | NSAlert * alert; 345 | 346 | alert = [ NSAlert new ]; 347 | alert.messageText = NSLocalizedString( @"AKS Error", @"" ); 348 | alert.informativeText = NSLocalizedString( @"Could not store a passphrase with ASK. Please start again with fewer threads. Note that you may need to restart your computer.", @"" ); 349 | 350 | [ alert addButtonWithTitle: NSLocalizedString( @"OK", @"" ) ]; 351 | [ alert runModal ]; 352 | } 353 | ); 354 | } 355 | 356 | break; 357 | } 358 | 359 | if( [ cs unlockLogicalVolumeUUID: volumeUUID withAKSUUID: ( __bridge NSString * )aks ] ) 360 | { 361 | CSFDERemovePassphrase( aks ); 362 | atomic_store( &( self->_unlocked ), true ); 363 | 364 | self.password = p; 365 | 366 | break; 367 | } 368 | 369 | CSFDERemovePassphrase( aks ); 370 | } 371 | } 372 | 373 | @synchronized( self ) 374 | { 375 | self.threadsRunning = self.threadsRunning - 1; 376 | } 377 | } 378 | 379 | - ( void )checkProgress 380 | { 381 | BOOL found; 382 | 383 | found = NO; 384 | 385 | if( atomic_load( &_stopping ) == true ) 386 | { 387 | self.message = @"Stopping..."; 388 | } 389 | 390 | if( self.initialized == NO ) 391 | { 392 | return; 393 | } 394 | 395 | if( atomic_load( &_stopping ) == true && self.threadsRunning > 0 ) 396 | { 397 | return; 398 | } 399 | 400 | atomic_store( &_stopping, false ); 401 | 402 | if( atomic_load( &( self->_unlocked ) ) ) 403 | { 404 | found = YES; 405 | 406 | goto stop; 407 | } 408 | 409 | if( self.threadsRunning == 0 ) 410 | { 411 | goto stop; 412 | } 413 | 414 | { 415 | atomic_ulong done; 416 | NSUInteger last; 417 | NSUInteger total; 418 | NSString * s; 419 | 420 | done = atomic_load( &( self->_processed ) ); 421 | last = ( self.progress == 0 ) ? done : done - self.lastProcessed; 422 | total = self.numberOfPasswordsToTest; 423 | self.progress = ( double )done / ( double )total; 424 | 425 | s = [ NSNumberFormatter localizedStringFromNumber: [ NSNumber numberWithUnsignedInteger: total ] numberStyle: NSNumberFormatterDecimalStyle ]; 426 | self.message = [ NSString stringWithFormat: @"Trying %@ passwords - %.0f%% (~%lu / sec)", s, self.progress * 100, last ]; 427 | self.lastProcessed = done; 428 | self.secondsRemaining = ( last ) ? ( total - done ) / last : 0; 429 | } 430 | 431 | return; 432 | 433 | stop: 434 | 435 | [ self.timer invalidate ]; 436 | 437 | self.timer = nil; 438 | self.message = nil; 439 | self.initialized = NO; 440 | 441 | if( self.completion ) 442 | { 443 | self.completion( found, self.password ); 444 | } 445 | 446 | self.completion = NULL; 447 | } 448 | 449 | @end 450 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/MainWindowController.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header MainWindowController.h 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Cocoa; 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | @interface MainWindowController: NSWindowController 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/MainWindowController.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @file MainWindowController.m 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | #import "MainWindowController.h" 31 | #import "FileVaultCracker.h" 32 | #import "CoreStorageHelper.h" 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | @interface MainWindowController() 37 | 38 | @property( atomic, readwrite, assign ) BOOL running; 39 | @property( atomic, readwrite, assign ) BOOL caseVariants; 40 | @property( atomic, readwrite, assign ) NSInteger caseVariantsMax; 41 | @property( atomic, readwrite, assign ) BOOL commonSubstitutions; 42 | @property( atomic, readwrite, assign ) NSInteger commonSubstitutionsMax; 43 | @property( atomic, readwrite, strong, nullable ) NSString * coreStorageUUID; 44 | @property( atomic, readwrite, strong, nullable ) NSString * wordList; 45 | @property( atomic, readwrite, strong, nullable ) NSImage * wordListIcon; 46 | @property( atomic, readwrite, strong, nullable ) NSString * runningLabel; 47 | @property( atomic, readwrite, strong, nullable ) FileVaultCracker * cracker; 48 | @property( atomic, readwrite, strong, nullable ) NSTimer * timer; 49 | @property( atomic, readwrite, assign ) NSInteger numberOfThreads; 50 | @property( atomic, readwrite, assign ) double progress; 51 | @property( atomic, readwrite, assign ) BOOL indeterminate; 52 | @property( atomic, readwrite, assign ) BOOL hasStopped; 53 | @property( atomic, readwrite, assign ) BOOL hasTimeRemaining; 54 | @property( atomic, readwrite, strong, nullable ) NSString * timeRemainingLabel; 55 | 56 | - ( void )windowWillClose: ( NSNotification * )notification; 57 | - ( IBAction )crack: ( nullable id )sender; 58 | - ( IBAction )stop: ( nullable id )sender; 59 | - ( IBAction )chooseWordList: ( nullable id )sender; 60 | - ( IBAction )chooseImplementation: ( nullable id )sender; 61 | - ( void )displayAlertWithTitle: ( NSString * )title message: ( NSString * )message; 62 | - ( void )updateUI; 63 | - ( NSString * )timeRemainingWithSeconds: ( NSUInteger )seconds; 64 | - ( BOOL )verifyVolumeUUID: ( NSString * )uuid; 65 | 66 | @end 67 | 68 | NS_ASSUME_NONNULL_END 69 | 70 | @implementation MainWindowController 71 | 72 | - ( instancetype )init 73 | { 74 | return [ self initWithWindowNibName: NSStringFromClass( self.class ) ]; 75 | } 76 | 77 | - ( void )dealloc 78 | { 79 | [ [ NSNotificationCenter defaultCenter ] removeObserver: self ]; 80 | [ self.timer invalidate ]; 81 | } 82 | 83 | - ( void )windowWillClose: ( NSNotification * )notification 84 | { 85 | ( void )notification; 86 | 87 | [ [ NSUserDefaults standardUserDefaults ] setObject: self.coreStorageUUID forKey: @"CoreStorageUUID" ]; 88 | [ [ NSUserDefaults standardUserDefaults ] setBool: self.caseVariants forKey: @"CaseVariants" ]; 89 | [ [ NSUserDefaults standardUserDefaults ] setInteger: self.caseVariantsMax forKey: @"CaseVariantsMax" ]; 90 | [ [ NSUserDefaults standardUserDefaults ] setBool: self.commonSubstitutions forKey: @"CommonSubstitutions" ]; 91 | [ [ NSUserDefaults standardUserDefaults ] setInteger: self.commonSubstitutionsMax forKey: @"CommonSubstitutionsMax" ]; 92 | [ [ NSUserDefaults standardUserDefaults ] setInteger: self.numberOfThreads forKey: @"NumberOfThreads" ]; 93 | [ [ NSUserDefaults standardUserDefaults ] synchronize ]; 94 | } 95 | 96 | - ( void )windowDidLoad 97 | { 98 | NSString * wordList; 99 | 100 | [ super windowDidLoad ]; 101 | 102 | [ [ NSNotificationCenter defaultCenter ] addObserver: self selector: @selector( windowWillClose: ) name: NSWindowWillCloseNotification object: self.window ]; 103 | 104 | self.window.titlebarAppearsTransparent = YES; 105 | self.window.titleVisibility = NSWindowTitleHidden; 106 | self.window.title = [ [ NSBundle mainBundle ] objectForInfoDictionaryKey: @"CFBundleName" ]; 107 | 108 | self.coreStorageUUID = [ [ NSUserDefaults standardUserDefaults ] objectForKey: @"CoreStorageUUID" ]; 109 | wordList = [ [ NSUserDefaults standardUserDefaults ] objectForKey: @"WordList" ]; 110 | 111 | self.caseVariants = [ [ NSUserDefaults standardUserDefaults ] boolForKey: @"CaseVariants" ]; 112 | self.caseVariantsMax = [ [ NSUserDefaults standardUserDefaults ] integerForKey: @"CaseVariantsMax" ]; 113 | self.commonSubstitutions = [ [ NSUserDefaults standardUserDefaults ] boolForKey: @"CommonSubstitutions" ]; 114 | self.commonSubstitutionsMax = [ [ NSUserDefaults standardUserDefaults ] integerForKey: @"CommonSubstitutionsMax" ]; 115 | self.numberOfThreads = [ [ NSUserDefaults standardUserDefaults ] integerForKey: @"NumberOfThreads" ]; 116 | 117 | if( self.numberOfThreads <= 0 || self.numberOfThreads > 30 ) 118 | { 119 | self.numberOfThreads = 20; 120 | } 121 | 122 | if( self.caseVariantsMax < 2 || self.caseVariantsMax > 20 ) 123 | { 124 | self.caseVariantsMax = 20; 125 | } 126 | 127 | if( self.commonSubstitutionsMax < 2 || self.commonSubstitutionsMax > 20 ) 128 | { 129 | self.commonSubstitutionsMax = 5; 130 | } 131 | 132 | if( wordList.length && [ [ NSFileManager defaultManager ] fileExistsAtPath: wordList ] ) 133 | { 134 | self.wordList = wordList; 135 | self.wordListIcon = [ [ NSWorkspace sharedWorkspace ] iconForFile: self.wordList ]; 136 | } 137 | else if 138 | ( 139 | [ [ NSBundle mainBundle ] pathForResource: @"words" ofType: @"txt" ].length 140 | && [ [ NSFileManager defaultManager ] fileExistsAtPath: [ [ NSBundle mainBundle ] pathForResource: @"words" ofType: @"txt" ] ] 141 | ) 142 | { 143 | self.wordList = [ [ NSBundle mainBundle ] pathForResource: @"words" ofType: @"txt" ]; 144 | self.wordListIcon = [ [ NSWorkspace sharedWorkspace ] iconForFile: self.wordList ]; 145 | } 146 | 147 | self.timer = [ NSTimer scheduledTimerWithTimeInterval: 0.1 target: self selector: @selector( updateUI ) userInfo: nil repeats: YES ]; 148 | } 149 | 150 | - ( IBAction )crack: ( nullable id )sender 151 | { 152 | NSArray< NSString * > * passwords; 153 | NSData * data; 154 | 155 | ( void )sender; 156 | 157 | if( self.cracker != nil ) 158 | { 159 | return; 160 | } 161 | 162 | if( [ self verifyVolumeUUID: self.coreStorageUUID ] == NO ) 163 | { 164 | return; 165 | } 166 | 167 | data = [ [ NSFileManager defaultManager ] contentsAtPath: self.wordList ]; 168 | passwords = [ [ [ NSString alloc ] initWithData: data encoding: NSUTF8StringEncoding ] componentsSeparatedByString: @"\n" ]; 169 | 170 | if( passwords.count == 0 || ( passwords.count == 1 && passwords.firstObject.length == 0 ) ) 171 | { 172 | [ self displayAlertWithTitle: @"Error" message: @"Error reading from the word list file." ]; 173 | 174 | return; 175 | } 176 | 177 | self.cracker = [ [ FileVaultCracker alloc ] initWithCoreStorageUUID: self.coreStorageUUID passwords: passwords ]; 178 | self.cracker.maxThreads = ( self.numberOfThreads ) ? ( NSUInteger )( self.numberOfThreads ) : 1; 179 | 180 | if( self.caseVariants && self.caseVariantsMax > 0 ) 181 | { 182 | self.cracker.maxCharsForCaseVariants = ( NSUInteger )( self.caseVariantsMax ); 183 | } 184 | 185 | if( self.commonSubstitutions && self.commonSubstitutionsMax > 0 ) 186 | { 187 | self.cracker.maxCharsForCommonSubstitutions = ( NSUInteger )( self.commonSubstitutionsMax ); 188 | } 189 | 190 | if( self.cracker == nil ) 191 | { 192 | [ self displayAlertWithTitle: @"Error" message: @"Error initializing the FileVault cracker." ]; 193 | 194 | return; 195 | } 196 | 197 | self.running = YES; 198 | 199 | [ self.cracker crack: ^( BOOL volumeMounted, NSString * _Nullable password ) 200 | { 201 | dispatch_async 202 | ( 203 | dispatch_get_main_queue(), 204 | ^( void ) 205 | { 206 | if( self.hasStopped == NO ) 207 | { 208 | if( volumeMounted ) 209 | { 210 | [ self displayAlertWithTitle: @"Password found" message: [ NSString stringWithFormat: @"The FileVault volume has been successfully mounted. Password is: %@", password ] ]; 211 | } 212 | else 213 | { 214 | [ self displayAlertWithTitle: @"Password not found" message: @"A correct FileVault password wasn't found in the supplied word list." ]; 215 | } 216 | } 217 | 218 | self.hasStopped = NO; 219 | self.running = NO; 220 | self.cracker = nil; 221 | } 222 | ); 223 | } 224 | ]; 225 | } 226 | 227 | - ( IBAction )stop: ( nullable id )sender 228 | { 229 | ( void )sender; 230 | 231 | self.hasStopped = YES; 232 | 233 | [ self.cracker stop ]; 234 | } 235 | 236 | - ( IBAction )chooseWordList: ( nullable id )sender 237 | { 238 | NSOpenPanel * panel; 239 | 240 | ( void )sender; 241 | 242 | panel = [ NSOpenPanel openPanel ]; 243 | panel.canCreateDirectories = NO; 244 | panel.canChooseDirectories = NO; 245 | panel.canChooseFiles = YES; 246 | panel.allowsMultipleSelection = NO; 247 | panel.allowedFileTypes = @[ @"txt" ]; 248 | 249 | [ panel beginSheetModalForWindow: self.window completionHandler: ^( NSInteger result ) 250 | { 251 | if( result != NSFileHandlingPanelOKButton ) 252 | { 253 | return; 254 | } 255 | 256 | if( [ [ NSFileManager defaultManager ] fileExistsAtPath: panel.URLs.firstObject.path ] == NO ) 257 | { 258 | return; 259 | } 260 | 261 | self.wordList = panel.URLs.firstObject.path; 262 | self.wordListIcon = [ [ NSWorkspace sharedWorkspace ] iconForFile: self.wordList ]; 263 | 264 | [ [ NSUserDefaults standardUserDefaults ] setObject: self.wordList forKey: @"WordList" ]; 265 | [ [ NSUserDefaults standardUserDefaults ] synchronize ]; 266 | } 267 | ]; 268 | } 269 | 270 | - ( IBAction )chooseImplementation: ( nullable id )sender 271 | { 272 | ( void )sender; 273 | } 274 | 275 | - ( void )displayAlertWithTitle: ( NSString * )title message: ( NSString * )message 276 | { 277 | dispatch_async 278 | ( 279 | dispatch_get_main_queue(), 280 | ^( void ) 281 | { 282 | NSAlert * alert; 283 | 284 | alert = [ NSAlert new ]; 285 | alert.messageText = title; 286 | alert.informativeText = message; 287 | 288 | [ alert addButtonWithTitle: NSLocalizedString( @"OK", @"" ) ]; 289 | [ alert beginSheetModalForWindow: self.window completionHandler: NULL ]; 290 | } 291 | ); 292 | } 293 | 294 | - ( void )updateUI 295 | { 296 | if( self.running == NO ) 297 | { 298 | self.runningLabel = @""; 299 | self.progress = 0.0; 300 | self.indeterminate = YES; 301 | self.hasTimeRemaining = NO; 302 | self.timeRemainingLabel = @""; 303 | } 304 | else 305 | { 306 | self.runningLabel = self.cracker.message; 307 | self.progress = self.cracker.progress; 308 | self.indeterminate = self.cracker.progressIsIndeterminate; 309 | self.hasTimeRemaining = ( self.cracker.secondsRemaining > 0 ); 310 | self.timeRemainingLabel = [ self timeRemainingWithSeconds: self.cracker.secondsRemaining ]; 311 | } 312 | } 313 | 314 | - ( NSString * )timeRemainingWithSeconds: ( NSUInteger )seconds 315 | { 316 | NSString * unit; 317 | double value; 318 | 319 | if( seconds == 0 ) 320 | { 321 | return @""; 322 | } 323 | 324 | if( seconds < 60 ) 325 | { 326 | value = seconds; 327 | unit = ( value > 1 ) ? @"seconds" : @"second"; 328 | } 329 | else if( seconds < 3600 ) 330 | { 331 | value = seconds / 60; 332 | unit = ( value > 1 ) ? @"minutes" : @"minute"; 333 | } 334 | else 335 | { 336 | value = seconds / 3600; 337 | unit = ( value > 1 ) ? @"hours" : @"hour"; 338 | } 339 | 340 | return [ NSString stringWithFormat: @"Estimated time remaining: about %.02f %@", value, unit ]; 341 | } 342 | 343 | - ( BOOL )verifyVolumeUUID: ( NSString * )uuid 344 | { 345 | CoreStorageHelper * cs; 346 | NSAlert * alert; 347 | 348 | cs = [ CoreStorageHelper sharedInstance ]; 349 | alert = [ NSAlert new ]; 350 | 351 | [ alert setMessageText: NSLocalizedString( @"Error", nil ) ]; 352 | [ alert addButtonWithTitle: NSLocalizedString( @"OK", nil ) ]; 353 | 354 | if( [ cs isValidLogicalVolumeUUID: uuid ] == NO ) 355 | { 356 | alert.informativeText = NSLocalizedString( @"UUID is not a valid CoreStorage volume UUID.", nil ); 357 | 358 | [ alert beginSheetModalForWindow: self.window completionHandler: NULL ]; 359 | 360 | return NO; 361 | } 362 | 363 | if( [ cs isEncryptedLogicalVolumeUUID: uuid ] == NO ) 364 | { 365 | alert.informativeText = NSLocalizedString( @"Volume is not encrypted.", nil ); 366 | 367 | [ alert beginSheetModalForWindow: self.window completionHandler: NULL ]; 368 | 369 | return NO; 370 | } 371 | 372 | if( [ cs isLockedLogicalVolumeUUID: uuid ] == NO ) 373 | { 374 | alert.informativeText = NSLocalizedString( @"Volume is already unlocked.", nil ); 375 | 376 | [ alert beginSheetModalForWindow: self.window completionHandler: NULL ]; 377 | 378 | return NO; 379 | } 380 | 381 | return YES; 382 | } 383 | 384 | @end 385 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/NSString+FileVaultCracker.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header NSString+FileVaultCracker.h 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Foundation; 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | @interface NSString( FileVaultCracker ) 35 | 36 | - ( NSArray< NSString * > * )caseVariants; 37 | - ( NSArray< NSString * > * )commonSubstitutions; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/NSString+FileVaultCracker.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @file NSString+FileVaultCracker.m 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | #import "NSString+FileVaultCracker.h" 31 | 32 | static NSMutableDictionary< NSString *, NSArray< NSString * > * > * variants = nil; 33 | 34 | @implementation NSString( FileVaultCracker ) 35 | 36 | - ( NSArray< NSString * > * )caseVariants 37 | { 38 | char * permutation; 39 | const char * cp; 40 | NSUInteger length; 41 | NSUInteger i; 42 | NSUInteger j; 43 | NSUInteger n; 44 | NSMutableArray< NSString * > * v; 45 | 46 | if( self.length == 0 ) 47 | { 48 | return @[]; 49 | } 50 | 51 | cp = self.UTF8String; 52 | length = self.length; 53 | 54 | permutation = calloc( length + 1, 1 ); 55 | 56 | if( permutation == NULL ) 57 | { 58 | return @[ self ]; 59 | } 60 | 61 | v = [ NSMutableArray new ]; 62 | 63 | for( i = 0, n = ( NSUInteger )pow( 2, length ); i < n; i++ ) 64 | { 65 | for( j = 0; j < length; j++ ) 66 | { 67 | permutation[ j ] = ( ( i >> j & 1 ) != 0 ) ? ( char )toupper( cp[ j ] ) : cp[ j ]; 68 | } 69 | 70 | [ v addObject: [ NSString stringWithUTF8String: permutation ] ]; 71 | } 72 | 73 | free( permutation ); 74 | 75 | return v; 76 | } 77 | 78 | - ( NSArray< NSString * > * )commonSubstitutions 79 | { 80 | { 81 | static dispatch_once_t once; 82 | 83 | dispatch_once 84 | ( 85 | &once, 86 | ^( void ) 87 | { 88 | NSString * k; 89 | 90 | variants = 91 | @{ 92 | @"A": @[ @"4", @"@", @"^", @"Д" ], 93 | @"B": @[ @"8", @"ß", @"6" ], 94 | @"C": @[ @"[", @"¢", @"[", @"<", @"(", @"©" ], 95 | @"D": @[ @")", @"?", @">" ], 96 | @"E": @[ @"3", @"&", @"£", @"€", @"ë" ], 97 | @"F": @[ @"ƒ", @"v" ], 98 | @"G": @[ @"&", @"6", @"9", @"[" ], 99 | @"H": @[ @"#" ], 100 | @"I": @[ @"1", @"|", @"!" ], 101 | @"J": @[ @";", @"1" ], 102 | @"K": @[], 103 | @"L": @[ @"1", @"£", @"7", @"|" ], 104 | @"M": @[], 105 | @"N": @[ @"И", @"^", @"ท" ], 106 | @"O": @[ @"0", @"Q", @"p", @"Ø" ], 107 | @"P": @[ @"9" ], 108 | @"Q": @[ @"9", @"2", @"&" ], 109 | @"R": @[ @"®", @"Я" ], 110 | @"S": @[ @"5", @"$", @"z", @"§", @"2" ], 111 | @"T": @[ @"7", @"+", @"†" ], 112 | @"U": @[ @"v", @"µ", @"บ" ], 113 | @"V": @[], 114 | @"W": @[ @"Ш", @"Щ", @"พ" ], 115 | @"X": @[ @"Ж", @"×" ], 116 | @"Y": @[ @"j", @"Ч", @"7", @"¥" ], 117 | @"Z": @[ @"2", @"%", @"s" ] 118 | } 119 | .mutableCopy; 120 | 121 | for( k in variants.allKeys ) 122 | { 123 | [ variants setObject: variants[ k ] forKey: k.lowercaseString ]; 124 | } 125 | } 126 | ); 127 | } 128 | 129 | if( self.length == 0 ) 130 | { 131 | return @[ @"" ]; 132 | } 133 | 134 | { 135 | NSString * c; 136 | NSString * tv; 137 | NSString * v; 138 | NSMutableArray< NSString * > * l; 139 | 140 | c = [ self substringToIndex: 1 ]; 141 | l = [ NSMutableArray new ]; 142 | 143 | for( tv in [ self substringFromIndex: 1 ].commonSubstitutions ) 144 | { 145 | [ l addObject: [ c stringByAppendingString: tv ] ]; 146 | 147 | if( variants[ c ].count == 0 ) 148 | { 149 | continue; 150 | } 151 | 152 | for( v in variants[ c ] ) 153 | { 154 | [ l addObject: [ v stringByAppendingString: tv ] ]; 155 | } 156 | } 157 | 158 | return l; 159 | } 160 | } 161 | 162 | @end 163 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/Private Headers/CSFDE.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header CSFDE.h 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import CoreFoundation; 31 | 32 | NS_ASSUME_NONNULL_BEGIN 33 | 34 | CFStringRef CSFDEStorePassphrase( const char * passphrase ); 35 | void CSFDERemovePassphrase( CFStringRef uuid ); 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /FileVaultCracker/Classes/Private Headers/DiskManagement.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header DiskManagement.h 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Foundation; 31 | @import DiskArbitration; 32 | 33 | NS_ASSUME_NONNULL_BEGIN 34 | 35 | @protocol DMManagerDelegate< NSObject > 36 | 37 | @optional 38 | 39 | - ( void )dmInterruptibilityChanged: ( BOOL )value; 40 | - ( void )dmAsyncFinishedForDisk: ( DADiskRef )disk mainError: ( int )mainError detailError: ( int )detailError dictionary: ( NSDictionary * )dictionary; 41 | - ( void )dmAsyncMessageForDisk: ( DADiskRef )disk string: ( NSString * )str dictionary: ( NSDictionary * )dict; 42 | - ( void )dmAsyncProgressForDisk: ( DADiskRef )disk barberPole: ( BOOL )barberPole percent: ( float )percent; 43 | - ( void )dmAsyncStartedForDisk: ( DADiskRef )disk; 44 | 45 | @end 46 | 47 | @protocol DMManagerClientDelegate< NSObject > 48 | 49 | @end 50 | 51 | @interface DMManager: NSObject 52 | 53 | @property( atomic, readwrite, weak, nullable ) id< DMManagerDelegate > delegate; 54 | @property( atomic, readwrite, weak, nullable ) id< DMManagerClientDelegate > clientDelegate; 55 | @property( atomic, readonly ) BOOL checkClientDelegate; 56 | @property( atomic, readonly, nullable ) NSArray * topLevelDisks; 57 | @property( atomic, readonly, nullable ) NSArray * disks; 58 | @property( atomic, readwrite, assign, nullable ) DASessionRef defaultDASession; 59 | @property( atomic, readwrite, strong, nullable ) NSString * language; 60 | 61 | + ( instancetype )sharedManager; 62 | + ( instancetype )sharedManagerForThread; 63 | 64 | - ( BOOL )isCoreStoragePhysicalVolumeDisk: ( DADiskRef )disk error: ( NSError * __autoreleasing * )error; 65 | - ( BOOL )isCoreStorageLogicalVolumeDisk: ( DADiskRef )disk error: ( NSError * __autoreleasing * )error; 66 | - ( NSString * )diskUUIDForDisk: ( DADiskRef )disk error: ( NSError * __autoreleasing * )error; 67 | 68 | @end 69 | 70 | @interface DMCoreStorage: NSObject 71 | 72 | - ( instancetype )initWithManager: ( DMManager * )manager; 73 | 74 | - ( int )unlockLogicalVolume: ( NSString * )volumeUID options: ( NSDictionary * )options; 75 | - ( int )doCallDaemonForCoreStorage: ( NSString * )selector inputDict: ( NSMutableDictionary * )inputDict outputDict: ( NSDictionary * _Nullable * _Nullable )outputDict checkDelegate: ( BOOL )checkDelegate sync: ( BOOL )sync; 76 | 77 | - ( int )logicalVolumeGroups: ( NSArray< NSString * > * _Nullable * _Nullable )groups; 78 | - ( int )logicalVolumeForDisk: ( DADiskRef )disk logicalVolume: ( NSString * _Nullable * _Nullable )logicalVolume; 79 | - ( int )physicalVolumeAndLogicalVolumeGroupForDisk:( DADiskRef )disk physicalVolume: ( NSString * _Nullable * _Nullable )physicalVolume logicalVolumeGroup: ( NSString * _Nullable * _Nullable )logicalVolumeGroup; 80 | - ( int )logicalVolumeGroupForLogicalVolume: ( NSString * )uuid logicalVolumeGroup:( NSString * _Nullable * _Nullable )group; 81 | - ( int )copyDiskForLogicalVolume: ( NSString * )uuid disk: ( DADiskRef _Nullable * _Nullable )disk; 82 | - ( int )isEncryptedDiskForLogicalVolume: ( NSString * )uuid encrypted:( BOOL * _Nullable )encrypted locked: ( BOOL * _Nullable )locked type: ( id _Nullable * _Nullable )type; 83 | 84 | @end 85 | 86 | NS_ASSUME_NONNULL_END 87 | -------------------------------------------------------------------------------- /FileVaultCracker/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | Icon 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0.0 21 | CFBundleVersion 22 | 1.0.0 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSPrincipalClass 26 | NSApplication 27 | NSMainNibFile 28 | MainMenu 29 | NSHumanReadableCopyright 30 | Copyright © 2017 XS-Labs. All rights reserved. 31 | 32 | 33 | -------------------------------------------------------------------------------- /FileVaultCracker/Interface/Base.lproj/AboutWindowController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /FileVaultCracker/Interface/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | Default 534 | 535 | 536 | 537 | 538 | 539 | 540 | Left to Right 541 | 542 | 543 | 544 | 545 | 546 | 547 | Right to Left 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | Default 559 | 560 | 561 | 562 | 563 | 564 | 565 | Left to Right 566 | 567 | 568 | 569 | 570 | 571 | 572 | Right to Left 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | -------------------------------------------------------------------------------- /FileVaultCracker/Interface/Base.lproj/MainWindowController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | NSNegateBoolean 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | NSNegateBoolean 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | NSNegateBoolean 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | NSIsNil 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | NSIsNil 184 | 185 | 186 | 187 | 188 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | NSNegateBoolean 225 | 226 | 227 | 228 | 229 | 230 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | NSNegateBoolean 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 397 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | -------------------------------------------------------------------------------- /FileVaultCracker/Interface/Images/Icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macmade/FileVaultCracker/af107f597f946de4ae5a520ce9faec77936d6618/FileVaultCracker/Interface/Images/Icon.icns -------------------------------------------------------------------------------- /FileVaultCracker/Resources/words.txt: -------------------------------------------------------------------------------- 1 | lorem 2 | ipsum 3 | dolor 4 | sit 5 | amet 6 | consectetuer 7 | adipiscing 8 | elit 9 | sed 10 | diam 11 | nonummy 12 | nibh 13 | euismod 14 | tincidunt 15 | ut 16 | laoreet 17 | dolore 18 | magna 19 | aliquam 20 | erat 21 | volutpat 22 | ut 23 | wisi 24 | enim 25 | ad 26 | minim 27 | veniam 28 | quis 29 | nostrud 30 | exerci 31 | tation 32 | ullamcorper 33 | suscipit 34 | lobortis 35 | nisl 36 | ut 37 | aliquip 38 | ex 39 | ea 40 | commodo 41 | consequat 42 | duis 43 | autem 44 | vel 45 | eum 46 | iriure 47 | dolor 48 | in 49 | hendrerit 50 | in 51 | vulputate 52 | velit 53 | esse 54 | molestie 55 | consequat 56 | vel 57 | illum 58 | dolore 59 | eu 60 | feugiat 61 | nulla 62 | facilisis 63 | at 64 | vero 65 | eros 66 | et 67 | accumsan 68 | et 69 | iusto 70 | odio 71 | dignissim 72 | qui 73 | blandit 74 | praesent 75 | luptatum 76 | zzril 77 | delenit 78 | augue 79 | duis 80 | dolore 81 | te 82 | feugait 83 | nulla 84 | facilisiut 85 | wisi 86 | enim 87 | ad 88 | minim 89 | veniam 90 | quis 91 | nostrud 92 | exerci 93 | tation 94 | ullamcorper 95 | suscipit 96 | lobortis 97 | nisl 98 | ut 99 | aliquip 100 | ex 101 | ea 102 | commodo 103 | consequat 104 | duis 105 | autem 106 | vel 107 | eum 108 | iriure 109 | dolor 110 | in 111 | hendrerit 112 | in 113 | vulputate 114 | velit 115 | esse 116 | molestie 117 | consequat 118 | vel 119 | illum 120 | dolore 121 | eu 122 | feugiat 123 | nulla 124 | facilisis 125 | at 126 | vero 127 | eros 128 | et 129 | accumsan 130 | et 131 | iusto 132 | odio 133 | dignissim 134 | qui 135 | blandit 136 | praesent 137 | luptatum 138 | zzril 139 | delenit 140 | augue 141 | duis 142 | dolore 143 | te 144 | feugait 145 | nulla 146 | facilisi 147 | lorem 148 | ipsum 149 | dolor 150 | sit 151 | amet 152 | consectetuer 153 | adipiscing 154 | elit 155 | sed 156 | diam 157 | nonummy 158 | nibh 159 | euismod 160 | tincidunt 161 | ut 162 | laoreet 163 | dolore 164 | magna 165 | aliquam 166 | erat 167 | volutpatduis 168 | autem 169 | vel 170 | eum 171 | iriure 172 | dolor 173 | in 174 | hendrerit 175 | in 176 | vulputate 177 | velit 178 | esse 179 | molestie 180 | consequat 181 | vel 182 | illum 183 | dolore 184 | eu 185 | feugiat 186 | nulla 187 | facilisis 188 | at 189 | vero 190 | eros 191 | et 192 | accumsan 193 | et 194 | iusto 195 | odio 196 | dignissim 197 | qui 198 | blandit 199 | praesent 200 | luptatum 201 | zzril 202 | delenit 203 | augue 204 | duis 205 | dolore 206 | te 207 | feugait 208 | nulla 209 | facilisi 210 | lorem 211 | ipsum 212 | dolor 213 | sit 214 | amet 215 | consectetuer 216 | adipiscing 217 | elit 218 | sed 219 | diam 220 | nonummy 221 | nibh 222 | euismod 223 | tincidunt 224 | ut 225 | laoreet 226 | dolore 227 | magna 228 | aliquam 229 | erat 230 | volutpat 231 | ut 232 | wisi 233 | enim 234 | ad 235 | minim 236 | veniam 237 | quis 238 | nostrud 239 | exerci 240 | tation 241 | ullamcorper 242 | suscipit 243 | lobortis 244 | nisl 245 | ut 246 | aliquip 247 | ex 248 | ea 249 | commodo 250 | consequatf 251 | foobar -------------------------------------------------------------------------------- /FileVaultCracker/main.m: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2017 Jean-David Gadina - www.xs-labs.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | ******************************************************************************/ 24 | 25 | /*! 26 | * @header main.m 27 | * @copyright (c) 2017, Jean-David Gadina - www.xs-labs.com 28 | */ 29 | 30 | @import Cocoa; 31 | 32 | int main( int argc, const char * argv[] ) 33 | { 34 | return NSApplicationMain( argc, argv ); 35 | } 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | FileVaultCracker 2 | ================ 3 | 4 | [![Build Status](https://img.shields.io/travis/macmade/FileVaultCracker.svg?branch=master&style=flat)](https://travis-ci.org/macmade/FileVaultCracker) 5 | [![Coverage Status](https://img.shields.io/coveralls/macmade/FileVaultCracker.svg?branch=master&style=flat)](https://coveralls.io/r/macmade/FileVaultCracker?branch=master) 6 | [![Issues](http://img.shields.io/github/issues/macmade/FileVaultCracker.svg?style=flat)](https://github.com/macmade/FileVaultCracker/issues) 7 | ![Status](https://img.shields.io/badge/status-active-brightgreen.svg?style=flat) 8 | ![License](https://img.shields.io/badge/license-mit-brightgreen.svg?style=flat) 9 | [![Contact](https://img.shields.io/badge/contact-@macmade-blue.svg?style=flat)](https://twitter.com/macmade) 10 | [![Donate-Patreon](https://img.shields.io/badge/donate-patreon-yellow.svg?style=flat)](https://patreon.com/macmade) 11 | [![Donate-Gratipay](https://img.shields.io/badge/donate-gratipay-yellow.svg?style=flat)](https://www.gratipay.com/macmade) 12 | [![Donate-Paypal](https://img.shields.io/badge/donate-paypal-yellow.svg?style=flat)](https://paypal.me/xslabs) 13 | 14 | About 15 | ----- 16 | 17 | macOS FileVault cracking tool. 18 | 19 | ![Cracker](Assets/Cracker.png "Cracker") 20 | 21 | Disclaimer 22 | ---------- 23 | 24 | I wrote this software in order to help relatives of a deceased friend to recover data from his computer. 25 | **Please enjoy it responsibly, and please do not hack/harm people.** 26 | 27 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 28 | > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 29 | > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 30 | > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 31 | > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 32 | > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 33 | > THE SOFTWARE. 34 | 35 | License 36 | ------- 37 | 38 | FileVaultCracker is released under the terms of the MIT license. 39 | 40 | Repository Infos 41 | ---------------- 42 | 43 | Owner: Jean-David Gadina - XS-Labs 44 | Web: www.xs-labs.com 45 | Blog: www.noxeos.com 46 | Twitter: @macmade 47 | GitHub: github.com/macmade 48 | LinkedIn: ch.linkedin.com/in/macmade/ 49 | StackOverflow: stackoverflow.com/users/182676/macmade 50 | --------------------------------------------------------------------------------