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.
- immervivesolver2 months ago
Bronze III
Samh051 I tried this query but didn’t worked. I managed to build a query using the resource you shared. Thanks for suggestion.
- PRABAKARANRAMAMURTHY20 days ago
Bronze III
Hi immervivesolver, can I understand more on the query you build to solve the last question?
Does it use "sleep(5000)"? Can you drop some hints please?
- PRABAKARANRAMAMURTHY20 days ago
Bronze III
Hi Samh051,
This query worked for you in the last question?
- immervivesolver20 days ago
Bronze III
{“$where":"this.name == ‘admin’||’1’==‘1’&& this.incantation == ‘admin’||’1’==‘1’“}
PRABAKARANRAMAMURTHY- PRABAKARANRAMAMURTHY19 days ago
Bronze III
Thank you immervivesolver.
This worked:
{"$where":"this.name=='admin'||'1==1' && this.incantation =='admin'||'1==1'"}
- Samh05120 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?