Sign in to follow this  
Followers 0
FuryCell

TrueCrypt OneClick

15 posts in this topic

#1 ·  Posted (edited)

TrueCrypt OneClick makes mounting TrueCrypt volumes easier by creating a small exe which saves the drive letter and location of the volume (in encrypted form) so all that is needed is the password.

It uses Aut2exe to create the exe's and the location of the volume is encrypted using AES256 Encryption so it can be kept secret.

Aut2exe is included so the only dependency is that truecrypt is installed.

As always the program (minus aut2exe) is licensed under the GNU GPL V3. :mellow:

Documentation is also included in the zip.

Posted Image

Posted Image

Download Here

Edited by FuryCell

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites



furycel, according to the text under your avatar, I must say that you need to say it version 1.0.

No matter whatencrypting procedure you use, your security will be compromized as autoit exe are not immune to illegal decompilation. :mellow: You gotta find some other way to do this.


[Not using this account any more. Using "iShafayet" instead]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

furycel, according to the text under your avatar, I must say that you need to say it version 1.0.

No matter whatencrypting procedure you use, your security will be compromized as autoit exe are not immune to illegal decompilation. :mellow: You gotta find some other way to do this.

The actual password is only stored as an SHA1 and the location of the volume is stored in a string encrypted by AES256. Sure the script itself can be decompiled but the data useful to a potential attacker is as secure as the industry standard AES256 and SHA1.

Edited by FuryCell

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Here is an example script that would be compiled with this program. Yes the Hash and encrypted string is there but this should be more than secure enough to keep most people away. BTW ~aysgycg.au3 is crypt.au3

#NoTrayIcon
#NoAutoIt3Execute
#include<C:\Users\Michael\AppData\Local\Temp\~aysgycg.au3>
#Region::User Options
$File = "0x741F0FCF78992A72B21546D0E7B0549D13B73285993D654B511C5E79B15995D1"
$Letter = "Z"
$Hash = "0x8786BA517F024E479B20982567F998E58CDE951E"
$Display = True
#endregion
Switch FileExists($Letter & ":")
    Case True
        $Text = "Please enter password to dismount the volume."
    Case False
        $Text = "Please enter password to mount the volume."
EndSwitch
While 1
    $Input = InputBox(StringTrimRight(@ScriptName, 4),$Text, "", "*")
    If @error Then Exit
    If _Crypt_HashData($Input, $CALG_SHA1) <> $Hash Then
        MsgBox(0, "Error", "You entered an invalid password.")
        ContinueLoop
    EndIf
    ExitLoop
WEnd

$File = BinaryToString(_Crypt_DecryptData($File, $Input, $CALG_AES_256))


Switch FileExists($Letter & ":")
    Case True
        If Not _TC_UnMount($Letter, 1) Then MsgBox(0, StringTrimRight(@ScriptName, 4), "Unmount Failed.")
    Case False
        If Not _TC_Mount($File, $Letter, $Input) Then
            MsgBox(0, StringTrimRight(@ScriptName, 4), "Mount Failed.")
            Exit
        EndIf
        If $Display = 1 Then ShellExecute($Letter & ":")
EndSwitch


;V0.1.2A
#include-Once

;Gets or sets the path of the TrueCrypt executable (only needed if truecrypt is installed to a different path)
Func _TC_Path($sPath = "")
    Static $sTCPath = @ProgramFilesDir & "\TrueCrypt\TrueCrypt.exe"
    Switch $sPath
        Case ""
            Return $sTCPath
        Case Else
            $sTCPath = $sPath
    EndSwitch
EndFunc   ;==>_TC_Path

;Mounts a TrueCrypt volume
;@Error=1: $sVol does not exist or is a directory
;@Error=2: $cLetter was not valid (must be in the format "E" not "E:" or "E:\")
;Return 1:Success
;Return 0:Failure
Func _TC_Mount($sVol, $cLetter, $sPassword = "")
    If Not FileExists($sVol) Then Return SetError(1, 0, 0)
    If StringInStr(FileGetAttrib($sVol), "D") Then Return SetError(1, 0, 0)

    If StringLen($cLetter) <> 1 Then Return SetError(2, 0, 0)
    If Not StringIsAlpha($cLetter) Then Return SetError(2, 0, 0)

    Switch $sPassword
        Case ""
            Return Not RunWait('"' & _TC_Path() & '" /q /v "' & $sVol & '" /l' & $cLetter)
        Case Else
            Return Not RunWait('"' & _TC_Path() & '" /q /s /p "' & $sPassword & '" /v "' & $sVol & '" /l' & $cLetter)
    EndSwitch
EndFunc   ;==>_TC_Mount

;Unmounts a TrueCrypt Volume
;@Error=1: $cLetter was not valid (must be in the format "E" not "E:" or "E:\")
;@Error=2: $iForce was not valid (must be 0 or "1)
;Return 1:Success
;Return 0:Failure
Func _TC_UnMount($cLetter, $iForce = 0)
    If StringLen($cLetter) <> 1 Then Return SetError(1, 0, 0)
    If Not StringIsAlpha($cLetter) Then Return SetError(1, 0, 0)
    If Not ($iForce = 0 Or $iForce = 1) Then Return SetError(2, 0, 0)

    Switch $iForce
        Case 1
            Return Not RunWait('"' & _TC_Path() & '" /s /q  /f /d' & $cLetter)
        Case 0
            Return Not RunWait('"' & _TC_Path() & '" /s /q /d' & $cLetter)
    EndSwitch
EndFunc   ;==>_TC_UnMount
Edited by FuryCell

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Updated to V0.5.3B

-Changed hashing method to SHA512 for more security. (However XP SP3 or later is now required)

-Added various menu options in the help menu

-Added keyboard shortcuts

It should be more secure now. SHA512 is also one of hash methods used by truecrypt itself (the default is ripemd160) so in theory this should be fairly close to being as secure as TrueCrypt itself. The only other thing I can think of is maybe salting the hash value for more protection against rainbow tables.

Edited by FuryCell

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

Why do you store the password anyway? I have a simple script set up for my truecrypt mounting and as you can see it requires no hash or similar. Since truecrypt already authenticates the password there is no use in redoing it.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Why do you store the password anyway? I have a simple script set up for my truecrypt mounting and as you can see it requires no hash or similar. Since truecrypt already authenticates the password there is no use in redoing it.

The location is stored in encrypted form so I use a hash to prevent invalid data upon the use of a bad password. Maybe I should just pop up a message that says "Invalid path or bad password." Thanks for your input.


HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

I have implemented the solution above in the newest version and no hash of the password is stored. Only an AES256 encrypted string of the path.


HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

FuryCell - Will it handle being on a removable drive where the drive letter of the path to the TC file changes? Since a USB drive will be mounted with different drive letters on different computers the path will not be the same...the relative path may be?

Share this post


Link to post
Share on other sites

FuryCell - Will it handle being on a removable drive where the drive letter of the path to the TC file changes? Since a USB drive will be mounted with different drive letters on different computers the path will not be the same...the relative path may be?

Not yet but maybe a possibility in the future. In any case you can always use the subst command to remap your flash drive to a static letter.


HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Yet another update. :mellow:

-TC OneClick now offers the option to install TrueCrypt if it is not installed already.

-Loader programs now check that TrueCrypt is installed.

-Loader programs now wait for drive to exist before loading it to avoid errors with "Launch Explorer" on slower machines

-Program will now display a message when the build is completed or if it failed

-Put "Special thanks to the TrueCrypt Foundation" in the about box [They deserve it :)]

-Updated FAQ and HowTo with some corrections

Edited by FuryCell

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

Not yet but maybe a possibility in the future. In any case you can always use the subst command to remap your flash drive to a static letter.

Good idea on the subst...I hadn't thought of that.

Share this post


Link to post
Share on other sites

FuryCell - Will it handle being on a removable drive where the drive letter of the path to the TC file changes? Since a USB drive will be mounted with different drive letters on different computers the path will not be the same...the relative path may be?

Not yet but maybe a possibility in the future. In any case you can always use the subst command to remap your flash drive to a static letter.

FuryCell

thank you for sharing. If you want TrueCryptOC working from USB the only change to your script is to add the line code below to _TC_Path($sPath = "") function right before the Switch statement.

If FileExists(@ScriptDir & "\TrueCrypt\TrueCrypt.exe") Then $sTCPath = @ScriptDir & "\TrueCrypt\TrueCrypt.exe"

Now what is left to do is to create a folder called TrueCrypt at the same location where you have TrueCryptOC.exe and copy the following files:

License.txt

TrueCrypt Format.exe

TrueCrypt.exe

truecrypt.sys

truecrypt-x64.sys


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

Why do you store the password anyway? I have a simple script set up for my truecrypt mounting and as you can see it requires no hash or similar. Since truecrypt already authenticates the password there is no use in redoing it.

monoceres, I cant find your script

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0