1. #1
    Avatar von Snooki
    Registriert seit
    30.07.2013
    Beiträge
    5
    Thanked 3 Times in 1 Post

    Standard Anzahl geladener Module eines Prozesses auslesen

    Hallo Community,
    mir ist letztens was schönes eingefallen, ich weiß aber noch nicht, ob es überhaupt funktioniert.

    Und zwar:

    Ich habe mir überlegt, zu einem Programm extern noch einen Prozess laufen zu lassen, der das Haupt-Programm ständig untersucht.
    Die Untersuchung soll folgendes bewirken: Es soll die Anzahl geladener Module des Haupt-Programmes auslesen und das Haupt-Programm automatisch schließen, sobald ein Modul zuviel oder ein Modul zuwenig geladen wurde. Ziel ist es den Prozess somit routinemäßig auf nicht erwünschte Dll-Injektionen zu prüfen.

    Wie setzt man sowas am besten um? Brauche 'ne Stütze, danke im Voraus.

  2. #2
    Gelöschter Benutzer
    Gast

    Standard AW: Anzahl geladener Module eines Prozesses auslesen

    C#:


    Process proc = Process.GetProcessesByName("Skype")[0];
    foreach (ProcessModule module in proc.Modules)
    {
    Console.WriteLine(module.ModuleName);
    }


    VB.NET (konvertiert):


    Dim proc As Process = Process.GetProcessesByName("Skype")(0)
    For Each [module] As ProcessModule In proc.Modules
    Console.WriteLine([module].ModuleName)
    Next


    Ausgabe:
    Code:
    Skype.exe
    ntdll.dll
    kernel32.dll
    KERNELBASE.dll
    oleaut32.dll
    ole32.dll
    msvcrt.dll
    GDI32.dll
    USER32.dll
    LPK.dll
    USP10.dll
    RPCRT4.dll
    IMM32.DLL
    MSCTF.dll
    advapi32.dll
    sechost.dll
    wintrust.dll
    CRYPT32.dll
    MSASN1.dll
    msimg32.dll
    version.dll
    comctl32.dll
    SHLWAPI.dll
    winspool.drv
    URLMON.DLL
    api-ms-win-downlevel-ole32-l1-1-0.dll
    api-ms-win-downlevel-shlwapi-l1-1-0.dll
    api-ms-win-downlevel-advapi32-l1-1-0.dll
    api-ms-win-downlevel-user32-l1-1-0.dll
    api-ms-win-downlevel-version-l1-1-0.dll
    api-ms-win-downlevel-normaliz-l1-1-0.dll
    normaliz.DLL
    iertutil.dll
    WININET.dll
    shell32.dll
    comdlg32.dll
    oleacc.dll
    d3d9.dll
    d3d8thk.dll
    dwmapi.dll
    SHFolder.dll
    winmm.dll
    WS2_32.dll
    NSI.dll
    pdh.dll
    IPHLPAPI.DLL
    WINNSI.DLL
    DNSAPI.dll
    Secur32.dll
    SSPICLI.DLL
    PSAPI.DLL
    POWRPROF.dll
    SETUPAPI.dll
    CFGMGR32.dll
    DEVOBJ.dll
    MSACM32.dll
    uxtheme.dll
    CRYPTBASE.dll
    gdiplus.dll
    olepro32.dll
    wlanapi.dll
    wlanutil.dll
    avrt.dll
    CLBCatQ.DLL
    windowscodecs.dll
    cryptui.dll
    profapi.dll
    mapi32.dll
    wtsapi32.dll
    SXS.DLL
    propsys.dll
    ntmarta.dll
    WLDAP32.dll
    CRYPTSP.dll
    rsaenh.dll
    RpcRtRemote.dll
    api-ms-win-downlevel-advapi32-l2-1-0.dll
    avsda.dll
    mswsock.dll
    wshtcpip.dll
    wship6.dll
    MMDevApi.dll
    devenum.dll
    msdmo.dll
    nvSCPAPI.dll
    explorerframe.dll
    DUser.dll
    DUI70.dll
    Updater.dll
    dhcpcsvc.DLL
    dhcpcsvc6.DLL
    nvd3dum.dll
    USERENV.dll
    LINKINFO.dll
    ntshrui.dll
    srvcli.dll
    cscapi.dll
    slc.dll
    apphelp.dll
    TortoiseOverlays.dll
    TortoiseStub32.dll
    TortoiseSVN32.dll
    libsvn_tsvn32.dll
    libapr_tsvn32.dll
    MSVCR110.dll
    libaprutil_tsvn32.dll
    intl3_tsvn32.dll
    libsasl32.dll
    MSVCP110.dll
    crshhndl.dll
    EhStorShell.dll
    cscui.dll
    CSCDLL.dll
    jscript.dll
    mshtml.dll
    ieframe.dll
    api-ms-win-downlevel-shlwapi-l2-1-0.dll
    api-ms-win-downlevel-shell32-l1-1-0.dll
    jscript9.dll
    d2d1.dll
    DWrite.dll
    dxgi.dll
    DXGIDebug.dll
    d3d11.dll
    msimtf.dll
    msxml3.dll
    netprofm.dll
    nlaapi.dll
    rasadhlp.dll
    npmproxy.dll
    fwpuclnt.dll
    credssp.dll
    schannel.DLL
    ncrypt.dll
    bcrypt.dll
    bcryptprimitives.dll
    GPAPI.dll
    cryptnet.dll
    SensApi.dll
    MLANG.dll
    winhttp.dll
    webio.dll
    napinsp.dll
    pnrpnsp.dll
    winrnr.dll
    AUDIOSES.DLL
    WINSTA.dll
    D3D10Warp.dll
    XmlLite.dll
    msls31.dll
    RICHED20.DLL
    MSFTEDIT.DLL
    Geändert von Gelöschter Benutzer (20.11.2013 um 12:01 Uhr)

  3. The Following User Says Thank You to Gelöschter Benutzer For This Useful Post:

    Snooki (20.11.2013)

  4. #3
    Avatar von DMW007
    Registriert seit
    15.11.2011
    Beiträge
    6.145
    Thanked 9.130 Times in 3.005 Posts
    Blog Entries
    5

    Standard AW: Anzahl geladener Module eines Prozesses auslesen

    Du solltest dabei aber bedenken, dass das kein 100%tiger Schutz ist. Schließlich kann auch Code in eine zum Programm gehörende DLL injected werden. Noch simpler wäre natürlich, den Kontroll-Prozess einfach zu beenden. Ich würde also zumindest in der Hauptanwendung prüfen, ob der Kontroll-Prozess noch läuft. Wobei das natürlich auch nicht in Stein gemeißelt ist..

    EDIT: Wenn ein Thread geklärt wurde, bitte zukünftig diesen entsprechend markieren. Wie das geht steht hier: http://u-hacks.net/news-und-ankuendi...rkieren-28045/


  5. The Following User Says Thank You to DMW007 For This Useful Post:

    Snooki (20.11.2013)

Ähnliche Themen

  1. Prozess Module laden mit JNA
    Von DANP im Forum Java
    Antworten: 6
    Letzter Beitrag: 25.11.2013, 15:20
  2. [CSS] Geringe Anzahl an FPS
    Von !lkay im Forum Counter Strike
    Antworten: 8
    Letzter Beitrag: 24.09.2013, 18:32
  3. Module Tree Viewer Tool - Wer war des? oÔ
    Von Bubble Gum im Forum Ressourcen
    Antworten: 8
    Letzter Beitrag: 20.05.2013, 15:41
  4. :-Token (Module) parsen/schreiben
    Von Brainy im Forum Sourcecode
    Antworten: 3
    Letzter Beitrag: 11.07.2012, 20:01
  5. [Java] Module Protocol
    Von Flav im Forum Sourcecode
    Antworten: 0
    Letzter Beitrag: 09.04.2012, 03:38

Stichworte

Diese Seite nutzt Cookies, um das Nutzererlebnis zu verbessern. Klicken Sie hier, um das Cookie-Tracking zu deaktivieren.