Rahul Vaze

187 papers A* 9B 32Misc 4Journal 122Unranked 19
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Haricharan Balasundaram, Karthick Krishna Mahendran, Rahul Vaze
2026 A* conf
WWW
Rahul Vaze, Abhishek Sinha
2025 J jnl
CoRR
Abhishek Sinha, Rahul Vaze
2025 B conf
WiOpt
Rahul Vaze, Jayakrishnan Nair
2025 J jnl
CoRR
Rahul Vaze, Sumiran Mishra
2025 J jnl
CoRR
Rahul Vaze, Abhishek Sinha
2025 J jnl
CoRR
Rahul Vaze, Abhishek Sinha
2025 J jnl
CoRR
Harsh Shah, Purna Chandrasekhar, Rahul Vaze
2024 J jnl
CoRR
Rahul Vaze, Jayakrishnan Nair
2024 J jnl
SIGMETRICS Perform. Evaluation Rev.
Kumar Saurav, Rahul Vaze
2024 J jnl
SIGMETRICS Perform. Evaluation Rev.
Spandan Senapati, Rahul Vaze
2024 A* conf
NeurIPS
Abhishek Sinha, Rahul Vaze
2024 B conf
MobiHoc
Rahul Vaze
2024 J jnl
CoRR
Rahul Vaze
2024 J jnl
CoRR
Abhishek Sinha, Rahul Vaze
2023 conf
NCC
Akshit Kumar, Parikshit Hegde, Rahul Vaze, Amira Alloum, Cédric Adjih
2023 B conf
WiOpt
Rahul Vaze, Manjesh Kumar Hanawal
2023 J jnl
SIGMETRICS Perform. Evaluation Rev.
Kumar Saurav, Rahul Vaze
2023 J jnl
Perform. Evaluation
Kumar Saurav, Rahul Vaze
2023 J jnl
CoRR
Rahul Vaze
2023 J jnl
CoRR
Spandan Senapati, Rahul Vaze
2023 J jnl
IEEE J. Sel. Areas Inf. Theory
Kumar Saurav, Rahul Vaze
2023 conf
FSTTCS
Arghya Chakraborty, Rahul Vaze
2023 J jnl
Perform. Evaluation
Spandan Senapati, Rahul Vaze
2023 J jnl
CoRR
Abhishek Sinha, Rahul Vaze
2022 J jnl
CoRR
Kumar Saurav, Rahul Vaze
2022 B conf
WiOpt
Rahul Vaze, Jayakrishnan Nair
2022 J jnl
CoRR
Rahul Vaze, Jayakrishnan Nair
2022 B conf
WiOpt
Rahul Vaze
2022 J jnl
CoRR
Arghya Chakraborty, Rahul Vaze
2022 B conf
WiOpt
Rahul Vaze
2022 J jnl
CoRR
Rahul Vaze
2022 B conf
WiOpt
Kumar Saurav, Rahul Vaze
2022 J jnl
CoRR
Kumar Saurav, Rahul Vaze
2022 J jnl
IEEE/ACM Trans. Netw.
Rahul Vaze, Jayakrishnan Nair
2022 J jnl
SIGMETRICS Perform. Evaluation Rev.
Rahul Vaze, Jayakrishnan Nair
2021 J jnl
CoRR
Rahul Vaze, Manjesh Kumar Hanawal
2021 J jnl
IEEE Trans. Green Commun. Netw.
Haseen Rahman, Ankith Vinayachandran, Sibi Raj B. Pillai, Kumar Appaiah, Rahul Vaze, Navin Kashyap
2021 J jnl
IEEE Trans. Commun.
Sarthak Nijhawan, Agrim Gupta, Kumar Appaiah, Rahul Vaze, Nikhil Karamchandani
2021 J jnl
IEEE J. Sel. Areas Commun.
Kumar Saurav, Rahul Vaze
2021 B conf
WiOpt
Bhavya Joshi, Rajshekhar Vishweshwar Bhat, B. N. Bharath, Rahul Vaze
2021 J jnl
IEEE J. Sel. Areas Commun.
Rajshekhar Vishweshwar Bhat, Rahul Vaze, Mehul Motani
2021 A* conf
INFOCOM
Kumar Saurav, Rahul Vaze
2021 J jnl
CoRR
Kumar Saurav, Rahul Vaze
2021 J jnl
IEEE J. Sel. Areas Commun.
Nived Rajaraman, Rahul Vaze, Goonwanth Reddy
2021 J jnl
CoRR
Anhad Bhati, Sibi Raj B. Pillai, Rahul Vaze
2021 B conf
WiOpt
Kumar Saurav, Rahul Vaze
2021 J jnl
CoRR
Kumar Saurav, Rahul Vaze
2021 J jnl
CoRR
Rahul Vaze, Santanu Rathod
2021 J jnl
CoRR
Rahul Vaze, Jayakrishnan Nair
2021 J jnl
CoRR
Rahul Vaze, Jayakrishnan Nair
2021 J jnl
IEEE Trans. Wirel. Commun.
Rajshekhar Vishweshwar Bhat, Rahul Vaze, Mehul Motani
2020 Misc conf
ICNC
Haseen Rahman, Ankith Vinayachandran, Sibi Raj B. Pillai, Kumar Appaiah, Rahul Vaze
2020 conf
INFOCOM Workshops
Rajshekhar Vishweshwar Bhat, Rahul Vaze, Mehul Motani
2020 J jnl
CoRR
Akshit Kumar, Parikshit Hegde, Rahul Vaze, Amira Alloum, Cédric Adjih
2020 J jnl
IEEE Trans. Green Commun. Netw.
Rajshekhar Vishweshwar Bhat, Mehul Motani, Chandra R. Murthy, Rahul Vaze
2020 conf
INFOCOM Workshops
Kumar Saurav, Rahul Vaze
2020 J jnl
CoRR
Kumar Saurav, Rahul Vaze
2020 B conf
WiOpt
Nithin Ramesan, Sachin Nayak, Rahul Vaze
2020 J jnl
IEEE/ACM Trans. Netw.
Rahul Vaze, Jayakrishnan Nair
2020 J jnl
SIGMETRICS Perform. Evaluation Rev.
Rahul Vaze, Jayakrishnan Nair
2020 J jnl
Perform. Evaluation
Rahul Vaze, Jayakrishnan Nair
2020 B conf
WiOpt
Akhil Bhimaraju, Debanuj Nayak, Rahul Vaze
2020 J jnl
CoRR
Akhil Bhimaraju, Debanuj Nayak, Rahul Vaze
2020 conf
ICC Workshops
Rajshekhar Vishweshwar Bhat, Rahul Vaze, Mehul Motani
2019 J jnl
IEEE Trans. Commun.
Mohit K. Sharma, Chandra R. Murthy, Rahul Vaze
2019 J jnl
IEEE Trans. Wirel. Commun.
Rahul Vaze, Srikanth K. Iyer
2019 B conf
WiOpt
Arun Verma, Manjesh Kumar Hanawal, Rahul Vaze
2019 conf
ICC
Rajshekhar Vishweshwar Bhat, Mehul Motani, Chandra R. Murthy, Rahul Vaze
2019 J jnl
CoRR
Rahul Vaze, Jayakrishnan Nair
2019 J jnl
CoRR
Rahul Vaze, Sibi Raj B. Pillai
2019 J jnl
IEEE Trans. Green Commun. Netw.
Rahul Vaze, Sibi Raj B. Pillai
2019 conf
ICC
Agrim Gupta, Kumar Appaiah, Rahul Vaze
2019 J jnl
CoRR
Rahul Vaze, Jayakrishnan Nair
2019 J jnl
CoRR
Rajshekhar Vishweshwar Bhat, Rahul Vaze, Mehul Motani
2018 J jnl
CoRR
Rajshekhar Vishweshwar Bhat, Mehul Motani, Chandra R. Murthy, Rahul Vaze
2018 J jnl
CoRR
Nived Rajaraman, Rahul Vaze, Goonwanth Reddy
2018 B conf
GLOBECOM
Mohit K. Sharma, Chandra R. Murthy, Rahul Vaze
2018 A* conf
INFOCOM
Rahul Vaze
2018 conf
APPROX-RANDOM
Goonwanth Reddy, Rahul Vaze
2018 B conf
WiOpt
Parikshit Hegde, Akshit Kumar, Rahul Vaze
2018 J jnl
CoRR
Nived Rajaraman, Rahul Vaze
2017 J jnl
CoRR
Rahul Vaze, Srikanth K. Iyer
2017 B conf
WiOpt
Rahul Vaze, Srikanth K. Iyer
2017 J jnl
CoRR
Rahul Vaze, Shreyas Chaudhari, Akshat Choube, Nitin Aggarwal
2017 J jnl
CoRR
Mohit K. Sharma, Chandra R. Murthy, Rahul Vaze
2017 B conf
WiOpt
Mohit K. Sharma, Chandra R. Murthy, Rahul Vaze
2017 J jnl
CoRR
Rahul Vaze
2017 A* conf
INFOCOM
Rahul Vaze
2017 B conf
WiOpt
Ashwini Marathe, Sibi Raj B. Pillai, Rahul Vaze
2017 J jnl
IEEE/ACM Trans. Netw.
Ashwin Pananjady, Vivek Kumar Bagaria, Rahul Vaze
2017 conf
LATINCOM
Ligia M. M. Zorello, Marco Antonio Torrez Rojas, Marceau Coupechoux, Rahul Vaze, Tereza Cristina M. B. Carvalho
2017 J jnl
CoRR
Goonwanth Reddy, Rahul Vaze
2017 B conf
WiOpt
Parth Thaker, Aditya Gopalan, Rahul Vaze
2016 J jnl
IEEE Trans. Wirel. Commun.
Kiran Koshy Thekumparampil, Andrew Thangaraj, Rahul Vaze
2016 J jnl
IEEE Trans. Cogn. Commun. Netw.
Rahul Vaze, Chandra R. Murthy
2016 J jnl
CoRR
Rahul Vaze, Marceau Coupechoux
2016 J jnl
SIGMETRICS Perform. Evaluation Rev.
Rahul Vaze, Marceau Coupechoux
2016 J jnl
IEEE J. Sel. Areas Commun.
Aditya Deshmukh, Rahul Vaze
2016 J jnl
CoRR
Rahul Vaze
2016 J jnl
CoRR
Aditya Deshmukh, Rahul Vaze
2016 B conf
WiOpt
Aditya Deshmukh, Rahul Vaze
2016 J jnl
IEEE Trans. Inf. Theory
Siddhartha Satpathi, Rushil Nagda, Rahul Vaze
2016 J jnl
CoRR
Rahul Vaze, Sharayu Moharir
2016 B conf
WiOpt
Rahul Vaze, Sharayu Moharir
2016 J jnl
Int. J. Commun. Syst.
Saurabh Aggarwal, Joy Kuri, Rahul Vaze
2016 conf
FSTTCS
Umang Bhaskar, Ajil Jalal, Rahul Vaze
2016 conf
CODS
Shishir Pandey, Rahul Vaze
2015 J jnl
CoRR
Srikanth K. Iyer, Rahul Vaze
2015 B conf
WiOpt
Srikanth K. Iyer, Rahul Vaze
2015 J jnl
CoRR
Ajaykrishnan N., Navya S. Prem, Vinod M. Prabhakaran, Rahul Vaze
2015 conf
NCC
Ajaykrishnan N., Navya S. Prem, Vinod M. Prabhakaran, Rahul Vaze
2015 J jnl
CoRR
Ajil Jalal, Rahul Vaze, Umang Bhaskar
2015 B conf
WiOpt
Ashwin Subramanian, G. Sai Kanth, Sharayu Moharir, Rahul Vaze
2015 B conf
WiOpt
Abhinav Kumar, Sibi Raj B. Pillai, Rahul Vaze, Aditya Gopalan
2015 conf
ICC
Rushil Nagda, Siddhartha Satpathi, Rahul Vaze
2015 book
Rahul Vaze
2015 A* conf
INFOCOM
Ashwin Pananjady, Vivek Kumar Bagaria, Rahul Vaze
2014 J jnl
IEEE Trans. Wirel. Commun.
Tianyang Bai, Rahul Vaze, Robert W. Heath Jr.
2014 J jnl
CoRR
Srikanth K. Iyer, Rahul Vaze, Dheeraj Narasimha
2014 J jnl
IEEE/ACM Trans. Netw.
Rahul Vaze, Rachit Garg, Neetish Pathak
2014 J jnl
CoRR
Rahul Vaze, Krishna P. Jagannathan
2014 Misc conf
ICASSP
Rahul Vaze, Krishna P. Jagannathan
2014 J jnl
CoRR
Jainam Doshi, Rahul Vaze
2014 Misc conf
ICCS
Jainam Doshi, Rahul Vaze
2014 conf
NCC
Ashwin Pananjady, Vivek Kumar Bagaria, Rahul Vaze
2014 A* conf
ICDM
Shishir Pandey, Rahul Vaze
2014 conf
NCC
B. Santhana Krishnan, Rahul Vaze, D. Manjunath
2014 Misc conf
COMSNETS
Rahul Vaze, Chandra R. Murthy
2014 J jnl
IEEE Trans. Wirel. Commun.
Andrew Thangaraj, Rahul Vaze
2014 J jnl
CoRR
Rushil Nagda, Siddhartha Satpathi, Rahul Vaze
2014 J jnl
CoRR
Abhinav Kumar, Rahul Vaze, Sibi Raj B. Pillai, Aditya Gopalan
2014 J jnl
J. Appl. Probab.
Rahul Vaze, Srikanth K. Iyer
2014 B conf
WiOpt
Rahul Vaze, Srikanth K. Iyer
2014 J jnl
CoRR
Rahul Vaze, Jainam Doshi, Kaibin Huang
2014 J jnl
CoRR
Kiran Koshy Thekumparampil, Andrew Thangaraj, Rahul Vaze
2014 J jnl
CoRR
Ashwin Pananjady, Vivek Kumar Bagaria, Rahul Vaze
2014 J jnl
CoRR
Siddhartha Satpathi, Rushil Nagda, Rahul Vaze
2013 J jnl
CoRR
Tianyang Bai, Rahul Vaze, Robert W. Heath Jr.
2013 J jnl
EURASIP J. Wirel. Commun. Netw.
Rahul Vaze, Robert W. Heath Jr.
2013 A* conf
INFOCOM
Rahul Vaze
2013 J jnl
CoRR
Ashwin Pananjady, Vivek Kumar Bagaria, Rahul Vaze
2013 J jnl
CoRR
Ashwin Subramanian, G. Sai Kanth, Rahul Vaze
2013 J jnl
CoRR
Andrew Thangaraj, Rahul Vaze
2013 B conf
WCNC
Rahul Vaze
2013 J jnl
CoRR
Vivek Kumar Bagaria, Ashwin Pananjady, Rahul Vaze
2013 J jnl
CoRR
Rahul Vaze, Srikanth K. Iyer
2013 J jnl
CoRR
Saurabh Aggarwal, Joy Kuri, Rahul Vaze
2013 conf
GlobalSIP
Rahul Vaze
2012 J jnl
CoRR
Rahul Vaze, Piyush Gupta
2012 J jnl
CoRR
Rahul Vaze, Chandra R. Murthy
2012 A* conf
INFOCOM
Rahul Vaze
2012 J jnl
IEEE Commun. Lett.
Rahul Vaze, Harish Ganapathy
2012 J jnl
IEEE Trans. Inf. Theory
Rahul Vaze, Robert W. Heath Jr.
2012 J jnl
CoRR
Rahul Vaze
2011 J jnl
CoRR
Rahul Vaze
2011 J jnl
CoRR
Rahul Vaze
2011 J jnl
IEEE Trans. Inf. Theory
Rahul Vaze, Robert W. Heath Jr.
2011 J jnl
CoRR
Rahul Vaze
2011 J jnl
CoRR
Rahul Vaze, Harish Ganapathy
2011 J jnl
CoRR
Rahul Vaze
2011 J jnl
IEEE Trans. Wirel. Commun.
Rahul Vaze
2011 J jnl
IEEE Trans. Wirel. Commun.
Rahul Vaze
2011 B conf
WiOpt
Rahul Vaze
2011 J jnl
IEEE Trans. Wirel. Commun.
Rahul Vaze, Kien T. Truong, Steven Weber, Robert W. Heath Jr.
2010 J jnl
CoRR
Naqueeb Warsi, Rahul Vaze, Tapan Shah
2010 J jnl
CoRR
Rahul Vaze
2010 B conf
WiOpt
Rahul Vaze
2010 J jnl
CoRR
Rahul Vaze
2010 J jnl
CoRR
Rahul Vaze, Kien T. Truong, Steven Weber, Robert W. Heath Jr.
2010 B conf
ISIT
Rahul Vaze, Kien T. Truong, Robert W. Heath Jr., Steven Weber
2009 J jnl
CoRR
Rahul Vaze, Robert W. Heath Jr.
2009 J jnl
EURASIP J. Wirel. Commun. Netw.
Rahul Vaze, Robert W. Heath Jr.
2009 B conf
ITW
Rahul Vaze, Robert W. Heath Jr.
2009 J jnl
IEEE Trans. Signal Process.
Rahul Vaze, Robert W. Heath Jr.
2009 J jnl
CoRR
Rahul Vaze, Robert W. Heath Jr.
2008 J jnl
CoRR
Rahul Vaze, Robert W. Heath Jr.
2008 conf
ACSCC
Rahul Vaze, Robert W. Heath Jr.
2008 B conf
ISIT
Rahul Vaze, Robert W. Heath Jr.
2008 J jnl
CoRR
Rahul Vaze, Robert W. Heath Jr.
2008 J jnl
CoRR
Rahul Vaze, Robert W. Heath Jr.
2007 J jnl
CoRR
Rahul Vaze, Robert W. Heath Jr.
2007 B conf
ISIT
Rahul Vaze, Robert W. Heath Jr.
2006 conf
ICC
Rahul Vaze, B. Sundar Rajan
2006 J jnl
IEEE Trans. Inf. Theory
Rahul Vaze, B. Sundar Rajan
2005 conf
ICC
Rahul Vaze, Vummintala Shashidhar, B. Sundar Rajan
2004 B conf
GLOBECOM
Rahul Vaze, B. Sundar Rajan
redb/extractors/apk_extractors/apk_inconsistency_tests.py
← Index redb/extractors/apk_extractors/apk_inconsistency_tests.py python
import inspect
import re
from datetime import datetime, timezone
from typing import Any

from redb.extractors.enum import Tag
from redb.extractors.apk_extractor import APKExtractor
from redb.models.dataclasses import APKInconsistencyTests

# Emulator detection indicator strings
EMULATOR_INDICATORS = {
    "generic", "sdk", "google_sdk", "Emulator",
    "goldfish", "ranchu", "Andy", "Genymotion",
    "BlueStacks", "nox", "ttVM_Hdragon",
}

# Root detection indicator strings
ROOT_INDICATORS = {
    "/system/app/Superuser.apk",
    "/system/xbin/su",
    "/system/bin/su",
    "com.noshufou.android.su",
    "com.thirdparty.superuser",
    "eu.chainfire.supersu",
    "com.koushikdutta.superuser",
    "com.topjohnwu.magisk",
}

# Standard DEX filename pattern
STANDARD_DEX_PATTERN = re.compile(r"^classes\d*\.dex$")


class APKInconsistencyTestsExtractor(APKExtractor):

    def __init__(
        self, filepath, log, exporters=None, index_prefix=None,
        known_benign=False, known_malicious=False,
        apk=None,
    ):
        super().__init__(
            filepath, log, exporters, index_prefix,
            known_benign, known_malicious, apk,
        )
        self.test_results = None
        self.log.debug(inspect.currentframe().f_code.co_name)

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

    def _test_zip_bomb(self):
        """Check if any ZIP entry has compression ratio > 100:1."""
        try:
            zf = self._get_zip_file()
            if not zf:
                return None
            with zf:
                for info in zf.infolist():
                    if info.compress_size > 0:
                        ratio = info.file_size / info.compress_size
                        if ratio > 100:
                            return True
            return False
        except Exception as e:
            self.log.warning(f"Error in zip bomb test: {e}")
            return None

    def _test_zip_duplicate_entries(self):
        """Check for duplicate filenames in ZIP directory."""
        try:
            zf = self._get_zip_file()
            if not zf:
                return None
            with zf:
                names = [info.filename for info in zf.infolist()]
                return len(names) != len(set(names))
        except Exception as e:
            self.log.warning(f"Error in duplicate entries test: {e}")
            return None

    def _test_zip_path_traversal(self):
        """Check for path traversal (../) in ZIP entry names."""
        try:
            for f in self._list_files():
                if ".." in f or f.startswith("/"):
                    return True
            return False
        except Exception as e:
            self.log.warning(f"Error in path traversal test: {e}")
            return None

    def _test_zip_suspicious_timestamps(self):
        """Check for timestamps at epoch (1980) or in the future."""
        try:
            zf = self._get_zip_file()
            if not zf:
                return None
            now = datetime.now()
            with zf:
                for info in zf.infolist():
                    try:
                        dt = datetime(*info.date_time)
                        if dt.year <= 1980 or dt > now:
                            return True
                    except (ValueError, TypeError):
                        continue
            return False
        except Exception as e:
            self.log.warning(f"Error in suspicious timestamps test: {e}")
            return None

    def _test_hidden_dex_files(self):
        """Check for DEX files not matching classes*.dex pattern."""
        try:
            for f in self._list_files():
                if f.endswith(".dex"):
                    basename = f.split("/")[-1]
                    if not STANDARD_DEX_PATTERN.match(basename):
                        return True
            return False
        except Exception as e:
            self.log.warning(f"Error in hidden DEX files test: {e}")
            return None

    def _test_manifest_component_mismatch(self):
        """Check for declared components that don't exist in DEX."""
        try:
            if not self._is_valid_apk():
                return None

            # Get all class names from DEX
            dex_classes = set()
            try:
                from androguard.core.dex import DEX
                for dex_data in (self.apk.get_all_dex() or []):
                    try:
                        d = DEX(dex_data)
                        for cls in d.get_classes():
                            name = cls.get_name()
                            if name:
                                # Convert "Lcom/example/Foo;" to "com.example.Foo"
                                dex_classes.add(
                                    name[1:-1].replace("/", ".") if name.startswith("L") else name
                                )
                    except Exception:
                        continue
            except Exception:
                return None

            if not dex_classes:
                return None

            # Check manifest components against DEX classes
            components = []
            try:
                components.extend(self.apk.get_activities() or [])
                components.extend(self.apk.get_services() or [])
                components.extend(self.apk.get_receivers() or [])
                components.extend(self.apk.get_providers() or [])
            except Exception:
                return None

            for comp in components:
                if comp and comp not in dex_classes:
                    # Component might use a shorthand; check with package prefix
                    package = self.apk.get_package() or ""
                    full_name = package + comp if comp.startswith(".") else comp
                    if full_name not in dex_classes:
                        return True

            return False
        except Exception as e:
            self.log.warning(f"Error in manifest component mismatch test: {e}")
            return None

    def _test_debuggable_release(self):
        """Check android:debuggable=true combined with a release signature."""
        try:
            if not self._is_valid_apk():
                return None

            is_debuggable = self.apk.get_attribute_value(
                "application", "debuggable"
            ) == "true"

            if not is_debuggable:
                return False

            # Check if it has a signing certificate (release builds have certs)
            try:
                certs = self.apk.get_certificates()
                if certs and len(certs) > 0:
                    return True
            except Exception:
                pass

            return False
        except Exception as e:
            self.log.warning(f"Error in debuggable release test: {e}")
            return None

    def _get_dex_strings(self):
        """Get all string constants from DEX files."""
        all_strings = set()
        try:
            from androguard.core.dex import DEX
            for dex_data in (self.apk.get_all_dex() or []):
                try:
                    d = DEX(dex_data)
                    for s in d.get_strings():
                        if s:
                            all_strings.add(s)
                except Exception:
                    continue
        except Exception:
            pass
        return all_strings

    def _test_emulator_detection_strings(self):
        """Check for emulator detection patterns in DEX strings."""
        try:
            if not self._is_valid_apk():
                return None

            dex_strings = self._get_dex_strings()
            for indicator in EMULATOR_INDICATORS:
                for s in dex_strings:
                    if indicator in s:
                        return True
            return False
        except Exception as e:
            self.log.warning(f"Error in emulator detection test: {e}")
            return None

    def _test_debugger_detection(self):
        """Check for debugger detection API calls in DEX."""
        try:
            if not self._is_valid_apk():
                return None

            dex_strings = self._get_dex_strings()
            debugger_patterns = {
                "isDebuggerConnected",
                "waitingForDebugger",
                "Debug.isDebuggerConnected",
            }
            for pattern in debugger_patterns:
                for s in dex_strings:
                    if pattern in s:
                        return True
            return False
        except Exception as e:
            self.log.warning(f"Error in debugger detection test: {e}")
            return None

    def _test_root_detection(self):
        """Check for root detection patterns in DEX."""
        try:
            if not self._is_valid_apk():
                return None

            dex_strings = self._get_dex_strings()
            for indicator in ROOT_INDICATORS:
                for s in dex_strings:
                    if indicator in s:
                        return True
            return False
        except Exception as e:
            self.log.warning(f"Error in root detection test: {e}")
            return None

    def extract(self):
        if not self._is_valid_apk():
            self.log.error(f"Invalid APK for {self.hash.sha256}")
            return None

        self.test_results = APKInconsistencyTests(
            test_zip_bomb=self._test_zip_bomb(),
            test_zip_duplicate_entries=self._test_zip_duplicate_entries(),
            test_zip_path_traversal=self._test_zip_path_traversal(),
            test_zip_suspicious_timestamps=self._test_zip_suspicious_timestamps(),
            test_hidden_dex_files=self._test_hidden_dex_files(),
            test_manifest_component_mismatch=self._test_manifest_component_mismatch(),
            test_debuggable_release=self._test_debuggable_release(),
            test_emulator_detection_strings=self._test_emulator_detection_strings(),
            test_debugger_detection=self._test_debugger_detection(),
            test_root_detection=self._test_root_detection(),
        )
        return self.test_results

    def _bool_to_nullable(self, val):
        """Convert bool/None to ClickHouse Nullable(UInt8)."""
        if val is None:
            return None
        return int(val)

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

            current_time = datetime.now(timezone.utc)
            t = self.test_results

            data = [[
                self.sha256,
                self._bool_to_nullable(t.test_zip_bomb),
                self._bool_to_nullable(t.test_zip_duplicate_entries),
                self._bool_to_nullable(t.test_zip_path_traversal),
                self._bool_to_nullable(t.test_zip_suspicious_timestamps),
                self._bool_to_nullable(t.test_hidden_dex_files),
                self._bool_to_nullable(t.test_manifest_component_mismatch),
                self._bool_to_nullable(t.test_debuggable_release),
                self._bool_to_nullable(t.test_emulator_detection_strings),
                self._bool_to_nullable(t.test_debugger_detection),
                self._bool_to_nullable(t.test_root_detection),
                current_time,
            ]]

            column_names = [
                'sha256',
                'test_zip_bomb', 'test_zip_duplicate_entries',
                'test_zip_path_traversal', 'test_zip_suspicious_timestamps',
                'test_hidden_dex_files', 'test_manifest_component_mismatch',
                'test_debuggable_release', 'test_emulator_detection_strings',
                'test_debugger_detection', 'test_root_detection',
                'analysis_date',
            ]

            column_type_names = [
                'FixedString(64)',
                'Nullable(UInt8)', 'Nullable(UInt8)',
                'Nullable(UInt8)', 'Nullable(UInt8)',
                'Nullable(UInt8)', 'Nullable(UInt8)',
                'Nullable(UInt8)', 'Nullable(UInt8)',
                'Nullable(UInt8)', 'Nullable(UInt8)',
                "DateTime64(3, 'UTC')",
            ]

            return (data, column_names, column_type_names)

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