Dangerous Code Hidden in Plain Sight for 12 years

Поділитися
Вставка
  • Опубліковано 7 кві 2022
  • In this episode we'll explore a local privilege escalation vulnerability in polkit's pkexec.
    🐶 Snyk is free forever. Sign up with my link snyk.co/pwnfunction
    ⭐ Code + All Resources: github.com/PwnFunction/CVE-20...
    ✨ Info
    ➜ Tools used are: Adobe Animate, Adobe Premiere Pro, Adobe Illustrator & Adobe Auditions.
    ➜ VSCode: Monokai Pro Theme, Jetbrains Mono Font, SF Mono Font.
    ➜ Video Production time: 80-ish hours.
    ➜ About 2.5L of Almond milk were consumed during the video creation.
    💬 Discord: / discord
    🐤 Twitter: / pwnfunction
    🎵 Track: Lost Sky - Dreams
    NCS link: • Lost Sky - Dreams | Tr...

КОМЕНТАРІ • 1,1 тис.

  • @PwnFunction
    @PwnFunction  2 роки тому +2877

    BRUH

  • @56independent42
    @56independent42 2 роки тому +1440

    0:13
    "Pretty cool, right?" As a person who operates a web-facing server, this is terrifying. No coolness. Just pure terror.

    • @gg-gn3re
      @gg-gn3re 2 роки тому +63

      Why do you run a desktop environment on your web facing server? Why do you also allow users to login to that server? These are 2 requirements of your server in order to do this exploit. There is a reason it wasn't patched 10 years ago when it was found.

    • @ChrisD__
      @ChrisD__ 2 роки тому +51

      @@gg-gn3re They're just reacting to the first bit, not the whole video.

    • @56independent42
      @56independent42 2 роки тому +54

      @@gg-gn3re It's not that. It's the mentality you gain from it.

    • @leroyjenkins1911
      @leroyjenkins1911 2 роки тому +19

      Calm down bro, before you can escalate privileges you need to gain access to the system. If your server has minimal security measurements (no public ssh availability, key authentication), you should‘t be worried about this

    • @iagod6660
      @iagod6660 2 роки тому +36

      @@leroyjenkins1911 if you're saying this i suspect you didn't quite see log4j "recent" exploit right? i'll just imagine that you didn't.

  • @Rotem_S
    @Rotem_S 2 роки тому +1139

    I have a fix for this: simply block any access to folders/files containing "pwn" in their names. I'll collect my Turing award now thank you very much

    • @AndrewTSq
      @AndrewTSq 2 роки тому +348

      Simplest things would be to give all users root-access, then they would not try todo this. I will wait for my Nobel Prize.

    • @raz0229
      @raz0229 2 роки тому +38

      Wouldn't it be easier to just throw an OutOfBounds exception if encountered 'null' while reassigning path in pkexec.c

    • @pizzarella985
      @pizzarella985 2 роки тому +106

      @@AndrewTSq If everyone is a root user, then no one is a root user. Simple!

    • @scoreunder
      @scoreunder 2 роки тому +52

      @@raz0229
      1. C doesn't have exceptions
      2. the value was not null at the time
      3. argc must be used to check bounds, and that is the correct solution here

    • @Glosm
      @Glosm 2 роки тому +35

      i have a simpler fix: just destroy your pc and boom they cant hack it anymore

  • @aditya.ishan27
    @aditya.ishan27 2 роки тому +1981

    Really very nice explaination as always man!! As a software engineer I really learn a lot about security from you and LiveOverflow guy!.. my roomate is also a security engineer, he really enjoys your video too and we both discuss your topic which you cover everytime.

    • @kevinalexander4959
      @kevinalexander4959 2 роки тому +49

      your lucky to have a roommate to discuss that stuff with lol. My friends rudely cut me off

    • @l6e6i6n
      @l6e6i6n 2 роки тому +42

      @@kevinalexander4959 i dont think those are friends bro

    • @aditya.ishan27
      @aditya.ishan27 2 роки тому +8

      FYI, we were roomates in college and we are working in the same city so we live together as roomates again. We are from Bangalore - India.

    • @Angel-Pizzaeater
      @Angel-Pizzaeater 2 роки тому

      @@aditya.ishan27 so you're both black, you have nothing to be ashamed of

    • @nosam1998
      @nosam1998 2 роки тому +21

      @@Angel-Pizzaeater Really? You just HAD to bring RACE into a positive comment...

  • @theultramage
    @theultramage 2 роки тому +658

    As an exercise, I looked at the unpatched code, seeing if I could see and fix the flaw in that loop. Man, that code is really hard on the eyes. It was added in 2009 but wouldn't feel out of place in 1990. Ultimately it fell trap to its own complexity (supporting a variable-length argument list with optional parameters, rolling its own parser), together with making a false assumption about the execution environment (that argv[0] always exists).

    • @X_Baron
      @X_Baron 2 роки тому +71

      argv[0] does always exist if argv is defined, but the C language standard has always said that it can be null (when argc is zero), as far as I can tell. So they could have just read the standard document. :)

    • @eomoran
      @eomoran 2 роки тому +4

      This seems like the type of thing though that the exploit was known for a while but only got executed years later

    • @ps5hasnogames55
      @ps5hasnogames55 2 роки тому

      ​@@X_Baron do you think Red Hat (creator of this crap along other amazing turds like systemd) care about standards lol

    • @AnthonyTheSeven
      @AnthonyTheSeven 2 роки тому +19

      is it even normal practice? how common is writing your own cli parser? I imagine there has to be some standard and safe way or a lib to do it

    • @victorbrand8913
      @victorbrand8913 2 роки тому +21

      As far as I can understand, the false assumption is that argv[1] exists.

  • @qtxsystems
    @qtxsystems 2 роки тому +490

    Phenomenal work and explanation. Love it as a programmer. It amazes me how much is really needed to be known about operating systems and their underlying structures in order to find the right "path" to exploitation.

    • @jeschinstad
      @jeschinstad 2 роки тому +3

      Yeah, it's not exactly like Hollywood :)

    • @edwardcullen1739
      @edwardcullen1739 2 роки тому +7

      ... or sticking to "arbitrary" rules that have been developed over the years... That code should have been fixed, even is there was no exploit.
      Always assume the attacker is smarter than you; just because *you* can't see an exploit, doesn't mean there isn't one...
      This is a constant challenge with management types who only react to "big" exploits because they can't "see" the threat...

    • @ontheblock2063
      @ontheblock2063 2 роки тому

      Eh not really,

    • @jeschinstad
      @jeschinstad 2 роки тому

      @@edwardcullen1739: What are you referring to?

    • @edwardcullen1739
      @edwardcullen1739 2 роки тому +9

      @@jeschinstad The code violates many rules of defensive programming. The fact that there was a potential out-of-bounds write should have been fixed, regardless of whether it was "exploitable", because you "never know" - as proven by this video.

  • @Khari99
    @Khari99 2 роки тому +139

    It blows my mind how I've been coding for years now and stuff like this still feels like complete gibberish lol. Amazing explanation.

    • @Rudxain
      @Rudxain 2 роки тому +4

      I understand pointers, but I have no idea how C pointers work LMAO, the pointer star notation is still kinda confusing

    • @Khari99
      @Khari99 2 роки тому +15

      @@Rudxain OS level coding is a completely different ball game lmao

    • @drakey6617
      @drakey6617 2 роки тому +14

      @@Rudxain
      y = 0;
      int* x;

    • @bigboland6160
      @bigboland6160 2 роки тому +1

      @@Rudxain int* x declares pointer variable x. The variable x now stores an adress. *x will get the value stored at the address in the variable x

    • @Rudxain
      @Rudxain 2 роки тому +5

      @@drakey6617 Thank you for clearing my confusion, it seems more simple now

  • @insert1
    @insert1 2 роки тому +121

    This is an amazing explaination. It really serves to illustrate how every single package can be a flaw and needs to be maintained, just like when those 11 lines of leftpad were deleted, and it helped me gain root access to my computer, which my parents don't let me use root on. Zero-day exploits are scary, and whenever one is discovered, it helps both the hackers and the defenders...

    • @clivejameston7557
      @clivejameston7557 2 роки тому +8

      your parents?🤣

    • @sm_stormzy1075
      @sm_stormzy1075 2 роки тому +3

      @@clivejameston7557 yeah? why is that funny to you, it just means there is parental controls.

    • @buzifalus
      @buzifalus 2 роки тому +4

      is your father linus torvalds? heh

    • @skipfred
      @skipfred 2 роки тому

      @@clivejameston7557 I don't get the joke

    • @igorswies5913
      @igorswies5913 2 роки тому +1

      how did the deletion of leftpad help you gain root access?

  • @AmxCsifier
    @AmxCsifier 2 роки тому +24

    0:09 Well that escalated quickly

  • @Xioxio000
    @Xioxio000 2 роки тому +73

    The critical missing piece of information for people like me is that there's a permission bit on the pkexec file itself that says "when joe schmo runs this program, run the program as if it was actually run by the owner of the program" (that owner being root, in this case).
    I was coming into this thinking that it was going to call some operating system function or something and didn't realize that the pkexec code itself is priviledged just because of the bits in its inode.

    • @AlexeiSvitkine
      @AlexeiSvitkine 2 роки тому +5

      Thanks, I was also confused by this! The video was just describing a lot of steps to make that program do something ... that you could just do in your own program that would be trivial to write.
      The fact that program runs in a privileged context is a critical prerequisite of the exploit that I'm surprised the video didn't mention.

    • @0raj0
      @0raj0 Рік тому

      If you know what pkexec command is used for (it's basically a graphical equivalent of sudo), then this is pretty obvious.

    • @SianaGearz
      @SianaGearz Рік тому +1

      @@0raj0 Well it took me a good few seconds of confused thinking to connect the dots, i vaguely knew but it still took me a bit. For sure it would have been better had he mentioned it somewhere, like half a sentence.

    • @QuotePilgrim
      @QuotePilgrim Рік тому +1

      @@SianaGearz he did, at some point near the beginning of the video, he describes what pkexec does.

    • @JMurph2015
      @JMurph2015 Рік тому +2

      Tbh I originally thought it was a privileged system service situation and was thinking "ok so I can start this program under my permissions, but *how do I get it to be involved by the system*" but this clarifies that. Thanks!

  • @BradenBest
    @BradenBest 2 роки тому +23

    5:15 has some great examples of poor coding practices.
    L537: g_strdup is called but the next line assumes that it can only be null if the input is null. If libc malloc appears anywhere in that pipeline, then this is a bad assumption, as malloc will return a null pointer if it's unable to fulfill the request. The if statement on L538 assumes that this never happens, which may or may not be the case since we're dealing with g_strdup rather than libc strdup. If I were the original author, I would like to investigate the documentation to make sure those assumptions are true, and if so, document it in a "why" comment.
    L549: the error enum ENOENT is hardcoded into the error message rather than just letting errno select it. The author assumed that ENOENT is the only possible thing that can go wrong.
    L552-553: this is a clarity issue. When I first read it, my first thought was that use-after-free undefined behavior was about to be invoked. I quickly realized this wasn't the case when I stepped through the expression in my head and realized that path gets set to s before argv[n] gets set, BUT, reality check: I am a C programmer and I got confused. And If I can be confused, then so can anyone else. It's one more line of code, but path = s; argv[n] = s; is much easier to read and understand. Obvious code > compact code. If you want to min/max on code size, keep it in codegolf challenges, thank you very much
    You should in general avoid stuffing multiple var declarations and assignments into one line/statement. It may be faster to write, but it's messy and creates more work.

    • @BradenBest
      @BradenBest 2 роки тому +3

      @@anukranan The only thing I can find on that page that remotely pertains to what I said is the passage about the assignment operator yielding an expression, such that a = b = c is equivalent to a = (b = c). I use this for compact conditionals like `while ((ch = getchar()) != EOF)`.
      That still doesn't make it a good idea to stuff multiple assignment expressions into one line. You're writing code for humans, not for the compiler.

    • @BradenBest
      @BradenBest 2 роки тому

      ​@@anukranan Being able to understand other people's code is an important skill, but it's equally important to advocate for good style and clean code. Sure, I can read a poorly programmed algorithm and figure out "where the variables end up" afterwards. But the difference between clean code and messy code is that I can parse the clean code faster because it's formatted more cleanly and uses less state and side effects.
      The "git gud" argument only holds up for so long. Eventually, one will come across code written 10 years ago that is thoroughly terrible and full of bugs, and after you finish refactoring it and fixing the bugs, you'll utter to yourself "what idiot wrote this code?"... only to realize that "idiot" was you.
      There are things that are reasonable to expect programmers to understand, like bitwise operations and idioms like n%2 and *ptr++ = value. And then there's code that tries to be too compact or too clever, and that's where the problems start. Hard to read and hard to understand doesn't mean one is incapable of doing so. It means that it takes longer. And sure, taking a few extra seconds to understand some "clever" code doesn't seem immediately bad, but that time adds up quickly. Having multiple assignments on one line isn't the worst practice, but the reason I consider it bad is because in order to comprehend all of the variables being used in the expression, you have to read it left to right. Since the alternative is doing them one by one on their own lines, left to right is inferior, because it _could_ be written in a way that can be read/scanned much faster.
      That's my rationale. And you can see it in my code. Every variable used in a function (at function scope) is hoisted to the top and declared separately, and a blank line separates the var declarations from the next "chunk" of code. Sure it results sometimes in a declaration followed by something else followed by that variable being defined proper, but doing it my way results in a clean and rapidly comprehensible manifest of the function's entire state.
      Also sorry if it takes me a long time to reply. UA-cam doesn't notify me about this thread until someone upvotes it. I got no notification for either of your replies.

    • @jbird4478
      @jbird4478 2 роки тому +3

      L537: g_strdup calls g_new which calls g_malloc which calls malloc. I'm not even making that clusterf*k up, so yeah... it returns a null if malloc does. Did I mention all this chain of calls really does is call malloc and strcpy from the C library? GLib belongs in the trashcan. The library is basically C with G_ brand stuck in front of it.

  • @tomlinaker90
    @tomlinaker90 2 роки тому +4

    It's sometimes hard to put into words what you want to see/understand. Your explanation here is exactly what I wanted even if I couldn't quite get it into words.
    This was perfect ! Thank you

  • @theITGuy-no3nt
    @theITGuy-no3nt 2 роки тому +55

    Got here by accident but this is one of the best write-ups I have ever encountered. Clear, concise, good production value -- excellent work. Subbed, belled, this comment, all that algorithm stuff -- thanks for an informative 20 minutes!

    • @Dyanosis
      @Dyanosis Рік тому

      Write up? You mean video? This is hardly in written form.

    • @theITGuy-no3nt
      @theITGuy-no3nt Рік тому +1

      @@Dyanosis Thank you, Captain Obvious. "Write Up" == "After Action Report" == "How The FUCK Did He Do THAT?"
      In future, please leave you petty semantic quibbles by the door. Thank you.

  • @tohur
    @tohur 2 роки тому +28

    pkexec is the GUI password prompt that pops up on most Linux distros to run GUI apps as root.. some distros disguise the program as gtksu or kdesu but nowdays even if the window says its gtksu or kdesu its actually pkexec

  • @siegeaytv5679
    @siegeaytv5679 2 роки тому +1

    now ive only been studying computer science/coding for a few months now and i am not very knowledgeable in this kinda stuff but your explanation actually made it fairly clear to someone with little coding experience.

  • @brunoais
    @brunoais 2 роки тому +10

    For me, the weirdest parts in here are:
    1. Writing back to argv. That is usually a red alert.
    2. Having a conversion executable with setuid bit set or capable of running as root.
    I don't know about other exploits but this specific one wouldn't be one I'd ever end up doing.

    • @JMurph2015
      @JMurph2015 Рік тому +2

      Yeah I don't understand why the conversion module ever gets invoked with privileges... That just seems like an obvious exploit angle.

  • @rudiklein
    @rudiklein 2 роки тому +69

    I'm a noob when it comes to this level of OS programming stuff, but I really like the way you explain it.

  • @FedoraRose
    @FedoraRose 2 роки тому +6

    Finally a new video, love your content Ty

  • @ytmrsweatybtw56ismyepic14
    @ytmrsweatybtw56ismyepic14 2 роки тому

    first time watching ur videos and i already love it man, ur voice is calming and u explain coding stuff why better than my own teacher and if u were my teacher I would love to listen to u explain coding all day. keep up the amazing work man.

  • @matthewender3473
    @matthewender3473 2 роки тому +48

    Who the heck writes setuid-type code with hacky stuff like writing to argv[n] etc.? This is code you need to be the most careful about...

    • @bluesillybeard
      @bluesillybeard 2 роки тому +28

      as soon as I saw "argv[n] = path = s;" I had to wonder why on earth anybody would write to the arguments. As far as I'm aware, that's something nobody is supposed to do.

    • @gabrielpar3519
      @gabrielpar3519 2 роки тому +11

      looks like the same guy that uses "goto"

    • @ruffianeo3418
      @ruffianeo3418 2 роки тому +16

      @@gabrielpar3519 Goto bashing is so 1980! ;) Seriously - once compiled, there are gotos everywhere (JMP, JAL, JZ, JNZ,...). If used in the right scenario it can lead to more expressive code than avoiding it at any cost ever could.

    • @xplorethings
      @xplorethings 2 роки тому +1

      @@bluesillybeard really because you are too lazy to create a new data storage for it. So you reuse the args.

    • @maxwellerobini1603
      @maxwellerobini1603 2 роки тому +4

      @@gabrielpar3519 Goto is used a lot in C and kernel programming

  • @jesuschrist711
    @jesuschrist711 2 роки тому +120

    this was such an interesting accidental exploit. i imagine being able to read a variable as an argument has quite a few uses in a system, not necessarily just malicious ones either.

    • @-..._-.
      @-..._-. 2 роки тому +6

      True

    • @xakthos
      @xakthos 2 роки тому +7

      Was it accidental, really? A good coder can make a minor 'mistake' and leave a huge whole. Some aren't accidents.

    • @jessiejanson1528
      @jessiejanson1528 2 роки тому

      @@xakthos no way its an accident. govt bribes and threatens companies and people to install backdoors under threat of vanishing. putting something like that in a program is easily within their bag of tricks. you just wont find anything about it via google. its a search engine and they can omit results. govt just needs to threaten google to omit results, and companies like money and being in business, easy choice for them.

    • @Dyanosis
      @Dyanosis Рік тому

      @@xakthos hole*

  • @karsh001
    @karsh001 2 роки тому +5

    Perfect explanation. Basically it shows why we have guide lines and best practices in coding.
    A simple Lint or MISRA analysis would have caught this before release.

  • @strangeWaters
    @strangeWaters 2 роки тому +1

    This is a great video. I'd appreciate a full diagram of the layout of argc and argv with pointers as well -- even if you don't wanna fully explain c string layout, just having a picture can be helpful. Like, have little squares showing character boundaries or something

  • @shahrvand364
    @shahrvand364 2 роки тому +24

    I think you're the only developer in yt with great UI and nice thumbnail and very understandable explanation, your only weak point is that you upload videos so lately, but whatever It was Great! :)))

    • @c.x05
      @c.x05 2 роки тому +4

      I think it's good that he uploads lately. Quality over Quantity: If he would upload faster, the other aspects would suffer(thumbnail, UI, etc.)

    • @danielalorbi
      @danielalorbi 2 роки тому +2

      LiveOverflow is also pretty great.

    • @shahrvand364
      @shahrvand364 2 роки тому

      @@danielalorbi thanks, a minecraft developer :))
      Btw HorseNuggets is minecraft developer too

  • @LorenzoLeonardini
    @LorenzoLeonardini 2 роки тому +640

    What's not clear to me is, if you set the first argument to NULL, shouldn't you still have another NULL to separate it from the environment variables?

    • @PwnFunction
      @PwnFunction  2 роки тому +433

      From man page on `execve`:
      "The argv array must be terminated by a NULL pointer."
      Implies it's the programmer's job to terminate it with a null.

    • @LorenzoLeonardini
      @LorenzoLeonardini 2 роки тому +110

      @@PwnFunction yes I then realized we were talking about execve and not running the program "normally"
      I got confused because by talking about having NULL in argv[0] I was hearing that as setting the first argument to NULL, while we are not actually setting any argument at all

    • @NazriB
      @NazriB 2 роки тому

      Lies again? Drink Carlsberg

    • @user-oc6lw2rd1q
      @user-oc6lw2rd1q 2 роки тому +5

      @@NazriB 👍ok

    • @harrytsang1501
      @harrytsang1501 2 роки тому +45

      Requiring programmers to pass the executable name again in the argument array is just as absurd as the day I learned that it is required

  • @rabbitgundam4420
    @rabbitgundam4420 2 роки тому +20

    This is so simplistically brilliant.
    I love to think that this person was thinking "I wonder if this would work" and it did.
    I love having the same thoughts coding something, and when it works "Hell ya"
    In this case, it's a major exploit but, same thing lol
    Great video. I subbed.

    • @fensom80
      @fensom80 2 роки тому

      Yep. I love that feeling when you wonder if something will work and it does. I'm not a very good programmer so when ideas work, i am ecstatic.

  • @andrelee7081
    @andrelee7081 2 роки тому

    Man, I need to get back into this. Did a stint with gov't contractor for an internship, we focused on a lot of this stuff. The biggest vulnerabilities we took advantage of in Linux is a general trust in modules, we could gain a lot of control of a system that way, just like with that control-mod you had.

  • @DFiNEdotnet
    @DFiNEdotnet 2 роки тому

    Man.. Your content and explanations is just pure gold! Keep it up!

  • @rcelyte
    @rcelyte 2 роки тому +223

    Imagine dynamically linking security critical software.

  • @byteflowr912
    @byteflowr912 2 роки тому +8

    extremly nice video, just a minor technical detail: maybe a pop protection for you mic would be a nice addon :3

  • @aaronmay8951
    @aaronmay8951 2 роки тому +53

    I have no prior knowledge in anything related to computers besides high school B.S. classes and trying to understand this feels like taking 12 hits of acid and trying to befriend a octopus… and man I’m loving it. Frankly I don’t even know what Lenix is but your penguin avatar and the sporadic nature of the code has my brain in “I need more information” mode so I figure I’m going to be here more often from now on

    • @sleepCircle
      @sleepCircle 2 роки тому +9

      Linux is another operating system--an open-source equivalent of UNIX.
      UNIX is what Mac OS X is based on, but UNIX itself is much lower-down and barebones than OS X, for OS X, Apple just licensed UNIX and built a pretty window manager on top of it.
      Anyway Linux is similarly low-down and barebones--you can install pretty window managers on top of it (Android is built on top of Linux) but you don't need to, and for this reason and for its general stability it's very popular for web servers and systems which need to be on for a long time.

    • @User2o2
      @User2o2 2 роки тому +8

      In English, he means it’s like Windows but made by a community of people and it has more options

    • @TheMrVogue
      @TheMrVogue 2 роки тому +3

      @@User2o2 It's not by a different company, it was made and is managed by the open source community. Aka, it's owned by everyone. People on the internet out of the kindness of their hearts maintain it, and so many companies use it they pay to people to maintain it.

    • @NonTwinBrothers
      @NonTwinBrothers 2 роки тому

      I love this comment

    • @sleepCircle
      @sleepCircle 2 роки тому

      @@User2o2 i figured the guy was in high school, he should at least be able to understand 3/4 of what i was saying and he could google the rest.

  • @redcrafterlppa303
    @redcrafterlppa303 2 роки тому +89

    When you first showed the start of pkexec it directly looked fishy. Writing back to argv is a big no no. The few bytes saved in allocation are not worth it. On top of that not reading from argv without checking against argc is also something you learn as a beginner of c programming. These entire first couple lines of the main are totally bunkers.

    • @buzifalus
      @buzifalus 2 роки тому +29

      Polkit is also a fishy name ending up as a rootkit instead. Gotta wonder which agency needed that hole

    • @jessiejanson1528
      @jessiejanson1528 2 роки тому +26

      @@buzifalus honestly thats exactly my thought. US govt had a backdoor of sorts into pretty much every system running RSA encryption years ago. pretty much the entire world was vulnerable to it except the CIA and a few tech collages, both of which had their own seeds rather then trusting the default. To be fair, virtually nobody understood the security well enough to feel safe making their own or trusting someone to do it. It just so happened that the US govt had the seed though so cracking anything using RSA encryption was trivial. They only got caught when they had RSA put out a "security improvement" which when the security community tested, compared to previous versions, you could crack passwords even faster. They called out RSA since this was impossible to miss and the president of RSA outed that govt had forced him and his company to share the seed as well as implement this 'improvement', they were also paid for it. After the govt lost that they began work on PRISM, that spy system the US govt was using that edward snowden outed. they were pushing it into more and more companies and had claims it was in a few major ones, those companies deny it, but what else can they do say 'yeah the govt forced us to put in a backdoor for them to access your data and we didnt tell you or fight it in court' they would lose customers instantly.
      So the idea that this could have been put in place on purpose is 100% possible and definitely something the govt would do. too many bad practices that all line up to allow a massive exploit.
      We can look forward to the new windows exploit. windows 11 with a 'security' chip on the motherboard, that windows 11 wont work without, and that whole 'windows 10 will be our last version ever, we will keep updating it' suddenly it looks like the govt stepped in and said 'we want everyone on our new backdoor version'.

    • @skipfred
      @skipfred 2 роки тому +10

      @@jessiejanson1528 A lot of information about this has been scrubbed from the internet as well, including entire Wikipedia pages which had legitimate sources.

    • @HolyRamanRajya
      @HolyRamanRajya 2 роки тому +8

      @@jessiejanson1528 This is a beautiful reason why buzzwords like e2e are misdirections. If you are communicating really really really sensitive information, Big Brother may still be able to watch them be it in whatsapp or opensignal. If youre a commoner like me then don't bother beyond basic encryption, as whatsapp frontend can scrape the data once it decrypts it anyways. You only need avoid random scammer-hackers from knowing about you.

    • @iCarus_A
      @iCarus_A 2 роки тому +8

      Classic "clever code syndrome" where the programmer tries to do something clever, misses some edge case, makes the code a nightmare to maintain and introduces bugs to the system all in the name of saving insignificant amounts of runtime and memory... really makes you wonder how a package like that got shipped with major linux distros

  • @obinator9065
    @obinator9065 2 роки тому +426

    This is an example of why you shouldn’t just think you’re absolutely safe because you use Linux.

    • @bryede
      @bryede 2 роки тому +91

      Agreed, but at least we had the opportunity to find it.

    • @theraven.4
      @theraven.4 2 роки тому +28

      People are delusional. It is never a matter of if only a matter of when.

    • @zyansheep
      @zyansheep 2 роки тому +5

      @@theraven.4 and what, and why, and how...

    • @texrot9781
      @texrot9781 2 роки тому +74

      You're never 100% safe. But this still doesn't change the fact that Linux is STILL very safe. Nevertheless people use BSD's for better security

    • @csharponlinux4670
      @csharponlinux4670 2 роки тому +5

      True, though Linux basically hand over more tools for you to secure your machine against exploits like this such as AppArmor/SELinux which can restrict programs what they can do with root privilege. Windows equivalence is Mandatory Integrity Control which is pretty crap in comparison especially on Windows 11 which breaks everything.

  • @avananana
    @avananana 2 роки тому +11

    Very interesting topic. I had no idea that the BRUH charset exploit could cause this much harm to a computer system, I really have to double check that my calculator cannot be abused in this way.

  • @linckez958
    @linckez958 2 роки тому +2

    Love your videos! Always learn something awesome

  • @Zolotou2604
    @Zolotou2604 2 роки тому

    Nice video bro. Great montage that help to understand this stuff. Keep it up.

  • @Casadien
    @Casadien 2 роки тому +74

    This sounds a lot like a DLL side-loading attack in Windows, where a legitimate program loads a malicious dependency

  • @OneRedKraken
    @OneRedKraken 2 роки тому +4

    I have barebones programming knowledge. And your explanation still made complete sense to me. You sir have a gift! Cheers!

    • @santaclaws1508
      @santaclaws1508 2 роки тому +1

      Same I understand the basics and I could tell how everything is supposed to play but don't understand the functions of them 😅

    • @bannah6400
      @bannah6400 2 роки тому +1

      This world is rapidly passing away and I hope that you repent and take time to change before all out disaster occurs! Belief in messiah alone is not enough to grant you salvation - Matthew 7:21-23, John 3:3, John 3:36 (ESV is the best translation for John 3:36) if you believed in Messiah you would be following His commands as best as you could. If you are not a follower of Messiah I would highly recommend becoming one. Call on the name of Jesus and pray for Him to intervene in your life - Revelation 3:20.
      Contemplate how the Roman Empire fulfilled the role of the beast from the sea in Revelation 13. Revelation 17 confirms that it is in fact Rome. From this we can conclude that A) Jesus is the Son of God and can predict the future or make it happen, B) The world leaders/nations/governments etc have been conspiring together for the last 3000+ years going back to Babylon and before, C) History as we know it is fake. You don't really need to speculate once you start a relationship with God.
      Can't get a response from God? Fasting can help increase your perception and prayer can help initiate events. God will ignore you if your prayer does not align with His purpose (James 4:3) or if you are approaching Him when "unclean" (Isaiah 1:15, Isaiah 59:2, Micah 3:4). Stop eating food sacrificed to idols (McDonald's, Wendy's etc) stop glorifying yourself on social media or making other images of yourself (Second Commandment), stop gossiping about other people, stop watching obscene content etc. Have a blessed day!

  • @xzs432
    @xzs432 2 роки тому +1

    that was interesting and way over my head, im a windows user so i understand what arguments and variables are and what reads and writes are, my only coding knowledge usally involves looking something up online, like optimizations for windows or for fixing problems i encounter and following step by step instructions and copying and pasting things into command line or powershell.

  • @draydindoesthings
    @draydindoesthings 2 роки тому

    I love how you explain the topics.
    KEEP DOING WHAT YOU DO MAN!!!

  • @TheMR-777
    @TheMR-777 2 роки тому +4

    Next level of Genius, man! I'm a C++ Dev, and it's Mind-blowing to me!

  • @dave6012
    @dave6012 2 роки тому +5

    Me as a junior web dev watching this: “I can understand 9 words in that book”

  • @anarchyloves
    @anarchyloves 2 роки тому +1

    I just came across this channel, its awesome! We want more vids!!!

  • @ThomPorter74
    @ThomPorter74 2 роки тому

    First video of yours I've seen, but loved it. Knew about the exploit (and of course updated my servers) but never really understood it under the hood. Crazy what we programmers can do when we don't know what we're doing! 🤪

  • @ctje1638
    @ctje1638 2 роки тому +4

    I have 0 experience with coding in my life, but you explained it so clearly even I understood it.

  • @ulterno1665
    @ulterno1665 2 роки тому +7

    Thanks. I was having a difficulty understanding how this vulnerability would cause a problem from the explanation in the CVE.

  • @gabrielarsenio9241
    @gabrielarsenio9241 2 роки тому +1

    Your speaking is very clear! I'm not a native English speaker and I can't understand very well other people, but you I can. Thank you for the video, +1 subscriber!

  • @U-D13
    @U-D13 2 роки тому +1

    Cool explanation. I used the berdav's exploit for this in a CTF about a month ago, worked like a charm.
    _(I'd also recommend you include the CVE number in your title, it's sure to drive traffic/views.)_

  • @3N18AKPzmGOsBgWKH
    @3N18AKPzmGOsBgWKH 2 роки тому +7

    The Hated One showed your channel temporarily in his latest video about youtube blacklisting him :P
    I was like; "Omg, that's one of my favourite channel!!!"

  • @lefteriseleftheriades7381
    @lefteriseleftheriades7381 2 роки тому +6

    3:46 I think, in the application the thing that separates the arguments from the environment variables is nothing. If you read after argc, you are in the environment variables space.
    I think NULL is only used by execve to determine the number of arguments passed

    • @w0ttheh3ll
      @w0ttheh3ll 2 роки тому +3

      There is no boundary in the memory where the actual strings are stored, but the argv array of pointers into that memory is terminated with a null pointer.

  • @TheRyanSmee
    @TheRyanSmee 2 роки тому

    This is a really great explanation! Subscribed 😊

  • @zojirushi1
    @zojirushi1 2 роки тому

    Such an underrated channel! Keep up the great content!

  • @GarthHumphreys
    @GarthHumphreys 2 роки тому +4

    thanks for sharing this, excellent walk through.

  • @PLOXVR
    @PLOXVR 2 роки тому +3

    look at the white part on the penguin upside down

  • @Jennn
    @Jennn Рік тому

    Thank You for taking the time to explain this in legendary Detail. You Are Hero

  • @randomhominid9816
    @randomhominid9816 2 роки тому

    Great job explaining everything. In particular, the method to find how to take advantage of that shoddy c code.

  • @fabiorj2008
    @fabiorj2008 2 роки тому +46

    Man I love your videos and explanations. Would you tell me what font are you using in terminal ?

  • @eugenekolodenker9976
    @eugenekolodenker9976 2 роки тому +5

    Nice video, I thoroughly enjoyed it. One thing that was bothering me though: Why can't you just LD_PRELOAD over g_printerr and save yourself this GCONV business? When you talk about using LD_PRELOAD, and then saying there's a problem because clearenv() is called, I think you're actually missing the fundamental reason why LD_PRELOAD won't work here. LD_PRELOAD is processed before main() is executed (i.e., preloaded). This means we can't actually overwrite any functions because the env var doesn't exist at load, we only get to add env vars after loading. That's why GCONV is necessary here, because it gets processed during execution instead of only at load time.

  • @rastgo4432
    @rastgo4432 2 роки тому

    Great videos man, hope u upload more frequently

  • @afterdark69
    @afterdark69 2 роки тому

    OK, so this was in my recommended....have 0 idea what you're talking about, basically a foreign language, but I was hella invested!!

  • @KanaevM
    @KanaevM 2 роки тому +4

    Quite weird seeing this in recommended so soon after release for a channel that I've never interacted with before. But I'm game.

  • @shadamethyst1258
    @shadamethyst1258 2 роки тому +8

    One thing I don't understand is why the for loop is entered at all. If the first element of argv is NULL, then argc should be equal to 0, right?
    **Edit:** nvm, the loop doesn't have to be entered at all for this to work.

    • @davidtoomey4712
      @davidtoomey4712 2 роки тому +5

      Right. It has to create n and initialize it to 1 before it can compare it to anything. The comparison returns false so the body of the loop is not entered but n is still 1

  • @randomlabs1784
    @randomlabs1784 2 роки тому

    I'm so glad I found your channel!!

  • @MattMcT
    @MattMcT 2 роки тому

    Lovely work pwn! Cheers 🍻

  • @lolguy-x9n
    @lolguy-x9n 2 роки тому +5

    Just when you think your password was great you come in to find a user logged in without requiring a password and you are like.... how did you do that?

  • @Kinyanjui_765
    @Kinyanjui_765 2 роки тому +3

    omg i love this guy so much

  • @sandboxws
    @sandboxws 2 роки тому

    Awesome video. Side note, I really enjoyed the graphics style of this channel, mind sharing the tools you use? Keep up the good work!

  • @yanrui3700
    @yanrui3700 2 роки тому

    no way bro this has really helped me out in my school projects thank you for the amazing video

  • @karimfrempong1996
    @karimfrempong1996 2 роки тому +5

    After watching the video, i wondered why this is even possible in the first place, as the system calls setuid() and setgid() that you mentioned at 14:38 should already fail with "Permission denied". After looking around for a bit, I noticed the special user file permission "rws" instead of "rwx" for the program pkexec. Only because of the "s" flag pkexec is even allowed to call setuid() and setgid(), so any other preinstalled program with special file permissions will have the same vulnerability if not adressed in the code properly.

    • @0raj0
      @0raj0 Рік тому

      Considering the purpose of pkexec, it is obvious that it has the setuid bit set.

  • @savantshuia
    @savantshuia 2 роки тому +150

    I'm learning C right now so I didn't understand all of that but I really liked your explanation.
    How was this vulnerability patched?

    • @ikbenmathijs9424
      @ikbenmathijs9424 2 роки тому +45

      probably just checking the length of the list would fix it

    • @megapro1725
      @megapro1725 2 роки тому +43

      Switch to a good language until it's too late

    • @mohammedalkhateem
      @mohammedalkhateem 2 роки тому +126

      @Synth Depends on how you define a good language. People say JavaScript isn't a good language because it allows you to shoot yourself in the foot, well C allows you to freakin nuke your hometown. With great power comes great risks. Other languages will just give an API to access args and another for envs.

    • @megapro1725
      @megapro1725 2 роки тому +15

      @Synth it's only capable of writing programs with vulnerabilities. even the most expricened dev can't deal with it

    • @megapro1725
      @megapro1725 2 роки тому +12

      @Synth what about rust lol? Well that's a point not using such low level languages and rely to virtual machines. C doesn't even has smart pointers, absolute trash

  • @spookyboogie8064
    @spookyboogie8064 2 роки тому +1

    I clicked this cause the title was interesting, but almost immediately clicked off of it thinking it would be over my head as someone with only novice level experience with any programming (VB in excel) or Linux. But this was actually well presented without overly dumbing it down to the point of making it boring.
    It’s still a little bit over my head, but I got the gist of it.

  • @cx777o
    @cx777o 2 роки тому +2

    Damn I really enjoyed your video as a cybersecurity beginner! you explained it very clear! :)

  • @anon_y_mousse
    @anon_y_mousse 2 роки тому +8

    I know that we're technically allowed to modify the arguments in this way, and merely changing what argv points to isn't precisely wrong, but this is definitely some bad juju. While it would be less efficient, in this case I think safety should trump efficiency and it'd be better to just copy argv and modify your own copy.

    • @szr8
      @szr8 2 роки тому

      That would break any program that modifies its own ``argv[0]`` to change its program name in `ps` and such.

    • @anon_y_mousse
      @anon_y_mousse 2 роки тому

      @@szr8 It doesn't modify what shows up in 'ps', just what argv[0] points to. Remember, the array that is argv is on the stack. So everything it points to is considered read-only, but the pointers on the stack are not. You can't change argv[0][0], but you can change argv[0];

    • @ccreutzig
      @ccreutzig 2 роки тому

      @@anon_y_mousse Afaics, the code here didn't change argv[1][0], just argv[1]. Same thing.
      The problem is just that argv[1] is an alias for env[0] in this setup.

    • @anon_y_mousse
      @anon_y_mousse 2 роки тому

      @@ccreutzig Actually, I just had a look at the code in question. Turns out it doesn't modify argv at all. I guess I should pay attention better. Apparently, the whole bug is in calling it with an empty argv, because it skips past argv[0] which when using exec*() like this can be empty. Moral of the story with this code, is don't expect that you're being called with your program name as argv[0]. Though, I stand by my statement that you should never modify argc and argv regardless of what you're doing.

    • @anon_y_mousse
      @anon_y_mousse 2 роки тому +1

      @@ccreutzig Actually, disregard most of the previous comment too, I was looking at the updated code by mistake, and it does alter argv. However, the problem is that they expected argv[0] to point somewhere that it doesn't, and they didn't properly account for a 0 length argv.

  • @JW-oe6nw
    @JW-oe6nw 2 роки тому +5

    Hey, quick question, if the first argument in argv is set to null, what is the value of argc? I would assume that it would be 0 or 1, but that's clearly not true
    Edit to say that I messed around with this actual code some, and this does not run within the for loop, and that n is a global variable, so it doesn't exit scope before the invalid write is executed.

    • @RexxSchneider
      @RexxSchneider 2 роки тому

      Yer, it's the usual problem of allowing a variable (n) to exist beyond the scope that it's needed for. If you really have to use globals, you need to do some sanity checking before you use them.

    • @HenryLoenwind
      @HenryLoenwind 2 роки тому

      Pretty sure it is 0. The number of elements (including argv[0]) before the null value.

    • @cynodont7391
      @cynodont7391 2 роки тому

      @@HenryLoenwind Indeed. I consider myself as an experienced C programmer and I was shocked to discover that argc can be 0. Using a 'for' or 'while' loop starting at index 1 is a pretty standard way to process arguments in C/C++. Pretty much any tutorial about argument processing in C is using such a loop. There are probably thousands of applications that could be abused in a similar way. Of course, most of them do not run setuid so that should not matter much (there are far easier ways to 'hack' a non-setuid program).

    • @JW-oe6nw
      @JW-oe6nw 2 роки тому

      @@HenryLoenwind This is what I was figuring, I just did not realize that that value was set such that it existed outside of the loop

    • @JW-oe6nw
      @JW-oe6nw 2 роки тому

      @@cynodont7391 Is it convention to do it with a global variable like what was done in this video? That's what seems to be the culprit here

  • @1ben10234
    @1ben10234 2 роки тому +1

    I most likely haven't subscribed to anyone in like 7 years, good job, well subbed :) .

  • @mitjakomi2
    @mitjakomi2 2 роки тому +1

    Yo, you are uploading so rapidly I can't keep up watching these videos

  • @Kyrelel
    @Kyrelel 2 роки тому +3

    "We set the first argument to NULL"
    Did we? When did we do that?

    • @sim82
      @sim82 2 роки тому +1

      I think this becomes clear when he shows the code of the exploit at 12:00. It's a bit surprising that execve allows argv[0] == null to be passed to the child process.

  • @dracenmarx
    @dracenmarx 2 роки тому +20

    I have an improvement suggestion: Please use dark mode in your code editor. It is very stressful for the eyes if the video switches between light and dark mode. Thank you 🙂

  • @blindtechworld
    @blindtechworld 2 роки тому

    Thanks for this awesome video and great explanation I just found your channel just now you ern an instant sub

  • @botbeamer
    @botbeamer 2 роки тому

    More videos like this plz it's very instructive

  • @Christobanistan
    @Christobanistan 2 роки тому +6

    This is why we really can't trust the 'many eyes' security philosophy of open source. Really nasty bugs like this are uncovered all the time even in Linux code, yet there are supposedly large numbers of programmers going through this stuff with a fine-toothed comb. Problem is there just aren't nearly enough programmers, particularly in packages maintained by just one or two people in practice. Even Linted code with lots of warnings makes it through quality control because people just aren't paid enough to care.

    • @YodaWhat
      @YodaWhat 2 роки тому +1

      That's assuming this bug was not intentional on somebody's part. Who knows what inducements and/or persuasion is applied to those few who are meant to "insect" code for bugs?

    • @Christobanistan
      @Christobanistan 2 роки тому

      @@YodaWhat Very good point, too.
      And when we look at the numbers of discovered, exploitable bugs like this, we find that they're not much different to closed source software, and are sometimes worse, with worse effect because so many people use OSS.

  • @heathbruce9928
    @heathbruce9928 2 роки тому +13

    Question:
    Did some one run a malicious app on a system to figure this out? From the explanation you gave, one would need to be at the given terminal for this exploit to work. But it was my understanding this was being triggered remotely. Did I miss something?

    • @theworsttm1146
      @theworsttm1146 2 роки тому +27

      It's a privilage ESCALATION attack, meaning the system has already been breached or you have access already but as a low permision user and you are giving yourself better perms in order to do more detrimental things (like edit something you arent supposed to or view confidential information). A good example might be that you have remoted into a file sharing server and then as a guest on the server you run the code, get root, then add a new user to access everything with or maybe open a new reverse shell or smthn

    • @teal8365
      @teal8365 2 роки тому +10

      the exploit has to be executed by the 'local' machine. That can be triggered remotely through ssh, since polkit is an exec you can reach without sudo. Not necessarily like you open an email and suddenly your system deletes itself. You gotta have a keyboard connection (like ssh) to execute this, or the user has to be tricked into executing it by hiding it in something like an app install executable.
      as far as how did someone find out?
      It was found by some nerds at a security company, so more than likely they spent a week looking through polkit's source out of curiousity and found this. Coordinated media release on jan 25th in order to give RedHat a 2 month warning

    • @Stroopwafe1
      @Stroopwafe1 2 роки тому +1

      @@teal8365 Well it doesn't only have to be ssh or user error. You can also get a shell/terminal by using an attack what's known as a "reverse shell". Many languages include some way of opening up a child process or making an http request, which is vulnerable to exploitation

    • @gg-gn3re
      @gg-gn3re 2 роки тому +5

      Not only terminal access, but the machine needs a desktop environment installed as well, because these packages don't install otherwise.. they are for popup password prompts, which are only on DEs. I manage many servers with many different distros and none of them have pkexec on them because they're all headless.
      If your users don't have access to those prompts (which is pretty standard) you're already blocking access to this executable as well, so they couldn't even execute it.. so really right place right time type of exploit. There are many escalation attacks when you have this type of physical access.

    • @heathbruce9928
      @heathbruce9928 2 роки тому

      @@gg-gn3re I found that too be the case with allot of exploits. The most dangerous place for them to be is right at the keyboard.

  • @DemxnTheyThem
    @DemxnTheyThem 2 роки тому +1

    I didn't understand most of this, but it was engaging enough to distract my brain from anxiety while trying ro fall asleep. So thank you.

  • @GuruKal
    @GuruKal Рік тому

    I was gonna subscribe once the video was over bc it was incredible, but I subscribed immediately after seeing BRUH lmfao

  • @pm71241
    @pm71241 2 роки тому +3

    Somehow... The original code also ought to raise red flags for being a bit too clever.

  • @CJ-D-GOAT
    @CJ-D-GOAT 2 роки тому +5

    I have no idea what you're saying. It's like you're speaking another language but I still watched all the way

  • @purevert
    @purevert 2 роки тому +2

    I think i learnt more about arguments and how they are passing around than any exploit.
    Still great content.

  • @pxdav
    @pxdav 2 роки тому

    bro these videos are not only entertaining but also educational

  • @istiakferdous6864
    @istiakferdous6864 2 роки тому +4

    pkexec: Wait it's all BRUH?
    sudo: Always has been.

  • @smit17xp
    @smit17xp 2 роки тому +6

    polkits needs to be rewritten in rust

    • @SirWolf2018
      @SirWolf2018 2 роки тому +1

      Well said! Having to deal with too low-level implementation details together with the business logic makes us defocused and it's too easy to make mistakes.

  • @jeschinstad
    @jeschinstad 2 роки тому +2

    Wow, this was _really_ good! Very well done indeed. :) But it is also an example of why decentralization of software distribution on Linux _has_ to come with MAC enabled in the package manager by default. DAC simply doesn't cut it anymore. So if this program was packaged as a snap, then this exploit would not exist to begin with, because you would not have access to run those external dependencies, but even if you did somehow acquire root, it would still not give you the powers that root has in a DAC setup.
    I think it would be nice if people could focus a bit on testing that. It's very easy to do. sudo snap install hello. (Hello world demo package) Then sudo snap run --shell hello. Now you have a root shell that is supposed to be harmless. Is it? Please test it. I mean, if you can't cause problems with a root shell, then anyone would have to admit that security has been raised quite a bit.
    I believe that Linux needs decentralized software distribution and that we therefore need to reexamine how we distribute software, which I guess really means that we have to replace our package management softwares. But even with highly trustworthy centralized software distribution, we are never going to get full immunity against these types of exploits. We simply need to go MAC en mass. This has been known since before 1998, so the question is why we didn't do anything. I wonder if it's the distro infighting that's to blame; that if one distro were to replace their package format, then the fear is that other distros would take advantage.

  • @Aoekin
    @Aoekin 2 роки тому +1

    wow never knew about this, but very interesting and thankful for finding.

  • @irfansari_
    @irfansari_ 2 роки тому +4

    Best explanation
    And I am in college I couldn't understand anything but still that was fun

  • @petrie911
    @petrie911 2 роки тому +3

    I'm confused by one thing. Consider the expected case where argc > 0. The for loop goes
    for (n = 1; n < (guint) argc; n++)
    So at the end of this loop, we should have n == argc. Since nothing happens to n between here and this section
    g_assert (argv[argc] == NULL);
    path = g_strdup (argv[n]);
    if (path == NULL)
    It should be the case (especially with that assert) that argv[n] == NULL. So the next two lines just set path to NULL then check if it is, which doesn't make much sense to do. Am I missing something?

    • @GeorgeFoot
      @GeorgeFoot 2 роки тому

      As explained in the video - what if argc is 0?

    • @HenryLoenwind
      @HenryLoenwind 2 роки тому

      Presumable there's a "break" inside the loop, something like "if argv[n] == "--" /* end of parameter list marker */ break;"
      Um, on second thought...: "if (argv[n] is not a flag) break;" is more likely.

  • @just_jimmy
    @just_jimmy 2 роки тому

    Great explanation! Such a dangerous vulnerability hidden for all these years... Man, I wonder if someone had already exploited this in a regular way without disclosing it. Probably agencies LOL

  • @RajvirSingh1313
    @RajvirSingh1313 2 роки тому +2

    Damn really awesome explanation, Keep it up

  • @crusader_
    @crusader_ 2 роки тому +3

    you need to increase the video sound.

    • @ericxue3244
      @ericxue3244 2 роки тому +1

      why can't you?

    • @crusader_
      @crusader_ 2 роки тому

      @@ericxue3244 at max

    • @JorgetePanete
      @JorgetePanete 2 роки тому

      @@crusader_ check your device, the video's fine

  • @joshuadaley7069
    @joshuadaley7069 2 роки тому +3

    Windows users when there’s a security flaw: “THE END OF THE WORLD IS INEVITABLE WERE ALL GONNA DIE”
    Linux users when there’s a security flaw: “pretty cool right?”

  • @enciphered7650
    @enciphered7650 2 роки тому

    LOVE YOUR VIDEOS!

  • @lylestrachan5757
    @lylestrachan5757 2 роки тому +1

    i have 0 coding ability or a understanding of it. but you detail this so well me. good job!