|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Jan 2001
Città: Livorno
Messaggi: 1383
|
Come è possibile caricare in memoria un driver?
Ho da poco comprato una chiave usb. Vorrei usare truecrypt per crearci un volume criptato. Il limite di trucrypt è che è necessario installarlo, per cui non potrei infilare la chiave in un computer che non ha truecrypt installato. L'installazione è necessaria perchè carica in memoria il driver truecrypt.sys. Per farlo non è necessario riavviare il computer e neppure per scaricarlo dalla memoria. Deve essere possibile dunque la realizzazione di un prog. che carica e scarica il driver a piacimento ed in tempo reale.
Ma che comandi devo usare? Grazie. |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Oct 2004
Città: Acireale
Messaggi: 447
|
Ciao,
una soluzione è possibile, solo che si devono fare un pò di prove. ( Windows è sempre più incasinato di Linux Il file che dici tu truecrypt.sys lo puoi caricare direttamente con il comando da shell "net start truecrypt". Quindi praticamente nella tua chiavetta usb realizzi due partizioni: 1) FAT12 da 1 Mb, dove metti l'eseguibile truecrypt.exe, truecrypt.sys truecrypt format.exe, con un procedura per registrare il driver; ( vedi problema seguente ) 2) FAT32 Cryptata con TrueCrypt con spazio rimanente. Il problema appunto è registrare il driver truecrypt come servizio. Quelli del progetto ext2fsd sono riusciti a creare un .inf per registrare il loro servizio, cioè il driver ext2fsd.sys. Puoi dare un'occhiata a quel inf. Io ho fatto delle prove con il mio pc, ma non sono riuscito ad installare il servizio. Comunque ho letto nelle FAQ del sito ufficiale di TrueCrypt la seguente : Q: Does TrueCrypt support something like 'traveller' mode? A: Currently not (however, it is planned to be implemented in a future version). If you need to use TrueCrypt on a computer on which you cannot (or do not want to) install TrueCrypt, we recommend using BartPE for this purpose. For further information regarding BartPE, see the question "Is it possible to encrypt my operating system boot partition?" in this FAQ. Quindi non ti resta altro che fare prove oppure aspettare che esca la nuova versione con la feature che desideri tu. Ciao. |
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Jan 2001
Città: Livorno
Messaggi: 1383
|
Grazie, io credo che però non occorra aspettare:
Ho dato un'occhiata al sorgente ed ho isolato la parte che si occupa di avviare il driver. (mi sto riferendo alla versione 3.0 di truecrypt dunque non è necessario avviare un servizio ma solo caricare il driver truecrypt.sys) Penso sia sufficiente eseguire il comando hService = CreateService (hManager, "truecrypt", "truecrypt", SERVICE_ALL_ACCESS, SERVICE_KERNEL_DRIVER, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, szDir, NULL, NULL, NULL, NULL, NULL ); Con qualche sistema manuale e poi eseguire come da te suggerito net start truecrypt Poi per smontare il volume eseguire net stop truecrypt seguito dal comando analogo a quello sopra ma per la disinstallazione. Occorre però avere VC6 (che non ho) per compilarlo ed avere tutti gli include necessari, in più non conosco bene il c++. Una volta fatto funzionare il prob è risolto, no? Ciao ServiceMessage (hwndDlg, "installing TrueCrypt driver service"); hService = CreateService (hManager, "truecrypt", "truecrypt", SERVICE_ALL_ACCESS, SERVICE_KERNEL_DRIVER, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, szDir, NULL, NULL, NULL, NULL, NULL ); if (hService == NULL) goto error; else CloseServiceHandle (hService); hService = OpenService (hManager, "truecrypt", SERVICE_ALL_ACCESS); if (hService == NULL) goto error; ServiceMessage (hwndDlg, "starting TrueCrypt driver service"); bRet = StartService (hService, 0, NULL); if (bRet == FALSE) goto error; bOK = TRUE; error: if (bOK == FALSE && GetLastError ()!= ERROR_SERVICE_ALREADY_RUNNING) { handleWin32Error (hwndDlg); MessageBox (hwndDlg, "The installation of the device driver has failed", lpszTitle, MB_ICONHAND); } else bOK = TRUE; if (hService != NULL) CloseServiceHandle (hService); if (hManager != NULL) CloseServiceHandle (hManager); return bOK; |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Oct 2004
Città: Acireale
Messaggi: 447
|
In teoria non c'è bisogno del compilatore VC6. Lo puoi fare anche
con il compilatore della borland che oltretutto è scaricabile dalla rete. Comunque il file contiene le infomazioni per installare il tutto senza dover compilare nessun programma. Ti allego il file che dico io. Qua trovi la descrizione dei parametri per instllare un servizio. http://msdn.microsoft.com/library/de...erviceData.asp Se apri il file .inf con un editor di testo vedrai che alla fine ci sono parametri del tipo : ServiceType = 2 ; SERVICE_FILE_SYSTEM_DRIVER StartType = 3 ; SERVICE_MANUAL_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\ext2fsd.sys LoadOrderGroup = File System Tu dovresti modificare questi in ServiceType = 1; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_MANUAL_START ErrorControl = 1; SERVICE_ERROR_NORMAL ServiceBinary = %12%\truecrypt.sys LoadOrderGroup = File System Vedi tu cosa ti conviene. |
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Jan 2001
Città: Livorno
Messaggi: 1383
|
Ok, oggi provo e ti faccio sapere.
Ciao |
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: Jan 2001
Città: Livorno
Messaggi: 1383
|
Evviva Funziona! Sei stato grande!
Solo che non so poi come disinstallarlo in modo pulito e se occorrono dei privilegi per farlo funzionare su qualunque pc. Domani provo ad usare createprocess in delphi o c++ per fare la stessa cosa in modo più pratico. Ciao Per gli interessati ecco il testo dello script: [Version] Signature = "$Windows NT$" Provider = %Matt% Class = System SetupClass = BASE InfVersion = "00.00.10" ;----------------------------------------------------------------------------- ; Source and target directories and files [SourceDisksNames] 1=%SourceDisk%,,, [SourceDisksFiles] truecrypt.sys = 1 [DestinationDirs] DefaultDestDir = 12 ;----------------------------------------------------------------------------- ; Driver installation [DefaultInstall.NT] CopyFiles = Ext2Fsd.Install.CopyFiles [DefaultInstall.NT.Services] AddService = %Ext2FsdServiceName%,, Ext2Fsd.Service, ; Make a "service" for the driver [Ext2Fsd.Service] DisplayName = %Ext2FsdDisplayName% ServiceType = 1 ; SERVICE_FILE_SYSTEM_DRIVER StartType = 3 ; SERVICE_MANUAL_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\truecrypt.sys LoadOrderGroup = File System ; Copy files [Ext2Fsd.Install.CopyFiles] truecrypt.sys ; Setup parameters ;----------------------------------------------------------------------------- ; Strings [Strings] Matt = "Matt Wu <[email protected]>" SourceDisk = "Installation Disc for Ext2 File System Driver" Ext2fsdServiceName = "truecrypt" Ext2fsdDisplayName = "truecrypt" ; Driver and Service Start Types SERVICE_BOOT_START = 0 SERVICE_SYSTEM_START = 1 SERVICE_AUTO_START = 2 SERVICE_MANUAL_START = 3 SERVICE_NEVER_START = 4 ; (deactivated) DOPO E' IMPORTARE SCRIIVERE 'NET START TRUECRYPT' DAL PROMPT |
|
|
|
|
|
#7 |
|
Senior Member
Iscritto dal: Oct 2004
Città: Acireale
Messaggi: 447
|
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 00:12.



















