Vincent Matossian

15 papers B 1Misc 3Journal 5Unranked 6
YearRankTypeTitle / Venue / Authors
2006 J jnl
Clust. Comput.
Manish Parashar, Hua Liu, Zhen Li, Vincent Matossian, Cristina Schmidt, Guangsen Zhang, Salim Hariri
2006 Misc conf
International Conference on Computational Science (3)
Manish Parashar, Vincent Matossian, Hector Klie, Sunil G. Thomas, Mary F. Wheeler, Tahsin M. Kurç, Joel H. Saltz, Roelof Versteeg
2005 J jnl
Clust. Comput.
Wolfgang Bangerth, Hector Klie, Vincent Matossian, Manish Parashar, Mary F. Wheeler
2005 J jnl
Future Gener. Comput. Syst.
Manish Parashar, Hector Klie, Ümit V. Çatalyürek, Tahsin M. Kurç, Wolfgang Bangerth, Vincent Matossian, Joel H. Saltz, Mary F. Wheeler
2005 J jnl
Concurr. Pract. Exp.
Vincent Matossian, Viraj Bhat, Manish Parashar, Malgorzata Peszynska, Mrinal K. Sen, Paul L. Stoffa, Mary F. Wheeler
2005 conf
Self-star Properties in Complex Information Systems
Manish Parashar, Zhen Li, Hua Liu, Vincent Matossian, Cristina Schmidt
2005 Misc conf
International Conference on Computational Science (2)
Manish Parashar, Vincent Matossian, Wolfgang Bangerth, Hector Klie, Benjamin Rutt, Tahsin M. Kurç, Ümit V. Çatalyürek, Joel H. Saltz, Mary F. Wheeler
2004 Misc conf
International Conference on Computational Science
Manish Parashar, Hector Klie, Ümit V. Çatalyürek, Tahsin M. Kurç, Vincent Matossian, Joel H. Saltz, Mary F. Wheeler
2004 conf
ICPS
Nanyan Jiang, Cristina Schmidt, Vincent Matossian, Manish Parashar
2003 conf
Active Middleware Services
Manish Agarwal, Viraj Bhat, Hua Liu, Vincent Matossian, V. Putty, Cristina Schmidt, Guangsen Zhang, L. Zhen, Manish Parashar, Bithika Khargharia, Salim Hariri
2003 conf
CLADE
Vincent Matossian, Manish Parashar
2003 conf
Euro-Par
Vincent Matossian, Manish Parashar
2002 B conf
CCGRID
Mandar Kelaskar, Vincent Matossian, Preeti Mehra, Dennis Paul, Manish Parashar
2001 J jnl
Concurr. Comput. Pract. Exp.
Vijay Mann, Vincent Matossian, Rajeev Muralidhar, Manish Parashar
2001 conf
HICSS
Samian Kaur, Vijay Mann, Vincent Matossian, Rajeev Muralidhar, Manish Parashar
redb/extractors/pe_extractor.py
← Index redb/extractors/pe_extractor.py python
import logging
from abc import ABCMeta, abstractmethod
import inspect

import magic
import pefile
from dotnetfile import DotNetPE

from redb.extractors.extractor import Extractor

logger = logging.getLogger(__name__)


@abstractmethod
class PEExtractor(Extractor, metaclass=ABCMeta):

    def __init__(
        self,
        filepath,
        log,
        exporters=None,
        index_prefix=None,
        elastic_index=None,
        known_benign=False,
        known_malicious=False,
        pe=None,
    ):
        super().__init__(
            filepath,
            log,
            exporters,
            index_prefix,
            elastic_index,
            known_benign,
            known_malicious
        )
        self.pe = pe if pe else self._generate_pefile_object()
        self.dotnet = None

    def _generate_pefile_object(self):
        pe = None
        try:
            pe = pefile.PE(self.filepath)
            if not pe:
                raise pefile.PEFormatError("Empty file?")
        except pefile.PEFormatError as e:
            self.log.error(f"Format error {self.hash.sha256} Full error : {e}")
        return pe

    def _generate_dotnetfile_object(self):
        self.log.debug(inspect.currentframe().f_code.co_name)
        dotnet = None
        error = None
        try:
            dotnet = DotNetPE(self.filepath)
            if not dotnet:
                raise Exception("Empty file?")
        except Exception as e:
            self.log.error(
                f"Format error dotnet file {self.hash.sha256} Full error : {e}"
            )
            error = e
        return dotnet, error

    def _check_dotnet(self):
        try:
            file_type = magic.from_buffer(self.binary)
            if ".Net" in file_type:
                return True
            for entry in self.pe.OPTIONAL_HEADER.DATA_DIRECTORY:
                # IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR is typically 14
                if (
                    entry.name == "IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR"
                    and entry.Size > 0
                ):
                    return True
            return False
        except AttributeError as e:
            self.log.error(
                f"AttributeError error dotnet file {self.hash.sha256} Full error : {e}"
            )
            return False

    def _is_signed(self):
        address = self.pe.OPTIONAL_HEADER.DATA_DIRECTORY[
            pefile.DIRECTORY_ENTRY["IMAGE_DIRECTORY_ENTRY_SECURITY"]
        ].VirtualAddress
        if address == 0:
            return False
        return True

    def _has_overlay(self):
        return bool(self.pe.get_overlay())