R
I don't know what a codelobster is, but apparently there's a platform to create vulnerable sites. Injecting the code with such a crestomatic SQL should be ashamed. Well, asking to test the safety of a toy website where only five tables (block_pages,category,feedback,simple_pages,temple) and there's little information that's funny. You'd have set up the Hello World program and asked her to hack. What's there to break? Why? Who needs this website?
If, say, the site kept credit card numbers, they'd have gone as far as these deep questions from the feedback table:alert('hello'); hello
ddddddd dddd ddddddddddd dddddddddddddddd dd dddd ddddddddd ddd dddddddd dd dddddd dddddddddddd ddddddddd ddddddddddd dd dddd dddddddddddd dd ddd ddddddd dddddddddd dddddddddddd ddd dd dddd dddddddd dddd ddddd dddd ddddddd d dddd dddddddd
ра дывал п у дм жчсдялыпыа
adfasdf asadf adf asdf asdf adf
asdfasdfasfdasdfagfsdghsdbcxasdf
Again, there's no interface with this table on the website. I mean, at the last minute, the author was scared and stiffed her to the Disqus site. A very, very witty way of testing.Judging by the fact that in the commentaries, the author confused XSS with SQL with an injection (to defend himself against the first with a "stmt") and the "screwed Adminka" reads it as the top of the site's defense, it's just too early for him to say something for testing. It's aboutunding holes.The thing is, no hints are needed here.All you need to know is that there was a SQL injection. So it was said without any hints, open text. And that's exactly what it's like to know for protection from the word "shall."The point is, There's no need to know about the hole to protect. Protection against attack is irrelevant to the attack itself.What's needed to protect is written in all the books (except the outdated): it's necessary that any variables come into the request not directly, but through. Playsholders♪ That's what I had to do.You knew it (as your comments showed when you were going to get XSS to treat it through "stmt" but didn't matter. Now, after you've closed this hole, I hope you'll hand it over. And again, you see, to close the hole, you didn't need to know how the hack was made. To build protection, you have to build, not break. It's useless to mention holes. It's not the point here to make one specific, but... that all requests are carried out without exception on a single safe principle. And then the hacker will break into the scape, but no hole will be found.About XSS.The situation is pretty funny.It's true, somewhere in the subsoil of the site is falling, somehow, direct surveillance.But, of course, it can't be placed, and XSS can be introduced without surveillance. But there are already, alas, browsers on your defense who have learned to filter out such a clear XSS demand for mountain programmers. But again, hope for a browser is guaranteed to inject. That's what you do. Let's do it again, not "how God rests," but sie-te-me-tie-cheese! You sliced the fidbek and calmed down. And there's no page identifier. And there's got to be the same system as SQL injections-- you don't have to sit around and think where to defend yourself and where you don't. Protect yourself everywhere! In the protection of XSS, analog of the SQL players may be template c Eyeping♪ I mean, we can think of ourselves safe ifAny, absolutely any withdrawal shall be made only through the template.By default, the template formats the total variables. And only those for whom it is clearly stated that they should be removed as they are are, they're being removed.In particular, Twig is such a templateYeah, and another point. Code or die("Ошибка в запросе $zapros");
It's just a gift to the hacker. Let's just say if he wasn't there, I just wouldn't break, it would take more time, and time would be money. Apparently, you're right on the code to mysqli functions. It doesn't have to be done either, but it doesn't have anything to do with security, and it'll work out for practice. But these monsters are... or die() Put it all together. Instead, in front of mysql, write one line,mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);