Monday, December 23, 2024
HomeAndroidGoogle Revealed Kernel Address Sanitizer To Harden Android Firmware And Beyond

Google Revealed Kernel Address Sanitizer To Harden Android Firmware And Beyond

Published on

SIEM as a Service

Android devices are popular among hackers due to the platform’s extensive acceptance and open-source nature.

However, it has a big attack surface with over 2.5 billion active Android devices all over the world.

It also poses challenges when it comes to prompt vulnerability patching due to its fragmented ecosystem that consists of different hardware vendors and delayed software updates.

- Advertisement - SIEM as a Service

Malware distribution, surveillance, and unauthorized financial gain, or any other malicious purpose are some examples of how cybercriminals take advantage of these loopholes in security.

Recently, Google unveiled the Kernel Address Sanitizer (KASan) to strengthen the Android firmware and beyond.

Android Firmware And Beyond

KASan (Kernel Address Sanitizer) has broad applicability across firmware targets. Incorporating KASan-enabled builds into testing and fuzzing can proactively identify memory corruption vulnerabilities and stability issues before deployment on user devices.

Document

Download Free CISO’s Guide to Avoiding the Next Breach

Are you from The Team of SOC, Network Security, or Security Manager or CSO? Download Perimeter’s Guide to how cloud-based, converged network security improves security and reduces TCO.

  • Understand the importance of a zero trust strategy
  • Complete Network security Checklist
  • See why relying on a legacy VPN is no longer a viable security strategy
  • Get suggestions on how to present the move to a cloud-based network security solution
  • Explore the advantages of converged network security over legacy approaches
  • Discover the tools and technologies that maximize network security

Adapt to the changing threat landscape effortlessly with Perimeter 81’s cloud-based, unified network security platform.

Google has already leveraged KASan on firmware targets, leading to the discovery and remediation of over 40 memory safety bugs, some critically severe, through proactive vulnerability detection.

Address Sanitizer (ASan) is a compiler instrumentation tool that identifies invalid memory access bugs like out-of-bounds, use-after-free, and double-free errors during runtime. 

For user-space targets, enabling ASan is straightforward with the -fsanitize=address option. However, for bare-metal code built with none system targets like arm-none-eabi, there’s no default runtime support. 

The -fsanitize=kernel-address option exposes an interface to provide custom KASan runtime implementations, like the Linux kernel’s routines.

KASan’s core idea is to instrument memory access operations like loads, stores, and memory copy functions to verify the validity of destination/source regions. 

It only allows access to valid regions tracked in a shadow memory area, where each byte represents the state (allocated, freed, accessible bytes) of a fixed-size memory region. 

Upon detecting an invalid access, KASan reports the violation.

Enabling KASan for bare-metal targets requires implementing instrumentation routines to check region validity during memory operations, report violations, and manage shadow memory to track the state of covered regions.

For Bare-Metal Firmware, Enabling KASan

Here below we have mentioned all the sequential steps:-

  • KASan shadow memory
  • Implement a KASan runtime
  • Memory access check
  • Shadow memory management
  • Covering global variables
  • Memory copy functions
  • Avoiding false positives for noreturn functions
  • Hook heap memory allocation routines

For the usage of KASan on bare-metal code, one should employ -fsanitize=kernel-address option of the compiler and -asan-mapping-offset to indicate the location of shadow memory, -asan-stack/globals=1 to cover stack/global variables and -asan-instrumentation-with-call-threshold=0 for outlining checks against code bloat.

In addition, strategies such as leveraging Rust (a memory-safe language) are being advanced in order to proactively guard against memory vulnerabilities in the Android system.

Stay updated on Cybersecurity news, Whitepapers, and Infographics. Follow us on LinkedIn & Twitter.

Raga Varshini
Raga Varshini
Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Latest articles

Skuld Malware Using Weaponized Windows Utilities Packages To Deliver Malware

Researchers discovered a malware campaign targeting the npm ecosystem, distributing the Skuld info stealer...

BellaCiao, A new .NET Malware With Advanced Sophisticated Techniques

An investigation revealed an intrusion in Asia involving the BellaCiao .NET malware, as the...

Malicious Apps On Amazon Appstore Records Screen And Interecpt OTP Verifications

A seemingly benign health app, "BMI CalculationVsn," was found on the Amazon App Store,...

Lazarus Hackers Using New VNC Based Malware To Attack Organizations Worldwide

The Lazarus Group has recently employed a sophisticated attack, dubbed "Operation DreamJob," to target...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

DigiEver IoT Devices Exploited To Deliver Mirai-based Malware

A new Mirai-based botnet, "Hail Cock Botnet," has been exploiting vulnerable IoT devices, including...

Hackers Exploiting PLC Controllers In US Water Management System To Gain Remote Access

A joint Cybersecurity Advisory (CSA) warns of ongoing exploitation attempts by Iranian Islamic Revolutionary...

Siemens UMC Vulnerability Allows Arbitrary Remote Code Execution

A critical vulnerability has been identified in Siemens' User Management Component (UMC), which could...