Chapter 10 Practice 4: Detect And Send iMessages
10.1 iMessage
iMessage is an IM service that Apple implements seamlessly into the stock Messages App
(hereafter referrered to as MobileSMS). It was born in iOS 5 and became better ever since.
Whether it’s plain text, image, audio, or even video, iMessage can handle them with high speed,
security and efficiency. We all love iMessage!
Among all functions of iMessage, detecting if an address supports iMessage, and sending an
iMessage are 2 most interesting functions without doubt. Surprisingly, there are even companies
that make profit from sending spam iMessages, and that’s one of the main reasons that I
developed the Cydia tweak “SMSNinja”. You can’t understand how to defense without knowing
how to attack. In this chapter, we will combine all knowledge points we’ve studied by far and
start from scratch to reverse the functions of detecting and sending iMessages, as sublimation of
the book. All the following operations are finished on iPhone 5, iOS 8.1.
10.2 Detect if a number or email address supports iMessage
As usual, before using tools to start reverse engineering, let’s analyze the abstract target and
concretize it, then form the idea and carry it out.
10.2.1 Observe MobileSMS and look for cut-in points
As MobileSMS users, we will notice that during the process of sending a message, Apple will
show us if we’re currently sending an SMS or iMessage through the changes of texts and colors,
say:
-^ When you start to compose a message by just finishing recipient’s address without entering the
message body, if iOS detects that the address is iMessage supportive, the placeholder will change
from “Text Message” to “iMessage”, as shown in figure 10-1.
10