Shellshock Code & the Bash Bug - Computerphile

  Рет қаралды 124,477

Computerphile

Computerphile

Күн бұрын

Пікірлер: 156
@myne4
@myne4 10 жыл бұрын
I'd just like to interject for a moment. What you're referring to as GNU/Linux is in fact... GNU/Linux.
@RonJohn63
@RonJohn63 9 жыл бұрын
myne4 Or is it GNU/X/{GNOME|KDE|XFCE|LXDE}/Mozilla/LibreOffice/Linux?
@MrCreeperX
@MrCreeperX 8 жыл бұрын
Wut?
@ekanshdeepgupta658
@ekanshdeepgupta658 8 жыл бұрын
Umm, can someone explain?
@RonJohn63
@RonJohn63 8 жыл бұрын
Ekanshdeep Gupta No, we can't. You must be a Unix nerd to understand.
@yasyasmarangoz3577
@yasyasmarangoz3577 4 жыл бұрын
@@RonJohn63 Just explain it xD
@AndrewMeyer
@AndrewMeyer 10 жыл бұрын
Opening line is technically inaccurate (though probably correct enough for most purposes): "This line of code is the Shellshock exploit." Not quite. That line just demonstrates the exploit, it isn't the exploit itself. "I'm using it here to check whether my system is vulnerable to the shellshock bug." That line just checks whether your version of bash is vulnerable, not whether your system is vulnerable. Whether your system is vulnerable or not is a bit more complicated to determine. Just thought I'd point that out. (Sorry to be so pedantic.)
@yawor
@yawor 10 жыл бұрын
I totally agree. For the system to be vulnerable an attacker still needs some attack vector allowing him/her to exploit the bug in the bash. CGI scripts can be such a vector, but newer technologies like FastCGI, WSGI are not (data from front end server like Apache is not being send to back end application via shell environment variables). Unfortunately this still leaves many devices and servers vulnerable as there are still many CGI apps out there.
@FishKungfu
@FishKungfu 10 жыл бұрын
"How We Got to Now" reminds me of James Burke's "Connections" tv show.
@ZardoDhieldor
@ZardoDhieldor 10 жыл бұрын
This looks so simple. How come this wasn't found for the last 20 years?
@bloody_albatross
@bloody_albatross 10 жыл бұрын
Look at the source of bash and you'll know. The source of bash isn't that simple. Maybe something similar like OpenSSL: "Eew, no, I don't want to contribute to a project with such a source."
@JarinUdom
@JarinUdom 10 жыл бұрын
Well of course it's simple once you know about it
@ZardoDhieldor
@ZardoDhieldor 10 жыл бұрын
Jarin Udom But there sure was someone who tested it for bugs or something! I don't get how this stayed unnoticed for over a quarter of a century! Well, maybe it's just been luck.
@jamesrawlings8493
@jamesrawlings8493 10 жыл бұрын
Zardo Schneckmag There are (literally) thousands of different use cases which have to be tested for something as complex as bash. This is something which could have been tested but probably was not thought to do. Testing the function definition feature probably missed it. As others have said its taken decades before someone realized this could be done.
@bloody_albatross
@bloody_albatross 10 жыл бұрын
***** How can it beat C++ if it is a subset thereof? Also games and non Gtk GUI applications are usually written in C++ (and some in Objective C).
@Floodric1991
@Floodric1991 10 жыл бұрын
His response to Brady's question at the end made me lose it
@Coolfolder
@Coolfolder 10 жыл бұрын
I feel like this left me a bit hanging. How would this bug allow somebody else to gain access to my computer?
@iliakorvigo7341
@iliakorvigo7341 6 жыл бұрын
You can use that to download and execute malware.
@AureliusR
@AureliusR 3 жыл бұрын
@@abdulelahfallatah It's not a "virus", it's just a bug in the way it interprets environment variables. This won't affect systems that don't use bash, and this was immediately patched and is no longer an issue on modern *nix systems.
@LeiosLabs
@LeiosLabs 10 жыл бұрын
I would like to point out that most distros have a fix already. If you are vulnerable, be sure to update quickly!
@violencechildren7603
@violencechildren7603 8 жыл бұрын
this just inspired to do some automation on my ubuntu
@MrMebelMan
@MrMebelMan 7 жыл бұрын
1:48 you're using a string comparison '=' instead of numeric comparison '-eq'. It doesn't matter much tho ;)
@CelmorSmith
@CelmorSmith 10 жыл бұрын
Knew already about that Exploit but didn't know my Smartphone was also vulnerable. Are both iOS and Android affected? Sure, Android is based on the Linux Kernel but that it had also bash was new to me.
@IceMetalPunk
@IceMetalPunk 10 жыл бұрын
Android, as far as my research shows, is not vulnerable as it uses a custom shell, not Bash.
@CelmorSmith
@CelmorSmith 10 жыл бұрын
IceMetalPunk Ah OK.
@CelmorSmith
@CelmorSmith 10 жыл бұрын
***** Well, I generally use a PC with Windoof and just a cheap Smartphone. Normally you shouldn't even connect to a public networks or be visible from outside the router with your iPhone per port forwarding. Also I will check my router now, it's a FritBox but I don't know if the services running on there are also Linux Kernel based.
@CelmorSmith
@CelmorSmith 10 жыл бұрын
***** :P
@esoteridactyl
@esoteridactyl 10 жыл бұрын
***** Also if you're on jailbroken iOS 7 there is a patch in Cydia for it.
@199NickYT
@199NickYT 10 жыл бұрын
Seems very familiar to me...looking at you, unsanitized database queries
@SniperMayer
@SniperMayer 10 жыл бұрын
Deserves a thumb up at least for the GNU/Linux correction :^)
@HashimAziz1
@HashimAziz1 5 жыл бұрын
So basically SQL injection for bash? Shocking that this went unnoticed for so long.
@Bp1033
@Bp1033 10 жыл бұрын
For the longest time I thought that was a feature.
@alcesmir
@alcesmir 10 жыл бұрын
The ability to pass functions through environment variables is a feature. However, exploiting these variables to run code as the variable is parsed is not.
@Potenti4lz
@Potenti4lz 10 жыл бұрын
So you can run functions other than just echo?
@Bp1033
@Bp1033 10 жыл бұрын
you can pretty much do anything you can do in the terminal with this. lets say wget some script then execute said script.
@taesheren
@taesheren 10 жыл бұрын
***** So you can use this to execute programs at root level without actually having root access?
@jasondoe2596
@jasondoe2596 10 жыл бұрын
Taesh No! Not unless you combine it with some other privilege escalation exploit (which would be found elsewhere, not in bash itself). Even if someone can execute arbitrary code, it would be using the (limited) privileges of the user who started the specific bash instance (for example, the web server). Which is the reason that anyone running web services as root fully deserves what's coming at them...
@kingemocut
@kingemocut 10 жыл бұрын
all these "smart" systems getting so many bugs, and i'm just here with my composite TV having a laugh.
@bloody_albatross
@bloody_albatross 10 жыл бұрын
How do you write KZbin comments on a composite TV?
@kingemocut
@kingemocut 10 жыл бұрын
using my XP SP3 pc w/ dial up kappa
@bloody_albatross
@bloody_albatross 10 жыл бұрын
kingemocut Yeah, because that's safe. There are no more security updates for XP.
@kingemocut
@kingemocut 10 жыл бұрын
***** no, i was being sarcastic.
@dipi71
@dipi71 10 жыл бұрын
If you have the Cygwin environment installed on your WinXP system , then you might still use an exploitable bash installed and running.
@uriituw
@uriituw 10 жыл бұрын
How may I obtain that Bourne Shell book?
@jagmarz
@jagmarz 10 жыл бұрын
Nice catch on the typo on the original exploit, there...
@shpider916
@shpider916 10 жыл бұрын
So many Atari's in the background! Falcon, and an early non-fm ST
@dattebenforcer
@dattebenforcer 10 жыл бұрын
What about deleting System 32?
@WingmanSR
@WingmanSR 10 жыл бұрын
That typically solves most problems, yes.
@dattebenforcer
@dattebenforcer 10 жыл бұрын
SBwingman But will they cover it? (and demonstrate it)
@KurakiN64
@KurakiN64 10 жыл бұрын
***** Watch Joel’s Windows 98 destruction video.
@turkyandgravy
@turkyandgravy 8 жыл бұрын
+dattebenforcer Deleting System 32 is a huge bug in the Windows operating system.
@dattebenforcer
@dattebenforcer 8 жыл бұрын
Ryan Mattox I know, I deleted it from my PC and now it runs super fast and never crashes.
@blackneos940
@blackneos940 5 жыл бұрын
I'd just like to interject for a minute: What you are referring to as GNU/Linux, is, in fact, GNU/BASH/Apt/RPM/Sh/Git/SSH/Linux, or, as I have taken to calling it, GBARShITSL.
@Borednesss
@Borednesss 10 жыл бұрын
This might sound like a dumb question since I don't know how any of this works.. but, was it just the syntax of that code that was recently discovered, or had it been known and someone just figured out how to create exploits with it?
@JahMusicTube
@JahMusicTube 10 жыл бұрын
If i type helo as in the example at 3:09 on Linux Mint i get a "command not found" message! Why is that? How do i execute an environment function then?
@JahMusicTube
@JahMusicTube 10 жыл бұрын
Yes to both :D
@DrRChandra
@DrRChandra 10 жыл бұрын
A function has to be marked for export, such as by the "-f" option to export. One of Bash's options is to export all newly created variables and functions, and is a settable parameter. One of your files (say /etc/bashrc) may have turned this off; I'm not sure what the default is. As a result, "helo" is not exported into the new environment. Dr. Bagley's Bash environment may be different from yours. It's possible if you were to execute "set -a" before trying that example that it would work. The trouble would be is if your Bash startup files turn that off, the new invocation of bash in that example would not pay attention to your "set -a" command. It may very well be turned off as a response to Shellshock. The maintainers of your GNU/Linux distribution may think the feature is used so little that breaking scripts which depend on this behavior is more acceptable than letting the exported function bug do damage. It's tough to say, I'm just waxing philosophical, and cannot speak for whoever maintains your Bash.
@JahMusicTube
@JahMusicTube 10 жыл бұрын
rchandraonline It is possible. In fact, i've tried to replicate the bug in another way, but it doesn't seem feasible. 'export -f' only accepts the function name as argument, hence it is safe. What I cannot find is how to turn on automatic export of newly created variables and functions. My bashrc file does not contain anything related apparently, so I'm assuming that by default the feature is turned off. Do you know how to turn it on? Thank you for your explaination btw!
@Longlius
@Longlius 10 жыл бұрын
Linux Mint doesn't use bash but a somewhat stripped down shell called dash. It doesn't have this bug. en.wikipedia.org/wiki/Almquist_shell
@DrRChandra
@DrRChandra 10 жыл бұрын
That'd be "set -a". Use man bash and look at the builtins section where it discusses the set command. I have a really tough time believing Mint does not have Bash. It may be an optional package (not installed by default). I use Fedora and Xubuntu myself, and the latter is a Debian derivative, as are Ubuntu and Mint.
@Edgewalker001
@Edgewalker001 9 жыл бұрын
Pretty much, if you are using an android phone then it does have BASH. (As I recall, in the usual humoristic way that stands for Bourne Again SHell, as a nod to the original Bourne shell they were talking about.) Android is basically just a lightweight linux distro, it runs the linux kernel and it should also include BASH.
@turkyandgravy
@turkyandgravy 8 жыл бұрын
+Edgewalker001 While it's true that Android is based of Linux, by Linux they mean the Linux kernel, not GNU, so programs built for Android won't run on Linux, and programs made for Linux won't run on Android unless there's a compatibility layer. Android is about as related to Linux as OSX is.
@Dudleymiddleton
@Dudleymiddleton 10 жыл бұрын
Is that an old 1040ST lurking behind?
@DrSteveBagley
@DrSteveBagley 10 жыл бұрын
Atari Falcon.
@CFalcon030
@CFalcon030 10 жыл бұрын
DrSteveBagley And a Mega ST next to it. I am not sure what the desktop is though, seems like Teradesk. Anyway, if you are running bash on MiNT for the falcon that was also vulnerable so it's best to update.
@TechyBen
@TechyBen 10 жыл бұрын
The question is, how did such a simple bug get missed? Though I'm assuming it's not as simple as the example showed here?
@DevSolution
@DevSolution 10 жыл бұрын
even if an example exploit is simple does not mean the code that allows for the exploit is. But let's not forget all the awesome bash has given us, and now it is more secure then before, so we should still keep using it.
@jasondoe2596
@jasondoe2596 10 жыл бұрын
Arguably, it always was a (mis)feature, not a bug.
@rr1-rr1
@rr1-rr1 10 жыл бұрын
Jardar Oehrn hmmm... how many letters do you have to type to delete your entire hard drive with bash? That's how simple the exploit is.
@DevSolution
@DevSolution 10 жыл бұрын
You circumvented my entire statement there.
@shagster1970
@shagster1970 10 жыл бұрын
Surely it wasnt picked up?? - it is almost a typo!
@shortcutDJ
@shortcutDJ 10 жыл бұрын
amazing video i learned so much and not only about the bug but in a general sense. 10/10 would watch again
@THERESAPARTYINMYHEAD
@THERESAPARTYINMYHEAD 10 жыл бұрын
But....I thought UNIX was invincible?
@bld86
@bld86 10 жыл бұрын
wait so why run this? is he using that for his actual pc?
@JustinKoenigSilica
@JustinKoenigSilica 10 жыл бұрын
so much to apple being "secure" it's just something apple tells it's customers to comfort them to buy their crappy products
@mckennacisler01
@mckennacisler01 10 жыл бұрын
Where in your email-notifying program is there code that is querying a mail server? Or does bash actually have a command for that?
@Imagonem
@Imagonem 10 жыл бұрын
"scan unseen". Maybe some unix program to check mail on the local mailserver? Bash doesn't have a builtin for checking mail, instead you invoke a unix program from bash to check your mail. For instance you can use the program "curl" to check your gmail inbox.
@bookmark7853
@bookmark7853 6 жыл бұрын
4:42 *HOW IS THAT NOT A VIRAL MEME?* looooool
@Potenti4lz
@Potenti4lz 10 жыл бұрын
So you can run functions other than just echo?
@Potenti4lz
@Potenti4lz 10 жыл бұрын
Needs root access/privileges though. Thanks.
@krakenmetzger
@krakenmetzger 5 жыл бұрын
It's weird, somehow I know exactly what this guy looked like when he was 8.
@spoonikle
@spoonikle 10 жыл бұрын
you are only really vulnerable as a webserver or service that uses external variables inputed by users in your service to exacute script funtions using said variables. unless you are running a server on your home pc or smart phone... you have nothing to worry about.
@NoSuchCommand
@NoSuchCommand 9 жыл бұрын
1:59 UUOC spotted :-)
@amigojapan
@amigojapan 10 жыл бұрын
I watched the video and I still can't see how this can be used as an exploit by a person that is not logged as a valid user into my computer.... are we talking about if I run malicious code?
@seanld444
@seanld444 9 жыл бұрын
If you ran the code yourself, it would harm your computer.
@ekanshdeepgupta658
@ekanshdeepgupta658 8 жыл бұрын
Can someone please explain to me how that is so damaging? Surely, if you can declare environment variables, you can execute code? Or am I mistaken?
@ekanshdeepgupta658
@ekanshdeepgupta658 8 жыл бұрын
Thanks, that explains it!
@scragar
@scragar 10 жыл бұрын
You pronounce it Lee-nux, mostly because Linus is Finnish and you pronounce his name Lee-nus.
@CyborgNinja7
@CyborgNinja7 10 жыл бұрын
Is this a vulnerability that is from recent years? Because, to me, it seems like an obvious exploit that should've been picked up since the 80s. I don't know much about Bash, but I did programming when I was younger. Wouldn't you be able to limit the input to a certain length, or a certain variable type? Ignore a semicolon in a string?
@RonJohn63
@RonJohn63 9 жыл бұрын
CyborgNinja7 "to me, it seems like an obvious exploit ... I don't know much about Bash" You are a perfect example of the Dunning-Kruger effect.
@CyborgNinja7
@CyborgNinja7 9 жыл бұрын
RonJohn63 That's right. Ignore the rest of the comment. Consider getting a life.
@ProbablyNotARobot
@ProbablyNotARobot 9 жыл бұрын
+RonJohn63 Hardly, the fact that he himself points out his lack of experience shows that the Dunning-Kruger effect doesn't apply. A better example would be you who assumes that you understand what the Dunning-Kruger effect is even though you clearly don't.
@CyborgNinja7
@CyborgNinja7 9 жыл бұрын
Funny how he says I'm pontificating by asking questions. Real arrogant of me.
@RonJohn63
@RonJohn63 9 жыл бұрын
joseph byerly I don't think you know what "pretentious" means.
@mightyNosewings
@mightyNosewings 10 жыл бұрын
Your phone could have Bash on it, but it probably doesn't. I don't think iOS has Bash by default, and Android is "pure" Linux -- that is, not GNU/Linux -- since it doesn't come with the GNU core utilities.
@dssssada
@dssssada 10 жыл бұрын
Do people actually use Bash "in the wild"? My (admittedly limited) experience working on (again, admittedly paranoid) projects is that it is not to be trusted because it is relatively new and hasn't stood the test of time like csh or tcsh. The belief that I've seen is that such a young (from the old paranoid perspective) language is prone to exploits like this and won't be universally adopted until it hits the 30 or 35 year mark.
@THE16THPHANTOM
@THE16THPHANTOM 10 жыл бұрын
i used this to override my old password(i think it was this used). saved me the trouble of re-installing the os and loosing all my documents and music...since i doubted there was anyone who could go through all that trouble to get into my computer, i never asked questions.
@CosmicAstroDuck
@CosmicAstroDuck 10 жыл бұрын
It seems a lot of these exploits are really based off of syntax exploitation, i.e. xss(cross-site-scripting)
@garciajero
@garciajero 10 жыл бұрын
it would've been nice how to exploit it through a CGI script or something more realistic.
@TheRaaaZ47
@TheRaaaZ47 10 жыл бұрын
Not working on my ubuntu 14.04 LTS as well env helo="() { echo Hello; }" bash t@sys:~$ helo No command 'helo' found, did you mean: Command 'hello' from package 'hello' (main) Command 'hello' from package 'hello-debhelper' (main) helo: command not found
@TheRaaaZ47
@TheRaaaZ47 10 жыл бұрын
t@sys:~$$helo (): command not found
@TheUglyGnome
@TheUglyGnome 10 жыл бұрын
Please stop this "GNU/Linux" maddness. If mr Stallman is so jealous to mr Torvalds, it's his peronal problem.
@bashkillszombies
@bashkillszombies 10 жыл бұрын
*LIES. The bug isn't in me. :(*
@biscoole
@biscoole 10 жыл бұрын
This guy reminds me of Philip Seymour Hoffman.
@intelX1000
@intelX1000 10 жыл бұрын
Almost disliked for that 'Linux' line, before you corrected it.
@jasondoe2596
@jasondoe2596 10 жыл бұрын
Almost disliked for that "GNU/Linux" line, after he corrected it ;)
@maxwell10206
@maxwell10206 10 жыл бұрын
Is he reading a script or something ? If you notice some of the shots his eyes quickly look to the left (his right) in the video. If he is reading a script then that's pretty lame..
@Pants4096
@Pants4096 10 жыл бұрын
OS X is pronounced "Oh Ess Ten"
@Yaxqb
@Yaxqb 6 жыл бұрын
1:49 not bash, it's /bin/sh u liar
@Communist-Doge
@Communist-Doge 3 жыл бұрын
Interesting!
@un2mensch
@un2mensch 10 жыл бұрын
Sean, those aren't advanced bash features >=)
@cosmicfrog
@cosmicfrog 10 жыл бұрын
AMIGA !!!!!
@vicplichota
@vicplichota 10 жыл бұрын
Why not simply admit to selfish, expedient, short-sighted, *bad* design?
@AwesomeCrackDealer
@AwesomeCrackDealer 10 жыл бұрын
I didn't understand shit, cap'n
@matthelton6637
@matthelton6637 10 жыл бұрын
Already patched in Synology NAS 5.0-4493 Update 7. www.synology.com/en-global/releaseNote/DS412+
@Momonga-s7o
@Momonga-s7o 10 жыл бұрын
First 2 minutes I found you weird, but after you looks kind of handsome.
@DeviousMalcontent2
@DeviousMalcontent2 10 жыл бұрын
GNU\Linux Master Race reporting in. o7
@FennecTECH
@FennecTECH 10 жыл бұрын
i am not volunerable to #shellshocked
@jeandoe6036
@jeandoe6036 10 жыл бұрын
He looks like someone who knows exactly what he is talking about.
@atarixle
@atarixle 10 жыл бұрын
I'm sorry, but I still can't see any problem with the so called and hyped "shell shock"! Every user who is allowed to create shell functions is allowed to execute commands aswell. There is absolutely no difference between executing a command directly or after a function definition. Nobody on youtube or anywhere else in the WWW has ever shown a real attact using shell shock other than directly having access to the bash anyway! Additionally, idk why shell shock is so bad, while () { :;}: never has been mentioned except on geek T-Shirts!
@MidnightSt
@MidnightSt 10 жыл бұрын
Lol, linux guys, all hackers, cowboy coding away... :-D
@ahenryb1
@ahenryb1 10 жыл бұрын
Weird type of handsome
@MG30001
@MG30001 10 жыл бұрын
Old news!
@DeeWeext
@DeeWeext 10 жыл бұрын
Such bad exlpainer
@JohnDoe_69
@JohnDoe_69 3 жыл бұрын
ew linux
Cracking Enigma in 2021 - Computerphile
21:20
Computerphile
Рет қаралды 2,5 МЛН
Creating Your Own Programming Language - Computerphile
21:15
Computerphile
Рет қаралды 215 М.
OCCUPIED #shortssprintbrasil
0:37
Natan por Aí
Рет қаралды 131 МЛН
How to have fun with a child 🤣 Food wrap frame! #shorts
0:21
BadaBOOM!
Рет қаралды 17 МЛН
ShellShock & Kernel Exploits - TryHackMe! 0day
35:10
John Hammond
Рет қаралды 81 М.
The Shellshock Bug In About Four Minutes
4:30
Tom Scott
Рет қаралды 1,9 МЛН
Heartbleed, Running the Code - Computerphile
10:42
Computerphile
Рет қаралды 462 М.
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 499 М.
Running a Buffer Overflow Attack - Computerphile
17:30
Computerphile
Рет қаралды 2 МЛН
Busy Beaver Turing Machines - Computerphile
17:56
Computerphile
Рет қаралды 423 М.
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,3 МЛН
Has Generative AI Already Peaked? - Computerphile
12:48
Computerphile
Рет қаралды 1 МЛН
Man in the Middle Attacks & Superfish - Computerphile
13:29
Computerphile
Рет қаралды 1 МЛН
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН