Armadito Antimalware Backdoor / Bypass
Posted on 14 June 2016
/* # Exploit Title : Armadito antimalware - Backdoor/Bypass # Date : 07-06-2016 (DD-MM-YYYY) # Exploit Author : Ax. # Vendor Homepage : http://www.teclib-edition.com/teclib-products/armadito-antivirus/ # Software Link : https://github.com/41434944/armadito-av # Version : No version specified. Fixed 07-06-2016 post-disclosure # Tested on : Windows 7 1. Description Armadito is an modern antivirus developped by the french company TecLib' (http://www.teclib.com/). Looking at the source code made public few days ago we discovered that there was a backdoor (or a really lack of knowledge from their developpers, meaning that they should reconsider working in security). 2. Proof Of Concept As it can be seen in the GitHub repository in the file : armadito-av/core/windows/service/scan_onaccess.c at line 283. An obvious backdoor has been implemented. [SOURCE] if (msDosFilename == NULL) { a6o_log(ARMADITO_LOG_SERVICE,ARMADITO_LOG_LEVEL_WARNING, " ArmaditoSvc!UserScanWorker :: [%d] :: ConvertDeviceNameToMsDosName failed :: ",ThreadId); scan_result = ARMADITO_EINVAL; } else if (strstr(msDosFilename,"ARMADITO.TXT") != NULL) { // Do not scan the log file. (debug only) scan_result = ARMADITO_WHITE_LISTED; } else { // launch a simple file scan //printf("[+] Debug :: UserScanWorker :: [%d] :: a6o_scan :: [%s] ",ThreadId,msDosFilename); scan_result = a6o_scan_simple(Context->armadito, msDosFilename, &report); a6o_log(ARMADITO_LOG_SERVICE, ARMADITO_LOG_LEVEL_DEBUG, "[+] Debug :: UserScanWorker :: [%d] :: %s :: %s ", ThreadId, msDosFilename, ScanResultToStr(scan_result)); printf("[+] Debug :: UserScanWorker :: [%d] :: %s :: %s ", ThreadId, msDosFilename, ScanResultToStr(scan_result)); } [/SOURCE] Calling a file ARMADITO.TXT-Malware.exe (or whatever containing ARMADITO.TXT in its name) simply bypass the runtime analysis of the antivirus. You can find attach a small piece of code based on Armadito to reproduce the exploit. 3. Solution Stop paying developpers that do not know how to deal with security. (Reading the rest of the code has been an exhausting work). 3 bis. Real solution It seems that they fixed the backdoor already (https://github.com/armadito/armadito-av/blob/DEV/core/windows/service/scan_onaccess.c) */ #include <stdio.h> #include <stdlib.h> #include <Windows.h> #define BUFSIZE 4096 #define MAX_PATH_SIZE 255 #define ARMADITO_EINVAL 0 #define ARMADITO_WHITE_LISTED 1 char * ConvertDeviceNameToMsDosName(LPSTR DeviceFileName) { char deviceDosName[BUFSIZE]; char deviceLetter[3] = { '