Nir Lichtman
Nir Lichtman
  • 106
  • 1 704 395

Video

Drawing Graphics with C and Windows API is Easy
zhlédnutí 12KPřed 9 hodinami
In this video I will demonstrate basic usage of Windows GDI to draw graphics on the screen. Code: github.com/nir9/poc/blob/master/win/draw.c
Making Minimal Linux Distro with Buildroot
zhlédnutí 15KPřed 19 hodinami
In this video I will demonstrate how you can use Buildroot to create a simple x64 Linux distro Dependencies (Ubuntu packages): apt install g make libncurses-dev unzip bc bzip2 libelf-dev libssl-dev extlinux
Making a Very Minimal Windows Executable in C
zhlédnutí 60KPřed 14 dny
In this video I will demonstrate how you can instruct the Visual Studio linker to produce a very minimalist executable You can get the reverse engineering software that I use in the video by running "winget install Rizin.Cutter"
Screwing Up Linux Kernel Keyboard Driver
zhlédnutí 23KPřed 14 dny
Screwing Up Linux Kernel Keyboard Driver
What Happens When Booting Linux with Low Memory
zhlédnutí 59KPřed 21 dnem
In this video I will demonstrate how Linux reacts when it boots with too little memory. Documentation used in video: Kernel Docs - SysReq: docs.kernel.org/admin-guide/sysrq.html Wikipedia ASLR: en.wikipedia.org/wiki/Address_space_layout_randomization
How Windows API Works Under the Hood
zhlédnutí 13KPřed 28 dny
In this video we will follow a Python open file function call all the way to the native API of Windows. Tools: - windbg - winget install windbg - Visual Studio Build Tools - Python 3.10 IDLE Docs used in video: NtDoc (unofficial) - ntdoc.m417z.com/ntcreatefile Win32 Docs (official) - learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew Python 3.10 docs - docs.python.org/3....
What Happens When Linux Runs Out of Memory?
zhlédnutí 52KPřed měsícem
In this video we will explore how Linux reacts to a low memory situation. Kernel documentation article from video: www.kernel.org/doc/gorman/html/understand/understand016.html
30 Beginner Vim Commands in 7 Minutes
zhlédnutí 6KPřed měsícem
30 Beginner Vim Commands in 7 Minutes
How does a USB keyboard talk with your computer?
zhlédnutí 17KPřed měsícem
In this video I demonstrate how you can sniff USB packets and identify the packets coming from the keyboard. Installations: - usbpcap - winget install usbpcap - wireshark - winget install wireshark Docs: - OSDev Wiki HID page -wiki.osdev.org/USB_Human_Interface_Devices
Making Minimalist Web Server in C on Windows
zhlédnutí 6KPřed měsícem
In this video I will demonstrate how to make a simple web server in C on Windows using Windows Sockets (winsock). Code: gist.github.com/nir9/2db83a89c18a8add1e705710e9303208
Quick Look at FreeBSD
zhlédnutí 15KPřed měsícem
Quick Look at FreeBSD
Reverse Engineering Simple Windows Driver
zhlédnutí 6KPřed měsícem
In this video I will demonstrate how you can reverse engineer a simple "Hello, World" driver on Windows 10. Dependencies: - Cutter: winget install Rizin.Cutter - Windows Debugger (windbg): winget install Microsoft.WinDbg Docs: - DbgPrint: learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-dbgprint - COM Port Kernel Debugging: learn.microsoft.com/en-us/windows-hardware/drivers/deb...
Making Your Own Simple Man Page
zhlédnutí 4,5KPřed měsícem
Making Your Own Simple Man Page
The Importance of Resource Cleanup in C
zhlédnutí 5KPřed 2 měsíci
In this video I will explain the importance of cleaning up resources when programming C. Dependencies: - lsof (can be obtained with your package manager for example in Ubuntu/Debian run "apt install lsof")
Windows API Window Messages Explained
zhlédnutí 3,1KPřed 2 měsíci
Windows API Window Messages Explained
Making Snake Boot Sector Game in Assembly (x86)
zhlédnutí 9KPřed 2 měsíci
Making Snake Boot Sector Game in Assembly (x86)
Making Minimalist Web Server in Assembly on Linux (x64)
zhlédnutí 34KPřed 2 měsíci
Making Minimalist Web Server in Assembly on Linux (x64)
Windows API Memory Mapped Files Explained
zhlédnutí 5KPřed 2 měsíci
Windows API Memory Mapped Files Explained
Making Simple Shared Object (.so) in C on Linux
zhlédnutí 7KPřed 2 měsíci
Making Simple Shared Object (.so) in C on Linux
3 Cool Bash Tricks (Jobs, Debugging Scripts, Math)
zhlédnutí 5KPřed 2 měsíci
3 Cool Bash Tricks (Jobs, Debugging Scripts, Math)
Windows Kernel Debugging Introduction
zhlédnutí 6KPřed 2 měsíci
Windows Kernel Debugging Introduction
Making Simple Graphical Linux Distro from Scratch
zhlédnutí 46KPřed 2 měsíci
Making Simple Graphical Linux Distro from Scratch
Making Tiling Window Manager in C on Windows
zhlédnutí 33KPřed 3 měsíci
Making Tiling Window Manager in C on Windows
Using Vim Like a Chad
zhlédnutí 8KPřed 3 měsíci
Using Vim Like a Chad
Making Minimalist Chat Server in C on Linux
zhlédnutí 38KPřed 3 měsíci
Making Minimalist Chat Server in C on Linux
Making Driver That Blue Screens Windows using C
zhlédnutí 5KPřed 3 měsíci
Making Driver That Blue Screens Windows using C
Making Simple GUI Window in C on Windows
zhlédnutí 17KPřed 4 měsíci
Making Simple GUI Window in C on Windows
Making Simple X11 GUI Window in C on Linux
zhlédnutí 20KPřed 4 měsíci
Making Simple X11 GUI Window in C on Linux
Adding Simple System Call in Linux Kernel
zhlédnutí 11KPřed 4 měsíci
Adding Simple System Call in Linux Kernel

Komentáře

  • @nirlichtman
    @nirlichtman Před 2 hodinami

    - For more information about how the guard pages are used in the kernel to detect stacko check out this article from the kernel docs docs.kernel.org/mm/vmalloced-kernel-stacks.html - In this video I demonstrate with x64, but on other architectures (like ARM for example) this may work differently

  • @Onyx-it8gk
    @Onyx-it8gk Před 3 hodinami

    Can you make a small Linux distro with the Rust coreutils?!!!

  • @vantavoids
    @vantavoids Před 4 hodinami

    im so glad to not be the only one that has the kind of intrusive thoughts that makes you wanna stack overflow a kernel

  • @roz1
    @roz1 Před 5 hodinami

    Hi @Nir Licthman this is a wonderful video... Can u make a sereis on the linux kernel internals the code walk through and steps that the kernel takes from start to finish

    • @nirlichtman
      @nirlichtman Před 2 hodinami

      Yes I plan on also making videos about the boot process focusing on a specific subsystem each time

    • @roz1
      @roz1 Před hodinou

      @@nirlichtman Thank you so much ❤️ That would mean a lot to all of the people here .... Again Thank you

  • @kpjVideo
    @kpjVideo Před 5 hodinami

    Another excellent video! Keep up the content man this is great stuff

  • @pingu0b
    @pingu0b Před 7 hodinami

    Are you using WSL in the video ?

    • @rishaydutt812
      @rishaydutt812 Před 4 hodinami

      He is

    • @pingu0b
      @pingu0b Před hodinou

      @@rishaydutt812 thanks. i just had a doubt cuz it looked a bit different then usual wsl

  • @Maric18
    @Maric18 Před 8 hodinami

    lol i was kind of expecting an angry linus mail about people doing like mid tier coding advice in merge requests to the kernel like stack overflow

  • @angelffg
    @angelffg Před 8 hodinami

    Good video!!!! Nir, I have a question please: I run this program on Windows and Linux, on Linux it takes less than 1 second and on Windows it takes almost 2 minutes. Why does that happen? #include <stdio.h> #define MAX 1000000 int main(int argc, char *argv) { int i; for(i=1;i<=MAX;i++) { printf("%d ",i); } printf(" "); return 0; } Thanks for anything you can support.

  • @Agesilas2
    @Agesilas2 Před 9 hodinami

    11:23 cp $(ldd nano-X | awk '!/ld-linux|vdso/ {print $1}' | xargs) /distro/lib/x86_64-linux-gnu/

  • @aviinl1
    @aviinl1 Před 9 hodinami

    curious what happens if you comment out that call to `die` and `panic`

    • @Ed.E
      @Ed.E Před 9 hodinami

      Memory corruption, CPU memory exceptions

  • @wrestelman1
    @wrestelman1 Před 10 hodinami

    Detected😢

  • @A5A5A5A5h
    @A5A5A5A5h Před 10 hodinami

    Try make a video where you disable the ISR(Interrupt service routine) in charge to manage division by zero, then try to run such division in user space and see what happens.

    • @paulstelian97
      @paulstelian97 Před 10 hodinami

      Well obviously the CPU can't handle it so the ISR is triggered. So it depends on _how_ you remove it. Remove the code in it? Handler does nothing, you have a CPU bound infinite loop that the scheduler can still deal with. Remove it from the ISR table? Kernel panic (double fault -- invalid ISR entry). You can also try to not change the kernel and register a signal handler for SIGFPU in the userspace, and if you do nothing in that you're gonna again have the infinite loop.

  • @AntonioDoesMetal
    @AntonioDoesMetal Před 11 hodinami

    Such a fun video, I’ve never really thought too much about kernel issues like this. It’s very easy to forget it even exists and has to follow the same rules when developing user mode software

  • @BenjaminWheeler0510
    @BenjaminWheeler0510 Před 11 hodinami

    It’s pronounced qemu.

  • @BenjaminWheeler0510
    @BenjaminWheeler0510 Před 11 hodinami

    I’d be interested about what the convention is for kernel dev. I presume kernel maintainers generally avoid recursion?

    • @pachinger
      @pachinger Před 11 hodinami

      Same thought here… also, does that mean kernel code is always free of any warnings?

    • @Ed.E
      @Ed.E Před 9 hodinami

      @@pachingeryes, though the rules are set up so any irrelevant warnings may be changed to notes or discarded

    • @paulstelian97
      @paulstelian97 Před 2 hodinami

      Generally no recursion, though in some situations you do get some (btrfs for example uses up a lot of stack space)

  • @BenjaminWheeler0510
    @BenjaminWheeler0510 Před 11 hodinami

    Kernel panic attack :(((

  • @ayyyylmao-rg3ik
    @ayyyylmao-rg3ik Před 11 hodinami

    Thank you for showing so many interesting stuff on your channel, a peak into the inner workings of things is always great.

  • @Nunya58294
    @Nunya58294 Před 12 hodinami

    It makes me happy to see new comers try this stuff out; It's how you learn and become better at programming, etc

  • @ABCABC-sw8mh
    @ABCABC-sw8mh Před 12 hodinami

    Nice vid, looked similar vid a few weeks ago. Simple, good understandable, short, nice vid Thanks Nir

  • @bramfran4326
    @bramfran4326 Před 12 hodinami

    cool !

  • @DimDima09
    @DimDima09 Před 12 hodinami

    Hi! what will happen if you remove die() or other interruption in kernel code? what would happen on StackOverflow?

    • @BenjaminWheeler0510
      @BenjaminWheeler0510 Před 11 hodinami

      I imagine it would just go “off into the weeds” since it has no way to handle an unrecoverable error

    • @Ed.E
      @Ed.E Před 9 hodinami

      @@BenjaminWheeler0510technically it could keep going but it’s likely memory corruption would cause either an infinite loop or a number of CPU exceptions

    • @gwentarinokripperinolkjdsf683
      @gwentarinokripperinolkjdsf683 Před 5 hodinami

      If you remove the handler for CPU exceptions, they generate a double fault, if you remove that, or the code for it is unreachable (for instance, you get a segmentation fault when trying to reach that code) then it will generate a triple fault and reboot your machine

  • @zawadhyaa
    @zawadhyaa Před 13 hodinami

    Next video create a kernel module from scratch but something interesting, like a kernel mod to put a camera filiter or a voice filter or a custom keyboard mapping something like that would be really fun

    • @Nunya58294
      @Nunya58294 Před 12 hodinami

      It's actually possible I had found an article on it. You can make a module without needing the kernel sources

    • @zawadhyaa
      @zawadhyaa Před 3 hodinami

      @@Nunya58294 no that I know, my focus was on the second part

  • @user-br6ku7jj6n
    @user-br6ku7jj6n Před 13 hodinami

    I love your videos, straight to the point

  • @Paolog_
    @Paolog_ Před 13 hodinami

    the only problem that we can't solve when beeing root

    • @Nunya58294
      @Nunya58294 Před 12 hodinami

      Sometimes you need to be root for this stuff...

  • @ProSureStrings
    @ProSureStrings Před 13 hodinami

    hi!

  • @kinershah464
    @kinershah464 Před 16 hodinami

    Wow, this was so simple and nice explanation. I knew GDI but thought it was too low level, but this is so cool. You also explained how to use cmd tool cl.exe and how to refer to microsoft docs. Please make more videos on GDI. Maybe two series, one that covers creating a UI using GDI, other that shows how to make a simple game using GDI.

  • @szabotudor
    @szabotudor Před dnem

    Is that a tiling WM thing in windows lol?

    • @nirlichtman
      @nirlichtman Před 17 hodinami

      Yes, I am working on one called LightWM

  • @ismbks
    @ismbks Před dnem

    The only man that programs on Windows like it's 1990 UNIX.

  • @yash1152
    @yash1152 Před dnem

    oh lol, i am not going to watch 10 next videos in the playlist all generically titled "cool commands to save time" 🤣😂 i am not sure there's much that can be done about it though..

  • @yash1152
    @yash1152 Před dnem

    0:53 python's pudb is good. rest all (gdb, chrome web tools, python's default pdb) suck one way or the other. or, jetbrains' ide (intellij, pycharm, etc) debuggers are good too. they too don't throw much at the editor, rather focus on making the data (values, variables etc) while debugging to be easier to access and watch

  • @yash1152
    @yash1152 Před dnem

    that's where novim shines. its client-server abilities allow to use it kinda native, rather than in an emulation. i am not saying though that it is as good as vanilla novim.

  • @yash1152
    @yash1152 Před dnem

    0:24 what i don't understand is, why the lower case `i` or `a` etc don't work in the visual mode? or otherwise say, which others are there which work? `c`, `I`, `A` ... what else?

  • @yash1152
    @yash1152 Před dnem

    it doesn't seem to be working in neovim v0.10.0-dev-3078

  • @AbdullahALSHRIQI
    @AbdullahALSHRIQI Před dnem

    عجيب جدا يا انك فاضي

  • @SojournerDidimus
    @SojournerDidimus Před dnem

    My tiniest executable ever was 20 bytes, it set the terminal width from 25 to 50 lines.

  • @nil0bject
    @nil0bject Před dnem

    what is the real reason people still use windows?

  • @yorimirus
    @yorimirus Před dnem

    Wow. Didn't know you can draw stuff without a window on windows. Not sure what it would be useful for but that's pretty cool.

  • @jamesross3939
    @jamesross3939 Před 2 dny

    Nice! Liked and Subscribed!

  • @user-bd1dh7hh1j
    @user-bd1dh7hh1j Před 2 dny

    I cannot stress enough how much I love straight-to-the-point-no-bs videos such as yours.

  • @trwwrt5687
    @trwwrt5687 Před 2 dny

    Sending email with c please 😢

  • @trwwrt5687
    @trwwrt5687 Před 2 dny

    Sending email with c please 😢

  • @gerolifium
    @gerolifium Před 2 dny

    how can we implement uefi boot using buildroot?

    • @gerolifium
      @gerolifium Před dnem

      i am currently compiling buildroot after navigating cluelessly through the menuconfig and enabling support for iw(,d), nano, uefi using grub, ext4 filesystem, htop, git, and other stuff i forgot. I hope i can succeed.

  • @18sohamkulkarni95
    @18sohamkulkarni95 Před 3 dny

    This is very cool but how to add a config file syslinux.cfg in this process??

  • @GentleMannOfHats
    @GentleMannOfHats Před 3 dny

    You make such intresting videos!

  • @glewfw7989
    @glewfw7989 Před 3 dny

    do one with winrt

  • @anon_y_mousse
    @anon_y_mousse Před 3 dny

    That was even faster and easier than Rob Landley's video on a minimal Linux, nice!

  • @oof-software
    @oof-software Před 3 dny

    I like to use zsh with oh-my-zsh and as plugins zsh-autosuggestions and fzf zsh-autosuggestions always shows the CTRL+R thing while you're typing (but in a muted color) fzf makes the CTRL+R thing nicer by showing a list of matches that you can scroll through (and other things)

  • @baranjan6969
    @baranjan6969 Před 3 dny

    Why is buildroot suddenly a minor trend 90% of my recommendations are about buildroot

  • @itmemo8617
    @itmemo8617 Před 3 dny

    Simple and short . Exactly what i was looking for

  • @umathefurry
    @umathefurry Před 3 dny

    ur funny