Categories: Kali Linux

Frisky – Tools To Assist Binary App Reversing & Augmentation

Frisky is an instruments to assist in binary application reversing and augmentation, geared towards walled gardens like iOS. Most, if not all, recently tested on iOS 11.1.2 and macOS 10.12.6.

frida-url-interceptor.js(Frisky)

Intercepts all URLs of an iOS/macOS application, allowing you to trace and alter/intercept all network traffic, including https, per app before encryption and after decryption:

  1. iOS: open app of interest first, e.g. Safari
  2. macOS: frida -U -n Safari -l frida-url-interceptor.js
  3. It will also display a popup window upon the first request in the iOS app to confirm code interception

Also Read Dejavu – Open Source Deception Framework

ldid / ldid2

When building recent iOS jailbreaks dependent on SHA256 signatures, ldid2 is required. This repo will allow you to easily compile ldid and ldid2 for signing and modifying an iOS binary’s entitlements, and thus jailbreaking a device.

  1. macOS: ldid{2} -e MobileSafari # to dump MobileSafari’s entitlements
  2. macOS: ldid{2} -S cat # to sign cat
Extract shared libraries used by apps not directly available on iOS filesystem for static analysis:
  • Grab the patched dyld-210.2.3-patched (included in this repo) and run the custom dsc_extractor (you may need to compile from the xcodeproject) to dump iOS’ /System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm* into individual dylibs:
  • macOS: mkdir -p dylibs && dyld-210.2.3-patched/launch-cache/dsc_extractor /path/to/copied/dyld_shared_cache_arm* dylibs
Discover and modify library/framekwork function call arguments and return codes via Frida:
  • iOS: open app of interest first, e.g. Twitter
  • macOS: frida-trace -U -i "*tls*" Twitter # hook all calls matching /tls/i for the Twitter app
  • macOS: Now __handlers__/libcoretls.dylib/tls_private_key_create.js will be generated:
    • onEnter‘s args[2] is first argument to the function
      • Extract string from first argument: Memory.readUtf8String(args[2]) or ObjC.Object(args[2]))
    • onLeave‘s retval is the return value
      • Print out retval: log(retval.toInt32())
      • Adjust retval: retval.replace(0)
Sniff network traffic from (non-jailbroken/jailbroken) iOS device from your mac:
  1. macOS: system_profiler SPUSBDataType|perl -n0e'`rvictl -s $1`if/iP(?:hone|ad):.*?Serial Number: (\S+)/s';sudo tcpdump -i rvi0
  2. standard tcpdump options/filters apply
Decrypt IPA (iOS apps)/Frameworks for static analysis via dumpdecrypted.dylib:
  1. iOS: su mobile && mkdir -p ~/tmp && cd ~/tmp && DYLD_INSERT_LIBRARIES=/usr/lib/dumpdecrypted.dylib /var/containers/Bundle/Application/*/AppName.app/AppName
View system logs on iOS live using deviceconsole:
  1. macOS: deviceconsole
  2. macOS: unbuffer deviceconsole | grep something # keeps pretty colors- requiresexpect, can be installed viasudo port install expectorbrew install expect`
Electra: allow jailbroken Tweaks to appear in Settings:
  1. iOS: mv /Library/TweakInject /Library/TweakInject.bak && ln -s /Library/MobileSubstrate/DynamicLibraries /Library/TweakInject && killall -HUP SpringBoard

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

17 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

18 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

3 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago