Jump to content

TrueCrypt 6.0a automation problem (full system encryption)


Recommended Posts

TrueCrypt Version: 6.0a

AutoIt Version: 3.2.12.1

OS: Windows XP SP2

Problem:

I already use AutoIt to automatically deploy TrueCrypt to my desktops.

After the installation I wanted to automate the process of encrypting the harddrive.

The problem is that the dialogue where I have to enter the password that encrypts the master key

has got a copy & paste protection.

I use this piece of code to paste my password into the password fields:

CODE
; TrueCrypt Volume Creation Wizard

; Password

WinWait("TrueCrypt Volume Creation Wizard", "Password")

WinActivate("TrueCrypt Volume Creation Wizard", "Password")

ControlSetText("TrueCrypt Setup", "", "Edit1", "")

Sleep(1000)

ControlSetText("TrueCrypt Setup", "", "Edit1", $password)

Sleep(1000)

ControlSetText("TrueCrypt Setup", "", "Edit2", "")

Sleep(1000)

ControlSetText("TrueCrypt Setup", "", "Edit2", $password)

MsgBox(0x40010, @ScriptName, "Passwort: " & $password, 4)

ControlClick("TrueCrypt Volume Creation Wizard", "Password", "Button3")

Button 3 is locked all the time. It gets unlocked when the two password fields have the same content.

However, the two password fields never get filled with my password. Although the password fields are empty

and Button 3 (Next button) is locked, AutoIt somehow sends a click command to the button and jumps to the next screen.

As a result the preboot password is empty.

any idea how I could bypass the copy & paste protection of TrueCrypt?

Link to comment
Share on other sites

Use ControlSend() instead of ControlSetText(). Also, you may want to find out if there is a silent method for enabling the encryption with TrueCrypt (i.e. via command-line).

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt
Link to comment
Share on other sites

Many thanks for your help. The copy and past protection can also be bypassed by using the ControlSetText() function.

My mistake was that I used the wrong window title.

Now it works perfectly with:

; TrueCrypt Volume Creation Wizard
; Password
WinWait("TrueCrypt Volume Creation Wizard", "Password")
WinActivate("TrueCrypt Volume Creation Wizard", "Password")
ControlSetText("TrueCrypt Volume Creation Wizard", "", "Edit1", $password)
ControlSetText("TrueCrypt Volume Creation Wizard", "", "Edit2", $password)
ControlClick("TrueCrypt Volume Creation Wizard", "Password", "Button3")
Link to comment
Share on other sites

  • 1 year later...

Many thanks for your help. The copy and past protection can also be bypassed by using the ControlSetText() function.

My mistake was that I used the wrong window title.

Now it works perfectly with:

; TrueCrypt Volume Creation Wizard
; Password
WinWait("TrueCrypt Volume Creation Wizard", "Password")
WinActivate("TrueCrypt Volume Creation Wizard", "Password")
ControlSetText("TrueCrypt Volume Creation Wizard", "", "Edit1", $password)
ControlSetText("TrueCrypt Volume Creation Wizard", "", "Edit2", $password)
ControlClick("TrueCrypt Volume Creation Wizard", "Password", "Button3")

Do you have the Code that i can use to Automate the Install and Encryption of System Partition or entire system drive.?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...