Maarten Sierhuis

47 papers A* 3A 3C 2Misc 3Journal 12Unranked 18
YearRankTypeTitle / Venue / Authors
2016 ed.
SpringSim (ADS)
Levent Yilmaz, Tuncer I. Ören, Gregory R. Madey, Maarten Sierhuis, Yu Zhang
2015 conf
HRI (Extended Abstracts)
Bradley Hayes, Matthew C. Gombolay, Malte F. Jung, Koen V. Hindriks, Joachim de Greeff, Catholijn M. Jonker, Mark A. Neerincx, Jeffrey M. Bradshaw, Matthew Johnson, Ivana Kruijff-Korbayová, Maarten Sierhuis, Julie A. Shah, Brian Scassellati
2015 ed.
SpringSim (ADS)
Levent Yilmaz, Tuncer I. Ören, Gregory R. Madey, Maarten Sierhuis, Yu Zhang
2014 J jnl
J. Hum. Robot Interact.
Matthew Johnson, Jeffrey M. Bradshaw, Paul J. Feltovich, Catholijn M. Jonker, M. Birna van Riemsdijk, Maarten Sierhuis
2013 conf
RuleML
Maarten Sierhuis
2013 ed.
SpringSim (ADS)
Levent Yilmaz, Tuncer I. Ören, Greg Madey, Maarten Sierhuis, Yu Zhang
2012 J jnl
IEEE Intell. Syst.
Matthew Johnson, Jeffrey M. Bradshaw, Paul J. Feltovich, Catholijn M. Jonker, Birna van Riemsdijk, Maarten Sierhuis
2012 J jnl
Comput. Math. Organ. Theory
Yu Zhang, Levent Yilmaz, Tuncer I. Ören, Greg Madey, Maarten Sierhuis
2012 A* conf
HRI
Jeffrey M. Bradshaw, Virginia Dignum, Catholijn M. Jonker, Maarten Sierhuis
2012 J jnl
IEEE Intell. Syst.
Jeffrey M. Bradshaw, Virginia Dignum, Catholijn M. Jonker, Maarten Sierhuis
2011 conf
CLIMA
Richard Stocker, Maarten Sierhuis, Louise A. Dennis, Clare Dixon, Michael Fisher
2011 J jnl
IEEE Intell. Syst.
Matthew Johnson, Jeffrey M. Bradshaw, Paul J. Feltovich, Robert R. Hoffman, Catholijn M. Jonker, Birna van Riemsdijk, Maarten Sierhuis
2010 C conf
IAAI
Peter A. Jarvis, Shawn R. Wolfe, Francis Y. Enomoto, Robert A. Nado, Maarten Sierhuis
2010 J jnl
IEEE Intell. Syst.
Michael G. Shafto, Maarten Sierhuis
2010 J jnl
IEEE Intell. Syst.
Nanja J. J. M. Smets, Jeffrey M. Bradshaw, Jurriaan van Diggelen, Catholijn M. Jonker, Mark A. Neerincx, L. J. V. de Rijk, P. A. M. Senster, Maarten Sierhuis, O. ten Thije
2010 A conf
AAMAS
M. Birna van Riemsdijk, Koen V. Hindriks, Catholijn M. Jonker, Maarten Sierhuis
2010 C conf
COMMA
Simon Buckingham Shum, Maarten Sierhuis, Jack Park, Matthew Brown
2010 conf
COIN@AAMAS&MALLOW
Matthew Johnson, Jeffrey M. Bradshaw, Paul J. Feltovich, Catholijn M. Jonker, Birna van Riemsdijk, Maarten Sierhuis
2010 A* conf
HRI
Matthew Johnson, Jeffrey M. Bradshaw, Paul J. Feltovich, Catholijn M. Jonker, Maarten Sierhuis, Birna van Riemsdijk
2009 ch.
Multi-Agent Systems for Traffic and Transportation Engineering
Shawn R. Wolfe, Peter A. Jarvis, Francis Y. Enomoto, Maarten Sierhuis, Bart-Jan van Putten
2009 ch.
Multi-Agent Programming, Languages, Tools and Applications
Maarten Sierhuis, William J. Clancey, Ron J. J. van Hoof
2009 A* conf
HRI
Rafael H. Bordini, Michael Fisher, Maarten Sierhuis
2009 J jnl
Artif. Intell. Eng. Des. Anal. Manuf.
William J. Clancey, Maarten Sierhuis, Chin Seah
2008 conf
SpringSim
Maarten Sierhuis
2008 conf
AOSE
Bart-Jan van Putten, Virginia Dignum, Maarten Sierhuis, Shawn R. Wolfe
2008 conf
SpringSim
Shawn R. Wolfe, Maarten Sierhuis, Peter A. Jarvis
2007 conf
SpringSim (2)
Maarten Sierhuis, Thomas E. Diegelman, Chin Seah, Valerie L. Shalin, William J. Clancey, Albert M. Selvin
2007 J jnl
Int. J. Simul. Process. Model.
Maarten Sierhuis, William J. Clancey, Ron van Hoof
2007 conf
IAT
Shawn R. Wolfe, Francis Y. Enomoto, Peter A. Jarvis, Maarten Sierhuis
2007 ch.
The Geospatial Web
Daniel C. Berrios, Maarten Sierhuis, Richard M. Keller
2007 conf
ESAW
William J. Clancey, Maarten Sierhuis, Chin Seah, Chris Buckley, Fisher Reynolds, Tim Hall, Mike Scott
2006 conf
ESAW
Maarten Sierhuis
2006 conf
AAAI Fall Symposium: Aurally Informed Performance
John Dowding, Richard Alena, William J. Clancey, Maarten Sierhuis, Jeffrey Graham
2006 conf
AAAI Spring Symposium: To Boldly Go Where No Human-Robot Team Has Gone Before
Liam Pedersen, William J. Clancey, Maarten Sierhuis, Nicola Muscettola, David E. Smith, David Lees, Kanna Rajan, Sailesh Ramakrishnan, Paul Tompkins, Alonso Vera, Tom Dayton
2004 conf
SMC (2)
Jeffrey M. Bradshaw, Paul J. Feltovich, Hyuckchul Jung, Shriniwas Kulkarni, James F. Allen, Larry Bunch, Nathanael Chambers, Lucian Galescu, Renia Jeffers, Matthew Johnson, Maarten Sierhuis, William Taysom, Andrzej Uszok, Ron van Hoof
2004 conf
MATES
Jürgen Klüver, Maarten Sierhuis, Christina Stoica
2004 Misc conf
FLAIRS
William J. Clancey, Maarten Sierhuis, Richard Alena, Sekou Crawford, John Dowding, Jeffrey Graham, Charis Kaskiris, Kim S. Tyree, Ron van Hoof
2003 Misc conf
FLAIRS
William J. Clancey, Maarten Sierhuis, Charis Kaskiris, Ron van Hoof
2003 conf
ISESE
Cleidson R. B. de Souza, David F. Redmiles, Gloria Mark, John Penix, Maarten Sierhuis
2003 J jnl
J. Manag. Inf. Syst.
Maarten Sierhuis, William J. Clancey, Chin Seah, Jay P. Trimble, Michael H. Sims
2003 A conf
AAMAS
Jeffrey M. Bradshaw, Andrzej Uszok, Renia Jeffers, Niranjan Suri, Patrick J. Hayes, Mark H. Burstein, Alessandro Acquisti, Brett Benyo, Maggie R. Breedy, Marco M. Carvalho, David J. Diller, Matt Johnson, Shriniwas Kulkarni, James Lott, Maarten Sierhuis, Ron van Hoof
2002 J jnl
IEEE Intell. Syst.
Maarten Sierhuis, William J. Clancey
2002 conf
HICSS
Maarten Sierhuis, William J. Clancey, Michael H. Sims
2001 Misc conf
FLAIRS
William J. Clancey, Pascal Lee, Maarten Sierhuis
2001 conf
Hypertext
Jeff Conklin, Albert M. Selvin, Simon Buckingham Shum, Maarten Sierhuis
1998 J jnl
Int. J. Hum. Comput. Stud.
William J. Clancey, Patricia Sachs, Maarten Sierhuis, Ron van Hoof
1996 A conf
CSCW
Albert M. Selvin, Maarten Sierhuis
redb/extractors/elf_extractors/elf_imports.py
← Index redb/extractors/elf_extractors/elf_imports.py python
import inspect
from datetime import datetime, timezone
from typing import Any, List, Set

from elftools.elf.elffile import ELFFile
from elftools.common.exceptions import ELFError

from redb.extractors.enum import Tag
from redb.extractors.elf_extractor import ELFExtractor
from redb.models.dataclasses import ELFImport


class ELFImportExtractor(ELFExtractor):

    def __init__(
        self,
        filepath,
        log,
        exporters=None,
        index_prefix=None,
        elastic_index=None,
        known_benign=False,
        known_malicious=False,
        elf=None,
    ):
        super().__init__(
            filepath,
            log,
            exporters,
            index_prefix,
            elastic_index,
            known_benign,
            known_malicious,
            elf,
        )
        self.elf_imports = None
        self.elastic_index = self.index_prefix + "-elf_imports"
        self.log.debug(inspect.currentframe().f_code.co_name)

    def _get_import_libraries(self, elf) -> List[str]:
        """Extract imported libraries from dynamic section."""
        libraries = []

        try:
            # Get the dynamic section
            dynamic_section = elf.get_section_by_name('.dynamic')
            if not dynamic_section:
                return libraries

            # Extract DT_NEEDED entries (required libraries)
            for tag in dynamic_section.iter_tags():
                if tag.entry.d_tag == 'DT_NEEDED':
                    libraries.append(tag.needed)

        except Exception as e:
            self.log.error(f"Error extracting import libraries: {e}")

        return libraries

    def _get_imported_functions_from_symbols(self, elf) -> Set[str]:
        """Extract imported functions from dynamic symbol table."""
        imported_functions = set()

        try:
            # Get the dynamic symbol table
            dynsym_section = elf.get_section_by_name('.dynsym')
            if not dynsym_section or not hasattr(dynsym_section, 'iter_symbols'):
                return imported_functions

            # Look for undefined symbols (imports)
            for symbol in dynsym_section.iter_symbols():
                # Check if symbol is undefined (imported)
                if (symbol.entry.get('st_shndx', 0) == 'SHN_UNDEF' and
                    symbol.name and
                    symbol.entry.get('st_info', {}).get('bind') in ['STB_GLOBAL', 'STB_WEAK']):
                    imported_functions.add(symbol.name)

        except Exception as e:
            self.log.error(f"Error extracting imported functions from symbols: {e}")

        return imported_functions

    def _get_imported_functions_from_relocations(self, elf) -> Set[str]:
        """Extract imported functions from relocation sections."""
        imported_functions = set()

        try:
            # Look through relocation sections
            for section in elf.iter_sections():
                if hasattr(section, 'iter_relocations'):
                    try:
                        for relocation in section.iter_relocations():
                            # Get symbol associated with relocation
                            if hasattr(relocation, 'symbol') and relocation.symbol:
                                symbol_name = relocation.symbol.name
                                if symbol_name:
                                    imported_functions.add(symbol_name)
                    except Exception as e:
                        self.log.debug(f"Could not process relocations in section {section.name}: {e}")

        except Exception as e:
            self.log.error(f"Error extracting imported functions from relocations: {e}")

        return imported_functions

    def _get_plt_functions(self, elf) -> Set[str]:
        """Extract functions from PLT (Procedure Linkage Table) sections."""
        plt_functions = set()

        try:
            # Look for PLT-related sections
            plt_sections = ['.plt', '.plt.got', '.plt.sec']

            for section_name in plt_sections:
                section = elf.get_section_by_name(section_name)
                if section:
                    # PLT functions are typically associated with relocations
                    # We'll get them from the relocation analysis
                    pass

        except Exception as e:
            self.log.error(f"Error extracting PLT functions: {e}")

        return plt_functions

    def tag(self):
        return Tag.ELF_IMPORTS.value if hasattr(Tag, 'ELF_IMPORTS') else "elf_imports"

    def extract(self):
        try:
            self.log.debug(inspect.currentframe().f_code.co_name)

            def extract_data(elf):
                # Extract import libraries
                import_libraries = self._get_import_libraries(elf)

                # Extract imported functions from multiple sources
                imported_functions = set()

                # From dynamic symbols
                symbol_imports = self._get_imported_functions_from_symbols(elf)
                imported_functions.update(symbol_imports)

                # From relocations
                relocation_imports = self._get_imported_functions_from_relocations(elf)
                imported_functions.update(relocation_imports)

                # From PLT
                plt_imports = self._get_plt_functions(elf)
                imported_functions.update(plt_imports)

                # Convert to sorted lists for consistent output
                import_libraries_list = sorted(list(set(import_libraries)))
                import_functions_list = sorted(list(imported_functions))

                # Return ELFImport dataclass
                return ELFImport(
                    elf_imports_total=len(import_functions_list),
                    elf_import_libraries=import_libraries_list,
                    elf_import_functions=import_functions_list,
                )

            if not self._is_elf_file():
                return None

            result = self._with_elf_file(extract_data)
            if result is None:
                return None

            self.elf_imports = result
            return self.elf_imports

        except Exception as e:
            self.log.error(f"Error extracting ELF imports {self.hash.sha256}: {e}")
            return None

    def prepare_export_data(self, exporter_type: str) -> Any:
        self.log.debug(inspect.currentframe().f_code.co_name)

        if exporter_type == "ElasticsearchExporter":
            return self.elf_imports
        elif exporter_type == "ClickHouseExporter":
            try:
                if not self.elf_imports:
                    return None

                # Prepare data array
                data = [[
                    self.sha256,
                    self.md5,
                    self.sha1,
                    self.elf_imports.elf_imports_total,
                    self.elf_imports.elf_import_libraries,
                    self.elf_imports.elf_import_functions,
                    datetime.now(timezone.utc)
                ]]

                column_names = [
                    'sha256', 'md5', 'sha1',
                    'elf_imports_total',
                    'elf_import_libraries',
                    'elf_import_functions',
                    'analysis_date'
                ]

                column_type_names = [
                    'FixedString(64)', 'FixedString(32)', 'FixedString(40)',
                    'UInt32',
                    'Array(LowCardinality(String))',
                    'Array(LowCardinality(String))',
                    'DateTime64(3, \'UTC\')'
                ]

                if not data:
                    return None

                return (data, column_names, column_type_names)

            except Exception as e:
                self.log.error(f"Error preparing export data: {e}")
                raise

    def get_clickhouse_table(self) -> str:
        return "redb_elf_imports"