Alterserv

RaptorCache => Plugins para RaptorCache => Plugins de Antivirus => Mensaje publicado por: WebNewbie en Febrero 23, 2014, 04:53:36 PM

Título: Lista de RegEx para los Plugins de los antivirus
Publicado por: WebNewbie en Febrero 23, 2014, 04:53:36 PM
El cacheado de archivos para antivirus
Citares importante
, por eso listo de los RegEx de algunos antivirus que tengo; pero.. sin embargo, hay muchos que faltan por hacer. Quizás algunos de ustedes tengan y puedan compartirlo :)

LOS MÁS COMUNES:

AntivirusKaspersky => http.*\.kaspersky\.com.*(\.bz2|\.avc|\.kdc|\.dat|\.kd1|\.klz|\.exe|\.kfb|\.dif|\.kdz|\.diffs)
AntivirusMcAfee => http.*\.mcafee\.com.*(\.exe|\.xdb|\.msi|\.zip)
AntivirusSymantec => [h|f]tt?p://[^/]*\.symantec(liveupdate)?\.com/.*\.(exe|zip|vdb|xdb)
AntivirusAvast => http://download[\d]+\.avast\.com/.*\.(def|vpaa|stamp|vpx|exe|vpu)
AntivirusAvira => http://dl[0-9]\.(avgate\.net|avira-update\.com)/.*\.(exe|dll|vdf|dat|gz|bin)
AntivirusPanda Aún FALTA
AntivirusBitDefender Aún FALTA
AntivirusTrendMicro     => http://[^/]*\.trendmicro\.com/activeupdate/.*
AhnLab Aún FALTA
AntivirusAVG => http://.*\.avg\.com/.*\.(exe|bin|ctf)
AntivirusQuick Heal Aún FALTA
AntivirusClamAV Aún FALTA
AntivirusComodo Aún FALTA
AntivirusDr. Web LAún FALTA
AntivirusFrisk Aún FALTA
AntivirusF-Secure Aún FALTA
AntivirusFortinet Aún FALTA
AntivirusG Data Aún FALTA
AntivirusJiangmin Aún FALTA
AntivirusMicrosoft Aún FALTA
AntivirusNorman Aún FALTA
AntivirusRising Aún FALTA
AntivirusSophos     Aún FALTA
Título: Re:Lista de RegEx para los Plugins de los antivirus
Publicado por: francisco.romero87 en Enero 06, 2015, 01:12:29 PM
el plugin de avg quedaria de esta forma quien me ayuda? de igual forma estare probando hoy en la noche a ver que tal me va. ya que estoy en la oficina y no tengo a la mano el raptor:D

Código (cpp) [Seleccionar]
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o avg.com.so avg.com.cpp
// Regex
// http://.*\.avg\.com/.*\.(.exe|\.bin|\.ctf)

bool in_array(const string &needle, const vector< string > &haystack) {

        int max = haystack.size();
        if (max == 0) return false;
        for (int iii = 0; iii < max; iii++) {
                   if (regex_match(haystack[iii], needle) != "") {
                           return true;
                }
        }
        return false;
}

string get_filename(string url) {
                vector<string> resultado;
                if (url.find("?") != string::npos) {
                        stringexplode(url, "?", &resultado);
                        stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
                        return resultado.at(resultado.size()-1);           
                } else {
                        stringexplode(url, "/", &resultado);
                        return resultado.at(resultado.size()-1);
                }
}

extern "C" resposta getmatch(const string url) {
        resposta r;
               
        vector<string> black_list;
        black_list.push_back ("servers.def.vpx");
        black_list.push_back ("prod-ais.vpx");
               
        if ((url.find(".avg.com/") != string::npos) and (in_array(url, black_list) == false)
                ) {
                r.file = get_filename(url);
                if (!r.file.empty()) {
                        r.match = true;
                        r.domain = "avg";
                } else {
                        r.match = false;
                }
        } else {
                r.match = false;
        }
        return r;
}
Título: Re:Lista de RegEx para los Plugins de los antivirus
Publicado por: francisco.romero87 en Enero 06, 2015, 01:15:14 PM
para avira

Código (cpp) [Seleccionar]
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o avira.com.so avira.com.cpp
// Regex
// http://dl[0-9]\.(avgate\.net|avira-update\.com)/.*\.(.exe|\.dll|\.vdf|\.dat|\.gz|\.bin)

bool in_array(const string &needle, const vector< string > &haystack) {

        int max = haystack.size();
        if (max == 0) return false;
        for (int iii = 0; iii < max; iii++) {
                   if (regex_match(haystack[iii], needle) != "") {
                           return true;
                }
        }
        return false;
}

string get_filename(string url) {
                vector<string> resultado;
                if (url.find("?") != string::npos) {
                        stringexplode(url, "?", &resultado);
                        stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
                        return resultado.at(resultado.size()-1);           
                } else {
                        stringexplode(url, "/", &resultado);
                        return resultado.at(resultado.size()-1);
                }
}

extern "C" resposta getmatch(const string url) {
        resposta r;
               
        vector<string> black_list;
        black_list.push_back ("servers.def.vpx");
        black_list.push_back ("prod-ais.vpx");
               
        if ((url.find(".avira.com/") != string::npos) and (in_array(url, black_list) == false)
                ) {
                r.file = get_filename(url);
                if (!r.file.empty()) {
                        r.match = true;
                        r.domain = "avira";
                } else {
                        r.match = false;
                }
        } else {
                r.match = false;
        }
        return r;
}
Título: Re:Lista de RegEx para los Plugins de los antivirus
Publicado por: firecold en Enero 06, 2015, 09:52:43 PM
Cita de: francisco.romero87 en Enero 06, 2015, 01:12:29 PM
el plugin de avg quedaria de esta forma quien me ayuda? de igual forma estare probando hoy en la noche a ver que tal me va. ya que estoy en la oficina y no tengo a la mano el raptor:D

Código (cpp) [Seleccionar]
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"

using namespace std;

// use this line to compile
// g++ -I. -fPIC -shared -g -o avg.com.so avg.com.cpp
// Regex
// http://.*\.avg\.com/.*\.(.exe|\.bin|\.ctf)

bool in_array(const string &needle, const vector< string > &haystack) {

       int max = haystack.size();
       if (max == 0) return false;
       for (int iii = 0; iii < max; iii++) {
                  if (regex_match(haystack[iii], needle) != "") {
                          return true;
               }
       }
       return false;
}

string get_filename(string url) {
               vector<string> resultado;
               if (url.find("?") != string::npos) {
                       stringexplode(url, "?", &resultado);
                       stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
                       return resultado.at(resultado.size()-1);          
               } else {
                       stringexplode(url, "/", &resultado);
                       return resultado.at(resultado.size()-1);
               }
}

extern "C" resposta getmatch(const string url) {
       resposta r;
               
       vector<string> black_list;
       black_list.push_back ("servers.def.vpx");
       black_list.push_back ("prod-ais.vpx");
               
       if ((url.find(".avg.com/") != string::npos) and (in_array(url, black_list) == false)
                {
               r.file = get_filename(url);
               if (!r.file.empty()) {
                       r.match = true;
                       r.domain = "avg";
               } else {
                       r.match = false;
               }
       } else {
               r.match = false;
       }
       return r;
}

Dependiendo de como esten, ya que los archivos que estas denegando no son los que deberian, ya que solo deniegas los que no permiten que la actualizacion se realice, Saludos