Rebuilding Serenity
Rebuilding Serenity
Have you ever seen Firefly? I have. Many, many times. What about the movie Serenity? I literally love them both. At the end of Serenity, the music is literally too moving for words. I have always found it so so so so healing. And so that's what today's blog theme is focused around. It is called Funeral/Rebuilding Serenity.
But let's just focus on the latter part. And it's a beautiful memory. Because the name of the spaceship is Serenity, and they need to rebuild it. But Rebuilding Serenity implies, of course, rebuilding peace.
And hey, it continues my space theme from last week!
If you haven't seen it already, I highly recommend watching the TV series and the movie. It is basically the most cult TV series of all time. At the end of the only season ever made, before it got cancelled, due to the episodes being aired at unhelpful times and in the wrong order, all of the characters will feel like your best friends. And the fans literally crowd-funded the follow-up movie - now show me where that's ever been done before.
OWASP Top 10 for Web
I am taking OWASP's Top 10 for Web internet security training course (for web developers, I am assuming).
Server Side Request Forgery - Brief Notes
- Vulnerability
- Attack Surface
- "Attack surface mapping is the process of analysing an application's core functionality, business logic, and control flow to identify potential inputs or vectors through which an attacker could to try to ender an application environment."
- Backend Code
- It was very advanced (but then they broke it down a bit).
- It mentions passing arguments, and methods.
- It mentioned more methods - but then I realised this was in Java - (even more) why I didn't get any of it.
Server Side Request Forgery - Longer Version
This was based on a real life incident - the Capital One data breach 'that exposed the records of almost 106 million customers'. Apparently, the hacker "exploited a Server Side Request Forgery (SSRF) vulnerability to access AWS cloud endpoints." These are often "encountered in functionality" associated with PDF generation and file uploads.
I can see how the "Change Card Image" service creates a vulnerability within the web. On the fake bank's website, "the Card Design Studio applet allows users to upload a user-supplied image". Using the widget URL, the hacker can the the parameter/value pairs. The hacker sees a URL being passed as a parameter (this rings a bell to me as I have been learning JavaScript functions and now know what a parameter is).
The hacker then tries to replace the original URL with his own URL. He is able to trick the 'preview applet' into using an external image. This worked because the bank application server itself "made the HTTP request to fetch the image URL and rendered the image". This in itself is the server side request forgery.
In other words, this is the "ability to manipulate a web application into sending unauthorized requests to a third-party site or resources". Arrrrrgh this is crazy! 😲 And so complicated. It's a lot t to learn!!!
This course then showed me the applet's Backend Code and ARRRRRGH, did it get complicated.
Okay I'm pretty extremely lost here, but THEN, what happened NEXT, is that "by passing [an] AWS metadata URL arugment t othe URL parameter url, [the hacker' manages to retrieve all categories of instance metadata associated with [the bank's] webserver!".
Ummmmm... that sounds bad, right? Then the hacker uses IAM roles (=he ) which I know (!!!) from working in a previous tech team that this is to do with authentication (and stuff) and like logins (and stuff). So the hacker STEALS some IAM credentials. And then he uses that to put it directly into the server (somehow!!!).
This returns a bunch of tokens. These are basically access keys.
He then does some command line mojo and boom! That's it. He gets access t oa ton of things
Moving Forwards From Here
Okay so this was meant to be Top 10 but I think one is enough for today.
I'd like to continue to do the others - and I'll happily do them another time!!!
There are 2 more I'd really like to do (as there seem to actually be a lot more than 10!):
- TikTok Cross Site Scripting (because I actually know what Tik Tok is...)
- SQL Injection (because I actually know what SQL is, and I have coded in it before).
MDN Stuff (More To Come Later)
Math
As if I even know what a function object is!!!
Here are a few more useful sentences on the Math built-in object from the MDN.
- Math is a global object.
- It is not a constructor.
- All properties and methods of Math are static
- I don't even know or understand what that means, but let me type that out again:
- All methods and properties of Math are static.
- All properties and methods of Math static.
- You refer to the constant pi and Math.PI and to the sine function as Math.sin(x), where x is the method's argument
- Constants are defined with the full precision of real numbers in JavaScript.
Chakra UI
- A component library for React
- As if I even know what this means
- What is a component library
- So when you use Chakra in React, you get access to all of its "pre-built and pre-styled" components.
- Like:
- Button Components
- Input Components
- Avatars
- Lists.
- It is:
- "A really quick and easy way to mock up React websites".
- Using "pre-built components".
- "So that we don't have to make them from scratch".
State Management
"The state of the shopping cart (items added, price of the items needed etc.) needs to be accurately saved and reflected as the user navigates through the application". In the example the user would be annoyed if they added tickets to their cart but they were not present in the checkout area.
This also affects video streaming services e.g. like when YouTube or Netflix remember where you were in the video or in the show.
So what do we need to do in order to enforce this (and to enable it/to actually make it happen)?
- Keep track of:
- Values of variables
- The state of an application
- This is important because:
- It helps ensure that an application is:
- Stable
- Predictable
- Easy to Maintain
- It helps:
- Improve the performance of an application - how?
- By reducing unnecessary re-rendering.
Lazy Loading
Critical Rendering Path
"Optimizing the critical render path improves render performance".
More Keywords
- Business Logic
Become A TypeScript Wizard
YES PLEASE!!!
Beginning to Understand the Great Code of DOOM
}
let funk = function (v1, v2){
let result = fred(5,6, funk)
That's right! It's the GREAT CODE OF DOOM from last Tuesday's Codebar session with Jules.
Adam made it all click for me with just once sentence:
"So you passed 5 & 6 to fred and then fred passes 5 & 6 to f1"
And that's it. I thought you were passing the variables to f1 (i.e. funk) and so I couldn't make sense of why they were the same as in fred - but you are passing them to fred. YOU ARE PASSING THEM TO fred. And then fred INPUTS THEM INTO f1.
Comments
Post a Comment