Optus/Huawei E960 HSDPA Router - Sms Cross-Site Scripting








XSS Attack using SMS to Optus/Huawei E960 HSDPA Router


Huawei E960 HSDPA Router (firmware version is
vulnerable to XSS attack using SMS. One of the feature of this router
is the ability to send and receive SMS through its web interface. The
SMS text is presented unescaped/unfiltered on the inbox view, and an
attacker can craft malicious short messages to gain control over
victims router.

The first 32 characters of every incoming SMS is presented in
unescaped form in the inbox view. The 32 characters limit can be
overcome by using several messages, and inserting javascript comment
to merge the current message with the next one.


First message ends with /* which will comment the all the HTML code up
to the second message

<script>alert('hello '/*

and the second message will start with */ that will close the comment
and continue the script:


Note that newest message is presented first, so the order of the SMS
sending must be reversed.

An attacker can
- get victim's PPP password by accessing /js/connection.js
- disconnect victim's internet connection
- send SMS with victim's router
- gain access to victim's WIFI password

After an attack is performed, the inbox page can not be used to delete
the received messages (because the delete button is not
available/visible). To remove offending messages from the inbox,
telnet to the router with username 'admin' and password 'admin'.
Huawei E960 uses busybox shell, so standard rm command can be used to
remove the messages (it is located at /tmp/sms/inbox_sms). After
removing the message content, the deleted messages will still be in
the inbox index, but it can now be removed from the inbox page.

Rizki Wicaksono (http://www.ilmuhacking.com) found this vulnerability.
The Indonesian article at
gives more detail about this vulnerability. This English
translation/summary was done by Yohanes Nugroho.

# milw0rm.com [2009-02-23]