{"id":336350,"date":"2022-07-29T15:00:21","date_gmt":"2022-07-29T15:00:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=336350"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=336350","title":{"rendered":"<span>\u0410\u043d\u0430\u043b\u0438\u0437 iOS-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/80c\/258\/455\/80c258455c8e5c64cfbe2bcb3cb927cd.jpg\" width=\"1280\" height=\"713\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80c\/258\/455\/80c258455c8e5c64cfbe2bcb3cb927cd.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u0430\u0443\u0434\u0438\u0442 iOS-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e \u0441\u0430\u043c\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0438 \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438\u0437 <a href=\"https:\/\/habr.com\/ru\/company\/dsec\/blog\/581422\/\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0430\u0433\u0438, \u043a\u0430\u043a \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0438 \u043e\u0442 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u043d\u043e\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (SecureStorev1 \u0438 SecureStorev2), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/www.udemy.com\/course\/hacking-and-pentesting-ios-applications\/\">Hacking and Pentesting iOS Applications<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u0432\u0435\u0436\u0438\u043c (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442 07.2021) \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u041c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c:<\/p>\n<ol>\n<li>\n<p>\u041a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c Attack Surface \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435.<\/p>\n<\/li>\n<\/ol>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 Attack Surface<\/h2>\n<p>\u041f\u043e\u0434 &#171;Attack Surface&#187; \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/p>\n<p>\u041f\u043e \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 iOS \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0412 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f &#171;\u041d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445&#187;, \u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0433\u0434\u0435 \u0436\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u0430\u043a \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 <code>\/var\/mobile\/Containers\/Data\/Application\/<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><code>\/var\/mobile\/Containers\/Data\/Application\/&lt;Application ID><\/code><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0432\u0430\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 Bundle \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 Bundle \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e Bundle \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><code>\/private\/var\/containers\/Bundle\/Application\/&lt;Bundle ID><\/code><\/p>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c Application ID, Bundle ID \u0438 \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Objection (console way) \u0438\u043b\u0438 Grapefruit (GUI way), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c Attack Surface \u0438 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0435 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e USB.<\/p>\n<h3>Objection<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c Identifier \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (<em>SecureStorev1<\/em>). \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>frida-ps<\/em>:<\/p>\n<p><code>$ frida-ps -Uia<\/code><\/p>\n<p>\u0412 \u0432\u044b\u0432\u043e\u0434\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e Indentifier &#8212; <em>cst.securestorev1<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/636\/423\/a9a\/636423a9a58c7faa37ea59bfe6493022.png\" alt=\"Identifier \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" title=\"Identifier \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" width=\"998\" height=\"240\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/636\/423\/a9a\/636423a9a58c7faa37ea59bfe6493022.png\"\/><figcaption>Identifier \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Objection:<\/p>\n<p><code>$ objection -g 'cst.securestorev1' explore<\/code><\/p>\n<p>\u0418 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # env<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f62\/dc2\/654\/f62dc26548cdd7cf43a02c944fe13c79.png\" alt=\"Objection. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" title=\"Objection. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" width=\"1652\" height=\"804\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f62\/dc2\/654\/f62dc26548cdd7cf43a02c944fe13c79.png\"\/><figcaption>Objection. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<h3>Grapefruit<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Grapefruit \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <a href=\"http:\/\/127.0.0.1:31337\">http:\/\/127.0.0.1:31337<\/a>):<\/p>\n<p><code>$ igf<\/code><\/p>\n<p>\u0412 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448 \u0434\u0435\u0432\u0430\u0439\u0441 \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6d7\/e6a\/d71\/6d7e6ad71b81ee119e3d3703c69e4660.png\" alt=\"Grapefruit. \u041f\u0430\u043d\u0435\u043b\u044c\" title=\"Grapefruit. \u041f\u0430\u043d\u0435\u043b\u044c\" width=\"2890\" height=\"1294\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6d7\/e6a\/d71\/6d7e6ad71b81ee119e3d3703c69e4660.png\"\/><figcaption>Grapefruit. \u041f\u0430\u043d\u0435\u043b\u044c<\/figcaption><\/figure>\n<p>\u041f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/15e\/a9a\/de4\/15ea9ade4b27c20d3f01d041681f0d7e.png\" alt=\"Grapefruit. Securestorev1 Basic\" title=\"Grapefruit. Securestorev1 Basic\" width=\"1928\" height=\"1138\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/15e\/a9a\/de4\/15ea9ade4b27c20d3f01d041681f0d7e.png\"\/><figcaption>Grapefruit. Securestorev1 Basic<\/figcaption><\/figure>\n<p>\u0418\u0437 \u0443\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p><code>\/private\/var\/containers\/Bundle\/Application\/F4C38F12-B7C2-401B-A483-FBF7451A8FD3<\/code><\/p>\n<\/li>\n<li>\n<p><code>\/var\/mobile\/Containers\/Data\/Application\/03BB8F81-5684-438C-8021-CD40A5720F19<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a Objection, \u0442\u0430\u043a \u0438 Grapefruit \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e ssh. \u0422\u0430\u043a \u043a\u0430\u043a Grapefruit \u0438 \u0442\u0430\u043a \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Objection \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<h2>\u0418\u0449\u0435\u043c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438<\/h2>\n<h3>\u041d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, &#171;\u041d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445&#187; \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0417\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0445\u0440\u0430\u043d\u044f\u0442 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 Data Storage \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043c\u043f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439<br \/>\u0438\u0437 Attack Surface \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0442\u043e\u043c, \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c<br \/>\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 Data Storage \u043b\u0438\u0431\u043e \u0432 \u043b\u0430\u0439\u0432-\u0440\u0435\u0436\u0438\u043c\u0435, \u043b\u0438\u0431\u043e \u0441\u043d\u043e\u0432\u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u0430\u043c\u043f<\/p>\n<p>\u041d\u0430\u0439\u0442\u0438 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<h4>.plist-\u0444\u0430\u0439\u043b\u044b<\/h4>\n<p>\u0424\u0430\u0439\u043b\u044b plist \u2013  \u0444\u0430\u0439\u043b\u044b \u0441 XML-\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u042d\u0442\u043e<br \/>\u0441\u043f\u043e\u0441\u043e\u0431 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043b\u0430\u0434\u0443\u0442 \u0442\u0443\u0434\u0430<br \/>\u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0447\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 Attack Surface \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>find:<\/em><\/p>\n<p><code>iPhone $ find . -name '*.plist'<\/code><\/p>\n<p>\u041f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c .plist-\u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 <em>plutil <\/em>\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 <em>Objection<\/em>:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # ios plist cat &lt;filename><\/code><\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c <em>auth_token<\/em> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 <em>userdetails.plist<\/em>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f8e\/c7f\/7fd\/f8ec7f7fdbe433b4b7edb4bb45c3610b.png\" alt=\"auth_token \u0432 userdetails.plist\" title=\"auth_token \u0432 userdetails.plist\" width=\"2140\" height=\"590\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f8e\/c7f\/7fd\/f8ec7f7fdbe433b4b7edb4bb45c3610b.png\"\/><figcaption>auth_token \u0432 userdetails.plist<\/figcaption><\/figure>\n<h4>\u0424\u0430\u0439\u043b\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0414<\/h4>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435. \u0421\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0414 \u2013 \u044d\u0442\u043e SQLite \u0438\u043b\u0438 Realm, \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 Attack Surface:<\/p>\n<p><code>$ find . \\( -name \"*.db\" -o -name \"*.realm\" \\)<\/code><\/p>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0444\u0430\u0439\u043b <em>bankdetails.db<\/em>. Objection \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0411\u0414 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>sqlite connect<\/em>:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # sqlite connect bankdetails.db<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0444\u0430\u0439\u043b\u0443 \u0411\u0414 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 <code>?<\/code> \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/de4\/699\/419\/de46994196b7dd1994ec13e1d4c945bf.png\" width=\"1468\" height=\"1046\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de4\/699\/419\/de46994196b7dd1994ec13e1d4c945bf.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p><code>SQLite @ bankdetails.db > .tables<\/code><\/p>\n<p><code>SQLite @ bankdetails.db > select<\/code> <code>* from bankdetails<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/552\/0da\/348\/5520da34805887fef64788c63ffd7c9f.png\" width=\"2772\" height=\"828\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/552\/0da\/348\/5520da34805887fef64788c63ffd7c9f.png\"\/><figcaption><\/figcaption><\/figure>\n<h4>\u041a\u044d\u0448<\/h4>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u0440\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 iOS-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u043f\u0443\u0442\u0438:<\/p>\n<p><code>\/var\/mobile\/Containers\/Data\/Application\/&lt;Application ID>\/Library\/Caches\/&lt;Application Identifier><\/code><\/p>\n<p>\u041a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0430\u043a\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0414 \u0438, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0447\u0430\u0441\u0442\u043e \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u0422\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<\/p>\n<p>\u041a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u043c\u0441\u044f \u043a \u0444\u0430\u0439\u043b\u0443 <em>Caches.db<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/var\/mobile\/Containers\/Data\/Application\/03BB8F81-5684-438C-8021-CD40A5720F19\/Library\/Caches\/cst.securestorev1<\/code><\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # sqlite connect Cache.db<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dce\/4a5\/8cb\/dce4a58cbffdd989e5246b814a64a1ed.png\" width=\"2230\" height=\"382\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dce\/4a5\/8cb\/dce4a58cbffdd989e5246b814a64a1ed.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<p><code>SQLite @ bankdetails.db > .tables<\/code><\/p>\n<p><code>SQLite @ bankdetails.db > select<\/code> <code>* from cfurl_cache_receiver_data<\/code><\/p>\n<p><code>SQLite @ bankdetails.db > select<\/code> <code>* from cfurl_cache_response<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/32c\/af5\/571\/32caf5571618d46efa67ab589c05aec8.png\" width=\"2738\" height=\"1030\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/32c\/af5\/571\/32caf5571618d46efa67ab589c05aec8.png\"\/><figcaption><\/figcaption><\/figure>\n<h4>NSUserDefaults \u0438 Keychain<\/h4>\n<p>\u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 NSUserDefaults \u0438 Keychain.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 NSUserDefaults. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 Objection \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p><code># ios nsuserdefaults get<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u0432\u0438\u0434\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0442\u043e \u044d\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c\u044e. \u0412\u0441\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 Keychain, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u0430 \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 Keychain \u0447\u0435\u0440\u0435\u0437 Objection \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p><code># ios keychain dump --json &lt;output_filename><\/code><\/p>\n<h2>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0437\u0430\u0432\u044f\u0437\u0430\u043d \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u2013 \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0442.\u043a. \u043e\u0431\u043c\u0430\u043d\u0443\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430.<\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u043f\u0440\u043e \u0444\u0430\u0439\u043b <em>userdetails.plist<\/em>, auth_token \u0432 \u043d\u0435\u043c \u2013 \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 MD5. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u043c \u0437\u0430\u0448\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u043e\u0433\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (<em>securestore<\/em>) \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u044d\u0442\u043e:<\/p>\n<p><code>$ md5 -s securestore<\/code><\/p>\n<p><code>MD5 (\"securestore\") = 212174768840da1c6a1604c8b485a0ee<\/code><\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u043e\u0441\u044c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u043b\u043e\u0433\u0438\u043d \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (<em>attacker<\/em>).<\/p>\n<p>Objection \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0441 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # file download userdetails.plist<\/code><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>attacker <\/em>\u0432 MD5 \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b:<\/p>\n<p><code>$ md5 -s attacker<\/code><\/p>\n<p><code>MD5 (\"attacker\") = 3f858cf8cfd59f25010e71b6b5671428<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/637\/d5e\/93f\/637d5e93f9bb0419fc377b33687aa2ad.png\" width=\"1458\" height=\"420\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/637\/d5e\/93f\/637d5e93f9bb0419fc377b33687aa2ad.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0435\u0440\u0435\u0437 Objection \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # file upload userdetails.plist<\/code><\/p>\n<p>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0441\u043d\u043e\u0432\u0430, \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u0435\u0437 \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/48f\/019\/4ad\/48f0194adbd2e1ad08ddc1853cd47f8f.png\" width=\"334\" height=\"597\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/48f\/019\/4ad\/48f0194adbd2e1ad08ddc1853cd47f8f.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>Server-Side \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h2>\n<p>\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0441\u0443\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e API. \u0414\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 &#171;\u0440\u0443\u0447\u043a\u0438&#187;, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0438\u0431\u043e<br \/>\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0439\u0442\u0438\u0441\u044c \u0431\u0430\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0432 \u0432\u0435\u0431-\u0432\u0435\u0440\u0441\u0438\u0438, \u043b\u0438\u0431\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u0430\u044f<br \/>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0447\u0435\u0439\u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c<br \/>\u0446\u0435\u043f\u043e\u0447\u043a\u0438.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u043c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043a\u0430\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u043a\u0440\u0443\u0442\u043a\u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<h3>SQL Injection<\/h3>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a auth_token&#8217;\u0443. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0441\u0447\u0435\u0442\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b5f\/f3d\/806\/b5ff3d8067f691d887abe6e928fcd864.png\" width=\"2138\" height=\"574\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b5f\/f3d\/806\/b5ff3d8067f691d887abe6e928fcd864.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0438\u0440\u0443\u0435\u043c SQL Injection \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <em>attacker:<\/em><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/822\/fb5\/98a\/822fb598ac788c5e17f59a1dc2da853f.png\" width=\"2138\" height=\"574\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/822\/fb5\/98a\/822fb598ac788c5e17f59a1dc2da853f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <strong>SecureStorev2<\/strong> \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0444\u043b\u043e\u0443 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Frida.<\/p>\n<h3>SQL Injection via End-to-end encryption<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0441\u0447\u0435\u0442\u0435 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 token \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/302\/0e4\/702\/3020e47023bcb709a688754c9276886b.png\" width=\"2348\" height=\"564\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/302\/0e4\/702\/3020e47023bcb709a688754c9276886b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>frida-trace <\/em>\u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0441\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0432\u0430\u0439\u043b\u0434\u043a\u0430\u0440\u0434\u0430\u043c\u0438:<\/p>\n<p><code>$ frida-trace -U -m \"*[* *crypt*]\"<\/code> <code>-n SecureStorev2<\/code><\/p>\n<p>\u041d\u0430\u0448\u043b\u043e\u0441\u044c 388 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0442\u0430\u043a\u0436\u0435 frida-trace \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043f\u0430\u043f\u043a\u0435 <strong>handlers<\/strong>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/84c\/e6a\/555\/84ce6a55524cc34fa5b3986befb05344.png\" width=\"2880\" height=\"714\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/84c\/e6a\/555\/84ce6a55524cc34fa5b3986befb05344.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <em>securestore<\/em> \u0432\u0438\u0434\u0438\u043c \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 frida-trace, \u043a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f27\/85e\/83d\/f2785e83d12b1f71f99d5121d90b1df1.png\" width=\"1954\" height=\"484\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f27\/85e\/83d\/f2785e83d12b1f71f99d5121d90b1df1.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 AES256EncryptedDataUsingKey \u043a\u043b\u0430\u0441\u0441\u0430 NSData \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f frida \u0438 \u0441\u0434\u0430\u043c\u043f\u0438\u043c \u043a\u043b\u044e\u0447 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. <\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f frida \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"javascript\">if (ObjC.available) {   try {   var className = \"NSData\"; var funcName = \"- AES256EncryptedDataUsingKey:error:\"; var hook = eval('ObjC.classes.' + className + '[\"' + funcName + '\"]');   Interceptor.attach(hook.implementation, {       onEnter: function(args)     {     console.log(\"\\n[+] Class Name: \" + className);     console.log(\"[+] Method Name: \" + funcName);     var enc_key = new ObjC.Object(args[2]); \/\/ &lt;-- \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 Frida \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430     var buf = enc_key.bytes().readByteArray(enc_key.length());     console.log(\"[+] Encryption Key: \" + enc_key.toString());     console.log(\"[+] Encryption Key dump: \" + hexdump(buf, { ansi: true }));     },       onLeave: function(returnvalue)     {     console.log('Return Value: ');     }       });   } catch(error) {  console.log(\"[!] Exception: \" + error.message); } }   else {   console.log(\"Objective-C Runtime is not available!\");   }<\/code><\/pre>\n<p>\u0417\u0430\u0438\u043d\u0436\u0435\u043a\u0442\u0438\u043c\u0441\u044f \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<p><code>$ frida -U SecureStorev2 -l AES256EncryptedDataUsingKey.js<\/code><\/p>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u043c \u0441\u0447\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0438\u043c \u043a\u043b\u044e\u0447 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2cc\/08a\/e58\/2cc08ae5804ed209ce69e3dc12f84852.png\" alt=\"\" title=\"\" width=\"2558\" height=\"614\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2cc\/08a\/e58\/2cc08ae5804ed209ce69e3dc12f84852.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0430\u0441\u044c MD5-\u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u043b\u043e\u0433\u0438\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043b\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0435\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043e \u0441\u0434\u0430\u043c\u043f\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 python:<\/p>\n<pre><code class=\"python\">import Crypto import Crypto.Random from Crypto.Cipher import AES import base64 import sys     def pad_data(data):     if len(data) % 16 == 0:         return data     databytes = bytearray(data)     padding_required = 15 - (len(databytes) % 16)     databytes.extend(b'\\x80')     databytes.extend(b'\\x00' * padding_required)     return bytes(databytes)   def unpad_data(data):     if not data:         return data       data = data.rstrip(b'\\x00')     if data[-1] == 128:         return data[:-1]     else:         return data   def generate_aes_key():     rnd = '35e685a1411a605852ec1045ef7f16f10e68dc18bdc1f13fa240a6996edb306c'     rnd = rnd.decode('hex')     return rnd   def encrypt(key, iv, data):     aes = AES.new(key, AES.MODE_CBC, iv)     data = pad_data(data)     return aes.encrypt(data)   def decrypt(key, iv, data):     data = data.decode('base64')     aes = AES.new(key, AES.MODE_CBC, iv)     data = aes.decrypt(data)     return unpad_data(data)   def test_crypto (input):     key = generate_aes_key()     iv = '00000000000000000000000000000000'     iv = iv.decode('hex')     encoded = encrypt(key, iv, input)     return encoded   if __name__ == '__main__':     encrypted = test_crypto(sys.argv[1])     encrypted = encrypted.encode('base64')     print encrypted<\/code><\/pre>\n<pre><code class=\"bash\">$ python aesencrypt.py 212174768840da1c6a1604c8b485a0ee wk3eQ9tu9LM+eq3I0pzst1I191hWOa9f+dpmRBQ6kCU=<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0417\u043d\u0430\u0447\u0438\u0442, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 SQL Injection payload \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"bash\">$ python aesencrypt.py \"securestore' OR '1'='1\" R4Dc8atsDx7T5c488eIedqXpw76hcUtc\/d4Euvrre\/Y=<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2f1\/696\/26d\/2f169626d3823f1bb8be3e824fd18f34.png\" width=\"2146\" height=\"516\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2f1\/696\/26d\/2f169626d3823f1bb8be3e824fd18f34.png\"\/><figcaption><\/figcaption><\/figure>\n<hr\/>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u043a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c Attack Surface \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u0432 iOS-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b\u0438, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041d\u0430\u0434\u0435\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0442\u0435\u043c, \u043a\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0432\u043e\u0439 \u043f\u0443\u0442\u044c \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0441\u0442\u0430\u043d\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u043a\u0438\u043b\u043b\u043e\u0432 \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \ud83d\ude42<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/dsec\/blog\/675550\/\"> https:\/\/habr.com\/ru\/company\/dsec\/blog\/675550\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u0430\u0443\u0434\u0438\u0442 iOS-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e \u0441\u0430\u043c\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0438 \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438\u0437 <a href=\"https:\/\/habr.com\/ru\/company\/dsec\/blog\/581422\/\">\u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0433\u0434\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0430\u0433\u0438, \u043a\u0430\u043a \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0438 \u043e\u0442 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0433\u043b\u0443\u0431\u043b\u0435\u043d\u043d\u043e\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (SecureStorev1 \u0438 SecureStorev2), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u043a\u0443\u0440\u0441\u0430 <a href=\"https:\/\/www.udemy.com\/course\/hacking-and-pentesting-ios-applications\/\">Hacking and Pentesting iOS Applications<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u0432\u0435\u0436\u0438\u043c (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0442 07.2021) \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>\u041c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c:<\/p>\n<ol>\n<li>\n<p>\u041a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c Attack Surface \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435.<\/p>\n<\/li>\n<\/ol>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 Attack Surface<\/h2>\n<p>\u041f\u043e\u0434 &#171;Attack Surface&#187; \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/p>\n<p>\u041f\u043e \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 iOS \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0412 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f &#171;\u041d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445&#187;, \u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0433\u0434\u0435 \u0436\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u0430\u043a \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 <code>\/var\/mobile\/Containers\/Data\/Application\/<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u044b, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><code>\/var\/mobile\/Containers\/Data\/Application\/&lt;Application ID><\/code><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0432\u0430\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 Bundle \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 Bundle \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u043a\u043e\u0434, \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e Bundle \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><code>\/private\/var\/containers\/Bundle\/Application\/&lt;Bundle ID><\/code><\/p>\n<p>\u0423\u0437\u043d\u0430\u0442\u044c Application ID, Bundle ID \u0438 \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0443\u0442\u0438 \u0434\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Objection (console way) \u0438\u043b\u0438 Grapefruit (GUI way), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c Attack Surface \u0438 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0435 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e USB.<\/p>\n<h3>Objection<\/h3>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c Identifier \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (<em>SecureStorev1<\/em>). \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>frida-ps<\/em>:<\/p>\n<p><code>$ frida-ps -Uia<\/code><\/p>\n<p>\u0412 \u0432\u044b\u0432\u043e\u0434\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e Indentifier &#8212; <em>cst.securestorev1<\/em><\/p>\n<figure class=\"full-width\"><figcaption>Identifier \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Objection:<\/p>\n<p><code>$ objection -g 'cst.securestorev1' explore<\/code><\/p>\n<p>\u0418 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # env<\/code><\/p>\n<figure class=\"full-width\"><figcaption>Objection. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<h3>Grapefruit<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Grapefruit \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <a href=\"http:\/\/127.0.0.1:31337\">http:\/\/127.0.0.1:31337<\/a>):<\/p>\n<p><code>$ igf<\/code><\/p>\n<p>\u0412 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0448 \u0434\u0435\u0432\u0430\u0439\u0441 \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<figure class=\"full-width\"><figcaption>Grapefruit. \u041f\u0430\u043d\u0435\u043b\u044c<\/figcaption><\/figure>\n<p>\u041f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<\/p>\n<figure class=\"full-width\"><figcaption>Grapefruit. Securestorev1 Basic<\/figcaption><\/figure>\n<p>\u0418\u0437 \u0443\u0432\u0438\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043f\u043e\u0438\u0441\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p><code>\/private\/var\/containers\/Bundle\/Application\/F4C38F12-B7C2-401B-A483-FBF7451A8FD3<\/code><\/p>\n<\/li>\n<li>\n<p><code>\/var\/mobile\/Containers\/Data\/Application\/03BB8F81-5684-438C-8021-CD40A5720F19<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a Objection, \u0442\u0430\u043a \u0438 Grapefruit \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e ssh. \u0422\u0430\u043a \u043a\u0430\u043a Grapefruit \u0438 \u0442\u0430\u043a \u0438\u043c\u0435\u0435\u0442 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f Objection \u0434\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<h2>\u0418\u0449\u0435\u043c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438<\/h2>\n<h3>\u041d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041a\u0430\u043a \u0438 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435, &#171;\u041d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445&#187; \u2013 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0417\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0445\u0440\u0430\u043d\u044f\u0442 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 Data Storage \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043c\u043f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439<br \/>\u0438\u0437 Attack Surface \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0442\u043e\u043c, \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c<br \/>\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 Data Storage \u043b\u0438\u0431\u043e \u0432 \u043b\u0430\u0439\u0432-\u0440\u0435\u0436\u0438\u043c\u0435, \u043b\u0438\u0431\u043e \u0441\u043d\u043e\u0432\u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u0430\u043c\u043f<\/p>\n<p>\u041d\u0430\u0439\u0442\u0438 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<h4>.plist-\u0444\u0430\u0439\u043b\u044b<\/h4>\n<p>\u0424\u0430\u0439\u043b\u044b plist \u2013  \u0444\u0430\u0439\u043b\u044b \u0441 XML-\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u042d\u0442\u043e<br \/>\u0441\u043f\u043e\u0441\u043e\u0431 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043b\u0430\u0434\u0443\u0442 \u0442\u0443\u0434\u0430<br \/>\u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0447\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 Attack Surface \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>find:<\/em><\/p>\n<p><code>iPhone $ find . -name '*.plist'<\/code><\/p>\n<p>\u041f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c .plist-\u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 <em>plutil <\/em>\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 <em>Objection<\/em>:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # ios plist cat &lt;filename><\/code><\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c <em>auth_token<\/em> \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 <em>userdetails.plist<\/em>:<\/p>\n<figure class=\"full-width\"><figcaption>auth_token \u0432 userdetails.plist<\/figcaption><\/figure>\n<h4>\u0424\u0430\u0439\u043b\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0414<\/h4>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2013 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435. \u0421\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0414 \u2013 \u044d\u0442\u043e SQLite \u0438\u043b\u0438 Realm, \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 Attack Surface:<\/p>\n<p><code>$ find . \\( -name \"*.db\" -o -name \"*.realm\" \\)<\/code><\/p>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0444\u0430\u0439\u043b <em>bankdetails.db<\/em>. Objection \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0411\u0414 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>sqlite connect<\/em>:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # sqlite connect bankdetails.db<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0444\u0430\u0439\u043b\u0443 \u0411\u0414 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 <code>?<\/code> \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<p><code>SQLite @ bankdetails.db > .tables<\/code><\/p>\n<p><code>SQLite @ bankdetails.db > select<\/code> <code>* from bankdetails<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h4>\u041a\u044d\u0448<\/h4>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u0440\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 iOS-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u043f\u0443\u0442\u0438:<\/p>\n<p><code>\/var\/mobile\/Containers\/Data\/Application\/&lt;Application ID>\/Library\/Caches\/&lt;Application Identifier><\/code><\/p>\n<p>\u041a\u044d\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0430\u043a\u0436\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0411\u0414 \u0438, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0447\u0430\u0441\u0442\u043e \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u0422\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<\/p>\n<p>\u041a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u043c\u0441\u044f \u043a \u0444\u0430\u0439\u043b\u0443 <em>Caches.db<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>\/var\/mobile\/Containers\/Data\/Application\/03BB8F81-5684-438C-8021-CD40A5720F19\/Library\/Caches\/cst.securestorev1<\/code><\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # sqlite connect Cache.db<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u043b\u0438\u0441\u0442\u0438\u043d\u0433 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438 \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<p><code>SQLite @ bankdetails.db > .tables<\/code><\/p>\n<p><code>SQLite @ bankdetails.db > select<\/code> <code>* from cfurl_cache_receiver_data<\/code><\/p>\n<p><code>SQLite @ bankdetails.db > select<\/code> <code>* from cfurl_cache_response<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h4>NSUserDefaults \u0438 Keychain<\/h4>\n<p>\u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 NSUserDefaults \u0438 Keychain.<\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 NSUserDefaults. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 Objection \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p><code># ios nsuserdefaults get<\/code><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u0432\u0438\u0434\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0442\u043e \u044d\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c\u044e. \u0412\u0441\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 Keychain, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u0430 \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 Keychain \u0447\u0435\u0440\u0435\u0437 Objection \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p><code># ios keychain dump --json &lt;output_filename><\/code><\/p>\n<h2>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0437\u0430\u0432\u044f\u0437\u0430\u043d \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445 \u2013 \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0442.\u043a. \u043e\u0431\u043c\u0430\u043d\u0443\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430.<\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u043f\u0440\u043e \u0444\u0430\u0439\u043b <em>userdetails.plist<\/em>, auth_token \u0432 \u043d\u0435\u043c \u2013 \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 MD5. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u043c \u0437\u0430\u0448\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u043e\u0433\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (<em>securestore<\/em>) \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u044d\u0442\u043e:<\/p>\n<p><code>$ md5 -s securestore<\/code><\/p>\n<p><code>MD5 (\"securestore\") = 212174768840da1c6a1604c8b485a0ee<\/code><\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u043e\u0441\u044c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u043b\u043e\u0433\u0438\u043d \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (<em>attacker<\/em>).<\/p>\n<p>Objection \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0441 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # file download userdetails.plist<\/code><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>attacker <\/em>\u0432 MD5 \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b:<\/p>\n<p><code>$ md5 -s attacker<\/code><\/p>\n<p><code>MD5 (\"attacker\") = 3f858cf8cfd59f25010e71b6b5671428<\/code><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0427\u0435\u0440\u0435\u0437 Objection \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e:<\/p>\n<p><code>cst.securestorev1 on (iPhone: 14.7.1) [usb] # file upload userdetails.plist<\/code><\/p>\n<p>\u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0441\u043d\u043e\u0432\u0430, \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0431\u0435\u0437 \u0437\u043d\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u043e\u043b\u044f:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>Server-Side \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h2>\n<p>\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0441\u0443\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e API. \u0414\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 &#171;\u0440\u0443\u0447\u043a\u0438&#187;, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0438\u0431\u043e<br \/>\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0439\u0442\u0438\u0441\u044c \u0431\u0430\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0432 \u0432\u0435\u0431-\u0432\u0435\u0440\u0441\u0438\u0438, \u043b\u0438\u0431\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u0430\u044f<br \/>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0447\u0435\u0439\u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c<br \/>\u0446\u0435\u043f\u043e\u0447\u043a\u0438.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u043d\u0443 \u0438\u0437 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u043c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043a\u0430\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0441\u043a\u0440\u0443\u0442\u043a\u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<h3>SQL Injection<\/h3>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a auth_token&#8217;\u0443. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0441\u0447\u0435\u0442\u0435:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u042d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0438\u0440\u0443\u0435\u043c SQL Injection \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <em>attacker:<\/em><\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <strong>SecureStorev2<\/strong> \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0444\u043b\u043e\u0443 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Frida.<\/p>\n<h3>SQL Injection via End-to-end encryption<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u0441\u0447\u0435\u0442\u0435 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 token \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <em>frida-trace <\/em>\u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0441\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u0432\u0430\u0439\u043b\u0434\u043a\u0430\u0440\u0434\u0430\u043c\u0438:<\/p>\n<p><code>$ frida-trace -U -m \"*[* *crypt*]\"<\/code> <code>-n SecureStorev2<\/code><\/p>\n<p>\u041d\u0430\u0448\u043b\u043e\u0441\u044c 388 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0442\u0430\u043a\u0436\u0435 frida-trace \u0441\u043e\u0437\u0434\u0430\u043b\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u043f\u0430\u043f\u043a\u0435 <strong>handlers<\/strong>:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <em>securestore<\/em> \u0432\u0438\u0434\u0438\u043c \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430 frida-trace, \u043a\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 AES256EncryptedDataUsingKey \u043a\u043b\u0430\u0441\u0441\u0430 NSData \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f frida \u0438 \u0441\u0434\u0430\u043c\u043f\u0438\u043c \u043a\u043b\u044e\u0447 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. <\/p>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f frida \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"javascript\">if (ObjC.available) {   try {   var className = \"NSData\"; var funcName = \"- AES256EncryptedDataUsingKey:error:\"; var hook = eval('ObjC.classes.' + className + '[\"' + funcName + '\"]');   Interceptor.attach(hook.implementation, {       onEnter: function(args)     {<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-336350","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336350"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/336350\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}