Тёмный

How SUDO on Linux was HACKED! // CVE-2021-3156 

LiveOverflow
Подписаться 893 тыс.
Просмотров 202 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 354   
@PwnFunction
@PwnFunction 3 года назад
So basically scream AAAAAAAAAAAAAA\ at sudo and it makes you a sandwich.
@INeedAttentionEXE
@INeedAttentionEXE 3 года назад
Make me a sandwich AAAAAAAAAAAAAAAAAAA\
@zyansheep
@zyansheep 3 года назад
@@INeedAttentionEXE make it yourself
@Saghetti
@Saghetti 3 года назад
And it makes you a core dump*
@tamilxctf4075
@tamilxctf4075 3 года назад
YOU'RE here ;-;
@robinhouben4244
@robinhouben4244 3 года назад
@@INeedAttentionEXE u forgot the sudoedit
@SimoneAonzo1988
@SimoneAonzo1988 3 года назад
Man, there's a lot of work behind your *free* videos, thanks so much for sharing!
@YoIntangible
@YoIntangible 3 года назад
Does he have paid videos
@LiveOverflow
@LiveOverflow 3 года назад
No, I don’t have any paid courses right now
@YoIntangible
@YoIntangible 3 года назад
@@LiveOverflow cool i didn't think you read comments on old videos
@marcoschincaglia
@marcoschincaglia 3 года назад
glad to see there was one more video you wanted to make
@lllSavitarlll
@lllSavitarlll 3 года назад
sounds like many from what he said at the end :)
@imamagedude
@imamagedude 3 года назад
Thanks for making this. Code analysis for exploits can seem super impenetrable especially for these old Unix utilities that feel like a fact of life. It's great to have stuff like this showing how you could find an exploit like this on your own. Especially I feel like it's pretty common to get to the point of crashing something and think "OK cool I crashed it, but now what do I do? How do I actually exploit this?", and the segment with GDB really helps with that.
@jwenting
@jwenting 3 года назад
I've done it, though not on Linux code (was part of a bug analysis for a program I was maintaining). Found a potential massive security hole by accident going through the code looking for something completely different. Luckily that piece of code had not yet been rolled out to any production server, and the patch was small and easy to deploy to the test servers it was already running on. Sometimes that's all it takes to find an exploit, sheer luck.
@hamdyahmed5742
@hamdyahmed5742 3 года назад
Your channel is really treasure ☺️ Thanks for sharing these videos
@alicangul2603
@alicangul2603 3 года назад
Imagine the vulnerabilities in the Kernel and utilities the NSA knows right now.
@bjarnestronstrup9122
@bjarnestronstrup9122 3 года назад
What's the point of kernel vulnerabilities when your whole CPU is a backdoor for the NSA XD. Meltdown and Scepter are just the tip of the iceberg of what type of vulnerabilities are hidden in our CPU's, South and North bridges, NIC's and other hardware.
@gmdzbanwic
@gmdzbanwic 3 года назад
imagine what type of shit you would have on your HDD /SSD if NSA wants it XD
@Perseagatuna
@Perseagatuna 3 года назад
@@gmdzbanwic Exactly. I don't know what the fear is lmao. NSA won't just randomly select people to investigate. It's a waste of resources. Unless you are doing some really suspicious stuff, NSA shouldn't investigate you. And even then, nothing will happen if you did nothing. "Which owes nothing fears nothing". Or maybe they do idk I don't work at NSA, seems dumb to me though.
@PatrikKron
@PatrikKron 3 года назад
@@Perseagatuna yet they did mass surveillance as evident by Snowden. Moreover if they save everything, they’ll be able to look through it later to retroactively find something that you might not want to be public.
@Perseagatuna
@Perseagatuna 3 года назад
@@PatrikKron Didn't know that since I'm not from the US. That type of shit is illegal, damn...
@matthewlandry1352
@matthewlandry1352 3 года назад
I think he is getting his mojo back. He looks happy and motivated. 🧐
@filda2005
@filda2005 3 года назад
still out of focus - lens
@TheCramik
@TheCramik 3 года назад
A buffer overflow in your buffer overflow fuzzer, nice one
@willemme758
@willemme758 3 года назад
I really like this type of video, I appreciate the effort you put in to research and explain this. Can't wait for the rest of this series
@CraneArmy
@CraneArmy 3 года назад
totally unrelated. but I've smashed my head against the wall trying to do setup for a process that would run as its own user and spent hours not getting it to run right only to break down and do it with su. this vid answered so many questions for me that I didnt show up trying to answer.
@gFamWeb
@gFamWeb 3 года назад
This is so interesting! It really doesn't look that complicated tbh. Step 1: find a vulnerable function for buffer overflow Step 2: find a way to access that function in a vulnerable state Step 3: find a place to overwrite that could cause arbitrary code execution Fascinating!
@EvilSapphireR
@EvilSapphireR 2 года назад
lmao not complicated. Imagine discovering this and then actually make a valid exploit for it.
@lightblue254
@lightblue254 2 года назад
2:25 this genius acting caught me so off guard and was so hilarious for some reason :) I love it
@ThingEngineer
@ThingEngineer 3 года назад
Really great video as usual, and I’m glad you found your new path going forward!
@Bryzey7
@Bryzey7 3 года назад
Damn! Really Cool mate👍 Look forward to the series.
@chrisjames278
@chrisjames278 3 года назад
Awesome explanation as always. Looking forward to the series!
@DM-qm5sc
@DM-qm5sc 3 года назад
It's samedit because it's a play on Baron Samedi a character in an old James Bond movie.
@InfiniteQuest86
@InfiniteQuest86 3 года назад
As always, great video. I think you may have overstated the difficulty of setting up afl to fuzz commandline input though. It's a super common thing to do if you fuzz a lot. What I'm partially saying is that it's inexcusable that no one has fuzzed it before. Commandline programs are fuzzed all the time and with afl at that!
@x32gx
@x32gx 3 года назад
Inspiring... I'm just getting started on format1 in protostar lol. So... be right with you! :)
@timus545
@timus545 3 года назад
Love your videos, great work. Thanks a lot for creating these videos
@somehow_sane
@somehow_sane 3 года назад
I am VERY excited for this series!
@Epinardscaramel
@Epinardscaramel 3 года назад
Actually laughed out loud at “Their code was much better than my shitty Python script” 🤣
@ejonesss
@ejonesss 2 года назад
what i find amazing is how this eventually got discovered because normally i think such vulnerabilities get discovered accidently for example someone tries to head or tail a file for example and since head and tail displays the first or last part of a file if the file is a binary maybe the system interprets the head or tail output wrongly and not realizing it they have set a memory value and maybe the next time they do something that requires sudo or maybe sudo does not ask for the password or the command is done as if they did sudo. so the only way i can think of is someone decompiled the sudo binary and looked at the code and saw a piece of assembly code that did not look right maybe a jump or copy command and decided to throw stuff at it and got it to work.
@almjhoolGOLD
@almjhoolGOLD 3 года назад
Keep this kind of stuff coming. We LOVE binary exploitation ❤️.
@squirrel1620
@squirrel1620 3 года назад
Still.... Every person who has ever used or developed a fuzzer is kicking themselves right now for now realizing this bug. (-s) ?? Wow that blew my mind. That's all you gotta do? -s and a trailing backslash... 😲
@popquizzz
@popquizzz 3 года назад
Not Super Crazy Stuff... This is a Super Awesome Intelligent Analysis and Review!!!! Thank You!!!
@gruntscrewdriver3261
@gruntscrewdriver3261 2 года назад
Good vid! Im still kinda curious how you couldnt know about NSS?
@meditationsafespace153
@meditationsafespace153 3 года назад
Brilliantly explained. Great video!
@guydurand6270
@guydurand6270 3 года назад
Baron Samedi is from Ayisyan (Haiti) Vaudou. So they played on it and added the "t" at the end. en.wikipedia.org/wiki/Baron_Samedi
@kbzoncapo777
@kbzoncapo777 3 года назад
Man AMAZING video. Insane!
@tg7943
@tg7943 3 года назад
Thank you very much as always! Awesome! :)
@error.418
@error.418 3 года назад
It's Baron Samedit as a play on the name Baron Samedi from Haitian Vodou (Voodoo). He is also a prominent character in the James Bond film Live and Let Die. en.wikipedia.org/wiki/Baron_Samedi Naming it "pwnedit" wouldn't work for this reference.
@taragnor
@taragnor 3 года назад
I feel like anything named after Baron Samedi should be an exploit that works with zombie processes.
@PamirTea
@PamirTea 3 года назад
Great explaination.
@vaff69420
@vaff69420 3 года назад
love the redstar os easter egg :D
@typingcat
@typingcat 2 года назад
Music volume at around 3:30 too high compared to overall voice volume.
@slonkazoid
@slonkazoid 3 года назад
doas gang
@linuxnoodle8682
@linuxnoodle8682 3 года назад
(Let's go)
@dj-no
@dj-no 3 года назад
doas best
@maray97
@maray97 3 месяца назад
Thank you for the tutorial, clear as always. I am trying to replicate the CVE in a Docker container, however, when I run sudoedit -s 'AAAAAAAAAAAA\' I get vim opened. I cannot understand why. Could you please help me? I am running Ubuntu 18.04 and. sudo1.9.5p1 (the version before the patch)
@naruto73924
@naruto73924 3 года назад
liked it very much. quite a good resource.
@eproulx
@eproulx 3 года назад
Why did the code analyzer tools not find anything?
@petrovasyka8
@petrovasyka8 2 года назад
Why you should fuzz as root if we are looking 4 priv esc?
@小张同学-v6i
@小张同学-v6i 3 года назад
kudos liveoverflow! this channel is a goldmine!!...i bet another hacker is there, after watching liveoverflow, is now crafting a mac exploit....Apple is giving decent bounty for serious exploits....
@WladcaKsomsou
@WladcaKsomsou 3 года назад
Cool video! I've tried reproducing it myself but had problems with automating "heap fengshui". Can you share your whole code, including gdb script?
@h3xad3cimaldev61
@h3xad3cimaldev61 3 года назад
Best part of the video 2:26
@Dziedzic95
@Dziedzic95 3 года назад
Great video!
@jerryplayz101
@jerryplayz101 3 года назад
Null termination is an interesting feature of C
@taragnor
@taragnor 3 года назад
It's basically one of those features in C that's built for pure speed but has created countless bugs and exploits over the years.
@testizoizo7373
@testizoizo7373 3 года назад
Thx for the video
@nanupanu8521
@nanupanu8521 2 года назад
Does it work only in linux?
@ImadSaci-xc4rm
@ImadSaci-xc4rm 5 месяцев назад
I love you bro,i follow since along time,but am not pregressing 😂
@icenberg5908
@icenberg5908 3 года назад
How long did it take for you to accomplish this work? Hours?
@icenberg5908
@icenberg5908 3 года назад
I got the answer
@icenberg5908
@icenberg5908 3 года назад
Amazing video and is plush with efforts.
@aspeakgaming3564
@aspeakgaming3564 3 года назад
Baron Samedi was perfectly fine if you know about voodoo
@telnobynoyator_6183
@telnobynoyator_6183 3 года назад
why did rust came in so late 😔
@LongNguyen-jk5dh
@LongNguyen-jk5dh 3 года назад
I watched until 4:47 and my brain has memory overflowed. I'm just a software engineer.
@ucnguyenvan9230
@ucnguyenvan9230 3 года назад
so I move from linux to bsd
@grim1427
@grim1427 3 года назад
Thanks!
@Alex-ck4in
@Alex-ck4in 3 года назад
I feel like that argv solution you gave for Fuzz was WAAAAAAY overcomplicated... Why would you not just write a quick shell script that reads fuzz from stdin to a file, so that you can pass the `cat` of that file as an arg??
@Alex-ck4in
@Alex-ck4in 3 года назад
Realised the answer to my own question: because fuzz needs to see the tested program's output across executions 😅
@boblol1465
@boblol1465 3 года назад
Installing doas speedrun %any when
@Skaytacium
@Skaytacium 3 года назад
i like your funny words magic man
@sp3ct3r71
@sp3ct3r71 3 года назад
Sry to bother u guyz any of u know what is a parser?
@adihacks3755
@adihacks3755 3 года назад
New series opppppp
@werren894
@werren894 3 года назад
that guy/girl that find the bug exist me : *_allow my to serve u my master_*
@jimothyus
@jimothyus 3 года назад
17:02 anyone know why the qualys initialize an integer with (1+0) ? Line 6
@Hauketal
@Hauketal 3 года назад
My guess: allocating a variable length buffer is often for strings. Strings lengths need to be adjusted for the \0 byte at the end, not doing that is a traditional security problem. Here this is not needed, so the programmer used an adjustment of +0 as documentation for 'I thought about adjusting, no error here'.
@shrirangkahale
@shrirangkahale 3 года назад
redstarosx lol good one
@lil_zcrazyg1917
@lil_zcrazyg1917 3 года назад
*sudo apt update's vigorously*
@MCTTABOB
@MCTTABOB 3 года назад
I learned that sudo's code is a mess
@traderdaniel4749
@traderdaniel4749 3 года назад
Sudo make a Sandwich
@sobertillnoon
@sobertillnoon 3 года назад
Where did you get that ASMR valley girl voice to read feng shui?
@LiveOverflow
@LiveOverflow 3 года назад
Default Google Search voice
@nonononononononope
@nonononononononope 3 года назад
When you don't get the original joke so you make a 'better' joke
@thomashirtz
@thomashirtz 3 года назад
I love your videos, however I feel you kinda diminish a lot the achievement of the guys that found the exploit by saying things like "it's luck", or "I could almost have find it" etc
@hayline
@hayline 3 года назад
hello bro i dent know why i love you ..
@SwordQuake2
@SwordQuake2 3 года назад
dafuq is fuzzing?
@LaZZeYT
@LaZZeYT 3 года назад
Friendship ended with sudo! Now doas is my best friend.
@JuliusAlphonso
@JuliusAlphonso 3 года назад
😂😂😂
@archie9500
@archie9500 3 года назад
Doas is the better one anyway, sudo is full of redundant features that a regular user won't use anyway. You could warrant it's use in some server / production environment, with many people having different privileges.
@Synthels
@Synthels 3 года назад
sudo is pure bloat
@tacokoneko
@tacokoneko 3 года назад
I fully switched to doas because of this vulnerability. I use Duncaen's port OpenDoas entirely because he sounds smart and won a flamewar with a different port dev
@anujtomar4234
@anujtomar4234 3 года назад
Better you review "doas" code before drawing conclusion, who knows whats hidden there. 🤔
@MeriaDuck
@MeriaDuck 3 года назад
Already well over 20 years ago I aliased please to sudo. Mainly for self-protection: on a university server sudo would notify system administrators that a student (me) 'accidently' tried sudo. And I was logged into my own linux machine an the uni system in two windows that looked very much the same. At uni, please told me politely that I shouldnt use that. At home, please would do sudo XD
@cemperable
@cemperable 3 года назад
If you had just renamed the sudo binary to "please" instead, it would have also protected you from this bug!
@arivanhouten6343
@arivanhouten6343 3 года назад
Finally another masterpiece!
@Scaramouche122
@Scaramouche122 3 года назад
Van houten?
@simeondermaats
@simeondermaats 3 года назад
@@Scaramouche122 it's a Dutch surname
@arivanhouten6343
@arivanhouten6343 3 года назад
@@simeondermaats yeah but im still German and this is not my real name (apart from Ari which is apparently my 2nd name)
@julian_handpan
@julian_handpan 3 года назад
AMEN!
@PiotrekR-aka-Szpadel
@PiotrekR-aka-Szpadel 3 года назад
This is kind of content that originally bring my attention to your channel, great job
@oldbootz
@oldbootz 3 года назад
ok ok i watched it! i was going to anyway but you guilt tripped me lmao.
@TheGrimravager
@TheGrimravager 3 года назад
ahh yesI remember this one. I was on the toilet reading my google feed, coming across an article mentioning it. Aftwards I'd hit sudo apt update and there was an update ready for the sudo program already. I had only updated about 3-4 hours ago, so I was amazed the patch followed me reading the article so quickly :D
@egoworks5611
@egoworks5611 3 года назад
HAHAHAHAHHAHA that also happened to me, bro... I was reading the google now feed and suddenly. the sudo post popped out. Hilarious.
@jwenting
@jwenting 3 года назад
quite likely they didn't publish the exploit before they had already pushed the code for the patch to the master repository.
@stoinks224
@stoinks224 2 года назад
@@jwenting Thats standard practice as they have time beofre expolit is released by securty resaercher as well as info of exploit.
@Ryan-xq3kl
@Ryan-xq3kl 3 года назад
This guy coding: Me coding: where tf is the h key.
@omerfeyyazselcuk7325
@omerfeyyazselcuk7325 3 года назад
this.
@stop8576
@stop8576 3 года назад
Next to the J, oh wait.. Where tf is the J key
@ariss3304
@ariss3304 3 года назад
I’m honestly surprised that heap layout on Linux is consistent between different runs. That seems like a major flaw.
@misteick
@misteick 2 года назад
Imagine unexperienced user accidentally types \' in this command in 2013 and does not report the bug (not based on me, 100% sure xD)
@JoshuaWolfe
@JoshuaWolfe 3 года назад
Great walkthrough and analysis!! I really appreciate the care you took in explaining this from discovery and going slowly into the analysis for an infosec noob like myself 👍
@CarmelleCodes
@CarmelleCodes 2 года назад
This video is amazing, I'm mind-blown both by the exploit and your clear, concise explanation
@febin2217
@febin2217 3 года назад
SEGFAULT MyBrain.elf Crashed (Core Dumped)
@istvanbarta
@istvanbarta 3 года назад
Linux is safer they said...
@jacoblobo95
@jacoblobo95 3 года назад
Kind of got guilt tripped into watching this video but I am SO GLAD I did. There's so much content on CTF's and basic content and I think it's a struggle going from guaranteed exploitable challenges to real world, humongous code bases looking for bugs that could or could not be there. The idea of taking a CVE and trying to go from step 0 to 0 day is perfect, genius even. I can't wait for your new videos and will definitely be looking for a CVE to research myself. You've definitely outdone yourself this time! Thanks so much!!!
@EvilSapphireR
@EvilSapphireR 2 года назад
You made any progress?
@wgm-en2gx
@wgm-en2gx 3 года назад
This was very informative. Consider doing a video like this in a way that it could be presented to an non-c/c++ developer. I'd love to present this video to my coworkers. While I understand c/c++, our development is java and .net and i would need to explain ASLR and heaps and the other hard core tech stuff. However, I think they would benefit from knowing the lengths to which hackers can go to exploit something like this and that tools like AFL can be used for good or evil.
@taragnor
@taragnor 3 года назад
It's hard to explain it because Java doesn't use pointers, so for the most part if you're using Java, buffer overflows won't happen, at least unless there's a bug in the virtual machine code you're running on. Java won't let you read/write past the bounds of a string in your actual code, so bugs like this really can't happen there. Really this stuff is mostly a C/C++ thing, because those languages have very unsafe string implementations.
@Spartan322
@Spartan322 3 года назад
Pretty much the reason doas was made, the complexity of sudo has (as with most software) been known to introduce bugs and exploits. Real problem with sudo is that its never really been very unix in philosophy, "Do one thing, and do it very well." Sudo really shouldn't have been given control over the kernel/userspace permissions itself honestly in first place, (and as it stands it does so many things that it could be handled separately that you can't honestly call it unix) optimally it would only and purely elevate a process to another user, default being the admin (or root) user.
@Ardeact
@Ardeact 3 года назад
I'm just going to pretend I know what he's talking about
@flipped_bit
@flipped_bit 3 года назад
!!!! NEW SERIES COMING AAAAAAAAAAAAAA\
@ThisIsTheInternet
@ThisIsTheInternet 3 года назад
This is a genius series idea - I have wanted to see something like this for a long time. The high level stuff is great, but a more in depth version would be good - one where you actually work through the steps, how you're figuring out getting past the various challenges. That might be more work, so maybe a patreon feature? If you want to take it further, maybe try going after allocated but undisclosed CVEs that have been patched. Covering how to attack unknown exploits via source diffing (or binary diffing) would be amazing.
@jauleris
@jauleris 3 года назад
I have analyzed this bug also... And those "How did they managed to find this?" moments almost exactly match :DDDD
@Lethaltail
@Lethaltail 2 года назад
Are subtitles modifiable in any way by community members? It irks me that RU-vid removed such a nice feature.
@pavel9652
@pavel9652 3 года назад
I suspected this kind of deep-dive takes ages to produce. The two weeks of research on the KNOWN bug, I am not even surprised! ;) I don't even want to know how many decades would it take for me to discover the vulnerability in the first place! ;) Thanks for the great video! 11/10 - will watch it again! (note the integer overflow) ;)
@kal1gh0stsecurity40
@kal1gh0stsecurity40 3 года назад
I would like to know who dislikes his videos -_-
@RYANTHORNTONCALL
@RYANTHORNTONCALL 3 года назад
Am I just the one confused why sudo has so much code to make something run under another user?
@SoulSukkur
@SoulSukkur 3 года назад
oh dude, I have a parser written in c, and I created that exact same "blind increment over an escape" bug. do i have to credit you in my capstone now?
@LMB222
@LMB222 3 года назад
That's why we need to switch to C++, like Fuchsia did.
@Deniied
@Deniied 3 года назад
You should make a video about the PHP backdoor.
@mariuskimmina
@mariuskimmina 3 года назад
Love the idea of this series!
@GeofreySanders
@GeofreySanders 3 года назад
I'm happy to hear you're not ran out of ideas anymore.
@chwaee
@chwaee 2 года назад
For Mac, I don't have "sudoedit" by default, so wouldn't that bypass the whole thought about trying to run this on Mac? I thought we needed sudoedit in order to get in that interesting sudo 'mode' to be exploited? At 18:10 we see the use of "/tmp/sudoedit" meaning the attacker would need to have an already compromised system, and be able to write a file in /tmp/ to attempt privilege escalation. At that point, there are easier ways, like writing a malicious python script in /tmp/ and gaining privileges from that, right? This just doesn't seem to be worth the squeeze on Mac. So feasibility on a Mac: very very improbable I do see a "/usr/sbin/visudo" Mach-O binary on my Mac. Perhaps that would be a better place to start looking for a more realistic approach.
@gentoo6003
@gentoo6003 2 года назад
@LiveOverflow what can I use to fuzz source code or binaries themselves(for example Firefox) for RCE’s?
Далее
Why Pick sudo as Research Target? | Ep. 01
14:57
Просмотров 48 тыс.
How To Protect Your Linux Server From Hackers!
20:38
Просмотров 301 тыс.
Witch changes monster hair color 👻🤣 #shorts
00:51
What is the Smallest Possible .EXE?
17:04
Просмотров 397 тыс.
When you Accidentally Compromise every CPU on Earth
15:59
The Circle of Unfixable Security Issues
22:13
Просмотров 114 тыс.
How One Line of Code Almost Blew Up the Internet
13:47
My Trip to DEF CON & Black Hat
26:35
Просмотров 53 тыс.
The Linux Experience
31:00
Просмотров 1 млн
Local Root Exploit in HospitalRun Software
20:48
Просмотров 68 тыс.