IOS text messages are stored in/private/var/mobile/library/SMS. DB, which is a database in SQLite format. In addition, normal mobile users have the write permission. This makes text message forgery possible. After an hour of hard work, I finally forged a text message.
SMS. dB can be easily downloaded locally and viewed using SQLite browser. It can be found that there are three main tables, message stores the content of each text message, msg_group stores session-related information, group_member stores the participants of each session. Modify the message table decisively and obtain the error message. The read () function is not found.
What is read? I searched the internet and found that Apple had done some work in it. There are several triggers in the database. When you try to update/insert/delete entries in the message table, it calls a read () method to update the number of unread messages. This read () can be called normally only when an undisclosed function in the SDK is used for text message operations. Otherwise, the trigger cannot be executed normally and the changes to the database cannot be completed. (However, In the impression that SQLite trigger does not support external functions, it is not clear what the read () is. Please tell me if you know it)
Fortunately, this is not a problem for the CSER who has learned the database. It can be changed simply by dropping trigger into fail. I searched the internet and found that the original trigger has the function of maintaining data consistency. You can redefine them to simplify subsequent insertion.
After the trigger is redefined, you can modify the data table. It is easy to get the effect shown in the figure. However, because there is no read () function for maintenance of unread information, it seems that the number of unread messages is a bit problematic. Therefore, the current method is only applicable to short-term scams. If it is used for a long time, it is safer to use the trigger that comes with the system.
P.s. If you want to try it, please back up your iPhone in advance and break it into bricks. I am not responsible.