Close Menu
The Daily PostingThe Daily Posting
  • Home
  • Android
  • Business
  • IPhone
    • Lifestyle
  • Politics
  • Europe
  • Science
    • Top Post
  • USA
  • World
Facebook X (Twitter) Instagram
Trending
  • Jennifer Lopez and Ben Affleck reveal summer plans after Europe trip
  • T20 World Cup: Quiet contributions from Akshar Patel, Kuldeep Yadav and Ravindra Jadeja justify Rohit Sharma’s spin vision | Cricket News
  • The impact of a sedentary lifestyle on health
  • Bartok: The World of Lilette
  • Economists say the sharp rise in the U.S. budget deficit will put a strain on Americans’ incomes
  • Our Times: Williams memorial unveiled on July 4th | Lifestyle
  • Heatwaves in Europe are becoming more dangerous: what it means for travelers
  • Christian Science speaker to visit Chatauqua Institute Sunday | News, Sports, Jobs
Facebook X (Twitter) Instagram
The Daily PostingThe Daily Posting
  • Home
  • Android
  • Business
  • IPhone
    • Lifestyle
  • Politics
  • Europe
  • Science
    • Top Post
  • USA
  • World
The Daily PostingThe Daily Posting
Android

Android Supply Chain Validation Cheat Sheet

thedailyposting.comBy thedailyposting.comMarch 28, 2024No Comments

[ad_1]

Android allows you to use several different tools and techniques to enumerate software and configurations, and begin validating the software on your device. This cheat sheet is based on work performed on an Android TV device (we documented the steps in the article “Android TV Devices: Owned Supply Chain Security Threats”).

This information collected by the command below does not automatically validate the supply chain, but provides data that can be used for manual validation. Because Android has many versions and device configurations, the commands below may not work exactly as described here. Some of the data collected is highly dependent on whether you can “root” your Android device.

Adb (Android debugger) commands

$ adb connection 192.168.1.150
Connected to 192.168.1.150:5555

$ adb devices -l
List of connected devices
192.168.1.150:5555 Device Product:walleye Model:MBOX Device:walleye Transport_id:1

$ adb shell
Walleye:/ $

$ adb root
Restart adbd as root

$ adb shell
Walleye:/ #

$ adb shell pm list package -f

Package:/system/app/TvdVideo/TvdVideo.apk=com.softwinner.TvdVideo
Package:/system/priv-app/CtsShimPrivPrebuilt/CtsShimPrivPrebuilt.apk=com.android.cts.priv.ctsshim
Package:/system/priv-app/GoogleExtServices/GoogleExtServices.apk=com.google.android.ext.services
Package:/data/app/com.google.android.katniss-cge_xXeW17WhrGeW3nufDg==/base.apk=com.google.android.katniss
Package:/system/priv-app/TelephonyProvider/TelephonyProvider.apk=com.android.providers.telephony
Package:/system/priv-app/DynamicSysteminstallationService/DynamicSysteminstallationService.apk=com.android.dynsystem
Package:/system/priv-app/CalendarProvider/CalendarProvider.apk=com.android.providers.calendar

$ adb shell pm list package

$ adbshellpmlistpackages -f #See related files.

$ adb shell pm list Packages -d #Filter to show only invalid packages.

$ adb shell pm list Packages -e #Filter to display only valid packages.

$ adb shell pm list package -s #Filter to show only system packages.

$ adb shell pm list package -3 #Filter to show only third-party packages.

$ adb shell pm list package -i #See installer for packages.

$ adb shell pm list package -u #Include uninstalled packages.

$ adbshell pmlistpackages –user #Userspace to query.

Source: https://book.hacktricks.xyz/mobile-pentesting/android-app-pentesting/adb-commands

Dump flash over the network.

$ adb forward tcp:5555 tcp:5555
$ adb shell
$ sudo nc -l -p 5555 -e dd if=/dev/block/mmcblk0

Run the following command in a new terminal:

$ mkdir ~/dump
$ cd ~/dump
$ North Carolina 127.0.0.1 5555 | pv -i 0.5 > mydump.img

Mount the device disk image

Display partition list

$ sudo split mydump.img print

List all mountable partitions. They will be listed in File Explorer and you can click on the partition to mount it.

$ sudo kpartx -a -v mydump.img

Remove the device mapper and make sure all mounted partitions are unmounted.

$ sudo kpartx -d -v mydump.img

Scan your network for Android debugging (adb) ports

$ nmap -sV -p 5555 –open 192.168.1.0/24

Nmap scan report for 192.168.1.148
Host is booting (delay 0.12 seconds).

Port state service version
5555/tcp open freeciv?
One service was not recognized even though it returned data. If you know the service/version, please submit the following fingerprint to https://nmap.org/cgi-bin/submit.cgi?new-service.
SF-Port5555-TCP:V=7.94%I=7%D=1/23%Time=65AFEA8D%P=x86_64-pc-linux-gnu%r(ad
SF:bConnect,2C,”AUTH\x01\0\0\0\0\0\0\0\x14\0\0\0\x9f\t\0\0\xbe\xaa\xab\xb7
SF:\x94\xde\x92\xbd\0\^\x14c\xc0UDkPB\xb9\xf7\x80\xe7\x12\x8a”);

Get device properties

Get all properties.

$ adb shell getprop

Get the Android release number.

$ adb shell getprop ro.build.version.release

Obtain the build fingerprint from the vendor.

$ adb shell getprop ro.vendor.build.fingerprint

Get the device model.

$ adb shell getprop ro.product.model

Get the release name.

$ adb shell getprop ro.product.device

Get running apps.

$ adb shell ps | grep u0_

Service list:

$ adb shell service list

List app permissions:

$ adb shell pm list permissions -g -f

pull a log

$ adb logcat
$ adb logcat -d -f /sdcard/log.txt
$ adb pull /sdcard/log.txt

Tools and references

  • Autopsy – The Android Analyzer module hasn’t been updated in a while, but parsing some items from Android devices is still supported. It also provides faster access to file system directory trees than commercially available tools. Most tools, but not Autopsy, will make you wait until the file system is visible during analysis. Also, the keyword search and engraving are top notch.
  • Jadx – Android app decompiler
  • Mobexler (commercial) – “Mobexler is a customized virtual machine designed to help with penetration testing of Android and iOS applications.”
  • MobSF – Mobile App Static Analyzer
  • Androidqf – Automates and simplifies most of the commands presented here in one utility (creating backups, logging, downloading applications, etc.).
  • Apk sh – “apk.sh is a Bash script that facilitates reverse engineering Android apps and automates repetitive tasks such as pulling, decoding, rebuilding, and patching APKs.”
  • Missing signs: How some brands forgot to protect critical parts of Android
  • Analyze installed Android applications for security risks with Termux

The post Android Supply Chain Validation Cheatsheet appeared first on Eclypsium | Supply chain security for modern enterprises.

*** This is a syndicated blog from the Security Bloggers Network brought to you by Eclypsium | “Supply Chain Security for the Modern Enterprise” by Chris Garland. Read the original post: https://eclypsium.com/blog/android-supply-chain-validation-cheat-sheet/

[ad_2]

Source link

thedailyposting.com
  • Website

Related Posts

Qualcomm wants to make it easier for phone makers to issue Android updates

June 28, 2024

Qualcomm wants to make Android updates easier for OEMs

June 28, 2024

What’s new in the June 2024 Google system update for Android

June 28, 2024
Leave A Reply Cancel Reply

ads
© 2025 thedailyposting. Designed by thedailyposting.
  • Home
  • About us
  • Contact us
  • DMCA
  • Privacy Policy
  • Terms of Service
  • Advertise with Us
  • 1711155001.38
  • xtw183871351
  • 1711198661.96
  • xtw18387e4df
  • 1711246166.83
  • xtw1838741a9
  • 1711297158.04
  • xtw183870dc6
  • 1711365188.39
  • xtw183879911
  • 1711458621.62
  • xtw183874e29
  • 1711522190.64
  • xtw18387be76
  • 1711635077.58
  • xtw183874e27
  • 1711714028.74
  • xtw1838754ad
  • 1711793634.63
  • xtw183873b1e
  • 1711873287.71
  • xtw18387a946
  • 1711952126.28
  • xtw183873d99
  • 1712132776.67
  • xtw183875fe9
  • 1712201530.51
  • xtw1838743c5
  • 1712261945.28
  • xtw1838783be
  • 1712334324.07
  • xtw183873bb0
  • 1712401644.34
  • xtw183875eec
  • 1712468158.74
  • xtw18387760f
  • 1712534919.1
  • xtw183876b5c
  • 1712590059.33
  • xtw18387aa85
  • 1712647858.45
  • xtw18387da62
  • 1712898798.94
  • xtw1838737c0
  • 1712953686.67
  • xtw1838795b7
  • 1713008581.31
  • xtw18387ae6a
  • 1713063246.27
  • xtw183879b3c
  • 1713116334.31
  • xtw183872b3a
  • 1713169981.74
  • xtw18387bf0d
  • 1713224008.61
  • xtw183873807
  • 1713277771.7
  • xtw183872845
  • 1713329335.4
  • xtw183874890
  • 1716105960.56
  • xtw183870dd9
  • 1716140543.34
  • xtw18387691b

Type above and press Enter to search. Press Esc to cancel.