Chamith Wijenayake

66 papers A 2C 27Misc 1Journal 21Unranked 15
YearRankTypeTitle / Venue / Authors
2026 J jnl
Internet Things
M. M. Oshan A. B. Yalegama, Selani A. Indrapala, Dulini H. S. Hewage, Chamod Kavinda, Chamira U. S. Edussooriya, Chamith Wijenayake, Aleksandar Ignjatovic
2025 C conf
ISCAS
Pathmapirian Nanthakumar, Chamith Wijenayake, Chamira U. S. Edussooriya, Arjuna Madanayake, Renato J. Cintra
2025 C conf
ISCAS
Arjuna Madanayake, Umesha Kumarasiri, S. Sivasankar, Chamira U. S. Edussooriya, Renato J. Cintra, Chamith Wijenayake
2024 C conf
ISCAS
Zhaofeng Zhong, Pathmapirian Nanthakumar, Gabriel Field, Chamira U. S. Edussooriya, Aleksandar Ignjatovic, Chamith Wijenayake
2024 C conf
ISCAS
Pathmapirian Nanthakumar, Chamira U. S. Edussooriya, Chamith Wijenayake, Arjuna Madanayake
2023 conf
ISCIT
Pathmapirian Nanthakumar, Chamith Wijenayake, Chamira U. S. Edussooriya, Arjuna Madanayake
2023 conf
TALE
Zhaofeng Zhong, Chamith Wijenayake, Chamira U. S. Edussooriya
2023 conf
TALE
Inmaculada Tomeo-Reyes, Zhuoyu Chen, Chamith Wijenayake, Arash Khatamianfar
2022 C conf
ISCAS
Chamith Wijenayake, Kithmin Wickremasinghe, G. Abarajithan, Arjuna Madanayake, Chamira U. S. Edussooriya, K. Samarasinghe
2022 C conf
ISCAS
Darukeesan Pakiyarajah, Nadeeshan D. K. Dissanayake, Chamira U. S. Edussooriya, Chamith Wijenayake, Arjuna Madanayake
2021 C conf
ISCAS
Amir Antonir, Chamith Wijenayake, Aleksandar Ignjatovic
2021 C conf
ISCAS
Chamira U. S. Edussooriya, Dileepa Marasinghe, Chamith Wijenayake, Len T. Bruton, Panajotis Agathoklis
2021 conf
TALE
Chamith Wijenayake, Matthew D'Souza, Arash Khatamianfar, Konstanty Bialkowski, Montserrat Ros, Peter Sutton
2021 J jnl
IEEE Signal Process. Lett.
Sakila S. Jayaweera, Chamira U. S. Edussooriya, Chamith Wijenayake, Panajotis Agathoklis, Len T. Bruton
2021 J jnl
IEEE Trans. Circuits Syst. II Express Briefs
Chamira U. S. Edussooriya, Chamith Wijenayake, Arjuna Madanayake, Namalka Liyanage, Sanduni U. Premaratne, John T. Vorhies, Donald G. Dansereau, Pan Agathoklis, Len T. Bruton
2021 C conf
ISCAS
Darukeesan Pakiyarajah, Sakila S. Jayaweera, Chamira U. S. Edussooriya, Chamith Wijenayake, Arjuna Madanayake
2021 J jnl
Multidimens. Syst. Signal Process.
Sai K. Gullapalli, Chamira U. S. Edussooriya, Chamith Wijenayake, Donald G. Dansereau, Len T. Bruton, Arjuna Madanayake
2020 J jnl
IEEE Trans. Circuits Syst. II Express Briefs
Chamith Wijenayake, Amir Antonir, Gabriele Keller, Aleksandar Ignjatovic
2020 C conf
ISCAS
Namalka Liyanage, Chamith Wijenayake, Chamira U. S. Edussooriya, Arjuna Madanayake, Renato J. Cintra, Eliathamby Ambikairajah
2020 C conf
TENCON
Namalka Liyanage, Kalana Abeywardena, Sakila S. Jayaweera, Chamith Wijenayake, Chamira U. S. Edussooriya, Suranga Seneviratne
2020 C conf
ISCAS
Ashira L. Jayaweera, Sakila S. Jayaweera, Chamira U. S. Edussooriya, Chamith Wijenayake, Arjuna Madanayake
2020 J jnl
Signal Process.
Namalka Liyanage, Chamith Wijenayake, Chamira U. S. Edussooriya, Arjuna Madanayake, Pan Agathoklis, Len T. Bruton, Eliathamby Ambikairajah
2020 J jnl
IEEE Trans. Circuits Syst. I Regul. Pap.
Sanduni U. Premaratne, Namalka Liyanage, Chamira U. S. Edussooriya, Chamith Wijenayake
2019 J jnl
IEEE Trans. Mob. Comput.
Arunan Sivanathan, Hassan Habibi Gharakheili, Franco Loi, Adam Radford, Chamith Wijenayake, Arun Vishwanath, Vijay Sivaraman
2019 J jnl
IEEE Trans. Circuits Syst. II Express Briefs
Chamith Wijenayake, Namalka Liyanage, Chamira U. S. Edussooriya, H. Seatang, Panajotis Agathoklis, Leonard T. Bruton
2019 C conf
ISCAS
Chamira U. S. Edussooriya, Chamith Wijenayake, Sravan Kumar Pulipati, Arjuna Madanayake, Leonard T. Bruton
2019 J jnl
Signal Process.
Chamith Wijenayake, Aleksandar Ignjatovic, Gabriele Keller
2019 Misc conf
ICASSP
Gajan Suthokumar, Kaavya Sriskandaraja, Vidhyasaharan Sethu, Chamith Wijenayake, Eliathamby Ambikairajah
2019 C conf
ISCAS
Namalka Liyanage, Chamith Wijenayake, Chamira U. S. Edussooriya, Eliathamby Ambikairajah
2018 conf
DSP
Sanduni U. Premaratne, Chamira U. S. Edussooriya, Chamith Wijenayake, Len T. Bruton, Panajotis Agathoklis
2018 J jnl
IEEE Trans. Signal Process.
Aleksandar Ignjatovic, Chamith Wijenayake, Gabriele Keller
2018 J jnl
IEEE Trans. Signal Process.
Aleksandar Ignjatovic, Chamith Wijenayake, Gabriele Keller
2018 conf
TALE
Chamith Wijenayake, Will Gilbert, Simon Van Winden, Beena Ahmed
2018 C conf
ISCAS
Namalka Liyanage, Chamith Wijenayake, Chamira U. S. Edussooriya, Arjuna Madanayake, Pan Agathoklis, Eliathamby Ambikairajah, Len T. Bruton
2018 A conf
INTERSPEECH
Gajan Suthokumar, Vidhyasaharan Sethu, Chamith Wijenayake, Eliathamby Ambikairajah
2018 J jnl
Signal Process.
Chamith Wijenayake, Jarryd Scutts, Aleksandar Ignjatovic
2018 conf
APSIPA
Gajan Suthokumar, Kaavya Sriskandaraja, Vidhyasaharan Sethu, Chamith Wijenayake, Eliathamby Ambikairajah, Haizhou Li
2017 conf
TALE
Ediz Cetin, Chamith Wijenayake, Vidhyasaharan Sethu, Eliathamby Ambikairajah
2017 conf
VTC Spring
Nilan Udayanga, Arjuna Madanayake, Chamith Wijenayake, Peyman Ahmadi, Leonid Belostotski, Brent Maundy, Len T. Bruton, Ahmed S. Elwakil
2017 J jnl
Multidimens. Syst. Signal Process.
Arjuna Madanayake, Tharindu Randeny, Nilan Udayanga, Arindam Sengupta, Glenn Jones, Chamith Wijenayake, Len T. Bruton
2017 conf
INFOCOM Workshops
Arunan Sivanathan, Daniel Sherratt, Hassan Habibi Gharakheili, Adam Radford, Chamith Wijenayake, Arun Vishwanath, Vijay Sivaraman
2017 A conf
INTERSPEECH
Gajan Suthokumar, Kaavya Sriskandaraja, Vidhyasaharan Sethu, Chamith Wijenayake, Eliathamby Ambikairajah
2017 conf
ICIIS
Chamira U. S. Edussooriya, Chamith Wijenayake, Len T. Bruton, Panajotis Agathoklis
2016 C conf
ISCAS
Chamith Wijenayake, Arjuna Madanayake, Leonid Belostotski, Yongsheng Xu, Len T. Bruton
2015 conf
RWS
Arjuna Madanayake, Chamith Wijenayake, Leonid Belostotski
2015 J jnl
IEEE Trans. Aerosp. Electron. Syst.
Sewwandi Wijayaratna, Arjuna Madanayake, Chamith Wijenayake, Len T. Bruton
2015 conf
MWSCAS
Nilan Udayanga, Arjuna Madanayake, Chamith Wijenayake
2015 C conf
ICICS
Nilan Udayanga, Arjuna Madanayake, Chamith Wijenayake, Len T. Bruton
2015 J jnl
Multidimens. Syst. Signal Process.
Randeel Wimalagunarathne, Chamith Wijenayake, Arjuna Madanayake, Donald G. Dansereau, Len T. Bruton
2015 C conf
ISCAS
Arjuna Madanayake, Chamith Wijenayake, Zhiping Lin, Nathan Dornback
2015 C conf
ISCAS
Nilan Udayanga, Arjuna Madanayake, Chamith Wijenayake, Peyman Ahmadi, Leonid Belostotski
2014 J jnl
IEEE Trans. Circuits Syst. I Regul. Pap.
Chamith Wijenayake, Arjuna Madanayake, Leonid Belostotski, Yongsheng Xu, Len T. Bruton
2014 conf
MWSCAS
Arjuna Madanayake, Sewwandi Wijayaratna, Chamith Wijenayake
2014 C conf
ISCAS
Arjuna Madanayake, Nilan Udayanga, Chamith Wijenayake, Mohammad Almalkawi, Vijay Kumar Devabhaktuni
2014 J jnl
Multidimens. Syst. Signal Process.
Arjuna Madanayake, Chamith Wijenayake, Rimesh M. Joshi, Mohammad Almalkawi, Leonid Belostotski, Len T. Bruton, Vijay Kumar Devabhaktuni
2014 C conf
ISCAS
Chamith Wijenayake, Arjuna Madanayake, Len T. Bruton
2013 C conf
ISCAS
Chamith Wijenayake, Arjuna Madanayake, Yongsheng Xu, Leonid Belostotski, Len T. Bruton
2013 C conf
ISCAS
Chamith Wijenayake, Arjuna Madanayake, Len T. Bruton, Vijay Kumar Devabhaktuni
2013 J jnl
IEEE J. Emerg. Sel. Topics Circuits Syst.
Chamith Wijenayake, Arjuna Madanayake, John Kota, Len T. Bruton
2012 J jnl
IEEE Trans. Circuits Syst. II Express Briefs
Leonard T. Bruton, Arjuna Madanayake, Chamith Wijenayake, Mona Maini
2012 C conf
WOWMOM
Arjuna Madanayake, Chamith Wijenayake, Nghi Tran, Todor Cooklev, Sean Victor Hum, Leonard T. Bruton
2012 C conf
ISCAS
Chamith Wijenayake, Arjuna Madanayake, Yongsheng Xu, Leonid Belostotski, Leonard T. Bruton
2012 J jnl
IEEE Trans. Circuits Syst. I Regul. Pap.
Chamith Wijenayake, Yongsheng Xu, Arjuna Madanayake, Leonid Belostotski, Leonard T. Bruton
2012 C conf
ISCAS
Arjuna Madanayake, Chamith Wijenayake, Rimesh M. Joshi, Jim Grover, Joan Carletta, Jay L. Adams, Tom T. Hartley, Tokunbo Ogunfunmi
2011 C conf
ISCAS
Arjuna Madanayake, Leonid Belostotski, Chamith Wijenayake, Leonard T. Bruton
2011 conf
nDS
Chamith Wijenayake, Arjuna Madanayake, Leonid Belostotski, Len T. Bruton
redb/extractors/detectiteasy.py
← Index redb/extractors/detectiteasy.py python
import inspect
from pprint import pprint
import subprocess
import json
from typing import Any
from datetime import datetime, timezone
import os
from dotenv import load_dotenv

from redb.extractors.enum import Tag
from redb.models.dataclasses import DIEinfo
from redb.extractors.extractor import Extractor

load_dotenv(override=True)

class DIEExtractor(Extractor):

    def __init__(
        self,
        filepath,
        log,
        exporters=None,
        index_prefix=None,
        elastic_index=None,
        known_benign=False,
        known_malicious=False,
        precomputed_hashes=None,
    ):
        super().__init__(
            filepath, log, exporters, index_prefix, elastic_index, known_benign, known_malicious,
            precomputed_hashes=precomputed_hashes
        )
        self.log.debug(inspect.currentframe().f_code.co_name)
        self.die_info = None
        self.die_info_dict = {}
        self.elastic_index = self.index_prefix + "-die"

    def _recursive_entry(self, die_dict, master_key):
        self.log.debug(inspect.currentframe().f_code.co_name)
        if master_key:
            self.die_info_dict[master_key] = {}
        else:
            self.die_info_dict = {}
        for value in die_dict:
            if "type" in value:
                type_key = value["type"].lower().replace(" ", "_")
                name = value.get("name", "")
                version = f"({value.get('version')})" if value.get("version") else ""
                info = f"[{value.get('info')}]" if value.get("info") else ""

                if master_key:
                    self.die_info_dict[master_key][type_key] = f"{name}"
                    self.die_info_dict[master_key][f'{type_key}(full)'] = f"{name}{version}{info}"
                else:
                    self.die_info_dict[type_key] = f"{name}"
                    self.die_info_dict[f'{type_key}(full)'] = f"{name}{version}{info}"

            elif "parentfilepart" in value:
                child_key = (
                    value["parentfilepart"].lower().replace(" ", "_")
                    + "."
                    + value["filetype"].lower().replace(" ", "_")
                )
                if master_key:
                    self._recursive_entry(value["values"], f"{master_key}.{child_key}")
                else:
                    self._recursive_entry(value["values"], f"{child_key}")

    def _extract_dieinfo(self):
        """
        Execute a command-line binary with arguments and parse its JSON output.

        :param command: The command or path to the binary to execute
        :param args: Additional arguments to pass to the command
        :return: Parsed JSON output as a Python object
        """
        self.log.debug(inspect.currentframe().f_code.co_name)

        # Construct the full command
        # command = "nfdc" # UNCOMMENT FOR PROD
        # command = "/Users/p4c0/_tools/NFD.app/Contents/MacOS/nfdc" # COMMENT FOR TESTING ON MAC
        command = os.getenv("DIE_PATH")
        args = ["-durj", self.filepath]
        full_command = [command] + list(args)
        TIMEOUT = int(os.getenv("DIE_TIMEOUT", "180"))

        try:
            # Execute the command and capture its output
            result = subprocess.run(
                full_command,
                capture_output=True,
                text=True,
                check=True,
                timeout=TIMEOUT,
            )

            # Parse the JSON output
            nfdc_output = json.loads(result.stdout)

            # Extract the DIE information from the json output
            for die_entry in nfdc_output["detects"]:
                if die_entry["parentfilepart"] == "Header":
                    master_key = (
                        die_entry["parentfilepart"].lower().replace(" ", "_")
                        + "."
                        + die_entry["filetype"].lower().replace(" ", "_")
                    )
                    self._recursive_entry(die_entry["values"], None)

            # pprint(json.dumps(self.die_info_dict, indent=2)) #debug
            self.die_info = DIEinfo(result.stdout, self.die_info_dict)
            self.log.debug(f"NFDC-DIE JSON dump: todo")
        except subprocess.TimeoutExpired:
            self.log.error(f"The DIE command timed out after {TIMEOUT} seconds")
            return None
        except subprocess.CalledProcessError as e:
            self.log.error(f"Error executing DIE command: {e}")
            self.log.error(f"Command output (stderr): {e.stderr}")
            return None
        except json.JSONDecodeError as e:
            self.log.error(f"Error parsing DIE JSON output: {e}")
            self.log.error(f"Raw output: {result.stdout}")
            return None

    def prepare_export_data(self, exporter_type: str) -> Any:
        if exporter_type == "ElasticsearchExporter":
            return self.die_info
        elif exporter_type == "ClickHouseExporter":
            # Convert DIE info to JSON string
            die_info_json = json.dumps(self.die_info_dict)
            
            data = [[
                self.sha256,
                self.md5,
                self.sha1,
                die_info_json,
                datetime.now(timezone.utc)
            ]]
            
            column_names = [
                'sha256', 'md5', 'sha1', 'die_info', 'analysis_date'
            ]
            
            column_type_names = [
                'String', 'String', 'String', 'JSON', 'DateTime64(3, \'UTC\')'
            ]
            
            return (data, column_names, column_type_names)

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

    def extract(self):
        self.log.debug(inspect.currentframe().f_code.co_name)
        try:
            self._extract_dieinfo()
            
            # Check if there's a packer in the DIE results
            is_packed = False
            if self.die_info_dict:
                # Check if 'packer' exists in the DIE results
                is_packed = bool(self.die_info_dict.get('packer'))
            
            return self.die_info  # Return the extracted data instead of exporting directly
        except Exception as e:
            self.log.error(f"Error extracting DIE information: {e}")
            return None

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