Pavel Yosifovich
Pavel Yosifovich
  • 35
  • 35 946
Registry: The Main Hives
Registry: The Main Hives
zhlédnutí: 396

Video

Darkside Clone Demo from the webinar
zhlédnutí 884Před měsícem
just the code demo! source code: github.com/zodiacon/MalDevWorkshopWebinar
Fork/Join Parallelism
zhlédnutí 429Před 2 měsíci
For more on threads, see the course Windows System Programming 2 at training.trainsec.net/windows-system-programming-2-pavel Souce code: github.com/zodiacon/youtubecode/tree/main/PrimesCounter
Create Process with Alternate Parent
zhlédnutí 311Před 2 měsíci
Create Process with Alternate Parent
Hooking Functions in a different Process
zhlédnutí 607Před 3 měsíci
Hooking Functions in a different Process
Simple Function Hooking
zhlédnutí 733Před 3 měsíci
Simple Function Hooking
Drivers And Devices (Part 2)
zhlédnutí 352Před 4 měsíci
Drivers And Devices (Part 2)
Drivers And Devices (Part 1)
zhlédnutí 790Před 4 měsíci
Drivers And Devices (Part 1)
x64 Virtual Address Translation
zhlédnutí 987Před 4 měsíci
x64 Virtual Address Translation
Injecting DLL with Shellcode
zhlédnutí 2,6KPřed 5 měsíci
Injecting DLL with Shellcode
Simple Data Race
zhlédnutí 332Před 5 měsíci
Simple Data Race
Hello Assembly!
zhlédnutí 1,2KPřed 6 měsíci
Assembly-only executable Upcoming course: scorpiosoftware.net/2023/11/02/x64-architecture-and-programming-class/
Introduction to ETW
zhlédnutí 1,5KPřed 8 měsíci
Introduction to ETW
DLL Injection with SetWindowsHookEx
zhlédnutí 2,6KPřed 10 měsíci
DLL Injection with SetWindowsHookEx
Committed vs. Reserved Memory
zhlédnutí 935Před 10 měsíci
Committed vs. Reserved Memory
Process Address Space Size
zhlédnutí 413Před 10 měsíci
Process Address Space Size
Creating a Window
zhlédnutí 833Před 10 měsíci
Creating a Window
Windows Containers
zhlédnutí 456Před 10 měsíci
Windows Containers
Job Objects
zhlédnutí 455Před 11 měsíci
Job Objects
Shared Memory with Memory Mapped Files
zhlédnutí 1,3KPřed 11 měsíci
Shared Memory with Memory Mapped Files
Enumerate Processes (part 2)
zhlédnutí 289Před 11 měsíci
Enumerate Processes (part 2)
Enumerate Processes (part 1)
zhlédnutí 539Před 11 měsíci
Enumerate Processes (part 1)
Simple Memory Sharing
zhlédnutí 592Před 11 měsíci
Simple Memory Sharing
Substituting Executables
zhlédnutí 297Před 11 měsíci
Substituting Executables
Closing a handle in another process
zhlédnutí 364Před 11 měsíci
Closing a handle in another process
Maximum Handles in a process
zhlédnutí 313Před 11 měsíci
Maximum Handles in a process
Task Manager: End Task
zhlédnutí 525Před rokem
Task Manager: End Task
Single Instance Application
zhlédnutí 665Před rokem
Single Instance Application
What is this Process Doing?
zhlédnutí 592Před rokem
What is this Process Doing?
Zombie Processes
zhlédnutí 845Před rokem
Zombie Processes

Komentáře

  • @Hallilo
    @Hallilo Před měsícem

    Great video as always, what i think would be really interesting is a video about networking internals of windows because i never found a lot of information about that. Ive read Windows internals 7th edition part 1 and am currently reading part 2 but there isnt anything about networking.

  • @the_nurk
    @the_nurk Před měsícem

    got to say the one thing I appreciate the most about all of what you are doing is the dedication to digging to the exact fact i need to see to verify what you're saying is true. windows makes that very hard.

  • @MarekKnapek
    @MarekKnapek Před měsícem

    Your registry tool is using old style look and feel scroll bars. Maybe you are missing the v6 common controls XML manifest?

    • @zodiacon
      @zodiacon Před měsícem

      No, the common controls 6 manifest is there. It's the normal style I am on win 10. It looks different on win 11.

    • @MarekKnapek
      @MarekKnapek Před měsícem

      ​@@zodiaconOK, then something else is going on. The scroll bars are not consistent between the built-in tool and your tool.

    • @zodiacon
      @zodiacon Před měsícem

      I will say this: my tool supports dark mode and for that I had to use some hooks and subclassing, but I didn't touch the scroll bars that are built into windows (like the list view), because they are very difficult to customize.

  • @MrDimension0
    @MrDimension0 Před měsícem

    Thank you for the great video. I am wondering if we need thread-synchronization especially for the wchar process name changed by the configurator process and used inside the compare function inside the .dll? Also what about memory barriers so that writes to pid and process name are actually flush the store buffer and can be observed by dll inside task manager? I'm a total noob on this and I am probably wrong. I would be grateful if you could add a short explanation why we don't need to care about these threading-problems in this case. Thanks a lot

    • @zodiacon
      @zodiacon Před měsícem

      In theory, you would need thread sync (a simple mutex or SRWLock will do) because the globals are read and written potentially at the same time from 2 different threads, but not really in practice, since if something is observed as partially changed, it will be picked up correctly the next time NtQuerySystemInformation is called. A memory barrier here is an alternative to synchronization - you could add a memory barrier to force the memory to be observed by other processors right after update to ensure sequential consistency, but again, from a practical perspective it's not needed, especially since the configurator exits quickly which will force store buffer flushing . And in any case, the example is non-trivial as it is without adding sync to the mix :)

  • @the_nurk
    @the_nurk Před měsícem

    can you use modular arithmetic for getting chunks?

    • @zodiacon
      @zodiacon Před měsícem

      What do you mean "modular arithmetic"?

    • @the_nurk
      @the_nurk Před měsícem

      @@zodiacon czcams.com/video/lJ3CD9M3nEQ/video.html&pp=ygUdemFjaCBzdGFydCBtb2R1bGFyIGFyaXRobWV0aWM%3D

  • @amirmahdavi8005
    @amirmahdavi8005 Před měsícem

    Thanks.

  • @chicoern
    @chicoern Před měsícem

    Great video! Are you using an extension for syntax highlighting? If so, which one? Thanks!

    • @zodiacon
      @zodiacon Před měsícem

      I think it's what you get out of the box. But if not, there is a syntax highlight extension from Mads Kristensen

  • @ek2719
    @ek2719 Před měsícem

    Great content. Plenty to refer to in the future. Thanks!

  • @bludablaz
    @bludablaz Před měsícem

    Recently took the Rust class. You're genuinely a wizard. Absolutely brilliant work again.

  • @tgare8861
    @tgare8861 Před měsícem

    Hello, how are you? I want to ask you how to load dll from byte array

    • @zodiacon
      @zodiacon Před měsícem

      This is called Reflective loading. Look it up.

  • @MarekKnapek
    @MarekKnapek Před měsícem

    Nice! I was thinking about C++ constexpr function converting from module name and function name to a hash. Then searching the module list and export list hashing each element and comparing it to pre-computed hashes. This way you hide the strings from anti virus and from offline analyzers. But no, Pavel ecrypted the whole thing. Nice. Possible red flag would be running code that is not mapped to any file (that modified pages after decryption).

  • @batphamduong9700
    @batphamduong9700 Před 2 měsíci

    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 Před 2 měsíci

      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 Před 2 měsíci

      @@zodiacon so what is solution ?

    • @zodiacon
      @zodiacon Před 2 měsíci

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

  • @ramyogeshwaran
    @ramyogeshwaran Před 2 měsíci

    Super explanation

  • @askardyuss
    @askardyuss Před 2 měsíci

    Очень полезное видео, но не совсем понял один момент. Каким образом новый поток с точкой входа в функции GetProcAddress() заставляет в дальнейшем исполнить LoadLibraryA(dllpath)?

    • @zodiacon
      @zodiacon Před 2 měsíci

      Sorry, I don't read Russian very well :)

  • @2radix774
    @2radix774 Před 2 měsíci

    high quality content

  • @MarekKnapek
    @MarekKnapek Před 2 měsíci

    My idea would be to split the work to fixed number of chunks, like 1024. Then spawn the same number of threads as I have number of processors. Or maybe add one or two threads more in case of some thread gets stuck on I/O for a while, so the extra threads could run in meantime. Then each thread would repeatedly take one work chunk form shared queue until the queue is empty. This is more work for the programmer, but I believe the CPU utilization will be more even. For example when the work items are part of image that needs to be processed in some way (ray casting). Or when converting video file. If some part of the image is solid color or if some part of video is still then the speedup would be still (close to) linear.

    • @zodiacon
      @zodiacon Před 2 měsíci

      parallel_for works along similar lines, but it does not choose a fixed number, but uses the actual number of iterations, keeping the CPUs busy by throwing the next item at an idle CPU.

  • @bloodyink3423
    @bloodyink3423 Před 2 měsíci

    Thank you 4 ur videos

  • @_zproxy
    @_zproxy Před 2 měsíci

    can ye spawn a new userinteractive session and then connect it to console?

    • @zodiacon
      @zodiacon Před 2 měsíci

      Possibly, if you have the SeTcbPrivilege.

  • @GregLindor
    @GregLindor Před 2 měsíci

    Waht font are you using?

    • @zodiacon
      @zodiacon Před 2 měsíci

      Cascadia Code (Light) - download free from Microsoft (Github)

  • @dharanisanjaiy
    @dharanisanjaiy Před 2 měsíci

    Can we expect videos based on NtAPIs instead of win32APIs ^_^ ?

    • @zodiacon
      @zodiacon Před 2 měsíci

      I use whatever is easier and gets the job done in videos :)

  • @nila27_98
    @nila27_98 Před 2 měsíci

    Great! I learned and studied a lot from your 'Parent Process vs. Creator Process' blog post. That's a really cool code, but it would have been nice if you put the CREATE_NEW_CONSOLE flag in when calling the CreateProcess because the 0xC0000142 error occurs if the process you're trying to spoil is the console process. And some uwp apps, such as calc.exe, do not have this spoofing. Anyway, thank you so much for sharing that information through blogs and CZcams.

  • @ronyg3017
    @ronyg3017 Před 2 měsíci

    I am getting an error where it keeps saying hDll could be '0; this does not adhere to the specification for the function 'GetProcAddress'

    • @zodiacon
      @zodiacon Před 2 měsíci

      Are you sure it's an error? It's probably a warning at best.

  • @slava_xd
    @slava_xd Před 3 měsíci

    pavel will you make a video on WTL in the future?

    • @zodiacon
      @zodiacon Před 3 měsíci

      I have a complete course on that... training.trainsec.net/gui-programming-with-wtl There are some free videos there.

    • @slava_xd
      @slava_xd Před 3 měsíci

      @@zodiacon oh, I'll buy it then. thank you :)

  • @ALCHEMYTWEAKS
    @ALCHEMYTWEAKS Před 3 měsíci

    You the best ❤

  • @nikos4677
    @nikos4677 Před 3 měsíci

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

  • @amerafa1
    @amerafa1 Před 3 měsíci

    yeaah new video.

  • @suen-tech
    @suen-tech Před 3 měsíci

    Thank you

  • @shaovoon
    @shaovoon Před 3 měsíci

    Very useful technique. Thank you for sharing!

  • @user-qt4vc5wc9g
    @user-qt4vc5wc9g Před 3 měsíci

    Where I can get local offline Help for Winapi, such as in your video?

    • @zodiacon
      @zodiacon Před 3 měsíci

      Go to the Visual Studio 2022 installer, and add the Help Viewer component

  • @rayansec
    @rayansec Před 3 měsíci

    Great video, I was trying to learn what ETW is and couldn't really understand it without examples but this video helped me a lot! Thank you :)

  • @ALCHEMYTWEAKS
    @ALCHEMYTWEAKS Před 3 měsíci

    Sir Pavel, I would like to ask what might be a silly question and it’s out of the context of this video ... How can I verify whether something exists or not, for example, a DWORD that I added in a specific registry path that affects a certain mechanism? Secondly, is there a possibility that, by default, it doesn't exist internally in the Windows kernel in some pert of code, but changes once the respective DWORD is added? (I’m new on this part so I apologise for any misleading)

    • @zodiacon
      @zodiacon Před 3 měsíci

      I'm not sure I understand your question, especially the second part. You can use Windows APIs like RegOpenKeyEx and RegQueryValue to find out if a key/value exists. If something changes in the Registry, you can get notifications in user mode and kernel mode. In kernel mode they are much more powerful.

    • @ALCHEMYTWEAKS
      @ALCHEMYTWEAKS Před 3 měsíci

      Excuse me, I'll rephrase it. Let's take, for example, a registry path like "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl," which has some keys at this location that exist by default. However, I find some keys that are not present by default in this location. My question is how to verify if these new keys I added are indeed valid and potentially "active" or if they are as if they don't exist. I am asking this because friends send me various keys, and when I go through the process of recording the 'before and after' using xperf, comparing the execution time in DPC/ISR before and after, focusing on the driver that will be affected by the changes, I observe some differences between the before and after. I'm not sure if I am being clear, but I hope I've clarified it now. @@zodiacon

    • @zodiacon
      @zodiacon Před 3 měsíci

      I think I understand. There is no sure way to tell. You will have to reverse the kernel code to see if some keys/values are used. But you can use the strings.exe tool from Sysinternals or some PE viewer that can show strings within the PE. You may find various key and value names, and those are most likely used by the kernel (if they exist)

    • @ALCHEMYTWEAKS
      @ALCHEMYTWEAKS Před 3 měsíci

      Thank you very much for your time! @@zodiacon

    • @ALCHEMYTWEAKS
      @ALCHEMYTWEAKS Před 3 měsíci

      I would like to ask one last thing, if a certain 'parameterization' or registry key does not officially exist in any Microsoft documentation, is it likely that it does not exist? @@zodiacon

  • @amerafa1
    @amerafa1 Před 3 měsíci

    Hello can anyone pls give a hint on what I'm doing wrong? I'm trying to open a handle to keyboard device, check if CAPSLOCK is on and if it's turn it off. Everything is working correct except the DeviceIoControl call to turn CAPSLOCK off. #include <Windows.h> #include <stdio.h> #include <ntddkbd.h> int main() { HANDLE hDevice = CreateFile(LR"(\\.\GlobalRoot\Device\KeyboardClass0)", GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr); if (hDevice == INVALID_HANDLE_VALUE) { printf("Error opening handle to file "); return 1; } KEYBOARD_INDICATOR_PARAMETERS inputBuffer; KEYBOARD_INDICATOR_PARAMETERS outputBuffer; ULONG DataLength = sizeof(KEYBOARD_INDICATOR_PARAMETERS); ULONG ReturnedLength; inputBuffer.UnitId = 0; outputBuffer.UnitId = 0; if (!DeviceIoControl(hDevice, IOCTL_KEYBOARD_QUERY_INDICATORS, &inputBuffer, sizeof(inputBuffer), &outputBuffer, sizeof(outputBuffer), &ReturnedLength, nullptr)) { printf("Error sending IOCTL "); CloseHandle(hDevice); return 1; } if (outputBuffer.LedFlags & KEYBOARD_CAPS_LOCK_ON) { printf("Caps Lock is ON "); // Turn off Caps Lock inputBuffer.LedFlags = 0x0; if (!DeviceIoControl(hDevice, IOCTL_KEYBOARD_SET_INDICATORS, &inputBuffer, sizeof(inputBuffer), nullptr, 0, &ReturnedLength, nullptr)) { printf("Error setting caps lock "); CloseHandle(hDevice); return 1; } } getchar(); CloseHandle(hDevice); return 0; } Another doubt is that I'm able to open this handle with GENERIC_WRITE permission but with GENERIC_READ it doesn't work, is this a security policy to avoid getting the keys pressed from user land? Where can I find the about device objects permissions?

    • @zodiacon
      @zodiacon Před 3 měsíci

      Make sure you're connecting to the correct device - KeyboardClass0 might not be the right one - if you have a laptop keyboard and an external keyboard for example. In some cases you won't be able to open a handle to the device (sharing violation). Also make sure UnitId is the correct index.

  • @Hallilo
    @Hallilo Před 4 měsíci

    Nice series :)

  • @amerafa1
    @amerafa1 Před 4 měsíci

    thank you.

  • @ek2719
    @ek2719 Před 4 měsíci

    Thank you.

  • @_zproxy
    @_zproxy Před 4 měsíci

    nice. is the example on github?

  • @ahmedeissa7148
    @ahmedeissa7148 Před 4 měsíci

    thank you

  • @user-ry7gh8vb3l
    @user-ry7gh8vb3l Před 4 měsíci

    I read the handle value from output of handle64.exe, I needed to use base 16 to get a valid handle. HANDLE handle = (HANDLE)(ULONG_PTR)strtol(strHandle.c_str(), nullptr, 16); Thank you for this video (and many others)!

  • @2radix774
    @2radix774 Před 4 měsíci

    dude thats cool, you should write a book or sth

    • @zodiacon
      @zodiacon Před 4 měsíci

      :D

    • @2radix774
      @2radix774 Před 4 měsíci

      I have a question If I would liek to learn things about windows system I would read your book but where did you learn about windwos system? your book hasn't been released yet @@zodiacon

    • @zodiacon
      @zodiacon Před 4 měsíci

      Many of my books have been released... checkout leanpub.com/bookstore?search=pavel%20yosifovich&type=all and www.amazon.com/stores/Pavel-Yosifovich/author/B00A2OTORO

    • @ek2719
      @ek2719 Před 4 měsíci

      Great content as always. Much appreciated.

    • @Bomag
      @Bomag Před dnem

      @@zodiacon Dude these are great. You should plug these in your video, and put in the description so people can find them.

  • @amitmoshel9847
    @amitmoshel9847 Před 4 měsíci

    Very Informative, thank you pavel!

  • @nicoooxx
    @nicoooxx Před 4 měsíci

    trappo is you BIGGEST fan (in weight terms)

  • @tylerm.3306
    @tylerm.3306 Před 4 měsíci

    trappo is your biggest fan! Keep up the work

  • @EnLopXf
    @EnLopXf Před 4 měsíci

    I hope you create another great videos

    • @zodiacon
      @zodiacon Před 4 měsíci

      Expect a new video tomorrow!

  • @dadogwitdabignose
    @dadogwitdabignose Před 4 měsíci

    you're a life saver man thank you so much

  • @stephencole9289
    @stephencole9289 Před 5 měsíci

    Setting the memory as executable later (and as read,executable) (ie not at the same time as setting it RW) to try to avoid things noticing, was clever. Worth noting you have to be admin (or have debug privileges?) to do this injection etc

    • @zodiacon
      @zodiacon Před 5 měsíci

      No need for admin rights or debug privilege. It depends on your target process.

    • @stephencole9289
      @stephencole9289 Před 5 měsíci

      Ah yes, if the target process was started by (running in the context of) the current user doing the injecting, then its ok. Which is also why a normal user can debugg their own running apps. The comment was more to highlight the fact that cant inject into system processes etc without the necessary rights.

  • @stephencole9289
    @stephencole9289 Před 5 měsíci

    At 19:00 the ASLR address of loadlibrary in the target process is USALLY the same as in the program doing the injecting, ie common for the state of the system since the last reboot, but not guaranteed for certain dll's?