Change in executable (*.exe) size while transferring file from one PC to another

I am encountering a strange issue with en executable file. When I transfer this executable from PC A to PC B using IP messenger its size changes. Functionally, it still behaves in the same manner. Again, when I further transfer the file from PC B to PC C, the executable reverts back to the original size. I tried comparing both these executable files of different sizes using HEX compare and there are quite a lot of bytes that have changed.

What could be the reason for this?

NOTE: All these systems using Windows operating system.


Solution 1:

In the past I have experienced issues with CR/LF -> CR conversion, or ASCII/binary transfer mode conflicts in numerous file transfer contexts. If the virus payload theory doesn't pan out, you might want to go down this path to see if this is happening in your case.

Solution 2:

If transferring an executable from system A to system B changes it in some way, and transferring it back to system A apparently changes it back, then I'd say it a common sign of a virus infection. That is, the EXE file is infected. However, on the original system (A) this virus is active, and makes the file size to be reported as it was originally. However, checking the copied file on a "clean" system (B) you can see the difference.

My advice is, upload the EXE file from system B (where the file appears to be bigger) to VirusTotal, which will have it checked with many antiviruses simultaneously, in a matter of minutes. If the file is infected, you'll most probably know it.