Ian A. Glover

50 papers Journal 21Unranked 29
YearRankTypeTitle / Venue / Authors
2019 J jnl
Wirel. Pers. Commun.
Sinan A. Khwandah, John Paul Cosmas, Pavlos I. Lazaridis, Ian A. Glover, Zaharias D. Zaharis, Neeli R. Prasad
2019 J jnl
IET Wirel. Sens. Syst.
Ephraim Iorkyase, Christos Tachtatzis, Pavlos I. Lazaridis, Ian A. Glover, Robert C. Atkinson
2019 J jnl
Wirel. Pers. Commun.
Keyur K. Mistry, Pavlos I. Lazaridis, Zaharias D. Zaharis, Mobayode O. Akinsolu, Bo Liu, Thomas D. Xenos, Ian A. Glover, Ramjee Prasad
2018 J jnl
Sensors
Umar F. Khan, Pavlos I. Lazaridis, Hamd Mohamed, Ricardo Albarracín Sánchez, Zaharias D. Zaharis, Robert C. Atkinson, Christos Tachtatzis, Ian A. Glover
2018 conf
ICAC
Sinan A. Khwandah, John Paul Cosmas, Zaharias D. Zaharis, Pavlos I. Lazaridis, Ian A. Glover, Shadi M. Saleh
2018 conf
ICAC
Umar F. Khan, Pavlos I. Lazaridis, H. Mohamed, David Upton, Keyur K. Mistry, Bahghtar Saeed, Peter Mather, Robert C. Atkinson, Christos Tachtatzis, Ian A. Glover
2017 J jnl
Turkish J. Electr. Eng. Comput. Sci.
Yong Zhang, Pavlos I. Lazaridis, Raed Abd-Alhameed, Ian A. Glover
2017 conf
ICAC
Jack Bryan Hughes, Pavlos I. Lazaridis, Ian A. Glover, Andrew D. Ball
2017 conf
ICAC
Jack Bryan Hughes, Pavlos I. Lazaridis, Ian A. Glover, Andrew D. Ball
2017 conf
ICAC
H. Mohamed, Pavlos I. Lazaridis, David Upton, Umar F. Khan, Keyur K. Mistry, Bahghtar Saeed, Peter Mather, Maria F. Q. Vieira, K. W. Barlee, D. S. W. Atkinson, Ian A. Glover
2016 J jnl
IEEE Wirel. Commun.
Sinan A. Khwandah, John Cosmas, Ian A. Glover, Pavlos I. Lazaridis, Giuseppe Araniti, Zaharias D. Zaharis
2016 conf
WISATS
Adel Jaber, Pavlos I. Lazaridis, Bahghtar Saeed, Yong Zhang, Umar F. Khan, David Upton, Hamd Ahmed, Peter Mather, Robert C. Atkinson, Martin Judd, Maria de Fátima Queiroz Vieira, Ian A. Glover
2016 conf
ICAC
Adel Jaber, Pavlos I. Lazaridis, Bahghtar Saeed, Yong Zhang, David Khan, David Upton, Hamd Ahmed, Peter Mather, Maria de Fátima Queiroz Vieira, Robert C. Atkinson, Martin Judd, Ian A. Glover
2016 conf
ICT
H. Mohamed, Pavlos I. Lazaridis, David Upton, Umar F. Khan, Bahghtar Saeed, Adel Jaber, Yong Zhang, Peter Mather, Maria F. Q. Vieira, K. W. Barlee, D. S. W. Atkinson, Albena Mihovska, Liljana Gavrilovska, Ian A. Glover
2016 conf
BlackSeaCom
Mohammed Al-Momin, Pavlos I. Lazaridis, John Cosmas, Zaharias D. Zaharis, Stavros Kalafatis, Albena Mihovska, Ian A. Glover
2015 J jnl
IET Wirel. Sens. Syst.
Fabio Di Franco, Christos Tachtatzis, Robert C. Atkinson, Ilenia Tinnirello, Ian A. Glover
2015 conf
ICAC
Adel Jaber, Pavlos I. Lazaridis, Yong Zhang, David Upton, Hamd Ahmed, Umar F. Khan, Bahghtar Saeed, Peter Mather, Maria F. Q. Vieira, Robert C. Atkinson, Martin Judd, Ian A. Glover
2015 conf
BMSB
Stylianos Kasampalis, Pavlos I. Lazaridis, Zaharias D. Zaharis, Aristotelis Bizopoulos, Lidija Paunovska, Spiridon Zettas, Ian A. Glover, Dimitrios Drogoudis, John Cosmas
2015 conf
BMSB
Spiridon Zettas, Pavlos I. Lazaridis, Zaharias D. Zaharis, Stylianos Kasampalis, Neeli R. Prasad, Ian A. Glover, John Paul Cosmas
2015 J jnl
Int. J. Distributed Sens. Networks
Yong Zhang, David Upton, Adel Jaber, Hamd Ahmed, Bahghtar Saeed, Peter Mather, Pavlos I. Lazaridis, Alexandre Mopty, Christos Tachtatzis, Robert C. Atkinson, Martin Judd, Maria de Fátima Queiroz Vieira, Ian A. Glover
2014 conf
I2MTC
José M. R. de Souza Neto, José Sérgio da Rocha Neto, Euler C. T. de Macedo, Ian A. Glover, Martin D. Judd
2014 conf
ISCCSP
Konstantinos Sasloglou, Ian A. Glover, Vangelis Gazis, Panayotis Kikiras, Ivan Andonovic
2013 J jnl
IEEE Trans. Veh. Technol.
Neil Sinclair, David Harle, Ian A. Glover, James Irvine, Robert C. Atkinson
2013 J jnl
IET Wirel. Sens. Syst.
Xuewu Dai, John E. Mitchell, Yang Yang, Ian A. Glover, Konstantinos Sasloglou, Robert C. Atkinson, Isabella Panella, John Strong, Werner Schiffers, Partha S. Dutta
2013 conf
Panhellenic Conference on Informatics
Konstantinos Sasloglou, G. Tsao, Ian A. Glover, Vangelis Gazis, Nikolaos Frangiadakis, Panayotis Kikiras
2013 conf
ISSPIT
Konstantinos Sasloglou, Ian A. Glover, Vangelis Gazis, Panayotis Kikiras, Kostas Mathioudakis, Ivan Andonovic
2013 conf
VTC Spring
Neil Sinclair, David Harle, Ian A. Glover, James Irvine, Robert C. Atkinson
2013 conf
I2MTC
Euler C. T. de Macedo, Juan Moises Maurício Villanueva, Edson C. Guedes, Raimundo C. S. Freire, José M. R. de Souza Neto, Ian A. Glover
2012 conf
EW
Neil Sinclair, David Harle, Ian A. Glover, Robert C. Atkinson
2012 conf
ISGT Europe
José M. R. de Souza Neto, José Sérgio da Rocha Neto, Long Chang, Robert C. Atkinson, Konstantinos Sasloglou, Ian A. Glover
2012 conf
ISSSE
G. Tsao, P. Iyamu, Lykourgos Petropoulakis, Robert C. Atkinson, Ivan Andonovic, Ian A. Glover
2012 conf
SmartGridComm
Shahzad A. Bhatti, Qingshan Shan, Robert C. Atkinson, Ian A. Glover
2012 J jnl
Int. J. Distributed Sens. Networks
Xuewu Dai, Konstantinos Sasloglou, Robert C. Atkinson, John Strong, Isabella Panella, Lim Yun Yuncai, Mingding Han, Chee-Wei Ang, Ian A. Glover, John E. Mitchell, Werner Schiffers, Partha S. Dutta
2011 J jnl
IET Wirel. Sens. Syst.
Kae Hsiang Kwong, Tsung Ta Wu, Hock Guan Goh, Konstantinos Sasloglou, Bruce Stephen, Ian A. Glover, Chong Shen, Wencai Du, W. Craig Michie, Ivan Andonovic
2009 J jnl
Wirel. Sens. Netw.
Konstantinos Sasloglou, Ian A. Glover, Hock Guan Goh, Kae Hsiang Kwong, Michael P. Gilroy, Christos Tachtatzis, W. Craig Michie, Ivan Andonovic
2009 conf
EUSIPCO
Qingshan Shan, Shahzad A. Bhatti, Ian A. Glover, Robert C. Atkinson, Iliana E. Portugués, Philip J. Moore, Richard Rutherford
2009 conf
EUSIPCO
Shahzad A. Bhatti, Qingshan Shan, Ian A. Glover, Robert C. Atkinson, Iliana E. Portugués, Philip J. Moore, Richard Rutherford
2008 J jnl
IEEE Trans. Instrum. Meas.
Iliana E. Portugués, Philip J. Moore, Ian A. Glover, Robert John Watson
2008 conf
EUSIPCO
Faisal Darbari, Konstantinos Sasloglou, Robert W. Stewart, Ian A. Glover, Ivan Andonovic
2008 conf
EIAT/IETA
Qingshan Shan, Ian A. Glover, Philip J. Moore, Iliana E. Portugués, Richard Rutherford, Robert C. Atkinson, Shahzad A. Bhatti, R. J. Watson
2007 J jnl
IEICE Trans. Commun.
Zuoyin Tang, Ian A. Glover, Donald M. Monro, Jianhua He
2007 J jnl
Signal Process.
Zuoyin Tang, Ian A. Glover, Adrian N. Evans, Jianhua He
2007 conf
ICC
Faisal Darbari, Ian A. Glover, Robert W. Stewart
2007 conf
ICC
Zuoyin Tang, Ian A. Glover, Adrian N. Evans, Jianhua He
2007 J jnl
Comput. Educ.
Ian A. Glover, Zhijie Xu, Glenn Hardaker
2006 J jnl
Int. J. Satell. Commun. Netw.
Ping Yu, Ian A. Glover, Peter A. Watson, O. T. Davies, Spyros Ventouras, Charles Wrench
2004 conf
ICON
Zuoyin Tang, Ian A. Glover, Donald M. Monro, Jianhua He
2002 J jnl
IEEE Trans. Veh. Technol.
Mark D. Button, John G. Gardiner, Ian A. Glover
2000 J jnl
Int. J. Satell. Commun. Netw.
S. P. Sitorus, Ian A. Glover
1992 J jnl
Microprocess. Microsystems
Rabin Deka, B. Singh, Ian A. Glover
redb/extractors/elf_extractors/elf_relocations.py
← Index redb/extractors/elf_extractors/elf_relocations.py python
import inspect
from datetime import datetime, timezone
from typing import Any, List, Dict

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 ELFRelocation


class ELFRelocationExtractor(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_relocations = []
        self.elastic_index = self.index_prefix + "-elf_relocations"
        self.log.debug(inspect.currentframe().f_code.co_name)

    def _get_relocation_type_string(self, reloc_type: int, machine_arch: str) -> str:
        """Convert relocation type number to human-readable string based on architecture."""
        # This is a simplified mapping - real implementation would need comprehensive
        # architecture-specific relocation type mappings

        common_types = {
            0: "R_NONE",
            1: "R_DIRECT",
            2: "R_PC_RELATIVE",
            3: "R_GOT",
            4: "R_PLT",
            5: "R_COPY",
            6: "R_GLOB_DAT",
            7: "R_JMP_SLOT",
            8: "R_RELATIVE"
        }

        # Architecture-specific mappings could be added here
        if machine_arch == "x86_64":
            x86_64_types = {
                1: "R_X86_64_64",
                2: "R_X86_64_PC32",
                3: "R_X86_64_GOT32",
                4: "R_X86_64_PLT32",
                5: "R_X86_64_COPY",
                6: "R_X86_64_GLOB_DAT",
                7: "R_X86_64_JUMP_SLOT",
                8: "R_X86_64_RELATIVE"
            }
            return x86_64_types.get(reloc_type, f"R_X86_64_{reloc_type}")
        elif machine_arch == "x86":
            i386_types = {
                1: "R_386_32",
                2: "R_386_PC32",
                3: "R_386_GOT32",
                4: "R_386_PLT32",
                5: "R_386_COPY",
                6: "R_386_GLOB_DAT",
                7: "R_386_JMP_SLOT",
                8: "R_386_RELATIVE"
            }
            return i386_types.get(reloc_type, f"R_386_{reloc_type}")

        return common_types.get(reloc_type, f"R_UNKNOWN_{reloc_type}")

    def _extract_relocation_data(self, relocation, section_name: str, machine_arch: str) -> Dict:
        """Extract data from a single relocation entry."""
        try:
            # Get relocation offset
            relocation_offset = relocation.entry.get('r_offset', 0)

            # Get relocation type
            relocation_type = relocation.entry.get('r_info_type', 0)

            # Get symbol index
            relocation_symbol_index = relocation.entry.get('r_info_sym', 0)

            # Get addend (only present in RELA sections)
            relocation_addend = None
            if hasattr(relocation.entry, 'r_addend'):
                relocation_addend = relocation.entry.get('r_addend', 0)

            # Get symbol name if available
            relocation_symbol_name = ""
            if hasattr(relocation, 'symbol') and relocation.symbol:
                relocation_symbol_name = relocation.symbol.name or f"<symbol_{relocation_symbol_index}>"
            else:
                relocation_symbol_name = f"<symbol_{relocation_symbol_index}>"

            # Get type string mapping
            relocation_type_str = self._get_relocation_type_string(relocation_type, machine_arch)

            return ELFRelocation(
                relocation_offset=relocation_offset,
                relocation_type=relocation_type,
                relocation_type_str=relocation_type_str,
                relocation_symbol_index=relocation_symbol_index,
                relocation_symbol_name=relocation_symbol_name,
                relocation_section=section_name,
                relocation_addend=relocation_addend
            )

        except Exception as e:
            self.log.error(f"Error extracting relocation data: {e}")
            return None

    def _extract_relocations_from_section(self, section, machine_arch: str) -> List[Dict]:
        """Extract all relocations from a relocation section."""
        relocations = []

        try:
            if not hasattr(section, 'iter_relocations'):
                return relocations

            section_name = section.name or f"<unnamed_section>"

            for relocation in section.iter_relocations():
                reloc_data = self._extract_relocation_data(relocation, section_name, machine_arch)
                if reloc_data:
                    relocations.append(reloc_data)

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

        return relocations

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

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

            def extract_data(elf):
                # Get architecture for relocation type mapping
                machine_arch = self._get_architecture()
                all_relocations = []

                # Iterate through all sections looking for relocation sections with per-section error handling
                for section_index, section in enumerate(elf.iter_sections()):
                    try:
                        # Check if this is a relocation section (.rel or .rela)
                        if (section.name and
                            (section.name.startswith('.rel') or section.name.startswith('.rela')) and
                            hasattr(section, 'iter_relocations')):

                            section_relocations = self._extract_relocations_from_section(section, machine_arch)
                            all_relocations.extend(section_relocations)
                            self.log.debug(f"Extracted {len(section_relocations)} relocations from section {section.name}")
                    except Exception as e:
                        section_name = getattr(section, 'name', f'section_{section_index}')
                        self.log.warning(f"Error processing relocation section {section_name}: {e}")
                        # Continue processing other sections

                return all_relocations

            if not self._is_elf_file():
                return None

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

            self.elf_relocations = result
            return self.elf_relocations

        except Exception as e:
            self.log.error(f"Error extracting ELF relocations {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_relocations
        elif exporter_type == "ClickHouseExporter":
            try:
                # Return valid empty structure if no relocations (e.g., statically linked binary)
                # None is reserved for actual errors

                # Prepare data arrays for all relocations
                data = []
                current_time = datetime.now(timezone.utc)
                for reloc in self.elf_relocations:
                    row = [
                        self.sha256,
                        self.md5,
                        self.sha1,
                        reloc.relocation_offset,
                        reloc.relocation_type,
                        reloc.relocation_type_str,
                        reloc.relocation_symbol_index,
                        reloc.relocation_symbol_name,
                        reloc.relocation_addend,
                        reloc.relocation_section,
                        current_time
                    ]
                    data.append(row)

                column_names = [
                    'sha256', 'md5', 'sha1',
                    'relocation_offset', 'relocation_type', 'relocation_type_str',
                    'relocation_symbol_index', 'relocation_symbol_name',
                    'relocation_addend', 'relocation_section',
                    'analysis_date'
                ]

                if not data:
                    return None

                column_type_names = [
                    'FixedString(64)', 'FixedString(32)', 'FixedString(40)',
                    'UInt64', 'UInt32', 'LowCardinality(String)',
                    'UInt32', 'LowCardinality(String)',
                    'Nullable(Int64)', '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_relocations"