Author Topic: False positive - OBJFIX.EXE  (Read 2944 times)

0 Members and 1 Guest are viewing this topic.

Zbzzn

  • Guest
False positive - OBJFIX.EXE
« on: August 01, 2007, 11:39:24 PM »
Hello,

I was performing a compile of the latest ZSNES and received what I believe to be a false positive upon compiling an executable for correcting Win32 object files for MinGW. The source code for the executable follows:

Code: [Select]
#include <stdio.h>
#include <string.h>

int open_error(const char *filename, const char *mode)
{
 printf("Failure opening %s for %s\n",filename,mode);
 return 1;
}

int main(int argc, char **argv)
{
 int c;
 int section_count;
 FILE *in, *out;
 unsigned char section_header[40];

 if (argc < 2 || argc > 3)
 {
  printf("Fixes MS Win32 object files to be compatible with the incorrect\n");
  printf(" implementation in MinGW32.\n");
  printf("Usage: objfix infile [outfile]\n");
  return 1;
 }

 in = fopen(argv[1], (argc == 2 ? "rb+" : "rb"));
 if (!in) return open_error(argv[1], (argc == 2 ? "read" : "update"));

 if (argc == 3)
 {
  out = fopen(argv[2], "wb");
  if (!out) return open_error(argv[1], (argc == 2 ? "read" : "update"));
 }
 else
 {
  out = NULL;
 }

 if (out)
 {
  fputc(fgetc(in), out);
  fputc(fgetc(in), out);

  fputc(section_count = fgetc(in), out);
  fputc(c = fgetc(in), out);
  section_count += c << 8;

  for (c = 4; c < 0x14; c++)
  {
   fputc(fgetc(in), out);
  }

  for (c = 0; c < section_count; c++)
  {
   fread(section_header, 1, 40, in);

   if (!strncmp(section_header, ".bss", 8))
   {
    memcpy(section_header + 8, section_header + 16, 4);
    memset(section_header + 16, 0, 4);
   }
   else
   {
    memset(section_header + 8, 0, 4);
   }

   fwrite(section_header, 1, 40, out);
  }

  while ((c = fgetc(in)) != EOF)
  {
   fputc(c, out);
  }
 }
 else
 {
  fgetc(in);
  fgetc(in);

  section_count = fgetc(in);
  section_count += fgetc(in) << 8;

  fseek(in, 0x14, SEEK_SET);

  for (c = 0; c < section_count; c++)
  {
   fread(section_header, 1, 40, in);

   fseek(in, -40, SEEK_CUR);

   if (!strncmp(section_header, ".bss", 8))
   {
    memcpy(section_header + 8, section_header + 16, 4);
    memset(section_header + 16, 0, 4);
   }
   else
   {
    memset(section_header + 8, 0, 4);
   }

   fwrite(section_header, 1, 40, in);

   fseek(in, 0, SEEK_CUR);
  }
 }

 fclose(in);
 if (out) fclose(out);

 return 0;
}

I am using avast! v4.7 Home Edition, VPS file dated 08/01/2007 version 000763-0. I scanned objfix.exe at VirusTotal as well, the outcome was:

AntivirusVersionLast UpdateResult
AhnLab-V32007.8.2.02007.08.01-
AntiVir7.4.0.542007.08.01-
Authentium4.93.82007.08.01-
Avast4.7.1029.02007.08.01Win32:Agent-HFI
AVG7.5.0.4762007.08.01-
BitDefender7.22007.08.01-
CAT-QuickHeal9.002007.08.01-
ClamAV0.912007.08.01-
DrWeb4.332007.08.01-
eSafe7.0.15.02007.07.31-
eTrust-Vet31.1.50242007.08.01-
Ewido4.02007.08.01-
FileAdvisor12007.08.01-
Fortinet2.91.0.02007.08.01-
F-Prot4.3.2.482007.08.01-
F-Secure6.70.13030.02007.08.01-
IkarusT3.1.1.82007.08.01-
Kaspersky4.0.2.242007.08.01-
McAfee50882007.08.01-
Microsoft1.27042007.08.01-
NOD32v224312007.08.01-
Norman5.80.022007.08.01-
Panda9.0.0.42007.08.01-
Prevx1V22007.08.01-
Rising19.34.22.002007.08.01-
Sophos4.19.02007.08.01-
Sunbelt2.2.907.02007.08.01-
Symantec102007.08.01-
TheHacker6.1.7.1602007.08.01-
VBA323.12.2.22007.07.31-
VirusBuster4.3.26:92007.08.01-
Webwasher-Gateway6.0.12007.08.01-

Additional information
File size: 6656 bytes
MD5: 5469672259c2f6a1bc63b6e7520974f8
SHA1: a24b127c1ca517e3f258162323b9cda570997037

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89033
  • No support PMs thanks
Re: False positive - OBJFIX.EXE
« Reply #1 on: August 02, 2007, 12:39:55 AM »
Send the sample to virus@avast.com zipped and password protected with password in email body and false positive in the subject.

Or you can also add the file to the User Files (File, Add) section of the avast chest where it can do no harm and send it from there (select the file, right click, email to Alwil Software). No need to zip and PW protect when the sample is sent from chest. A copy of the file/s will remain in the original location, so any further action you take can remove that.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.3.6108 (build 24.3.8975.762) UI 1.0.801/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security