DLL Injection with CreateRemoteThread

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024
  • Using the CreateRemoteThread API to inject a DLL to a target process

ความคิดเห็น • 31

  • @crr0ww
    @crr0ww ปีที่แล้ว +5

    I learned a lot from this! Thank you, you're a legend :)

    • @gitgudsec
      @gitgudsec 5 หลายเดือนก่อน

      aint he just?

  • @nikos4677
    @nikos4677 6 หลายเดือนก่อน +2

    Dude you explained some things I didnt know and ot really helped thanks. Most youtubers ignore some important details and itsannoying

  • @logicchild
    @logicchild ปีที่แล้ว +3

    Great as usual :), I created similar injector but in C#, the important thing here is that you need to create two versions of injector; a x64 one to inject x64 processes, and a x86 one to inject x86 processes.

  • @nazmdar
    @nazmdar หลายเดือนก่อน

    Thanks for your nice explanation.
    Does this technic work even if "Address space layout randomization" is enabled? Does the address of "LoadLibraryA" the same in virtual address space of all processes?

    • @zodiacon
      @zodiacon  หลายเดือนก่อน

      @@nazmdar yes

  • @kaolungservice
    @kaolungservice ปีที่แล้ว +1

    thanks for sharing ,good man .

  • @apaatutu9709
    @apaatutu9709 ปีที่แล้ว +1

    Thanks a lot, Great help to me.

  • @tomifilep1
    @tomifilep1 21 วันที่ผ่านมา

    and what happened if nothing happened i mean the code compiled without error when I'm try to inject nothing do no error print nothing all anti virus is off!! any idea ? ?? ?

    • @zodiacon
      @zodiacon  21 วันที่ผ่านมา +1

      Make sure you inject a 64 bit DLL into a 64-bit process or 32-bit DLL into a 32-bit process.
      Other than that, you can use Process Monitor to see if the DLL is loaded, if the thread is created, etc.

    • @tomifilep1
      @tomifilep1 20 วันที่ผ่านมา +1

      @@zodiacon yhea thanks i solve it . i try with other injector and the injector tell you are dumb u want to inject 32 bit into a 64 bit :D

  • @fee171
    @fee171 ปีที่แล้ว +1

    Hey bro if I subscribe to patreon, can you compile an injector for me?

    • @zodiacon
      @zodiacon  ปีที่แล้ว

      No... that's not the purpose of this channel.
      I'm sure you can find plenty elsewhere.

    • @zodiacon
      @zodiacon  ปีที่แล้ว

      The source code is provided at github.com/zodiacon/youtubecode

  • @logicchild
    @logicchild ปีที่แล้ว +2

    Could you please create a tutorial for a mini driver to inject this dll into any user-mode process when it starts 🙏

    • @zodiacon
      @zodiacon  ปีที่แล้ว +2

      There are such examples on Github... for now, I'll stick with simpler things :)

    • @marq4375
      @marq4375 ปีที่แล้ว +1

      Hey Pavel big fan! I have some of your books and also your pentester academy windows series. Glad to see you on TH-cam. If you make a Patreon I'd be interested in donating! Thanks again, you're a master at this !

    • @zodiacon
      @zodiacon  ปีที่แล้ว +1

      Happy to receive support! patreon.com/zodiacon

    • @tomifilep1
      @tomifilep1 21 วันที่ผ่านมา

      i bet u want a make a cs go cheatoos xd

  • @itf_ph3r0x41
    @itf_ph3r0x41 ปีที่แล้ว +1

    Hey Pavel, great video to show some basics, thats often underrated.
    If you wouldn't mind, could you help me out with a little problem that I am facing right now?
    I want to get a better understanding of the entire usermode concept in windows, I also bought the wininternals books and partially read them.
    So my problem is, that I want to perform accurate handle enumeration.
    There is a usermode process that is creating a lot of short lived handles to scan memory regions of my process, but I cant find these handles by using NtQuerySystemInformation using the SystemHandleInformation class.
    On the other hand, I know that the other process is also doing a usermode handle enumeration to detect any opened handles to the process.
    So my question is, are there other ways to enumerate handles of a process in usermode? NtQuerySystemInformation gives us a list of all system handles, and each scan takes multiple seconds to traverse through, which could be a reason why short lived handles are not found...
    I really don't want to inject into the other process though and hook stuff, the goal was to perform a good handle enumeration externally.
    I hope you can give me a hint maybe :)
    But for now - Спасибо за всё,
    Я огромный Фан!

    • @zodiacon
      @zodiacon  ปีที่แล้ว +2

      NtQuerySystemInformation is the way to go. There is no better way from user mode. Short-lived handles are just that - enumeration has nothing to do with that. It captures what exists at enumeration time. With a kernel driver, you could intercept opening handles to processes, for example.

    • @itf_ph3r0x41
      @itf_ph3r0x41 ปีที่แล้ว +1

      @@zodiacon Alright, so I guess that detecting short lived handles from usermode is a thing of time luck then. Would multithreaded scanning increase the probability of detecting these handles?

    • @zodiacon
      @zodiacon  ปีที่แล้ว +2

      Not really, there is internal locking happening anyway.

  • @batphamduong9700
    @batphamduong9700 5 หลายเดือนก่อน

    Hi Pavel, Thanks for tutorials...But all your tutorial is injected to already running process.. How about Create new process and inject in to it?
    My current problem is create new progress (Ex Notepad) and inject to it..but sometime it work...sometime it dont...I dont know why...just assume dll injected when nodepad process not full loaded

    • @zodiacon
      @zodiacon  5 หลายเดือนก่อน

      Usually injecting into a new process is much easier, because you have an all powerful handle to it (no need to call OpenProcess which may fail). If you create the process suspended and try to inject to it, it is likely to fail, because the process only has NtDll loaded into it.

    • @batphamduong9700
      @batphamduong9700 5 หลายเดือนก่อน

      @@zodiacon so what is solution ?

    • @zodiacon
      @zodiacon  5 หลายเดือนก่อน

      There is no "one, single" solution... do some research, try things out...

  • @CoolGamer6525
    @CoolGamer6525 2 หลายเดือนก่อน

    hi, is it possible to convert a dll to .exe trainer?

    • @zodiacon
      @zodiacon  2 หลายเดือนก่อน

      Depends on what you mean by "convert". You can remove the DLL bit from the PE header, but the entry point will DllMain, and it's not what is expected from an EXE, so likely to crash.