Nancy M. Lorenzi

60 papers Misc 20Journal 34Unranked 6
YearRankTypeTitle / Venue / Authors
2024 J jnl
J. Am. Medical Informatics Assoc.
Suzanne Bakken, James J. Cimino, Sue S. Feldman, Nancy M. Lorenzi
2022 J jnl
Inf. Serv. Use
Nancy M. Lorenzi, William W. Stead
2021 J jnl
J. Am. Medical Informatics Assoc.
Claire N. Umstead, Kim M. Unertl, Nancy M. Lorenzi, Laurie Lovett Novak
2021 J jnl
J. Am. Medical Informatics Assoc.
Bob Chen, Wael Alrifai, Cheng Gao, Barrett Jones, Laurie L. Novak, Nancy M. Lorenzi, Daniel J. France, Bradley A. Malin, You Chen
2019 Misc conf
AMIA
Kim M. Unertl, Joyce M. Harris, Shilo Anders, Laurie L. Novak, Taylor Avery, Peggy Cunningham, Carrie Reale, Patricia Sengstack, Nancy M. Lorenzi
2019 Misc conf
AMIA
Kim M. Unertl, Laurie L. Novak, Joyce M. Harris, Christopher L. Simpson, Nancy M. Lorenzi
2019 conf
MedInfo
Claude J. Pirtle, Rollin R. Reeder, Christoph U. Lehmann, Kim M. Unertl, Nancy M. Lorenzi
2019 Misc conf
AMIA
Shilo H. Anders, Patricia Sengstack, Carrie Reale, Laurie L. Novak, Joyce M. Harris, Nancy M. Lorenzi, Elma Jashim, Kim M. Unertl
2018 Misc conf
AMIA
Kim M. Unertl, Nancy M. Lorenzi, Laurie L. Novak, Patricia Sengstack
2018 Misc conf
AMIA
Kim M. Unertl, Laurie L. Novak, Shilo H. Anders, Joyce M. Harris, Nancy M. Lorenzi
2018 Misc conf
AMIA
Guergana Savova, Merida L. Johns, Nancy M. Lorenzi, Patricia F. Brennan, Rebecca Crowley Jacobson
2017 J jnl
J. Am. Medical Informatics Assoc.
You Chen, Nancy M. Lorenzi, Warren S. Sandberg, Kelly Wolgast, Bradley A. Malin
2016 Misc conf
AMIA
Laurie L. Novak, Rupa Valdez, Tiffany C. Veinot, Jan L. Talmon, Nancy M. Lorenzi
2016 J jnl
J. Am. Medical Informatics Assoc.
Charlotte Tang, Nancy M. Lorenzi, Christopher A. Harle, Xiaomu Zhou, Yunan Chen
2014 Misc conf
AMIA
Jacob P. VanHouten, John Starmer, Nancy M. Lorenzi, David J. Maron, Thomas A. Lasko
2014 J jnl
Int. J. Medical Informatics
You Chen, Nancy M. Lorenzi, Steve Nyemba, Jonathan S. Schildcrout, Bradley A. Malin
2013 Misc conf
AMIA
Kim M. Unertl, Nancy M. Lorenzi
2013 Misc conf
AMIA
Jacob P. VanHouten, John Starmer, Nancy M. Lorenzi, Thomas A. Lasko
2013 J jnl
J. Biomed. Informatics
Jacob B. Weiss, Eta S. Berner, Kevin B. Johnson, Dario A. Giuse, Barbara A. Murphy, Nancy M. Lorenzi
2012 conf
Nursing Informatics
Elizabeth E. Weiner, Tom Elasy, Nancy M. Lorenzi, Ryan McNew, Laura Shackleford, Kathleen Wolff, Stephanie Martin, Christy Benson
2012 J jnl
J. Am. Medical Informatics Assoc.
Kim M. Unertl, Kevin B. Johnson, Nancy M. Lorenzi
2012 J jnl
Eur. J. Inf. Syst.
Laurie L. Novak, JoAnn Brooks, Cynthia S. Gadd, Shilo Anders, Nancy M. Lorenzi
2012 J jnl
J. Am. Medical Informatics Assoc.
Laurie L. Novak, Shilo Anders, Cynthia S. Gadd, Nancy M. Lorenzi
2012 Misc conf
AMIA
Kim M. Unertl, Laurie L. Novak, Cindy Gadd, Nancy M. Lorenzi
2011 J jnl
J. Am. Medical Informatics Assoc.
Nancy M. Lorenzi
2011 J jnl
J. Am. Medical Informatics Assoc.
Meryl Bloomrosen, Justin Starren, Nancy M. Lorenzi, Joan S. Ash, Vimla L. Patel, Edward H. Shortliffe
2011 J jnl
Int. J. Medical Informatics
Thomas R. Campion Jr., Lemuel R. Waitman, Nancy M. Lorenzi, Addison K. May, Cynthia S. Gadd
2011 J jnl
J. Am. Medical Informatics Assoc.
Thomas R. Campion Jr., Addison K. May, Lemuel R. Waitman, Asli Ozdas, Nancy M. Lorenzi, Cynthia S. Gadd
2011 J jnl
J. Am. Medical Informatics Assoc.
S. Trent Rosenbloom, Joshua C. Denny, Hua Xu, Nancy M. Lorenzi, William W. Stead, Kevin B. Johnson
2011 J jnl
J. Am. Medical Informatics Assoc.
Kevin B. Johnson, Kim M. Unertl, Qingxia Chen, Nancy M. Lorenzi, Hui Nian, James Bailey, Mark E. Frisse
2010 conf
MedInfo
John M. Starmer, C. Wright Pinson, Nancy M. Lorenzi
2010 J jnl
J. Am. Medical Informatics Assoc.
Edward H. Shortliffe, Nancy M. Lorenzi, Karen Greenwood, Alexis N. Broussard, Randolph A. Miller
2010 J jnl
Int. J. Medical Informatics
Thomas R. Campion Jr., Lemuel R. Waitman, Addison K. May, Asli Ozdas, Nancy M. Lorenzi, Cynthia S. Gadd
2010 J jnl
J. Am. Medical Informatics Assoc.
Kim M. Unertl, Laurie L. Novak, Kevin B. Johnson, Nancy M. Lorenzi
2009 J jnl
Int. J. Medical Informatics
Charles P. Friedman, Ilias Iakovidis, Laurent Debenedetti, Nancy M. Lorenzi
2009 Misc conf
AMIA
Jacob B. Weiss, Nancy M. Lorenzi
2009 J jnl
BMC Medical Informatics Decis. Mak.
Nancy M. Lorenzi, Angelina Kouroubali, Don E. Detmer, Meryl Bloomrosen
2009 J jnl
J. Am. Medical Informatics Assoc.
Kim M. Unertl, Matthew B. Weinger, Kevin B. Johnson, Nancy M. Lorenzi
2008 Misc conf
AMIA
Laurie L. Novak, Nancy M. Lorenzi
2008 J jnl
J. Am. Medical Informatics Assoc.
David A. Leiman, Nancy M. Lorenzi, Jeremy C. Wyatt, Alex S. F. Doney, S. Trent Rosenbloom
2008 Misc conf
AMIA
Jacob B. Weiss, Nancy M. Lorenzi
2008 J jnl
J. Am. Medical Informatics Assoc.
Nancy M. Lorenzi, Laurie L. Novak, Jacob B. Weiss, Cynthia S. Gadd, Kim M. Unertl
2007 Misc conf
AMIA
Thomas R. Campion Jr., Joshua C. Denny, Stuart T. Weinberg, Nancy M. Lorenzi, L. Russell Waitman
2006 Misc conf
AMIA
Jacob B. Weiss, Nancy M. Lorenzi
2006 Misc conf
AMIA
Jack Starmer, Nancy M. Lorenzi, C. Wright Pinson
2005 Misc conf
AMIA
Jacob B. Weiss, Nancy M. Lorenzi
2004 conf
MedInfo
Nancy M. Lorenzi, Janis B. Smith, Susan R. Conner, Thomas R. Campion Jr.
2003 Misc conf
AMIA
Asli Ozdas, Jim Jirjis, Dario A. Giuse, Nancy M. Lorenzi
2003 J jnl
Int. J. Medical Informatics
Nancy M. Lorenzi, Robert T. Riley
2003 Misc conf
AMIA
William M. Gregg, Jim Jirjis, Nancy M. Lorenzi, Dario A. Giuse
2001 conf
MedInfo
Nancy M. Lorenzi, Robert T. Riley, Naakesh A. Dewan
2000 J jnl
J. Am. Medical Informatics Assoc.
Nancy M. Lorenzi, Robert T. Riley
2000 J jnl
J. Am. Medical Informatics Assoc.
Nancy M. Lorenzi
1999 J jnl
Int. J. Medical Informatics
Nancy M. Lorenzi
1999 J jnl
Int. J. Medical Informatics
Elisabeth M. S. J. van Gennip, Nancy M. Lorenzi
1999 J jnl
J. Am. Medical Informatics Assoc.
William W. Stead, Nancy M. Lorenzi
1998 conf
MedInfo
Nancy M. Lorenzi, Robert T. Riley, Andrew J. C. Blyth, Gray Southon, Bradley J. Dixon
1998 J jnl
J. Am. Medical Informatics Assoc.
Robert A. Greenes, Nancy M. Lorenzi
1997 J jnl
J. Am. Medical Informatics Assoc.
Nancy M. Lorenzi, Robert T. Riley, Andrew J. C. Blyth, Gray Southon, Bradley J. Dixon
1995 J jnl
J. Am. Medical Informatics Assoc.
Nancy M. Lorenzi, Reed M. Gardner, T. Allan Pryor, William W. Stead
redb/extractors/elf_extractors/elf_exports.py
← Index redb/extractors/elf_extractors/elf_exports.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 ELFExport


class ELFExportExtractor(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_exports = None
        self.elastic_index = self.index_prefix + "-elf_exports"
        self.log.debug(inspect.currentframe().f_code.co_name)

    def _get_exported_functions_from_symbols(self, elf) -> Set[str]:
        """Extract exported functions from symbol tables."""
        exported_functions = set()

        try:
            # Check both static (.symtab) and dynamic (.dynsym) symbol tables
            symbol_sections = ['.symtab', '.dynsym']

            for section_name in symbol_sections:
                section = elf.get_section_by_name(section_name)
                if not section or not hasattr(section, 'iter_symbols'):
                    continue

                for symbol in section.iter_symbols():
                    # Check if symbol is exported (defined and globally visible)
                    if (symbol.name and
                        symbol.entry.get('st_shndx', 0) != 'SHN_UNDEF' and  # Not undefined
                        symbol.entry.get('st_info', {}).get('bind') in ['STB_GLOBAL', 'STB_WEAK'] and  # Global or weak binding
                        symbol.entry.get('st_info', {}).get('type') in ['STT_FUNC', 'STT_OBJECT']):  # Function or object

                        # Additional checks for meaningful exports
                        if (symbol.entry.get('st_value', 0) > 0 or  # Has a value
                            symbol.entry.get('st_size', 0) > 0):    # Has a size
                            exported_functions.add(symbol.name)

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

        return exported_functions

    def _get_exported_functions_from_dynamic_section(self, elf) -> Set[str]:
        """Extract exported functions information from dynamic section."""
        exported_functions = set()

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

            # Look for version definition sections that might indicate exports
            # This is complementary to symbol table analysis
            for tag in dynamic_section.iter_tags():
                if tag.entry.d_tag == 'DT_SONAME':
                    # If it has a SONAME, it's likely a shared library with exports
                    # The actual exports are still found in symbol tables
                    pass

        except Exception as e:
            self.log.error(f"Error extracting exports from dynamic section: {e}")

        return exported_functions

    def _filter_meaningful_exports(self, exports: Set[str]) -> Set[str]:
        """Filter out compiler-generated and internal symbols to focus on meaningful exports."""
        filtered_exports = set()

        # Common patterns to exclude (compiler-generated, internal symbols)
        exclude_patterns = [
            '_start',
            '_init',
            '_fini',
            '__libc_',
            '__gmon_start__',
            '_IO_stdin_used',
            '__data_start',
            '__bss_start',
            '_edata',
            '_end',
            '__TMC_END__',
            '_ITM_deregisterTMCloneTable',
            '_ITM_registerTMCloneTable',
            '__cxa_finalize',
            '__gxx_personality_v0',
            '_Jv_RegisterClasses'
        ]

        for export in exports:
            # Skip empty or very short names
            if not export or len(export) < 2:
                continue

            # Skip symbols that match exclude patterns
            skip = False
            for pattern in exclude_patterns:
                if export.startswith(pattern):
                    skip = True
                    break

            # Skip symbols that look like internal mangled names (but keep reasonable C++ names)
            if export.startswith('_Z') and len(export) > 50:  # Very long mangled names
                skip = True

            if not skip:
                filtered_exports.add(export)

        return filtered_exports

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

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

            def extract_data(elf):
                # Extract exported functions from multiple sources
                exported_functions = set()

                # From symbol tables (primary source)
                symbol_exports = self._get_exported_functions_from_symbols(elf)
                exported_functions.update(symbol_exports)

                # From dynamic section (supplementary)
                dynamic_exports = self._get_exported_functions_from_dynamic_section(elf)
                exported_functions.update(dynamic_exports)

                # Filter out compiler-generated and internal symbols
                meaningful_exports = self._filter_meaningful_exports(exported_functions)

                # Convert to sorted list for consistent output
                export_functions_list = sorted(list(meaningful_exports))

                # Return ELFExport dataclass
                return ELFExport(
                    elf_exports_total=len(export_functions_list),
                    elf_export_functions=export_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_exports = result
            return self.elf_exports

        except Exception as e:
            self.log.error(f"Error extracting ELF exports {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_exports
        elif exporter_type == "ClickHouseExporter":
            try:
                if not self.elf_exports:
                    return None

                # Prepare data array
                data = [[
                    self.sha256,
                    self.md5,
                    self.sha1,
                    self.elf_exports.elf_exports_total,
                    self.elf_exports.elf_export_functions,
                    datetime.now(timezone.utc)
                ]]

                column_names = [
                    'sha256', 'md5', 'sha1',
                    'elf_exports_total',
                    'elf_export_functions',
                    'analysis_date'
                ]

                if not data:
                    return None

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

                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_exports"