How to prevent uploads of EXE files

Syncplify.me Server! version: 4.0.0+

Some SFTP servers feature a simple “extension exclusion list” so that administrators can specify certain file extensions that the server should not let users upload. But that’s a pretty weak defense, as a clever attacker could always upload an EXE with a fake extension and then rename it or otherwise find alternative ways to run it on the server, thus compromising its security.

Syncplify.me Server!’s scriptable nature, though, allows you to do a lot more than just disallow certain file extensions. Here’s a sample script that can be attached to the “AfterFileUpload” event handler, to identify EXE files that have been uploaded with fake extensions and delete them right away.

The above script is provided as a mere example to identify Windows EXE files. But it could be easily modified in order to identify other file types.

All Windows EXEs, in fact have stable distinguishing features in their binary code, and more precisely: the first 2 bytes (in hex) will always be 4D5A, and the 4 bytes at offset 256 (0x100) will always be 50450000. So if a file has those byte sequences in those exact locations, it’s safe to say it’s a Windows EXE.

Do you need to identify ZIP files instead? The first 4 bytes are always 04034B50.

And so on… many file types can be identified by specific “signatures” in their binary code, that one can easily read using Syncplify.me Server!’s powerful scripting capabilities.

Syncplify.me Server!: VFS with quotas

Syncplify.me Server! version: 4.0.0+

The Virtual File System (VFS) instroduced in Syncplify.me Server! v4.0, comes with a long-awaited feature: quota management.

The Windows OS features a very powerful yet complicated quota management, but it’s only available in Windows Server editions and requires optional features to be installed, therefore we could not rely on that and we built our own quota management system which is cross-compatible with all Windows systems.

Now, the problem with quota management is that calculating the current size of a folder (along with its sub-folders) can be very time-consuming, if the folder contains millions and millions of files. So if we were to re-evaluate the size to enforce quota restrictions at every operation it could totally kill the performances. Our solution the Quota TTL, which is the Time-To-Live (TTL) of the quota cache, expressed in seconds. Basically, when Syncplify.me Server! calculates the current size of a folder structure, it will consider such result valid for QuotaTTL seconds, without re-evaluating it too often. Continue reading

Syncplify.me Server! v4.0.8 released

We have just released version 4.0.8 of our Syncplify.me Server! software. This version features the following improvements:

  • Support for Windows XP, Server 2003, Server 2003 R2, and Vista
  • Fixed a bug that prevented the import of user keys in RSA format
  • Fixed a bug that prevented the correct behavior of AllowFTP, AllowFTPS, and AllowFTPES

As usual you can download this new release from our website.

PCI and HIPAA compliant administrative logs

Syncplify.me Server! version: 4.0.0+

Another requirement found in the latest versions of both PCI-DSS and HIPAA regulations is the necessity to keep an “untamperable” log of all configuration operations performed by any administrator.

Digitally signing every single log line is not enough, as the disloyal employee could simply delete some log lines entirely. Therefore each line should have a numeric incremental ID (to make it easier to spot “holes”) and each line’s digital signature should “roll over” and be calculated including the previous line’s digital signature in the signed data. This way an administrator cannot delete one (or several) log lines without being spotted.

Furthermore, to make log analysis even easier, each log line is not actually just a “line of plain text”, rather it’s a JSON object that can be easily queried. Here below you can see a typical “log line” showing a call to a configuration REST API and the relative response and signature: