File download scanning with modsecurity

306 Views Asked by At

I want to scan the file downloads with mod-security. Is it possible to do this? I could not find any way of doing it. File upload scanning is feasible but how to do scanning of downloads?

1

There are 1 best solutions below

1
On

Yes it's possible to do this.

Look at SecResponseBodyAccess and SecResponseMimeType. Note however that only text files are really useful to check. PDFs and other documents which contain binary data lead to many false positives.