DLL Injection with CreateRemoteThread

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ม.ค. 2025

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

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

    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.

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

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

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

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

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

      aint he just?

  • @FJProject
    @FJProject 16 วันที่ผ่านมา

    Does this technique work if the injector app is 64bit but target process and dll are 32bit?
    Or do i need to use a proxy 32bit process?

    • @zodiacon
      @zodiacon  16 วันที่ผ่านมา

      It can't work with different DLL/process "bitness". You need a 32-bit version of the DLL to be injected into a 32-bit process.

    • @FJProject
      @FJProject 15 วันที่ผ่านมา

      @@zodiacon Yes, i know that. I ask if i can inject 32bit DLL into 32bit process with 64bit injector, using this technique. Actualy i tried and it not gives any error but DLL is not injected. Maybe i miss something.
      Upd: oh, because kernel32 has not same address in 32bit and 64bit process memory space

    • @zodiacon
      @zodiacon  15 วันที่ผ่านมา

      Correct. You need another way to find the address of the 32-bit LoadLibrary.

    • @FJProject
      @FJProject 15 วันที่ผ่านมา

      @@zodiacon For now im using EnumProcessModulesEx to get k32 address on target process and add LoadLibrary offset to it.

  • @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 4 หลายเดือนก่อน

      i bet u want a make a cs go cheatoos xd

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

    Thanks a lot, Great help to me.

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

    Greate Work !

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

    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  5 หลายเดือนก่อน

      @@nazmdar yes

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

    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  4 หลายเดือนก่อน +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 4 หลายเดือนก่อน +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

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

    Hi, thanks for such a great explanation. I have a question:
    When I run notepad, the corresponding message box will always appear?

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

      No, you need to inject with the correct process ID.

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

    thanks for sharing ,good man .

  • @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 9 หลายเดือนก่อน

    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  9 หลายเดือนก่อน

      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 9 หลายเดือนก่อน

      @@zodiacon so what is solution ?

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

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

  • @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

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

    You explaining very fast and most of code i did not know what you did

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

      I understand, sorry about that. Perhaps you can view it in slower motion.

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

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

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

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

      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.