unlock the lowest levels of coding

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I get asked all the time in stream you know if I were to start over again and have to relearn all the stuff that I know what would I do today to learn about the lowest level for those of you that don't know my name is low level learning my day job I'm a security researcher but on the internet I teach people how to code in languages like C and teach them how computers work through languages like assembly and others if you're new here welcome to the channel hit that sub button and let's learn how to be lowlevel together so how would I get from zero to lowlevel as fast as possible thought about this question really hard and I came up with the following three answers three things that I would do today to get good at the low level starting with number one code in a lowlevel language this probably goes without saying but if you know how to code right now maybe you know how to code in python or Ruby or God forbid JavaScript I would say take that knowledge of programming and go and learn a language that gives you raw unfettered access to the memory of your process space and the language I recommend for that is the c programming language I know there's a lot of talk and I talk about this a lot on my YouTube channel if C is the appropriate language for the future when it comes to systems programming I think that rust eventually will take over for C we're not talking about that today in this video I want to talk about why C is the best language to learn with also we're not going to get into the holy war of whether or not C is a high or low-level language for the purposes of this video C is a low-level language discussed in the comments learning to code effectively in C forces you to learn effective memory management it forces you to learn how to write code that is bulletproof because if you don't the code will just inherently be unsafe there are lots of things you have to do in C to not leak memory to not give your code access to hackers and to not have the crash the code just crash whenever it runs the number one project I tell people to write when they're trying to learn to code maybe they know the language but don't have a project to go after is to write an HTTP server and I know that sounds fairly Advanced for somebody who may be new to a language but it will teach you not only the ins and outs of the HTTP RFC but a lot of really important things about programming for example when you're writing the HTTP parser you have to not only write the code that adheres to the RFC but then you also have to think of your code defensively you're going to be inprocessing and reading code from literally anybody on the internet you have to treat your code as if it's being attacked you have to code defensively writing an HTTP server will allow you to get really familiar with how to read the documentation of language you're not just going to know the networking stack off the top of your head you have to learn how to read Man pages read documentation and read how return values work in the language of your choosing I think learning C teaches you how computers work at a fairly high level so go and take your programming knowledge and learn a language like C as step one step two go learn an assembly variant I'm not saying you have to be some wizard who can just look at an assembly blob and tell you exactly what's going on as fast as possible I am saying that knowing an assembly variant and knowing how the CPU works at the instruction level gives you a really really good understanding of how your code is going to behave and also if you can look at a blob of c and figure out basically how it's going to happen under the hood in the CPU architecture it gives you a superpower in choosing what code you make and deciding how to design your code so that it performs better the best way you can learn assembly right now is by taking this snippet of C code and I'll put it in the description below and go and compile that in if you can object dump this piece of code go to the main function and in reverse engineer how it works you will learn the basic 101 of that CPU architecture and that will give you a significant advantage on how things work and number three once you've learned how to code in a low-l language once you've begin to understand when you write that low-l code what architecture code gets spit out by the compiler and generally how the architecture works I recommend learning the basics of reverse engineering now now this pays off in a number of ways one maybe your job is just a malware reverse engineer maybe you're a Bug Hunter looking for bugs and taking binaries apart or maybe you're just somebody who is looking at code and you can't figure out why it doesn't work learning the basics of reverse engineering will teach you fundamentally not only how things work but how things are engineered and what the final output of the compiler will be also when you do reverse engineering challenges typically they're all based around a specific thing that you should know or like a specific fact like maybe it has to do with the Trap flag in the Intel CPU or maybe it has to do with the global offset table all these challenges teach you a little thing that you can kind of put into your toolbox of knowledge that over time you'll just begin to H have a holistic picture of how binaries are how binaries are constructed in the Linux operating system for example and I highly recommend going to crack. one this is not sponsored this is not an ad it's just a website that I like where there are people who write reverse engineering challenges and you can download them run them on your computer run them in a VM because you have no idea if the code is mici or not um but I think these challenges are really cool and an easy and fast way to learn the skills of reverse engineering and ultimately one of the lowest level techniques and then finally actually number four secret bonus um I think that another way to get really good at low level stuff is to pick up a board to learn to write C on that board so this for example is an stm32 it's an arm-based board this is the stm32 F7 nucleo if you can learn C if you then learn an assembly architecture if you can then get that c code to run on a specific architecture of microcontroller so again be it like an STM maybe an Arduino or risk vbo an esp32 something like that it will give you the ability to read a data sheet to understand how to interpret that data sheet and how to crossport your code to a board that can run somewhere else as Computing gets more advanced as computers get older and older and they get more technologically Superior as time goes on I feel like we lose touch with how CPUs work at a basic level I can literally take out my iPhone and access any information that I need to in the world and the whole Magic of what's going on we literally tricked rocks into thinking I think it's kind of lost on us so part of what I made this YouTube channel to do is to teach people and remind people that you know how computers work and to make sure that we have a cohort of people moving on into the future that once the gray beards of the world the line of TS of the world that built these systems move on and possibly pass away you know we have the second generation of low-l Architects that that know how CPUs work so if you think that's cool or you enjoyed this video or you want to be a part of that cohort hit that sub button really appreciate it and uh yeah we'll see you guys on the next video you can go check out this other video that I made about an interview question that I got asked it was really cool and it taught me a lot about how CPUs work you can go find that out right there see you guys
Info
Channel: Low Level Learning
Views: 236,035
Rating: undefined out of 5
Keywords: malloc, c programming, c++, memory allocators, heap
Id: 97i2BAUw5Xc
Channel Id: undefined
Length: 7min 5sec (425 seconds)
Published: Wed Feb 07 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.