Hi All,
As part of aem_hacker.py reports,requested us block the below access in our application.
bin/querybuilder.json.css
bin/querybuilder.feed.css
ibs/cq/security/userinfo.css
crx/de/index.jsp;%0aa.css
I have tried with the below deny rule in dispatcher.any file and it's not worked
Could you please suggest with solution to fix the hacker.py report issues ?
Solved! Go to Solution.
Views
Replies
Total Likes
We are also looking for a solution to block the querybuilder on publisher.
We denied access to /bin. But we have to allow few extensions
/0040 { /type "allow" /extension '(css|jpg|gif|ico|js|xml|txt)' }
We blocked CSS as below
/0120 { /type "deny" /path "/bin/querybuilder*" /selectors '(feed|servlet|json)' /extension '(css)'}
However following is accessible on another extension
Do we have to disallow querybuilder on all extensions which were allowed in /0040 rule. Any thoughts to do this little more deligently.
The following rules have been tested in local setup. Please try below deny rules:
{ /type "deny" /url "/bin/querybuilder*.css" }
{ /type "deny" /url "/crx/*.css" }
{ /type "deny" /url "/bin/querybuilder*.*.css" }
Regards,
Vishu
You need to make sure there is no other rule that allows thew access as the last dispatcher rule will be honoured. Example:
1) You denied access to files as part of a rule
2) If there is a rule below the rule at 1 that allows the access, users will be able to access that file.
We implemented with below rule to avoid querybuilder execution.
/0001
{
/type "deny"
/path "*/bin/querybuilder*"
/selectors "*"
/extension "*"
}
Nice one, are you going to do the same for all the other exposed servlets
/libs/cq/security/userinfo
/libs/granite/security/currentuser
etc which can also be hacked above the deny rule with an extension or selector rules
.
We are also looking for a solution to block the querybuilder on publisher.
We denied access to /bin. But we have to allow few extensions
/0040 { /type "allow" /extension '(css|jpg|gif|ico|js|xml|txt)' }
We blocked CSS as below
/0120 { /type "deny" /path "/bin/querybuilder*" /selectors '(feed|servlet|json)' /extension '(css)'}
However following is accessible on another extension
Do we have to disallow querybuilder on all extensions which were allowed in /0040 rule. Any thoughts to do this little more deligently.
Hi @vivianseba ,
Some of these rules can still be bypassed by putting multiple slashes in the URL.
As per Adobe documentation:
In Dispatcher versions later than 4.2.0, you can include POSIX Extended Regular Expressions in your filter patterns.
You might want to try something similar to the below rule (This takes care of the URL part. You can add extension if needed):
{ /type "deny" /url '([/]+bin[/]+querybuilder(.*))' }
As rightly mentioned earlier, a higher number in dispatcher doesn't mean higher priority. The rule that comes last always takes effect. So it is better to structure the filters in a way that there is nothing that allows these paths later on.
Thanks,
Ram
Views
Likes
Replies
Views
Likes
Replies