Making Simple Windows Driver in C

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 410

  • @bmx666bmx666
    @bmx666bmx666 8 месяцев назад +156

    0 water, 100% short and useful information. Thanks!

  • @georgeadrianstefan1676
    @georgeadrianstefan1676 10 месяцев назад +470

    Another episode of: Things I will never do but watch anyway because i like them.

    • @lucianprl
      @lucianprl 8 месяцев назад +14

      at least I'm not the only one who does this :)))

    • @mr.t9816
      @mr.t9816 6 месяцев назад +5

      Oh now i understand why this very very specific video has 250k+ views lol.

    • @sadiulhakim7814
      @sadiulhakim7814 6 месяцев назад +2

      @@lucianprl Same here

  • @badtrip858
    @badtrip858 11 месяцев назад +339

    It is almost comical that when searching for a video about Windows Drivers' Development so far, I was only getting results from 10 years ago that have completely given up on that specific matter so the information on these outdated videos is also minimal, and now, out of nowhere, I bumped into this video on my home page. I'd really love to see more guides concerning drivers' development. That was incredible.

    • @matteoveraldi.musica
      @matteoveraldi.musica 10 месяцев назад +1

      Same

    • @israelperezmasle6673
      @israelperezmasle6673 9 месяцев назад +16

      I wasn't even looking, it just popped up

    • @johnmarks714
      @johnmarks714 4 месяца назад

      Pavel Yosifovich is another good source. Dont know about his videos, but he's written good low level programming type books, such as device driver dev and theyre current.

    • @Алексей-ч4у3з
      @Алексей-ч4у3з 3 месяца назад

      so there are no new episodes and this video is more HELLO WORLD than really driver development guide

    • @harleyspeedthrust4013
      @harleyspeedthrust4013 7 дней назад +1

      There's great stuff on msdn

  • @BarryKawooya-c3g
    @BarryKawooya-c3g 11 месяцев назад +193

    Everything to get you started with drivers

  • @johnshaw6702
    @johnshaw6702 11 месяцев назад +28

    I liked it. I haven't written a driver in 25 years, but I see things have changed. Short but sweet.

  • @madghostek3026
    @madghostek3026 11 месяцев назад +87

    extremely good tutorial, coincise, no pauses, everything planned

  • @szyszqu
    @szyszqu 11 месяцев назад +11

    Damn, at the beginning I couldn't even tell if it was Linux or Windows with that DWM bar, looks amazing!

  • @preludelight
    @preludelight 11 месяцев назад +295

    I thought "There's no way a sub 8 minute video is going to be enough to be informative for a topic like this." I was completely wrong. This was well paced, straight forward, and better than I could have imagined. This will be the go-to video I send to people who want to start with kernel mode dev but don't understand quite where to get started.
    Also: What shell replacement are you using, It looks swell!

    • @nirlichtman
      @nirlichtman  11 месяцев назад +35

      Thanks! :) I use a port of Suckless dwm for Windows called dwm-win32, it actually sits on top of the shell and does not replace it but rather it works by managing the existing windows and listening to newly created ones

    • @cocosloan3748
      @cocosloan3748 11 месяцев назад +19

      Do not encourage this fellow...
      Next time he will do it in 4 minutes and I wont get it at all 😢

    • @jyothishkumar3098
      @jyothishkumar3098 10 месяцев назад

      ​@@nirlichtman Much like xoblite or Kera desktop

  • @nyzss
    @nyzss 11 месяцев назад +117

    incredible content, I would love to see more videos that introduce or expend on more low level concepts. thank you!

    • @shauryayamdagni
      @shauryayamdagni 11 месяцев назад +4

      expand

    • @johnmarks714
      @johnmarks714 11 месяцев назад +2

      Please expand

    • @yabbaso
      @yabbaso 11 месяцев назад +1

      Yes please, taking these to the next level

  • @NullCyan
    @NullCyan 11 месяцев назад +99

    Please make more Windows low level programming, this is awesome!
    suggestion: tutorials on C windows api

    • @ufufuawa401
      @ufufuawa401 11 месяцев назад +6

      How bout Native API Programming :3 ?

    • @NullCyan
      @NullCyan 11 месяцев назад

      @@ufufuawa401 true :3

    • @dsihacks
      @dsihacks 11 месяцев назад

      @@ufufuawa401 aint no way we making our own csrss.exe 💀

    • @awaismushtaq5719
      @awaismushtaq5719 9 месяцев назад +5

      @@ufufuawa401 couldn't agree more. We all need to know how things used to be during good old days

  • @Potew
    @Potew 11 месяцев назад +4

    I wonder how much knowledge and IQ is needed for making all these steps with such easiness. Thanks for the video!

  • @waleedalrashed1411
    @waleedalrashed1411 11 месяцев назад +11

    Even though I learned about drivers back in Uni. It was all theory. your 7-minute long video was the missing piece.
    Like your video style, not asking for [like , share, comment] just straight to the point with no pauses.
    Appreciate your hard work.
    p.s: liked , shared, subed ✅

  • @g4yktzgjx6
    @g4yktzgjx6 11 месяцев назад +3

    Video starts "Before you start writing a driver"
    Wait.. You skipped 6 steps. "Hello", "Subscribe", "Like", "Sponsor", "Basic shit you should know before even clicking the video", and "Thank you".
    Overall. Nice, short, and concise video. More of this please!

  • @Speed4Runs
    @Speed4Runs 11 месяцев назад +4

    It amazes me how someone can be both a CS geek and cute at the same time
    I've always been interested in drivers development, but despite having both hardware/electronics and kernel knowledge, I had no idea of where to start for drivers, ESPECIALLY on Windows. Thanks!

    • @nirlichtman
      @nirlichtman  11 месяцев назад +2

      Thanks for the compliment :)

    • @runninggames771
      @runninggames771 9 месяцев назад +8

      lmao bro got rizzed on a fucking driver tutorial

    • @Speed4Runs
      @Speed4Runs 9 месяцев назад +2

      @@runninggames771 could you believe it? Being weird and coding really bring the most unexpected parts of people

    • @gatonegro187
      @gatonegro187 8 месяцев назад

      eww gay

    • @felipemurta9160
      @felipemurta9160 6 месяцев назад

      @@runninggames771lmaoo

  • @rohitjacob803
    @rohitjacob803 4 месяца назад +1

    Finally someone decided to put out on a tutorial on writing windows driver instead of linux

  • @stefanosbek
    @stefanosbek 11 месяцев назад +5

    I absolutely love these. Short but informational.

  • @HarperLee1840
    @HarperLee1840 11 месяцев назад +5

    That's quality content I want on RUclips. Great video sir.

  • @GrindAlchemyTech
    @GrindAlchemyTech 11 месяцев назад +14

    You explain very well....the delivery is rare ....many videos I've watched...it's rare to get explanations that actually explain things if that makes sense... thank you ♌🙌🏽💗

  • @uschurch
    @uschurch 11 месяцев назад +5

    You have the best programming tutorials.👌If everyone made their tutorials as concise and terse RUclips could free half of its storage.😂

  • @chipling7367
    @chipling7367 8 месяцев назад +1

    Thank you so much Nir, that's the kind of video I enjoyed the most. Short and informative. No BS. Thanks again.

  • @dtikvxcdgjbv7975
    @dtikvxcdgjbv7975 9 месяцев назад +2

    I love Your work. Very helpful.
    You proved us that creating a driver is not a rocket science.
    Now some humorous stuff. When I saw the driver not stopping from executing, I expected that You'll like a true programmer make fun of it by saying: "OMG, how is this thing stopping?"

  • @orcofnbu
    @orcofnbu 11 месяцев назад +2

    i feel so lucky that i found this content. just wow

  • @abdullahtrees5204
    @abdullahtrees5204 11 месяцев назад +16

    This is an excellent video! To the point, concise and beautifully simple! Thanks a lot

  • @faustasazuolasbagdonas123
    @faustasazuolasbagdonas123 11 месяцев назад +4

    Short and straight to the point 👍. Subscribed.

  • @joab83
    @joab83 11 месяцев назад +10

    simple, concise and excellent for learning basic concepts!

  • @Acradasa
    @Acradasa 3 месяца назад

    i can't get enough of your content, it's that good!

  • @formlessone2807
    @formlessone2807 11 месяцев назад +5

    Well done - succinct, hits the important points. Thanks for this!

  • @Songfugel
    @Songfugel 6 месяцев назад

    Wow, this was an amazing video! so clear and so informative without skipping any steps (like sadly so many do) that are "obvious" to people who this every day

  • @jbray250
    @jbray250 11 месяцев назад +7

    Fantastic tutorial and well explained, subscribed and looking forward to more

  • @vladislavkaras491
    @vladislavkaras491 11 месяцев назад +1

    It was interesting to watch how to create a simple driver!
    Thanks for the video!

  • @HumanGamer
    @HumanGamer 11 месяцев назад +10

    I've been wanting to know windows driver dev for years and suddenly you make this video! Thank you. Would you be able to do more tutorials on windows drivers? For example, what about a driver for a virtual floppy disc or something? I'd love to see that.

    • @nirlichtman
      @nirlichtman  11 месяцев назад +11

      Yes, planning on more driver/kernel level videos, it's a very interesting subject :)

    • @sameerakhatoon9508
      @sameerakhatoon9508 11 месяцев назад +1

      @@nirlichtman would love to watch more on this

  • @pascalcoole2725
    @pascalcoole2725 8 месяцев назад

    Nir, thanks, i don't understand anything about MicroSoft Windows, running Linux since 1994 as wel as some UNICES. Your video however is the first interesting instruction on MicroSoft development i have ever seen.
    Main interesting thing is that you actualy show whats happening iso obfuscating the whole process using an IDE.

  • @none_of_your_business
    @none_of_your_business 11 месяцев назад +3

    Interesting, after 10 years of linux kernel programming, I never knew that windows also has something akin to dmesg, I also love how short and to the point this was. Kol hakavod.

    • @nirlichtman
      @nirlichtman  11 месяцев назад

      Toda! It's somewhat similar to dmesg but also different since dmesg shows you the kernel log buffer and the program dbgview just connects as a debugger to the user mode programs/kernel and shows you debug prints (although it does have a feature to log boot)

  • @complexity5545
    @complexity5545 6 месяцев назад

    I was trying to refresh making microsoft drivers. Good video.

  • @mattmurphy7030
    @mattmurphy7030 4 месяца назад

    This is exactly the kind of stuff I want to see. Thanks!

  • @alexandrohdez3982
    @alexandrohdez3982 11 месяцев назад +1

    Driver is complex, thank you 👏👏👏👏

  • @jonweinraub
    @jonweinraub 8 месяцев назад

    Really fantastic how the algorithm shows something I didn’t think I wanted to learn but now I do. Why though you needed the two voided parameters but wasn’t used on call with null unless I missed something. תודה

    • @nirlichtman
      @nirlichtman  8 месяцев назад +1

      That is just to follow the entry point signature according to the docs which specifies that the driver entry gets two parameters, I did not used the information passed into these parameters so I just ignored them.
      בכיף 🙂

  • @ciscornBIG
    @ciscornBIG 11 месяцев назад +1

    HELL YEAH! I'll check this out this later today. Thanks, broseph!

  • @emblink27
    @emblink27 8 месяцев назад +1

    Watched the video.
    Added driver development to my cv 😁

  • @progste
    @progste 11 месяцев назад +2

    Very well made and without wasting time!

  • @ilyastoletov
    @ilyastoletov 4 месяца назад

    Nice video. I certainly won't write any drivers for Windows but the commands' syntax of Windows shell is quite interesting, although similar to Linux

  • @BigA1
    @BigA1 11 месяцев назад +7

    Not being a full time programmer, I would like to see a 'Real World' example of what a driver is and what it can do, if that's possible?

    • @nirlichtman
      @nirlichtman  11 месяцев назад +4

      Yes, I plan on making a more general video about drivers as well :)

    • @TheNewKill1212
      @TheNewKill1212 11 месяцев назад

      I've been developing kernelmode driver for anti-cheat system, used assembly on x86 and ObRegisterCallbacks on x64. This is one of the examples.
      Another example is a device driver as you can access everything from kernel, you can for example ask PCI device directly.

  • @597das
    @597das 11 месяцев назад +14

    are you using a tiling window manager within windows? or do you just have multiple instances of a vm on different linux workspeces? if so, what tiling window manager are you using? I tried komorebi a few years back but it was pretty early in development back then.

    • @ardnys35
      @ardnys35 11 месяцев назад +3

      that looks like i3 and it's a nice wm for linux. seeing it on windows is kinda cursed but it got me curious too. anyways maybe give i3 a try, it's pretty easy to setup and configure

    • @nirlichtman
      @nirlichtman  11 месяцев назад +11

      @597das I use a port of Suckless dwm for Windows called dwm-win32, more information on the vid about my setup

  • @GuildOfCalamity
    @GuildOfCalamity 11 месяцев назад +1

    Never seen this explained so succinctly, bravo!
    Could you do another tutorial for creating a driver to talk to a USB device?

    • @nirlichtman
      @nirlichtman  11 месяцев назад +1

      Thanks! Noted, that is a good idea :)

  • @sinaghaderi9184
    @sinaghaderi9184 11 месяцев назад +1

    Nice video 👍🏼 Ps: now i understand the beauty of the linux kernel.. way more cooler and easier to write a kernel module 🧑‍💻

  • @indianbandhu
    @indianbandhu 11 месяцев назад

    Holy Sh**!...Dam it so precise, so concise tutorial..freaking amazing!!!🤩

  • @m.gredemptor2610
    @m.gredemptor2610 11 месяцев назад

    Man after looking at C-Drive for 20 years, your title just gave me a brain fart 😂.

  • @illusoryknowledge9307
    @illusoryknowledge9307 6 месяцев назад

    The couple cringe comments bashing Vim or C is laughable and makes one question if they even know programming.
    Great video, most have sought profit by means of their 20 minute diatribes, inefficiently transmitting that thing called knowledge. This is a pleasant contrast.

  • @netanelkomm5636
    @netanelkomm5636 11 месяцев назад

    הופתעתי ושמחתי באותו זמן לגלות שאתה ישראלי כשראיתי ״שבת, 02 דצמבר״ :)

  • @gaeshows1938
    @gaeshows1938 11 месяцев назад +5

    It’s better to debug your driver inside a VM to avoid having to restart your PC every time you get a BSOD

    • @paradoxicalcat7173
      @paradoxicalcat7173 4 месяца назад

      The first time I wrote a Windows driver I didn't BSOD the machine once. Driver dev isn't for you if you can't handle memory.

  • @kern776
    @kern776 11 месяцев назад +2

    You are ANGEL!! Thank you buddy, i suscribed )) thanks

  • @michaeldonoghue9015
    @michaeldonoghue9015 9 месяцев назад

    Great video. I would just add that you should always wear your seatbelt when writing a driver. Safety first.

  • @tamirrothschild
    @tamirrothschild 11 месяцев назад +1

    לא יודע איך הגעתי לפה אבל כל הכבוד לך ובהצלחה עם הערוץ

  • @test-rj2vl
    @test-rj2vl 11 месяцев назад

    If you just want to play around and learn I would suggest using VirtualBox or VMware or something similar. Then you don't have to restart. Also if you brick your computer like infinite boot loop or something then with VM you just restore previous snapshot and you are ready to go again.

  • @defaultentertainment697
    @defaultentertainment697 11 месяцев назад

    nice albums on the wall man, starset and breaking benjamin.

    • @nirlichtman
      @nirlichtman  11 месяцев назад +1

      Thanks! 🤘

    • @defaultentertainment697
      @defaultentertainment697 11 месяцев назад

      @@nirlichtman i religiously listen to downplay's saturday album on every saturday, starting with it's saturday song.

    • @nirlichtman
      @nirlichtman  11 месяцев назад +1

      @@defaultentertainment697 Nice song! has some early Breaking Benjamin vibes :) I like the original Downplay version of Dark on Me

  • @Rombizio
    @Rombizio 6 месяцев назад

    The cmd prompt to compile this alone make me cry. The extra steps to make it work put me in fetal position.

  • @saecula2391
    @saecula2391 4 месяца назад

    Klasse Video Vielen Dank, kurz und kompakt ... btw Ich benutze u.a. Visual Studio hauptberuflich ✨

  • @HimanshuShekhar1
    @HimanshuShekhar1 8 месяцев назад

    This is super awesome channel. Thank you

  • @kinershah464
    @kinershah464 6 месяцев назад

    Awesome, nice and simple. 👍

  • @siiiiiiiiiiiiiiiiiuu
    @siiiiiiiiiiiiiiiiiuu 3 месяца назад

    did this guy just entered PC godmode? yes!

  • @bgill7475
    @bgill7475 11 месяцев назад +2

    Excellent and straight to the point, thank you very much! 🙂

  • @gregorymccoy6797
    @gregorymccoy6797 11 месяцев назад

    Good video. Very clear

  • @MNE-yk8vp
    @MNE-yk8vp 11 месяцев назад

    no intro, no curve ball, just straight nerd-ery

  • @strange1702
    @strange1702 11 месяцев назад +2

    would be cool to see c++ version of drivers as well as how to sign a driver (:

    • @0o29k2
      @0o29k2 7 месяцев назад

      just write ur code in c++, cl is a c++ compiler

    • @paradoxicalcat7173
      @paradoxicalcat7173 4 месяца назад

      C++ isn't supported in kernel driver development as it uses memory in ways kernel mode drivers can't support due to the nature of memory management in the kernel.

    • @strange1702
      @strange1702 4 месяца назад

      @@paradoxicalcat7173 tf you talking about, it is supported, i have been writing kernel drivers for a decade now in c++ obviously...

    • @strange1702
      @strange1702 4 месяца назад

      @paradoxicalcat7173 literally usermode functions such as readprocessmemory is streamed from kernel... what you said is basically "i cant read this book, because its in French, and translations are impossible"

  • @muzairafzal1529
    @muzairafzal1529 11 месяцев назад

    Great work brother

  • @WhileTrueCode
    @WhileTrueCode 5 месяцев назад

    years ago when making my first USB device with microchip PIC i started to get into driver development.
    guess i got in at the wrong time... when windows decided "remember when we popped up a box asking if you want to install unsigned driver? tough luck; now we won't let you at all"
    requiring an end-user to do that stupid advanced troubleshooting startup option (for every reboot) completely stifled my hope for making any sort of custom product. thanks MS for keeping us "safe".

  • @nostromza3433
    @nostromza3433 11 месяцев назад +1

    How do you sign the driver?

  • @DrVektor
    @DrVektor 11 месяцев назад

    Thank you for this example.

  • @DeadCat-42
    @DeadCat-42 6 месяцев назад

    I used to make all kinds of genetic print drivers for hp laser printers to get around the bloat ware they pushed.

  • @TobyAdd
    @TobyAdd 11 месяцев назад

    awesome video!

  • @RiadAhmed-ce6qo
    @RiadAhmed-ce6qo 5 месяцев назад

    Nice one 👍 is that working with hive and hardware abstraction layer ?

  • @soyysaucceee
    @soyysaucceee 11 месяцев назад

    Nice video! deserve likes and subs

  • @karlm9584
    @karlm9584 11 месяцев назад +1

    This is great thank you. I never knew how to create services like that. Would that service also show up in Windows services?

    • @nirlichtman
      @nirlichtman  11 месяцев назад +2

      It won't show up in the services application since it is technically not a service but a kernel driver (I ran sc with type= kernel), SC supports also creating and loading drivers and calls them also "services" but you can see it is a driver by looking at the type (with sc query for example) and seeing that it says "KERNEL_DRIVER".

  • @DroneMothership
    @DroneMothership 11 месяцев назад +1

    Solid bro!!

  • @kamugishajoseph6467
    @kamugishajoseph6467 9 месяцев назад

    The precise video about drivers development.
    Can you continue and create executable file for driver ?

  • @MrChrisRP
    @MrChrisRP 11 месяцев назад

    Nasty, dude. Rock! You make the NirSoft stuff? Just wondering, with the coincidence in names is all. I like those tools a lot myself and use them since forever. Same with Russinovich's stuff.

    • @nirlichtman
      @nirlichtman  11 месяцев назад +1

      NirSoft is not me :)

  • @Zpicismrad
    @Zpicismrad 9 месяцев назад

    awesome, subscribed!

  • @深夜酒吧
    @深夜酒吧 11 месяцев назад +2

    how to get your driver certified by ms? how much money does it take to do that?

  • @binks3371
    @binks3371 11 месяцев назад

    can you do more driver videos ? Like how to write a simple filesystem driver.

    • @nirlichtman
      @nirlichtman  11 месяцев назад

      Yes, more driver videos are planned :)

  • @joaomatos6172
    @joaomatos6172 11 месяцев назад +2

    nice video

  • @Veso266
    @Veso266 11 месяцев назад +1

    Nice
    Would love to see a more detail video like how to comunicate with a driver from ur user program
    Suppose u are making a device driver, so how would u get data in and out of it with ur user program so u could comunicate with a device on the other side of a driver?

    • @nirlichtman
      @nirlichtman  11 месяцев назад +1

      That is a good idea for a future video, thanks :)

  • @treddwarf
    @treddwarf 4 месяца назад

    great video

  • @SMFJose
    @SMFJose 11 месяцев назад

    Thanks for sharing

  • @samas69420
    @samas69420 10 месяцев назад

    I loved this video

  • @fabiosarts
    @fabiosarts 11 месяцев назад

    I just tried the guide on Windows 2000 with its own WDK, it compiled pretty well. Unafotunately i couldn't try it since i couldn't add the sevice, as there's no sc command on that version :O

    • @nirlichtman
      @nirlichtman  11 месяцев назад

      Nice! Yah sc is only included with WinXP or higher but maybe you can try loading it with the registry

  • @joseloeza371
    @joseloeza371 11 месяцев назад

    Excellent video thanks

  • @antoniothomacelli
    @antoniothomacelli 9 месяцев назад

    Thank you for share.

  • @ibrahimzitouni5191
    @ibrahimzitouni5191 11 месяцев назад

    Very good video

  • @lucasmachadozainote32
    @lucasmachadozainote32 11 месяцев назад

    Omg this is mind blowing

  • @bitterbob30
    @bitterbob30 5 месяцев назад

    I'll take "World's most complicated and convoluted Hello World program, for $1,000"

  • @ZuvielDrama
    @ZuvielDrama 11 месяцев назад

    Thank you ❤

  • @SeanChYT
    @SeanChYT 11 месяцев назад +1

    Is there any way to install custom certificates or anything so that we can sign our own drivers? Disabling driver signature verification permanently is becoming very difficult on modern Windows versions if I remember correctly. It used to be easier.

  • @garlic-os
    @garlic-os 11 месяцев назад

    Subscribed. Can you make a Windows Shell Extension next?

    • @nirlichtman
      @nirlichtman  11 месяцев назад +1

      Thanks :) Yes, that's a good idea for the next Windows video!

  • @drakouzdrowiciel9237
    @drakouzdrowiciel9237 11 месяцев назад

    Good job ;)

  • @jackgerberuae
    @jackgerberuae 11 месяцев назад +2

    What would you do with a driver though. All hardware drivers are supplied by MS or the vendor, right?

    • @dylanh333
      @dylanh333 11 месяцев назад +3

      Access and manipulate kernel data structures normally not available in userland, implement file system filters, hook system calls, etc.
      The term "driver" in Windows tends to more generically refer to kernel modules (in Linux terminology), rather than just stuff for "driving" actual hardware.
      That said, you do also have some "user-mode drivers" that *are* for driving hardware, and don't run in kernel mode ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

    • @jackgerberuae
      @jackgerberuae 11 месяцев назад +1

      @@dylanh333 that is a very clear explanation, thank you 🙏

  • @josephdaquila2479
    @josephdaquila2479 2 месяца назад

    I don't seem to be seeing the "km" folder. I'm wondering if there was something I had to do beforehand to gain access to that folder. I see a "um" folder, presumably "user mode".
    EDIT: followed the guide for downloading the SDK and the WDK and we're good now.
    I guess what was already installed in the directory only included the user mode directory "um".

  • @kcirtaP69
    @kcirtaP69 11 месяцев назад +1

    If "sc create driverName binPath= C:\path\to\driver.sys type= kernel" is giving you an error try using sc.exe

  • @ohioisbruh
    @ohioisbruh 11 месяцев назад +1

    Just have a doubt... How to implement this driver onto a device... cuz today most devices are plug & play...

  • @adiyogi1003
    @adiyogi1003 11 месяцев назад

    Nice bro

  • @midjhelins8383
    @midjhelins8383 9 месяцев назад

    nice and curiously