[ Base de registres ] :: detection des entrées sorties : lecture ecriture

JackosKing Messages postés 168 Date d'inscription mardi 31 décembre 2002 Statut Membre Dernière intervention 21 avril 2005 - 7 juil. 2003 à 11:37
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019 - 7 juil. 2003 à 12:30
lu,
voilà, je voulais savoir si il était possible de detecter si un programme lit, ecrit dans la base de registre.

thx

JackosKing For EvEr

5 réponses

BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
7 juil. 2003 à 11:43
question ecriture tu peux surveiller avec RegNotifyChangeKeyValue, pour le reste je ne vois pas.
BruNews, ciao...
0
JackosKing Messages postés 168 Date d'inscription mardi 31 décembre 2002 Statut Membre Dernière intervention 21 avril 2005
7 juil. 2003 à 12:01
je pose la meme question pour les fichiers:p
JackosKing For EvEr
0
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
7 juil. 2003 à 12:14
DIRECT de MSDN:

DWORD dwWaitStatus;
HANDLE dwChangeHandles[2];
// Watch the C:\WINDOWS directory for file creation and
// deletion.

dwChangeHandles[0] = FindFirstChangeNotification(
"C:\\WINDOWS", // directory to watch
FALSE, // do not watch the subtree
FILE_NOTIFY_CHANGE_FILE_NAME); // watch file name changes

if (dwChangeHandles[0] == INVALID_HANDLE_VALUE)
ExitProcess(GetLastError());

// Watch the C:\ subtree for directory creation and
// deletion.

dwChangeHandles[1] = FindFirstChangeNotification(
"C:\", // directory to watch
TRUE, // watch the subtree
FILE_NOTIFY_CHANGE_DIR_NAME); // watch dir. name changes

if (dwChangeHandles[1] == INVALID_HANDLE_VALUE)
ExitProcess(GetLastError());

// Change notification is set. Now wait on both notification
// handles and refresh accordingly.

while (TRUE)
{

// Wait for notification.

dwWaitStatus = WaitForMultipleObjects(2, dwChangeHandles,
FALSE, INFINITE);

switch (dwWaitStatus)
{
case WAIT_OBJECT_0:

// A file was created or deleted in C:\WINDOWS.
// Refresh this directory and restart the
// change notification. RefreshDirectory is an
// application-defined function.

RefreshDirectory("C:\\WINDOWS")
if ( FindNextChangeNotification(
dwChangeHandles[0]) == FALSE )
ExitProcess(GetLastError());
break;

case WAIT_OBJECT_0 + 1:

// A directory was created or deleted in C:\.
// Refresh the directory tree and restart the
// change notification. RefreshTree is an
// application-defined function.

RefreshTree("C:\");
if (FindNextChangeNotification(
dwChangeHandles[1]) == FALSE)
ExitProcess(GetLastError());
break;

default:
ExitProcess(GetLastError());
}
}

BruNews, ciao...
0
JackosKing Messages postés 168 Date d'inscription mardi 31 décembre 2002 Statut Membre Dernière intervention 21 avril 2005
7 juil. 2003 à 12:18
oui, mais il ne le detecte pas en real time, je voudrais controller l'acces au fichiers et br, comme un firewall qui detecte en real time l'acces au ports, je voudrait faire la mee chose pour les fichiers.
JackosKing For EvEr
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
7 juil. 2003 à 12:30
ben je ne vois pas de truc simple. Faudra ecrire un truc residant pour injecter du code dans chaque processus qui se cree pour 'hooker' les API qui t'interessent.
Alors bon courage vraiment.
BruNews, ciao...
0
Rejoignez-nous