Question
Veterans Affairs
US
Last activity: 2 Jan 2018 7:41 EST
How to identify and prevent malicious file upload via Add Attachment
We have a requirement to block malicious file attachments uploaded via Add Attachments. Can anyone suggest any approach or provide some pointers to achieve this? Thanks in advance!
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi There,
It depends mechanism with which you would determine if a attachment is malicious.
Generally extension(.exe,.js etc) of a file is used to determine if it is malicious.
If this is you requirement the you can check below link
https://collaborate.pega.com/question/how-can-you-restrict-file-attachments-extension-type-entire-application-such-exe
Thanks,
Ujjwal
Veterans Affairs
US
Thanks for the reply Ujwal. I have already added the logic in CallVirusCheck activity to allow only certain valid file types but our requirement is to check if a jpeg file for example is malicious and prevent it from attaching to a case.
Pegasystems Inc.
IN
Hi,
Is there anything else that you want to implement apart from filtering on extention.
Thanks,
Ujjwal
Veterans Affairs
US
Yes, we need to check if the file being attached is malicious. For example, We need to restrict if a user is trying to attach a malicious jpeg file. We should allow if the jpeg file is not malicious.
Pegasystems Inc.
US
Hi,
Can you please look into this post as well. I strongly believe it will help you.
https://collaborate.pega.com/question/how-do-i-limit-file-extensions-upon-uploading-file.
Regards,
Rachit
Veterans Affairs
US
Hi I have already used the CallVirusCheck activity to allow only certain file types. But the issue is when users trying to upload a jpeg file that is malicious. We need to run some antivirus check on the files being attached and prevent attaching if the file is malicious. So the question comes to how we can know if a file being uploaded is malicious and prevent it from attaching to the work object?
Swedbank AB
SE
Hi, I think you need to add custom Java code to verify file is corrupted or malicious. Please try in other Java related forums. OOTB does not have code for this.
Thanks,
Deva
-
Kanimozhi Balakrishnan Mounika Manne Neelapala Kusuma sri
Pegasystems Inc.
US
Hi,
I tried searching more but could not find an OOTB apart from using CallVirusActivity. But I found the below article.
https://stackoverflow.com/questions/22652489/how-to-implement-virus-scan-on-file-upload-in-a-spring-3-mvc-application
In this article, the path is given as local. So, you can give server path. Please check and let me know if this helps.
Regards,
Rachit
Pegasystems Inc.
US
Using the CallVirusCheck activity is the recommended solution. You will probably need to implement some custom Java code to call you virus scanner of choice. If the Pegasystems employee associated with this issue would like to discuss this in more detail then they should feel free to ping me.