Autor Beitrag
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 18.01.04 12:55 
hallo !!!

ich möchte folgenden Quellcode verwenden um den Start von Apss abzufangen und anhand einer whitelist zu prüfen ob man diese apps starten darf oder nicht. www.datavis.ch/Thoma...s/EXECUTE-Hooker.zip
mein problem ist, dass der code keinen programmstart mitbekommt, wenn ich unter win2k auf dem desktop oder aus dem startmenü ein proggi starten. unter win XP geht das alles wieder wunderbar.

Wieso ? Ruf win 2k die programme anders auf oder was ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: So 18.01.04 13:07 
Hi,

Zitat:
Ruf win 2k die programme anders auf oder was ?


Unter XP wird zum Ausführen einer Datei vom Explorer aus die API CreateProcessW verwendet.
Ob unter Win2k dieselbe Funktion verwendet wird, kann ich dir
leider nicht sagen.

Aber du kann ja mal einen kleinen Test durchführen.

Erstelle ein Delphi Programm,
welches eine Datei mit CreateProcessW ausführt.
Dann findest du heraus, ob der EXECUTE Hooker CreateProcessW korrekt hookt oder nicht.

Falls CreateProcessW nicht abgefangen werden kann, dann stimmt
was mit dem Hook-Code nicht.

Falls CreateProcessW abgefangen werden kann, dann
verwendet wohl der Explorer eine andere Funktion zum Ausführen von Dateien.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 18.01.04 13:19 
also in dem ZIP File ist ein demo dabei. in der demo app, kann man auch programme aufrufen, entweder mit shellexecute oder mit createprocess. mit beiden läuft der hook einwandfrei !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: So 18.01.04 13:28 
Zitat:
also in dem ZIP File ist ein demo dabei. in der demo app, kann man auch programme aufrufen, entweder mit shellexecute oder mit createprocess. mit beiden läuft der hook einwandfrei !


Jaja, weiss ich, habe ja auch das Demo geschrieben...
Probier aber trotzdem mal das:

Zitat:
Erstelle ein Delphi Programm,
welches eine Datei mit CreateProcessW ausführt.
Dann findest du heraus, ob der EXECUTE Hooker CreateProcessW korrekt hookt oder nicht.


Vielleicht funktioniert's im Demo, weil die dll im gleichen Prozess läuft wie das Demo.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 18.01.04 14:17 
ups, stimmt, du hast das demo ja geschrieben. hab ich gar nicht überrissen !

kannst du mir mal einen bsp code posten, wie man CreateProcessW nutzt ?? ich weiss bei dieser masse von paramtern nicht was ich da eingeben muss. :shock:

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Yooda
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68



BeitragVerfasst: So 18.01.04 15:01 
Und wenn Du dann auch noch für mich etwas machen könntest dann wäre das echt super!
Statt der MessageBoxen die Ausgegeben werden wo gefragt wird:

Möchten Sie 'C:\windows\bla.exe' ausführen

soll ein Timer auf meiner Forum eingeschaltet werden. Ist das möglich?


Viele Grüsse

David
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 27.01.04 17:14 
hallo toms ???
könntest du oder jamand anders bitte mal posten wie ich mit CreateProcessW umgehe ?? also nen code bitte

_________________
In the beginning was the word.
And the word was content-type: text/plain.
matze Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 14.02.04 12:40 
also ich hab das jetzt mal selber hinbekommen !!
soweit ich das beurteilen kann, hook die DLL CreateProcessW korrekt. Ich bin mir aber nicht 100%ig sicher !

allerdings wird ein aufruf eines programmes vom desktiop oder dem strartmenü nicht richtig gehookt. warum ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.