Zero-day vulnerability in Bash - Suidbash Google CTF Finals 2019 (pwn)

  Рет қаралды 131,605

LiveOverflow

LiveOverflow

Күн бұрын

An actual 0-day in /bin/bash due to a bug in the privilege dropping feature. It was discovered by Ian Pudney and turned into a CTF challenge for the Google CTF 2019 Finals.
CVE-2019-18276
=[ 🔴 Stuff I use ]=
→ Microphone:* geni.us/ntg3b
→ Graphics tablet:* geni.us/wacom-...
→ Camera#1 for streaming:* geni.us/sony-c...
→ Lens for streaming:* geni.us/sony-l...
→ Connect Camera#1 to PC:* geni.us/cam-link
→ Keyboard:* geni.us/mech-k...
→ Old Microphone:* geni.us/mic-at...
US Store Front:* www.amazon.com...
=[ ❤️ Support ]=
→ per Video: / liveoverflow
→ per Month: / @liveoverflow
=[ 🐕 Social ]=
→ Twitter: / liveoverflow
→ Website: liveoverflow.com/
→ Instagram: / liveoverflow
→ Subreddit: / liveoverflow
→ Facebook: / liveoverflow
=[ 📄 P.S. ]=
All links with "*" are affiliate links.
LiveOverflow / Security Flag GmbH is part of the Amazon Affiliate Partner Programm.

Пікірлер: 167
@LiveOverflow
@LiveOverflow 4 жыл бұрын
What do you think about interviews for videos like this?
@SP-hz5tp
@SP-hz5tp 4 жыл бұрын
Really nice to see the thought processes of the creator itself. I would love to see more like this.
@Zooiest
@Zooiest 4 жыл бұрын
More!
@qwerty123443wifi
@qwerty123443wifi 4 жыл бұрын
I like it, I'd like to see more things like this
@swift87100
@swift87100 4 жыл бұрын
A face reveal
@Pcpiee
@Pcpiee 4 жыл бұрын
pretty clever editing with first talking over a muted video and then to unmute right at the interesting part
@jonathanhoyos8191
@jonathanhoyos8191 4 жыл бұрын
Michael Cera and Ed Sheeran doing some binary exploration. Love you guys
@AB-vu1yl
@AB-vu1yl 4 жыл бұрын
SCREAMINGGGGGGGGGGG
@wdai03
@wdai03 4 жыл бұрын
Seth Rogen should get off John Hammonds channel and join in. I've been saying that for a while now
@spv420
@spv420 2 жыл бұрын
I can’t unsee it
@_JohnHammond
@_JohnHammond 4 жыл бұрын
im 12 what is this
@quantumbracket6995
@quantumbracket6995 4 жыл бұрын
TEMPLE OS
@awecwec3720
@awecwec3720 4 жыл бұрын
??
@awecwec3720
@awecwec3720 4 жыл бұрын
xd
@awecwec3720
@awecwec3720 4 жыл бұрын
@@quantumbracket6995 stfu
@awecwec3720
@awecwec3720 4 жыл бұрын
?
@fishmoding
@fishmoding 4 жыл бұрын
Imagine if the developers didn't add that extra edge case for using setuid() as root... Shit this is what xkcd meant by 'we're only one linux exploit away from the world collapsing'
@strongman6201
@strongman6201 4 жыл бұрын
Yeah what lang you use for robot
@art_faith
@art_faith 2 жыл бұрын
09:03
@hatit8074
@hatit8074 Жыл бұрын
Waaw, happy to John as well in the video. Man you guys rock. 🎉🎉🎉
@JonathanSwiftUK
@JonathanSwiftUK 4 жыл бұрын
Similar to earlier PRIMOS bug allowing you to create a library with the same name as the ring 0 routine which checks if you are superuser, then load it using PRIMOS BIND before loading final system library. Your routine gets linked / resolved first, and allows checks to that library name to always return yes. That exploit was done over 30 years ago, I know because I was there, although I didn't do it myself. You'd presume today all privileged routines would have a digital signature to verify authenticity. Good job on explaining this, nice and clear.
@BGroothedde
@BGroothedde 4 жыл бұрын
That's amazing, using an actual existing vulnerability in a CTF!
@electricketchup
@electricketchup 4 жыл бұрын
Isn't that what most people do?
@BGroothedde
@BGroothedde 4 жыл бұрын
@@electricketchup No, most CTFs are simulated vulnerabilities. They are based on real-life examples of vulnerabilities. This was a real one.
@AneeshDogra
@AneeshDogra 4 жыл бұрын
Beautiful. Its cool to know that I wasn't alone in thinking this game is broken. The last thing you mentioned happened to me multiple times and then by hit and trial I figured that it works in sh and not bash. Bash was dropping my privs all along :D
@bringiton2100
@bringiton2100 4 жыл бұрын
Maaaaaaannnnn i felt exactly the same. When I started learning about exploitation (I'm still learning) . It was soooooo frustrating when I was sure all my exploiting was good but some how I was not root !!!. Now finally I know why, thanks a lot from Mexico.
@tcocaine
@tcocaine 4 жыл бұрын
We're all still learning.
@Reelix
@Reelix 4 жыл бұрын
The 4:20 person hiding with... bread was surprisingly effective. Rewatched that segment several times before I realized there was actually a person there (Their sleeve clips out the shot)
@GeorgeTsiros
@GeorgeTsiros 4 жыл бұрын
maybe they did not agree with appearing in the video? 🤔
@GeorgeTsiros
@GeorgeTsiros 4 жыл бұрын
or they identify as a baguette?
@sarunint
@sarunint 4 жыл бұрын
Wow, this video is mentioned in the CVE page.
@pgoeds7420
@pgoeds7420 4 жыл бұрын
One approach is to run the bash shell with the flag file as input and hope to see the content in the syntax error. Of course if it was an actual command to chmod your shell you'd fail to make progress.
@tempus_fugit__
@tempus_fugit__ 4 жыл бұрын
0:00 that's gynvael in the background
@fikrialwahid655
@fikrialwahid655 4 жыл бұрын
suidperl is oldest vulnerability but it's still relevant
@goeo_
@goeo_ 4 жыл бұрын
just to note, he mentioned a script by tavis ormandy and github.com/taviso/ctypes.sh was quite googleable; and that could've been used to solve the chal too
@Luculent
@Luculent 4 жыл бұрын
So basically, you ask yourself "how badly can you possibly fuck this up" and you're set.
@ethanp5215
@ethanp5215 4 жыл бұрын
Noob question, I apologise for the wide gaps in my knowledge, but does this also effect Zsh/Fish? Would it require a separate CVE if it did affect them? Thanks If you're reading LiveOverflow, I truly love your videos. Always excited, too much for a grown man, when I see your videos
@JimzZel
@JimzZel 4 жыл бұрын
I wish I could take you back into time. If I was 12 - 21. I could watch this all day :D
@PacAnimal
@PacAnimal 4 жыл бұрын
You can use bash loadable builtins to, for instance, get a builtin sleep function, to sleep for short times without spawning lots of processes.
@BlackHermit
@BlackHermit 4 жыл бұрын
So cool! It could really break many other CTFs, if you don't mind :)
@svampebob007
@svampebob007 4 жыл бұрын
would you look at that, perfect video for a paranoid guy trying to learn linux and remote management by setting up his won server with various automation scripts written in bash.... I'm starting to reconsider my sms to systemctl script :O I'm actually having so much fun messing around with my computer and android to see what I can port/"export" (like read various sensors on the phone but using the data on the server) but I've caught myself implementing some backdoor by just being lazy or ignorant. This video really shows that you can't assume that anything "standard and well peer reviewed" can be trusted to do everything right all the time! how many people read the binaries and boasted about compiling their own linux distro while over looking this "oh so simple" bug. I also love how he just stumbled on it by being extra curious, not only did he want to make up some hypothetical bug, but he wondered if anybody did the same "error" he was about to do! love it!
@gyroninjamodder
@gyroninjamodder 4 жыл бұрын
Compiling software does not mean that you have read over the source code
@nkusters
@nkusters 4 жыл бұрын
No surprise to see that Tavis reference :P
@R3dFlames
@R3dFlames 4 жыл бұрын
Just managed to reproduce it on the CTF server. Even after you guys mentioned loadable builtins, I still didn't get it, because I didn't know code gets executed as soon as you "enable -f". Is that "initLibrary" thing even documented anywhere on this planet? Oh wait, that's just the name you gave it, and the "((constructor))" tells gcc or linux or _something_ somewhere to run this when the module gets loaded? As one can tell I don't know a whole lot about this arcane C magic :P
@kevinalexander4959
@kevinalexander4959 3 жыл бұрын
Vulnerabilities are everywhere, you just gotta be good enough to solve the puzzle and exploit. Just to think, our whole infrastructure these days is based on these machines. I wouldn't doubt every secure system in the world could be exploited by a talented enough hacker. Collapse of civilization caused by some Python and Pearl code.. *chuckles*
@leon1985ist
@leon1985ist 4 жыл бұрын
I idol the 3 of you guys thanks for your teachings
@themadichib0d
@themadichib0d 4 жыл бұрын
I mean he calls it the worlds least useful vulnerability but I can think of a lot of systems where this vulnerability would have worked essentially as a jail escape.
@CyberMahir
@CyberMahir 4 жыл бұрын
Pretty tricky and cool.. Love from India
@saschamajewsky7990
@saschamajewsky7990 4 жыл бұрын
How do you create the drawing and text of the video? Do you got a program for that or is it just a graphic tablet?
@PaulaJBean
@PaulaJBean 4 жыл бұрын
YAGNI, but implement it anyway: a way to embed foreign binary executable code in your shell. What were the bash author(s) thinking?
@gyroninjamodder
@gyroninjamodder 4 жыл бұрын
Because doing exec is extremely slow
@bandie9101
@bandie9101 4 жыл бұрын
extensibility, plugin capability maybe?
@thewhitefalcon8539
@thewhitefalcon8539 Жыл бұрын
Why don't you want this?
@techchannel1781
@techchannel1781 4 жыл бұрын
How loves zero days❤
@LoukaJC
@LoukaJC 4 жыл бұрын
"-I wonder how many people feel the same way.. -I feel the same way. Like 1000% of the me same way :') "
@ZoomAnimationHere
@ZoomAnimationHere 3 жыл бұрын
holy bash !
@bernhardtrian7471
@bernhardtrian7471 4 жыл бұрын
I did kind of understand this video because of the similarity to Cisco User priviliges in their OS. The message was to gain back access to a priviliged mode with a bash execution , right ?
@BB-dv8nu
@BB-dv8nu 3 жыл бұрын
big brain moves
@georgez5269
@georgez5269 4 жыл бұрын
I love this video so informative
@ninocrudele
@ninocrudele 4 жыл бұрын
It looks like more a challenge on knowing parameters than any other thing to be honest
@wcodelyoko
@wcodelyoko 4 жыл бұрын
Wait, so I can escalate privileges on my school's pc? Nice!
@olfmombach260
@olfmombach260 4 жыл бұрын
This is *not* about escalating privileges to root, it's just lateral movement
@wcodelyoko
@wcodelyoko 4 жыл бұрын
@@olfmombach260 Still, you can switch to a user with higer privileges
@thewhitefalcon8539
@thewhitefalcon8539 Жыл бұрын
Does your school have this suidbash thing?
@BakedRawr
@BakedRawr 4 жыл бұрын
Dont understand everything yet aber sehr gutes Video! :)
@afonsorafael2728
@afonsorafael2728 4 жыл бұрын
so wait, you cat >/tmp/escape.c
@gabuscus
@gabuscus 4 жыл бұрын
it's a heredoc, it writes until you type "EOF"
@R3dFlames
@R3dFlames 4 жыл бұрын
When I just tried this I just... built it on my machine, stripped the binary, and put it through base64--- actually no, that's still very big, but fortunately xz & unxz are also available on the CTF server, so yeah 😅 I was going with the examples in the bash source itself, and that kinda required me to ./configure the whole thing.
@happygimp0
@happygimp0 4 жыл бұрын
You can also use something else other than EOF, you just need to end with the same string. Search for heredoc.
@SauravKumar-tf3uv
@SauravKumar-tf3uv 4 жыл бұрын
How do you create this video where only I can see the terminal and not the other aspects of ubuntu, like how do you hide it
@LiveOverflow
@LiveOverflow 4 жыл бұрын
it's called video editing lol
@SauravKumar-tf3uv
@SauravKumar-tf3uv 4 жыл бұрын
@@LiveOverflow Thanks! Had Suspicions but now you confirmed it!!
@kenstoudamire7366
@kenstoudamire7366 4 жыл бұрын
linux is beautiful!
@cafeinoz5966
@cafeinoz5966 4 жыл бұрын
Beautiful like "The Scream". I once tried kernel programming and all I got was a full beard and worsened mental health.
@RakibFiha
@RakibFiha 4 жыл бұрын
wow, did not know that enable -f has some hidden feature.
@himashhimash6017
@himashhimash6017 4 жыл бұрын
Better way of explanation
@pgoeds7420
@pgoeds7420 4 жыл бұрын
5:13 omitted to mention fsuid for Linux
@nanthantamilctf8912
@nanthantamilctf8912 3 жыл бұрын
Future liveoverflow:spoiler alert ()😁😁
@Adowrath
@Adowrath 4 жыл бұрын
How exactly was the Saved UID involved here? I don't see it really..
@gyroninjamodder
@gyroninjamodder 4 жыл бұрын
In his custom builtin he restores the saved uid
@Adowrath
@Adowrath 4 жыл бұрын
But he just sets his uid to 1001. Or is this an internal check of setuid, as in "allow this if [...] or if the uid parameter is equal to the saved UID"?
@secureitmania
@secureitmania 4 жыл бұрын
Other than this video there is no single article about this CVE id, why?
@ethanp5215
@ethanp5215 4 жыл бұрын
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18276
@secureitmania
@secureitmania 4 жыл бұрын
@@ethanp5215 thank you very much.
@secureitmania
@secureitmania 4 жыл бұрын
Is it vulnerable to all below 5.0 bash versions?
@ethanp5215
@ethanp5215 4 жыл бұрын
@@secureitmania You're very welcome I'm sorry I don't know, I'm just starting out I think "Through 5.0 patch 11" means that it is everything below that, but don't take my word for it
@gyroninjamodder
@gyroninjamodder 4 жыл бұрын
Because it's a rare configuration.
@ffKingcreole
@ffKingcreole 4 жыл бұрын
this looks so usefull, how is it not more dangerous? :D
@A1rPun
@A1rPun 4 жыл бұрын
You can't get root privileges. You can however read files from other non-root users.
@learningcode6786
@learningcode6786 4 жыл бұрын
intresting fact, Do you guys know that liveoverflow has a channel in P*rnHub. I am not kidding it is there. It is funny and there it is also this educational (seriously it is also about finding vulnerability there). Go check it out.
@jmullentech
@jmullentech 4 жыл бұрын
lmao holy shit that is amazing!!!
@learningcode6786
@learningcode6786 4 жыл бұрын
@TheUmbrellaCorpX7[エヴ] just search it in p*rnhub you will find it, it is a channel not a single video
@wdai03
@wdai03 4 жыл бұрын
Well he does do penetration testing
@rasmus9311
@rasmus9311 4 жыл бұрын
This dude talks the same as Tarantino
@dragon_warrior_
@dragon_warrior_ 4 жыл бұрын
Okay....In what lang they were speaking?
@willlynas672
@willlynas672 4 жыл бұрын
So does /bin/sh not drop privileges?
@adamrogers7682
@adamrogers7682 4 жыл бұрын
As I understand it, no. (However, i could be mistaken)
@floatingblaze8405
@floatingblaze8405 4 жыл бұрын
#NotificationSquad
@aprizamsaputra9611
@aprizamsaputra9611 4 жыл бұрын
Cool trick
@joelosler
@joelosler 4 жыл бұрын
What the song is on your intro?
@muellerhans
@muellerhans 4 жыл бұрын
11:54 *So you can use this "here document" / "here file" [...].
@ComeadeKat
@ComeadeKat 4 жыл бұрын
user@redstarOSX.... Did North Korea update redstarOS?
@ComeadeKat
@ComeadeKat 4 жыл бұрын
*downgrade
@dxsp1d3r
@dxsp1d3r 4 жыл бұрын
John Hammond
@-peridys8346
@-peridys8346 4 жыл бұрын
good
@doomzroxx3960
@doomzroxx3960 4 жыл бұрын
With all being said..could someone exploit 6.20 🙏🙏
@ali_p_q7920
@ali_p_q7920 4 жыл бұрын
I could barely understand a thing in this one. Will this get patched? What does that mean for all Linux systems out there?
@happygimp0
@happygimp0 4 жыл бұрын
Nothing, it needs a very special setup to be useful. And it gives you only access to other users, not root. Most people that would have such a script, which is needed, would have it as root.
@ali_p_q7920
@ali_p_q7920 4 жыл бұрын
@@happygimp0 I see. Thanks for answering. I really like to watch these videos covering the CTF, but my knowledge of hacking and of Linux in general is still on the humble side. To me the exploit seemed more powerful than it actually is, but with your explanation it makes more sense.
@thewhitefalcon8539
@thewhitefalcon8539 Жыл бұрын
Nothing. I'd even say there's no vulnerability in bash here. None at all. What there is, is a failure of defense-in-depth that would otherwise cancel out the vulnerability that was introduced by this custom suidbash thing
@henke37
@henke37 4 жыл бұрын
Cheating with a library initializer? How brutish. The elegant solution is clearly to implement a proper built in that lets you specify arbitrary userids to use.
@thewhitefalcon8539
@thewhitefalcon8539 Жыл бұрын
No ethical software engineer would ever write a DestroyBaghdad function. They'd have to write a DestroyCity function, to which Baghdad could be given as a parameter.
@GeorgeTsiros
@GeorgeTsiros 4 жыл бұрын
flag_haver... which means... semaphore 😁
@algorithm5717
@algorithm5717 4 жыл бұрын
Very nicely done
@gyroninjamodder
@gyroninjamodder 4 жыл бұрын
Using SHA256 for hashing passwords in 2019? Since they are using a high entry password they should be using Blake2.
@j3r3miasmg
@j3r3miasmg 4 жыл бұрын
IKTFB
@lior_haddad
@lior_haddad 4 жыл бұрын
Hi
@happygimp0
@happygimp0 4 жыл бұрын
Can you add a link to more information in the description?
@RyanTosh
@RyanTosh 4 жыл бұрын
Usually when a video is first posted, there're more comments than views. Not so here. It appears KZbin's scared to mess up on a hacking channel (-:
@schwingedeshaehers
@schwingedeshaehers 4 жыл бұрын
Or the users look before they comment
@fghsgh
@fghsgh 4 жыл бұрын
Usually, it's more likes (comments) than views. And this can be explained easily, as people like the video before having watched enough into the video to have it counted as a view. Also, views are cached more than likes, so they're more slowed down.
@RyanTosh
@RyanTosh 4 жыл бұрын
@@fghsgh I know, I know, just a joke (-:
@fghsgh
@fghsgh 4 жыл бұрын
@@RyanTosh Well some people don't know. Although on this channel, probably more people do than don't.
@aldison5070
@aldison5070 4 жыл бұрын
Ed Sheeran 14:46
@ronzz8933
@ronzz8933 4 жыл бұрын
John Hammond
@tylerufen
@tylerufen 4 жыл бұрын
needs more fab and uloos
@hexfish3422
@hexfish3422 4 жыл бұрын
This is inherently a shitty CTF problem because the description was absolutely useless. This challenge was created because the author wanted to brag and get attention for finding a vuln and wasted everyones' time while doing so. I hope Google doesn't let this happen again.
@DavidKoseckyCZ
@DavidKoseckyCZ 4 жыл бұрын
bash != sh ..
@danyrogers4220
@danyrogers4220 4 жыл бұрын
ph4t
@agonymouse4864
@agonymouse4864 4 жыл бұрын
lmao! the guy interviewing has no idea what the author is talking about, his face is priceless haha..
FPGA simulated on a GPU - GPURTL Google CTF Finals 2019 (reversing)
43:03
Analysing a Firefox Malware browserassist.dll - FLARE-On 2018
16:26
LiveOverflow
Рет қаралды 253 М.
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Паша Осадчий
Рет қаралды 4,3 МЛН
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 16 МЛН
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Wian
Рет қаралды 15 МЛН
What will he say ? 😱 #smarthome #cleaning #homecleaning #gadgets
01:00
Hacking Google Cloud?
21:59
LiveOverflow
Рет қаралды 123 М.
How SUDO on Linux was HACKED! // CVE-2021-3156
19:56
LiveOverflow
Рет қаралды 201 М.
Selling 0-Days to Governments and Offensive Security Companies
39:18
The Circle of Unfixable Security Issues
22:13
LiveOverflow
Рет қаралды 114 М.
Finding The .webp Vulnerability in 8s (Fuzzing with AFL++)
24:11
LiveOverflow
Рет қаралды 59 М.
Education and CTFs with Fabian aka LiveOverflow | CTF Radiooo 00A
1:36:05
Bash injection without letters or numbers - 33c3ctf hohoho (misc 350)
11:09
Find Vulnerable Services & Hidden Info Using Google Dorks [Tutorial]
13:37
Trying to Find a Bug in WordPress
18:07
LiveOverflow
Рет қаралды 91 М.
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Паша Осадчий
Рет қаралды 4,3 МЛН