@@daruiraikage he meant almost everything in Javascript is an object.
@unknownnn54793 жыл бұрын
"dont let the feminists see this" haha ... btw really cool work brother
@eduardoblas23153 жыл бұрын
So... everything in python is a cat ;)
@btccricket142 жыл бұрын
I watched 2 of your videos and I realized how fucked we're gonna be when the world goes full digital.....
@chairlovawitabat3 жыл бұрын
Subscribed to your channel a while ago because you discussed interesting topics outside of my primary area of interest. As a front end React developer, I'd never thought I'd see a video on your channel that cut so close to home. This is absolutely excellent information to know. omg thank you so much for this video!
@RodrigoMallmann13 жыл бұрын
Totally agreed! This video earned him my sub. Interesting to watch his other videos.
@Bingomad83833 жыл бұрын
This channel is gonna touch millions soon. Every video you create makes me curious about how it all can be broken down and easily hijacked. i love the graphics , very neat and clean.
@hesh17003 жыл бұрын
1 question. "How?" That's a lot of content to keep track of to make this work. Seriously though, your work is awesome and I learned a lot from it.
@dealloc3 жыл бұрын
This was a proof of concept. The real vulnerability shown is the property pollution and how it can be exploited in cases where user input isn't sanitized before being passed into library code that isn't safe. The proof of concept was just an example of what could happen in a specific case where Next.js and AMP was used, that would pass query parameters directly into the getServerSideProps through the unflatten function, as a way to run arbitrary code on the web server.
@hesh17003 жыл бұрын
@@dealloc Thanks for the clarification. I Really appreciate it, but still I'm amazed of people who actually discover these exploits or vulnerabilities for the first time. How they think, how they do stuff amazes me.
@mogwai8883 жыл бұрын
@@hesh1700 inspiration from other vuln types, knowledge of building/coding stuff from scratch (you're a dev) and the time to sit around playing with things your interested (or are paid well) to research.
@aditya.khapre3 жыл бұрын
In the end, the attached HAS to pollute the code on the server for this to work.
@Lupinicus16643 жыл бұрын
This is excellent work. So refreshing to find a clear, concise description of tricky topics. Thank you for the work this video took, it was well worth it.
@jemesmemes90263 жыл бұрын
there’s fun depth to the “everything is an object” thing, basically amounting to “mostly everything is an object”
@shanek.62932 жыл бұрын
This genuinely is the only thing that made me understand objects. Thank you so so much!
@dhyeychoksi51783 жыл бұрын
Appreciate your work man! Nice video
@jeschinstad2 жыл бұрын
This channel is _awesome_ man! I've just discovered it and I love it! Great work.
@FedoraRose3 жыл бұрын
Finally a new video I always learn so much
@cliffclof3 жыл бұрын
This is a great example. Will def be thinking about properly blocking prototype chain traverse while coding.
@blakek132 жыл бұрын
Excellent video and explanation! In my opinion, prototype issues shouldn’t be the module’s issue (i.e flat isn’t vulnerable). It’s the incorrect usage of the module that causes the vulnerability. This is like saying a MySQL library is vulnerable because it allows the programmer to pass unsanitized user input. Putting this responsibility on the module is something I’ve noticed more in JS since npm started it’s automatic “audits” on module installs.
@MarekWojt3 жыл бұрын
> "everything is an object" > getting "undefined is not an object" all day long
@FlorianWendelborn3 жыл бұрын
Fun fact, you used to be able to overwrite undefined to a different value in JS... IIRC it was just window.undefined = true and suddenly everything breaks down
@CrashCubeZeroOne2 жыл бұрын
Pwn: a class is basically a structure. C#: so a structure is basically a class.
@a_maxed_out_handle_of_30_chars3 жыл бұрын
I liked your presentation and animation skills
@cat-.-3 жыл бұрын
Lol I have always thought prototype pollutions as an annoyance but you have shown that batshit libraries can make it basically an RCE, goddamnit
@maxwax79583 жыл бұрын
Great content an keep it up 💪
@wtfdoiputhere3 жыл бұрын
Being someone who recently figured out OOP in JavaScript and wrote a blog to share my knowledge, i rly loved this vid and it made soooo much sense to me
@divzthepro99372 жыл бұрын
A class is like a blue print meanwhile a object is a building i guess
@az.tek.003 жыл бұрын
missed ya, master pwnfunction. thx for the post. happy holidays. 🌟
@PwnFunction3 жыл бұрын
Happy holidays to you too :)
@xenialxerous24413 жыл бұрын
Hey! Awesome video btw. Loved it thoroughly 🙌🎉
@lljw94552 жыл бұрын
Binge watching your vids! Great content btw💕
@gimmethedata42563 жыл бұрын
How well does the automated search for exploits actually work? What is the chance that a given exploit is detected? What I do know out of experience is that most exploits have been there for a pretty long time, and that 'there always are exploits'.
@dealloc3 жыл бұрын
It scans for already known vulnerabilities. While there are ways to use somewhat scan for possible vulnerabilities with static analysis and checking for common flaws. But the best known solution is to check against a database of known vulnerabilities, that have been discovered and reported by people.
@gimmethedata42563 жыл бұрын
@@dealloc Hm well now I think of it, it should be pretty easy if you just look for outdated libraries which is dogwork for humans but very systematically approachable in some areas I think. This could for example be used in combination with the Log4jl REC exploit, where basically logging any user input in an outdated library is 'lethal'. What I also do know is that my friend actually tried InteliJ"s search to try to find a recent minecraft server crashing exploit. This exploit had been around for a few years in some, and is in the interest of some very hackerous communities. (shulker box dispenser world height exploit, 'hackerous communities' meaning 2b2t)
@dealloc3 жыл бұрын
@@gimmethedata4256 The issue is not so much to look up dependencies of libraries, that's easy. The hard part is finding the vulnerability in the original library or code where it originates. Any software the relies on code that has vulnerabilities will also inherit those vulnerabilities. But the severity depends on where and how it's used. So it doesn't mean that software that uses a library with vulnerabilities is itself vulnerable if the it's used in places that aren't exploitable. In the case of Log4Shell it is a severe vulnerability for any library and code that passes any user input, but not so much if it doesn't. This is sometimes a problem with automated systems as most of the results can be false positives, especially when scanning development-only environments. It adds a lot of noise and can hide the real threats that appear in code that interfaces with user and other external sources.
@gimmethedata42563 жыл бұрын
@@dealloc Yeah, but finding which things use the lib is already 20% of the most boring part of the work. I agree, it is rly hard to determine systematically whether or not something is an exploit, for therefore you first need to define what user input is. I agree that is really hard. Ig everything that goes through netty can be regarded as 'user input', but there I bet there are tons of ways to connect to netty so that is already a problem. Then you have also got libraries on top of the netty stuff ... then you need some algorithm to follow the stack trace of the user input and 'understand' a lot of internal functions, and how they change the user input. It is also kinda tricky to determine whether or not something is an exploit, I mean for RCE it should be pretty easy, but for teleportation exploits in game it is hard. But hey, even if you find 1% of the exploits systematically, then that is still an absolute win. I mean it is really 1% * times a thousand projects times 10 hidden exploits per project ... That's still a 100 exploits. So therefore I think you should focus on the easily systematically detectable exploits. Would you wanna collaborate on something like that? hobrin#4694
@cybroxde3 жыл бұрын
Billion Dollar Companies: Spending Millions on patching vulnerabilities Also Billion Dollar Companies: Shipping Frameworks that sideload code from a CDN and run it on your server without further checks just to save the developer 5 Minutes of thinking.
@cybroxde3 жыл бұрын
Addendum: I agree that in this case, the root cause is not the framework itself. However, it is a contributor to the issue and the CDN simply being compromised is another very possible and very unnecessary attack vector that using it adds to your application.
@FlorianWendelborn3 жыл бұрын
@@cybroxde Yeah, it looks quite insane to me to yolo-execute arbitrary code from a URL without verifying it via their public key with asymmetric cryptography. But AMP is evil anyways, so not too surprised they also added backdoors to servers that comply with them
@boris_js3 жыл бұрын
Damn whenever i feel i know everything in js and then i see something like this which blows my mind..so many more things to learn
@AlienX-p2f Жыл бұрын
Gonna refer my buddies to learn OOP from this wholesome vid
@shintsu012 жыл бұрын
Wow i am not a developer but a light bullb watching your video(s) with a mind blown effect. Thanks for the clear and understandable explanation why and how a exploit works. now i need to check my ops team if they actually manage exploits like these in general.
@codepro33803 жыл бұрын
Your Logo is OP!! + the explanation ( Can you make react videos maybe in the future if you know ) ?
@elevatecyber50312 жыл бұрын
This is true black magic. Love it!
@iliedobre77033 жыл бұрын
Thats why I name my variables Yoda style, instead of isAdmin I put AdminIs
@denial42602 жыл бұрын
yesAdmin = 'is';
@flexiorange30483 жыл бұрын
Man this is gold. Thanks!
@Karan-um4bw2 жыл бұрын
im here at 113k subs, and I'll be here for the 1 mil subs. great content ❤️
@newton40983 жыл бұрын
I llike the whole, "Eminem is a square" analogy.
@shashwathegamer3 жыл бұрын
You earned a sub ;) (and a disc member too :))
@0xdecaf3 жыл бұрын
great video as usual
@mrala3 жыл бұрын
more prototype pollution please :)
@ej.xxxx_3 жыл бұрын
Welcome back!
@pxdav3 жыл бұрын
Hey PwnFunction, just wanted to ask how do you make these videos. It looks really cool especially the drawing thing
@b43xoit2 жыл бұрын
The Self language pioneered objects without classes. Javascript continued that capability.
@boshbosho81813 жыл бұрын
Pure gold, thank you!!!
@i_dont_want_a_handle3 жыл бұрын
"Everything in JavaScript is an object" - well no, not everything, forget that immediately
@vanjazed70213 жыл бұрын
technically yes, just not the same type of object, but they all have common superclass
@i_dont_want_a_handle3 жыл бұрын
@@vanjazed7021 no, seriously. The fact that you can invoke methods on a string literal does not mean that strings are objects, it's merely a convenience mechanism. Strings are passed by value and their "typeof" is not object, so they really are primitive (just like numbers, bools, undefined and null)
@kuchingneko96163 жыл бұрын
glad your back
@dandogamer3 жыл бұрын
Learnt something new, nice vid
@warengonzaga3 жыл бұрын
Thanks again @PwnFunction hahaha I'll create a list of your repos lol.
@mirrormirage03 жыл бұрын
Awesome work!
@JoshPaulie3 жыл бұрын
Damn you!!! I swore I’d never learn js, but now I know how to make js classes 😭
@vintprox3 жыл бұрын
Whoever though that flattening user input object into your codebase is alright, and that runContext is going to make better companion than eval? Yet another reason to switch over Sapper and other Svelte minimalistic solutions, in my opinion.
@frigga2 жыл бұрын
Stateful server side rendering is the root of all evil.
@Hope-kf1nl3 жыл бұрын
Do share a link to your IDE plugins. Digging the layout.
@PwnFunction3 жыл бұрын
Check the description :)
@rishabkumar21873 жыл бұрын
bro i really love your content . especially the way you teach 🔥🔥🔥🔥😍😍😍😍💘💘
@jamesjones22123 жыл бұрын
Awesome video as a life long hacker i am always amazed however much things change they stay the same.
@mmti10103 жыл бұрын
12:20 👀👀 Don't to worry child, oh fu*k
@bas5rocker3113 жыл бұрын
great video man, what's your terminal configs btw
@kuroexmachina3 жыл бұрын
finally, something interesting popped up in my recommended
@yasserarguelles61173 жыл бұрын
*Me in C programming procedural code, offline*: now this is safety
@kyputer3 жыл бұрын
Well done 💪
@junfengou68563 жыл бұрын
This is awesome!
@henriquematias19863 жыл бұрын
great video! what next.js version is this bug on? have you reported that to vercel?
@Wynell3 жыл бұрын
Amazing video! BTW what's the font?
@Parrotassassin15TechToker3 жыл бұрын
oop I am first lol that is cool loving your channel so far though!
@PwnFunction3 жыл бұрын
Haha good eye. The video isn't supposed to be out this soon XD.
@Parrotassassin15TechToker3 жыл бұрын
@@PwnFunction haha oops
@devhonk17223 жыл бұрын
gg
@du42bz3 жыл бұрын
gg
@ianrhys3 жыл бұрын
node can be a nightmare if not done properly right. Keep an eye on package vulnerabilities or jump ship to stable backend scripts like php and python. Not saying they are secure but you have less to worry about.
@DKLHensen3 жыл бұрын
Same kind of stuff happens in python and Php. Take a look at either language’ eval function. You should only ever use these kind of functions if you are 100% sure what you are doing is safe, but mostly this is mission impossible
@LUISANGEL273 жыл бұрын
I love tne way you explain
@astranger79953 жыл бұрын
how did u make yor VScode look so good
@efeservili2 жыл бұрын
Thank you for tNice tutorials! I've been trying to figure the software out on my own for a wNice tutorialle, and it's horribly confusing. TNice tutorials is the only guide video
@falxie_3 жыл бұрын
Oh god I gotta run snyk against my codebase now
@thetrends56703 жыл бұрын
Is it the channel of LiveOverflow's little brother?
@PwnFunction3 жыл бұрын
how did you know 👀
@thetrends56703 жыл бұрын
@@PwnFunction you've been pwned
@jaywye3 жыл бұрын
I like the penguin
@JLSynth2 жыл бұрын
Awesome!!
@gadgetvala3 жыл бұрын
Nice explanation
@b43xoit2 жыл бұрын
I don't have familiarity with next.js and I guess readers who do have that understand where in your talk you refer to where a user could cause their arbitrary code to be executed on the server side, but for me, you blow through that very quickly and I don't understand or hear where you explain that. But I guess the bottom line of what you are saying here is that something about next.js or some common way to use it opens such a vulnerability.
@robinzon1002 жыл бұрын
did next or amp peps at least patch this? but I guess it's not next or amp vulnerability but the flatten modules
@evolutionxbox3 жыл бұрын
The rectangle class is an object
@biggietuna98433 жыл бұрын
I polluted my pants
@lowborn72313 жыл бұрын
I know many people have already made videos abou it, but I really wanted to see youir video about Log4j vulnerability. I wanted to see your opinion as a security researcher, please, if you can, make a video about it.
@siddharthchhetry42183 жыл бұрын
One day i will understand this video fully :) Thank you for sharing such an awesome content .
@paxdriver2 жыл бұрын
Does this work even when dependencies are minified or do the object properties need to match the names in the objects exactly?
@Happy_Shaikh3 жыл бұрын
Which screen recorder do you use bro?
@Michaelmishael10 ай бұрын
thanks alot
@iamdanfleser3 жыл бұрын
what did you use to animate this video? edit software?
@scrambledmandible2 жыл бұрын
2:00 does this mean C structs can be classes
@b43xoit2 жыл бұрын
Before C++ was called C++, it was called "C with classes". The classes were a minor enhancement over structures.
@RedStone5763 жыл бұрын
waow finally a new video
@JorgetePanete3 жыл бұрын
3:40 i just put 2x speed and you say "eminem"
@Shortyxoli2 жыл бұрын
(proceeds to continue)
@FuzzyLitchi3 жыл бұрын
pretty cool!
@Aspiiire3 жыл бұрын
Wow! this is a good video
@bigchum39843 жыл бұрын
are you able to access the base object because it was a global variable? would namespacing protect against this?
@ZoranRavic2 жыл бұрын
The base "Object" is always global.
@Bogdan-ef9wz3 жыл бұрын
Thank you
@IShowD3 жыл бұрын
what is the whiteboard software u using ?
@wowbean3 жыл бұрын
No idea what’s happening but I like it.
@Elenthiriel2 жыл бұрын
Please , teach us how to understand and debug code like you
@jlacr80563 жыл бұрын
can we do a video where you don’t explain the entirety of OOP beforehand
@zxuiji3 жыл бұрын
off topic but it's a thing I learned today, in css you can honour text dpi by simply using the "in" unit on :root font-size then use rem everywhere else
@daleryanaldover65453 жыл бұрын
nc
@m3mphi5r4r73 жыл бұрын
Just wow 🤩
@DanielM20013 жыл бұрын
Don't you worry, don't you worry child :)
@TheJoaogouveia3 жыл бұрын
I'm a bit confused about how the getServerProps is actually exploited, in the example, it's not even receiving data from the url query, also, even if it was, the only prop being returned is the one we actually want, can someone kindly point out which part of the process am I missing?
@bussin13373 жыл бұрын
I'm guessing the unflatten function itself does something to the input that overrides the global Object's __prototype__. Don't even need to return the value
@ZakiWasik3 жыл бұрын
I tried your repo. After polluting the prototype like you do at 10:54 I get the 404 but if I try to go to localhost:3000 I still get 404 so I guess the global namespace did not get polluted in my case?
@0xfolling3 жыл бұрын
I really appreciate your explanations and know this is subjective: But personally I would prefer if you assumed some basic knowledge about a subject and then explain the topic you want rather than explaining everything from the ground up. The explanation for classes, objects, and members felt a little bit underwhelming for the video at hand. That being said, your explanation there was, as always, wonderful, along with the rest of the video!
@PwnFunction3 жыл бұрын
Thanks! I'll apply that next time. A bunch of people also told me the same thing. I appreciate the feedback.
@user-sn6yb8kr1m3 жыл бұрын
@@PwnFunction I really appreciated and enjoyed how it was broken down and explained. Subscribed and liked as well!
@fastexpand3 жыл бұрын
Consider putting in timestamps so people who already know it can skip ahead easily and beginners can still watch the basic stuff
@animeguywithexistentialcri50843 жыл бұрын
@@PwnFunction btw what colorscheme you're using in vscode in this video, sir? mine is the default and not really that colorful...
@pala99833 жыл бұрын
HTML Injection explained pls!!
@philippelhaus3 жыл бұрын
Interesting 👍
@_Funtime603 жыл бұрын
It seems REALLY dumb that JS lets you add things to objects that aren't in the class and add things to both ON THE FLY. I can see uses for this, but none of them need this feature and it adds looks to add so many risks.
@blakek132 жыл бұрын
This was heavily used for something called polyfills. Basically, if the browser doesn’t support a JS feature (or its implementation is buggy) you can conditionally add it to the language yourself. It’s used a lot less in modern code supporting modern clients. It’s also pretty useless for business logic. It was great for JavaScript because the number of runtimes that many projects supported. This would be a lot less useful in a compiled language because you know the compiler you’re targeting and the features it supports.