Saturday, September 17, 2011

CQ related google queries

This query returns many CQ sites:
Many of the sites accept .json rendering (-1.json, 34324232.json ...etc). Some also accept .query.json?statement=//*
Easy for content grabbing and DOS attack.

Also, this:
Usually,  /content/dam.xml is large. Easy for DOS attack.

Many sites block .json on /content. But they still let .json on /etc.

This queries shows a few author instances (try default cq logins other than admin:admin such as author:author):

Once you locate a CQ site, you can try various paths:

Also, try json servlets:

format is:

If things are blocked, try with some of characters replaced with url encoding.

For example, this is 404:*,cq:Page%29

But this returns:*,cq:Page)

e in query is replaced with %65 and o in json is replaced with %6F

Most of these are possible because of Sling:
Usually, databases use different port (and different protocol other than HTTP) to communicate with HTTP applications. Even databases that use HTTP (such as couchdb can be configured to use different port from HTML rendering server. But Sling exposes entire database (JCR) content on the same port for HTTP clients to access.

Sling does have access control mechanism. But, common development paradigm for Sling is to expose all resources to everyone.

You could expose few resources and have resourceType to query/access actual content resource.
For example, instead of exposing the following:

You can expose only one resource:

And, have resourceType of /content/pages handle GET requests to:
by reading actual content from:

Or, you can have a proxy server blocking various paths that could be used maliciously. For example, CQ has dispatcher module for Apache httpd. You can configure dispatcher.any to deny access to various globs.

1 comment:

  1. Los Angeles …Look at the site…News about residential income/rental property in Los Angeles.
    Los Angeles Housing Dept