Karen L. Butler-Purry

27 papers C 1Journal 12Unranked 14
YearRankTypeTitle / Venue / Authors
2025 J jnl
CoRR
Hong Zhao, Jin Wei-Kocsis, Adel Heidari Akhijahani, Karen L. Butler-Purry
2024 J jnl
CoRR
Hong Zhao, Jin Wei-Kocsis, Adel Heidari Akhijahani, Karen L. Butler-Purry
2023 conf
ISGT
Amarachi Umunnakwe, Abolaji Alimi, Katherine R. Davis, Karen L. Butler-Purry
2021 J jnl
CoRR
Ogbonnaya Bassey, Karen L. Butler-Purry
2021 J jnl
IEEE Trans. Educ.
Mehmet Oren, Susan Pedersen, Karen L. Butler-Purry
2018 J jnl
IEEE Trans. Smart Grid
Bo Chen, Chen Chen, Jianhui Wang, Karen L. Butler-Purry
2017 J jnl
IEEE Trans. Smart Grid
Ebony Mayhorn, Le Xie, Karen L. Butler-Purry
2016 conf
IPTComm
Abhijeet Sahu, Ana E. Goulart, Karen L. Butler-Purry
2015 J jnl
IEEE Trans. Smart Grid
Jin Wei, Deepa Kundur, Karen L. Butler-Purry
2014 J jnl
IEEE Trans. Smart Grid
Shan Liu, Bo Chen, Takis Zourntos, Deepa Kundur, Karen L. Butler-Purry
2014 J jnl
IEEE Trans. Smart Grid
Jin Wei, Deepa Kundur, Takis Zourntos, Karen L. Butler-Purry
2014 conf
MWSCAS
Hung-Ming Chou, Garng M. Huang, Karen L. Butler-Purry
2014 conf
SmartGridComm
Abdallah K. Farraj, Eman M. Hammad, Jin Wei, Deepa Kundur, Karen L. Butler-Purry
2014 conf
GlobalSIP
Abdallah K. Farraj, Eman M. Hammad, Jin Wei, Deepa Kundur, Karen L. Butler-Purry
2013 J jnl
IEEE Trans. Emerg. Top. Comput.
Shan Liu, Salman Mashayekh, Deepa Kundur, Takis Zourntos, Karen L. Butler-Purry
2013 J jnl
IEEE Trans. Smart Grid
Milad Falahi, Karen L. Butler-Purry, Mehrdad Ehsani
2013 conf
ISGT
Fred A. Ituzaro, Richard H. Douglin, Karen L. Butler-Purry
2012 conf
SmartGridComm
Shan Liu, Deepa Kundur, Takis Zourntos, Karen L. Butler-Purry
2012 conf
HiCoNS
Shan Liu, Deepa Kundur, Takis Zourntos, Karen L. Butler-Purry
2012 conf
SmartGridComm
Jin Wei, Deepa Kundur, Takis Zourntos, Karen L. Butler-Purry
2011 conf
CSIIRW
Shan Liu, Xianyong Feng, Deepa Kundur, Takis Zourntos, Karen L. Butler-Purry
2011 J jnl
Int. J. Secur. Networks
Deepa Kundur, Xianyong Feng, Salman Mashayekh, Shan Liu, Takis Zourntos, Karen L. Butler-Purry
2008 conf
Future Play
Vinod Srinivasan, Karen L. Butler-Purry, Susan Pedersen
2007 conf
SCSC
Fabian M. Uriarte, Karen L. Butler-Purry
2007 conf
SCSC
Li Qi, Karen L. Butler-Purry, Stephen Woodruff
2003 conf
HICSS
Karen L. Butler-Purry, Mustafa Bagriyanik
2002 C conf
CAINE
Sanjeev K. Srivastava, Hong Xiao, Karen L. Butler-Purry
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())