Mancia Anguita

27 papers A 1B 1Misc 3Journal 17Unranked 5
YearRankTypeTitle / Venue / Authors
2024 J jnl
Comput. Phys. Commun.
Sebastiano Aiello, Albert Akhriev, Sergio Alves Garre, Zineb Aly, Antonio Ambrosone, Fabrizio Ameli, Michel André, E. Androutsou, Marco Anghinolfi, Mancia Anguita, L. Aphecetche, M. Ardid, S. Ardid, H. Atmani, Julien Aublin, Christos Bagatelas, L. Bailly-Salins, Z. Bardacová, Bruny Baret, S. Basegmez du Pree, Y. Becherini, Meriem Bendahman, F. Benfenati, M. Benhassi, D. M. Benoit, Edward Berbee, Vincent Bertin, Vincent van Beveren, Simone Biagi, M. Boettcher, J. Boumaaza, M. Bouta, M. Bouwhuis, C. Bozza, R. M. Bozza, H. Brânzas, F. Bretaudeau, Ronald Bruijn, J. Brunner, R. Bruno, E. Buis, Raffaele Buompane, J. Busto, B. Caiffi, David Calvo, S. Campion, A. Capone, F. Carenini, V. Carretero, T. Cartraud, P. Castaldi, V. Cecchini, S. Celli, L. Cerisy, M. Chabab, M. Chadolias, Andrew Chen, S. Cherubini, T. Chiarusi, M. Circella, R. Cocimano, J. A. B. Coelho, Alexis Coleiro, R. Coniglione, P. Coyle, A. Creusot, A. Cruz, G. Cuttone, Richard Dallier, Y. Darras, A. De Benedittis, B. De Martino, V. Decoene, R. Del Burgo, Letizia Stella Di Mauro, I. Di Palma, Antonio F. Díaz, Dídac Diego-Tortosa, C. Distefano, A. Domi, C. Donzaud, Damien Dornic, M. Dörr, E. Drakopoulou, D. Drouhin, R. Dvornický, T. Eberl, E. Eckerová, A. Eddymaoui, T. van Eeden, M. Eff, D. van Eijk, I. El Bojaddaini, S. El Hedri, A. Enzenhöfer, G. Ferrara, M. D. Filipovic, F. Filippini, L. A. Fusco, O. Gabella, J. Gabriel, S. Gagliardini, T. Gal, Juan García Méndez, Alfonso Garcia Soto, C. Gatius Oliver, N. Geißelbrecht, H. Ghaddari, L. Gialanella, B. K. Gibson, E. Giorgio, A. Girardi, I. Goos, D. Goupilliere, Sara Rebecca Gozzini, R. Gracia, K. Graf, C. Guidi, B. Guillon, M. Gutiérrez, H. van Haren, A. Heijboer, A. Hekalo, L. Hennig, Juan José Hernández-Rey, F. Huang, W. Idrissi Ibnsalih, Giulia Illuminati, C. W. James, P. Jansweijer, M. de Jong, P. de Jong, B. J. Jung, P. Kalaczynski, O. Kalekin, U. F. Katz, N. R. Khan Chowdhury, A. Khatun, G. Kistauri, C. Kopper, A. Kouchner, V. Kulikovskiy, R. Kvatadze, M. Labalme, Robert Lahmann, G. Larosa, C. Lastoria, A. Lazo, S. Le Stum, G. Lehaut, E. Leonora, N. Lessing, G. Levi, M. Lindsey Clark, Fabio Longhitano, J. Majumdar, L. Malerba, Fadahat Mamedov, J. Manczak, A. Manfreda, Martina Marconi, A. Margiotta, A. Marinelli, C. Markou, L. Martin, J. A. Martínez-Mora, F. Marzaioli, M. Mastrodicasa, S. Mastroianni, S. Miccichè, Gennaro Miele, Pasquale Migliozzi, E. Migneco, S. Minutoli, M. L. Mitsou, C. M. Mollo, L. Morales-Gallegos, C. Morley-Wong, A. Mosbrugger, A. Moussa, I. Mozun Mateo, R. Muller, M. R. Musone, M. Musumeci, L. Nauta, Sergio Navas, Amid Nayerhoda, C. A. Nicolau, B. Nkosi, B. Ó Fearraigh, V. Oliviero, A. Orlando, E. Oukacha, Juan Palacios González, G. Papalashvili, E. J. Pastor Gomez, A. M. Paun, G. E. Pavalas, S. Peña Martínez, M. Perrin-Terrin, J. Perronnel, V. Pestel, R. Pestes, P. Piattelli, C. Poirè, V. Popa, T. Pradier, S. Pulvirenti, Gilles Quéméner, C. Quiroz, U. Rahaman, N. Randazzo, S. Razzaque, I. C. Rea, Diego Real, S. Reck, Giorgio Riccobene, J. Robinson, A. Romanov, A. Saina, Francisco Salesa Greus, D. F. E. Samtleben, Agustín Sánchez Losa, M. Sanguineti, C. Santonastaso, D. Santonocito, P. Sapienza, Y. Scarpetta, J. Schnabel, M. F. Schneider, J. Schumann, H. M. Schutte, J. Seneca, B. Setter, I. Sgura, R. Shanidze, Yury Shitov, F. Simkovic, A. Simonelli, A. Sinopoulou, M. V. Smirnov, Bernardino Spisso, Maurizio Spurio, Dimitris Stavropoulos, I. Stekl, M. Taiuti, Y. Tayalati, H. Tedjditi, H. Thiersen, I. Tosta e Melo, B. Trocme, S. Tsagkli, V. Tsourapis, E. Tzamariudaki, Antonin Vacheret, V. Valsecchi, V. Van Elewyck, G. Vannoye, G. Vasileiadis, F. Vazquez de Sola, C. Verilhac, Alessandro Veutro, Salvatore Viola, D. Vivolo, H. Warnhofer, Jörn Wilms, E. de Wolf, H. Yepes-Ramirez, G. Zarpapis, S. Zavatarelli, Angela Zegarelli, D. Zito, Juan de Dios Zornoza, Juan Zúñiga, Natalia Zywucka
2020 J jnl
Comput. Phys. Commun.
Sebastiano Aiello, Albert Akhriev, Sergio Alves Garre, Zineb Aly, Fabrizio Ameli, Michel André, Giorgos Androulakis, Marco Anghinolfi, Mancia Anguita, Gisela Anton, Miguel Ardid, Julien Aublin, Christos Bagatelas, G. Barbarino, Bruny Baret, Suzan Basegmez du Pree, Meriem Bendahman, Edward Berbee, Natalia Zywucka
2017 J jnl
J. Supercomput.
Raúl H. Palacios, Cristina Rodríguez-Quintana, Antonio F. Díaz, Mancia Anguita, Julio Ortega
2017 J jnl
J. Supercomput.
Raúl H. Palacios, Antonio F. Díaz, Mancia Anguita, Julio Ortega, Cristina Rodríguez-Quintana
2015 J jnl
IEEE Trans. Neural Networks Learn. Syst.
Francisco Naveros, Niceto R. Luque, Jesús Alberto Garrido, Richard R. Carrillo, Mancia Anguita, Eduardo Ros
2015 J jnl
Environ. Model. Softw.
Mario C. Acosta, Mancia Anguita, F. Javier Fernández-Baldomero, Cintia L. Ramón, S. Geoffrey Schladow, Francisco J. Rueda
2015 J jnl
Environ. Model. Softw.
Mancia Anguita, Mario C. Acosta, F. Javier Fernández-Baldomero, Francisco J. Rueda
2013 J jnl
J. Supercomput.
Andrés Ortiz, Julio Ortega Lopera, Antonio F. Díaz, Mancia Anguita
2013 J jnl
J. Supercomput.
Antonio F. Díaz, Mancia Anguita, Hugo E. Camacho, Erik Nieto, Julio Ortega Lopera
2011 conf
BIOINFORMATICS
José C. Calvo, Julio Ortega, Mancia Anguita, Javid Taheri, Albert Y. Zomaya
2011 J jnl
J. Supercomput.
José C. Calvo, Julio Ortega Lopera, Mancia Anguita
2011 J jnl
Neurocomputing
José C. Calvo, Julio Ortega Lopera, Mancia Anguita
2010 conf
IWPACBB
José C. Calvo, Julio Ortega Lopera, Mancia Anguita
2009 J jnl
IEEE Trans. Circuits Syst. Video Technol.
Mancia Anguita, Javier Díaz, Eduardo Ros, F. J. Fernandez-Baldomero
2009 conf
IWANN (1)
José C. Calvo, Julio Ortega Lopera, Mancia Anguita, José M. Urquiza, J. P. Florido
2007 J jnl
IEEE Trans. Educ.
Mancia Anguita, F. J. Fernandez-Baldomero
2006 Misc conf
International Conference on Computational Science (2)
Javier Fernández, Mancia Anguita, Eduardo Ros, José Luis Bernier
2005 J jnl
IEEE Micro
Mancia Anguita, J. Manuel Martinez-Lechado
2003 A conf
IPDPS
Antonio F. Díaz, Julio Ortega Lopera, Antonio Cañas, F. J. Fernández, Mancia Anguita, Alberto Prieto
2001 conf
ICPP Workshops
Julio Ortega Lopera, Antonio F. Díaz, Mancia Anguita, Antonio Cañas, F. J. Fernández, Alberto Prieto
1999 conf
IWANN (2)
Julio Ortega, Luis Parrilla, José Luis Bernier, Consolación Gil, Begoña Pino, Mancia Anguita
1999 J jnl
Int. J. Approx. Reason.
Ignacio Rojas, Héctor Pomares, Francisco J. Pelayo, Mancia Anguita, Eduardo Ros Vidal, Alberto Prieto
1998 J jnl
Int. J. Approx. Reason.
Ignacio Rojas, Olga Valenzuela, Mancia Anguita, Alberto Prieto
1998 B conf
ESANN
Ignacio Rojas Ruiz, Mancia Anguita, Eduardo Ros Vidal, Héctor Pomares, Olga Valenzuela, Alberto Prieto
1997 J jnl
Inteligencia Artif.
B. Pini, Francisco J. Pelayo, Julio Ortega, Mancia Anguita, Alberto Prieto
1995 Misc conf
IWANN
Mancia Anguita, Francisco J. Pelayo, F. J. Fernández, Alberto Prieto
1991 Misc conf
IWANN
Mancia Anguita, Alberto Prieto, Francisco J. Pelayo, Julio Ortega, Antonio F. Díaz
redb/extractors/macho_extractors/macho_segments.py
← Index redb/extractors/macho_extractors/macho_segments.py python
import hashlib
import inspect
import base64
from datetime import datetime, timezone
from typing import Any

from redb.extractors.enum import Tag
from redb.extractors.macho_extractor import MachOExtractor
from redb.models.dataclasses import MachOSegment


class MachOSegmentExtractor(MachOExtractor):

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

    def _is_empty_result(self, extracted_data) -> bool:
        """
        Override: Empty segments is an ERROR, not a valid empty case.
        A valid MachO file must have segments (at minimum __PAGEZERO, __TEXT).
        """
        # Always return False - empty segments should be treated as an error
        return False

    def tag(self):
        return Tag.MACHO_SEGMENT.value

    def _extract_segments_for_arch(self, arch_name):
        """Extract segment information for a specific architecture."""
        self.log.debug(f"Extracting segments for architecture: {arch_name}")
        segments = []

        try:
            # Get segments using new API with architecture parameter
            segments_data = self.macho.get_segments(arch=arch_name)
            if not segments_data:
                return segments

            # Extract segments for this architecture
            for segment in segments_data:
                try:
                    segment_name = segment.get('segname', 'Unknown')

                    # Calculate segment hash
                    segment_data = self._get_segment_data(segment)
                    if segment_data:
                        seg_sha256 = hashlib.sha256(segment_data).hexdigest()
                    else:
                        seg_sha256 = ""

                    # Use entropy already calculated by machofile module, rounded to 3 decimal places
                    seg_entropy = round(segment.get('entropy', 0.0), 3)

                    # Create segment dataclass with architecture info
                    macho_segment = MachOSegment(
                        segment_name=segment_name,
                        segment_vaddr=segment.get('vaddr', 0),
                        segment_vsize=segment.get('vsize', 0),
                        segment_offset=segment.get('offset', 0),
                        segment_size=segment.get('size', 0),
                        segment_max_vm_protection=segment.get('max_vm_protection', 0),
                        segment_initial_vm_protection=segment.get('initial_vm_protection', 0),
                        segment_nsects=segment.get('nsects', 0),
                        segment_flags=segment.get('flags', 0),
                        segment_entropy=seg_entropy,
                        segment_sha256=seg_sha256,
                    )
                    # Add architecture info to the segment
                    macho_segment.architecture = arch_name
                    segments.append(macho_segment)

                except Exception as e:
                    self.log.warning(
                        f'Unable to process segment "{segment.get("segname", "Unknown")}" for architecture {arch_name} in {self.hash.sha256}: {e}'
                    )
                    continue

            return segments

        except Exception as e:
            self.log.error(f"Error extracting MachO segments for architecture {arch_name}: {e}")
            return segments

    def _extract_segments(self):
        """Extract segment information from all architectures in the MachO binary."""
        self.log.debug(inspect.currentframe().f_code.co_name)
        segments = []

        if not self.macho:
            return segments

        try:
            # Get architectures using new API (already parsed in base class)
            architectures = self.macho.get_architectures()
            if not architectures:
                return segments

            # Process each architecture
            for arch_name in architectures:
                arch_segments = self._extract_segments_for_arch(arch_name)
                segments.extend(arch_segments)

            return segments

        except Exception as e:
            self.log.error(f"Error extracting MachO segments: {e}")
            return segments

    def _get_segment_data(self, segment):
        """Get the raw data for a segment."""
        try:
            offset = segment.get('offset', 0)
            size = segment.get('size', 0)
            
            if size == 0:
                return None
            
            # Read segment data from file
            with open(self.filepath, 'rb') as f:
                f.seek(offset)
                return f.read(size)
                
        except Exception as e:
            self.log.warning(f"Error reading segment data: {e}")
            return None

    def extract(self):
        self.log.debug(inspect.currentframe().f_code.co_name)
        try:
            segments = self._extract_segments()
            return segments
        except Exception as e:
            self.log.error(f"Error extracting MachO segments: {e}")
            return None

    def prepare_export_data(self, exporter_type: str) -> Any:
        if exporter_type == "ElasticsearchExporter":
            return self.extract()
        elif exporter_type == "ClickHouseExporter":
            if not self.macho:
                return None

            # Get architectures (macho is already parsed in base class)
            try:
                architectures = self.macho.get_architectures()
                is_fat = len(architectures) > 1
            except Exception as e:
                self.log.error(f"Could not get architectures: {e}")
                return None

            data = []
            current_time = datetime.now(timezone.utc)

            # Loop through each architecture (1 for single, multiple for FAT)
            for arch_name in architectures:
                # Extract segments for this specific architecture
                segments = self._extract_segments_for_arch(arch_name)
                if not segments:
                    continue

                # Get architecture-specific sha256 and header info
                try:
                    arch_general_info = self.macho.get_general_info(arch=arch_name)
                    arch_sha256 = arch_general_info.get('SHA256', self.sha256)

                    # Get raw architecture value
                    arch_header_raw = self.macho.get_macho_header(arch=arch_name)
                    arch_cputype_raw = arch_header_raw.get('cputype', 0) if arch_header_raw else 0
                except Exception as e:
                    self.log.warning(f"Could not get arch-specific data for {arch_name}: {e}")
                    arch_sha256 = self.sha256
                    arch_cputype_raw = 0

                for segment in segments:
                    data.append([
                        arch_sha256,                          # sha256 (architecture-specific)
                        segment.segment_name,                 # segment_name
                        segment.segment_vaddr,                # segment_vaddr
                        segment.segment_vsize,                # segment_vsize
                        segment.segment_offset,               # segment_offset
                        segment.segment_size,                 # segment_size
                        segment.segment_max_vm_protection,    # segment_max_vm_protection
                        segment.segment_initial_vm_protection, # segment_initial_vm_protection
                        segment.segment_nsects,               # segment_nsects
                        segment.segment_flags,                # segment_flags
                        segment.segment_entropy,              # segment_entropy
                        segment.segment_sha256,               # segment_sha256
                        current_time,                         # analysis_date
                    ])

            column_names = [
                'sha256',
                'segment_name', 'segment_vaddr', 'segment_vsize', 'segment_offset',
                'segment_size', 'segment_max_vm_protection', 'segment_initial_vm_protection',
                'segment_nsects', 'segment_flags', 'segment_entropy', 'segment_sha256',
                'analysis_date'
            ]

            if not data:
                return None

            column_type_names = [
                'FixedString(64)',
                'String', 'UInt64', 'UInt64', 'UInt64',
                'UInt64', 'UInt32', 'UInt32',
                'UInt32', 'UInt32', 'Float64', 'FixedString(64)',
                'DateTime64(3, \'UTC\')'
            ]

            return (data, column_names, column_type_names)

        return None

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