[MUSIC] Hey, welcome back. In our previous lesson, we covered cross-site scripting attacks and we tried to identify cross-site scripting in WebGoat activity. Remember, even though these practice activities are ungraded initially, they make up a part of your final project and they're an essential part of your learning plan, so please don't skip them. In this lesson, I'm going to show you how I approached the previous activity. If you had a different approach than me that worked, be sure to share it in the discussion area. After this lesson, we'll be able to explain how to protect again cross-site scripting injections and those types of attacks, and practice part of your final project. Finally, you'll have a chance to patch that vulnerability in WebGoat. So let's get started. So hopefully you had a chance to play around with this. And the question we really want to ask ourself is, what user controlled information here is being redisplayed to the page without any modifications? So I'm I'm just going to hit Purchase and just examine the page. And after a few seconds, you notice that the credit card number is being displayed. So we can test that theory. We can just put in some gibberish text and notice that it comes up. Okay, so we know that no input validation is being done on this. And we'll talk about the various methods that you can go about to protect against cross-site scripting in a second. They specifically want us to use their own payload, so we'll just copy that, paste it in here, purchase. we notice that their payload comes up and, well done, but alerts aren't very impressive, are they? So what just happened here was some user controlled content got presented to this page. Now, of course, you can't see anything because JavaScript is not displayed, it's executed on. And then we saw the alert box. Now, this looks like I just attacked myself, so the question becomes, was that a Self XSS or a Reflected XSS? The issue here is that WebGoat has created a container where their lessons are being contained in. So the URL on your browser is not actually representative of the URL itself. Truly what's happening is a link is being called where all these parameters are being sent as URL parameters to the page, and it's simply being executed on. So we can look at the code in a second and just see what that looks like. But essentially the problem is that the WebGoat framework doesn't allow for you to see this, this request is being made in the background. Now, if you open this in a new tab, you'll notice that you just get a gibberish text back and not really something that is being executed on. And that's because this is a JSON message that the WebGoat framework does get back. I know I already showed this example, but if we go back to my page on selfxss.php, this is a page that's simply saying Hello. And I can add to it a variable name, let's say James, and it'll say, Hello James. Alternatively, I can put in