Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL mitigation (filtering) can only be passed by updating table #838

Closed
dovecode opened this issue Jun 19, 2020 · 1 comment
Closed

SQL mitigation (filtering) can only be passed by updating table #838

dovecode opened this issue Jun 19, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@dovecode
Copy link

dovecode commented Jun 19, 2020

Edit: If you read this issue and still beg me for a solution to the referenced exercise, then I'm afraid you probably shouldn't be left outside unsupervised. I feel sorry for you.

It looks like the controller for the filtering lesson (currently number 9) assumes that the underlying table contains "dave" and "passW0rD'. The one used doesn't, and will only let you pass if you first insert those into the table.

Or to put it differently, the following input should pass you:

'/**/or/**/'1'='1

But it will print the entire table (which presumably is the objective (even though the objective isn't actually stated on the page!), after saying that the solution isn't correct:

image

After digging through the lesson code (which I would normally consider cheating, but my life is too short for broken courses), it dawned on me that the creator of this question assumes that the underlying table is the same as in a previous exercise, where we found that dave's password is passW0rD, so I ran this:

'/**/;update/**/user_data/**/set/**/cookie='davepassW0rD';--

After this, the previous solution will work:

image

I thought this app was supposed to teach you Web security flaws, not how not to fail at abstraction between code modules...

@nbaars
Copy link
Collaborator

nbaars commented Oct 22, 2020

Solved add a link to the correct assignment to read about the lesson goal

@nbaars nbaars self-assigned this Oct 22, 2020
@nbaars nbaars added this to the 8.1.1 milestone Oct 22, 2020
@nbaars nbaars added the waiting for release Issue is fix, waiting on new release label Apr 4, 2021
@nbaars nbaars added 4 - Done and removed waiting for release Issue is fix, waiting on new release labels Jul 27, 2021
@nbaars nbaars modified the milestones: 8.1.1, 8.2.0 Jul 27, 2021
@nbaars nbaars closed this as completed Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants
@nbaars @dovecode and others