cancel
Showing results for 
Search instead for 
Did you mean: 

Detection of virus infected file SQL Remote replication

JimDiaz
Participant
3,513

Lets say a user inserted a small file into a SQL Anywhere database that was infected with a worm and or virus and for some reason it was not detected on the users local computer. If SQL Remote replicated the file, would or could a virus scanner detect the virus? Lets assume file based replication and the message size was large enough that the file was replicated in a single message.

To go further I would also ask if SAP recommends the scanning of file based replication messages as well as if there is a best practice associated with keeping viruses out of blob or long binary database fields.

Thanks in advance...

Jim

Accepted Solutions (0)

Answers (2)

Answers (2)

regdomaratzki
Product and Topic Expert
Product and Topic Expert

I've no idea how a virus scanner detects a virus inside a file, so I've no idea how to answer your first question. I can say that a blob stored in the database and replicated will be broken into chunks that are equal to the maximum message size and then the content of the message is compressed. It's unlikely that the original bit pattern of the blob will be in the message file that is placed in the operating system and available to a virus scanner.

It is a database's job to store data, and SQL Remote's job to send that data to the databases you've told us to send it to. SAP SQL Anywhere does nothing to ensure that the data you are using is free of viruses. If that is a concern, you should use a virus scanner on the files before placing them in the database.

Reg

VolkerBarth
Contributor
0 Kudos

Just to add: You can usually try with the particular EICAR files whether your Antivirus will recognize known virus-infected files.

We've done so when checking whether a HTTP based file transfer would notice/block these files. IIRC, the behaviour was different when the "real" files or archives were uploaded in contrast to embedding the "virus" signature in a message block - the later would go unrecognized (not unexpectedly)...

JimDiaz
Participant
0 Kudos

Thanks we will use this when testing our in house solution to this problem.

Jim

JimDiaz
Participant
0 Kudos

I believe the answer from SAP is

If SQL Remote replicated the file, would or could a virus scanner detect the virus? NO ; Does SAP recommends the scanning of file based replication messages? UNANSWERED; Does SAP recommend a best practice associated with keeping viruses out of blob or long binary database fields? NOT OUR JOB

Sounds like an opportunity...

Vlad
Product and Topic Expert
Product and Topic Expert
0 Kudos

NOT OUR JOB

I have read your answer several times, and I still cannot understand whether it sounds offensive or not. My opinion is that the database is responsible to store bytes in the most efficient way. If it scans yours every particular query with an anti-virus, you will immediately start complaining regarding the performance.

The same can be applied to the replication mechanism, when you want to get the efficient data transferring + security.

Believe me, if the replication transferred records with a single-byte packets, none of anti-viruses would be able to catch a virus. The scanning of the DB per operation is inefficient as well.

Well... what else can I recommend you to help you with the topic? Please, google first: http://security.stackexchange.com/questions/26710/security-malware-implications-of-storing-data-in-a...

Former Member

Scanning the replicating messages won't help. As Reg. mentions above, they are in the database log format and so are unrecognizable to a Virus scanner.

As far as best practices go, here are some of the things you could do to mitigate/prevent this problem. This is not meant to be an exhaustive list.

  • Validate (ie. scan) input/ouput before it gets to the database

  • Setting appropriate permissions for users in the OS (ie. limit/prevent them from doing malicious things)

  • Use the database sandboxing feature

  • Implement a 'quarantine' area for uploaded files where they would be separately validated before being 'approved' for use when downloaded

Breck_Carter
Participant
0 Kudos

> you will immediately start complaining regarding the performance

Ha! ...in this particular case it is a leap too far ( from "cannot understand" to predicting a clueless complaint 🙂