{"id":2367,"date":"2011-05-09T08:21:30","date_gmt":"2011-05-08T22:21:30","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=2367"},"modified":"2011-05-09T08:21:30","modified_gmt":"2011-05-08T22:21:30","slug":"friendly-exploits","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2011\/05\/09\/friendly-exploits\/","title":{"rendered":"Friendly exploits"},"content":{"rendered":"<p>If you happen to be friends with me on Facebook you will have seen a bunch of rather strange updates from me last night. This all started with a tweet (that was also sent to Facebook) by a friend who joked about doing something with the &lt;MARQUEE&gt; tag (see\u00c2\u00a0<a href=\"http:\/\/www.angelfire.com\/super\/badwebs\/\">http:\/\/www.angelfire.com\/super\/badwebs\/<\/a> for an example of it and similar things). I saw the joke, as I was reading it through Gwibber or the Facebook website. However&#8230;. Leah saw text scrolling over the screen&#8230; just like the &lt;MARQUEE&gt; tag actually did.<\/p>\n<p>She was looking at it on her iPad using an app called Friendly.<\/p>\n<p>So I immediately posted a status update: &#8220;\u00ef\u00bb\u00bf\u00ef\u00bb\u00bf&lt;script lang=&#8221;javascript&#8221;&gt;alert(&#8220;pwned&#8221;);&lt;\/script&gt;&#8221;. This is a nice standard little test to see if you&#8217;ve managed to inject code into a web site. If this pops up a dialog box, you&#8217;ve made it.<\/p>\n<p>It didn&#8217;t work. It didn&#8217;t display anything&#8230; as if it was just not running the script tag. Disappointing. I <strong>soooo<\/strong> wanted it to break here.<\/p>\n<p>I did manage to do all sorts of other things in the Live Feed view though. I could use just about any other HTML tag&#8230; including forms. I couldn&#8217;t get a HTTP request to my server out of a HTML form in the Live Feed view&#8230; but once we did manage to crash Friendly (enough that it had to be force quit on the iPad).<\/p>\n<p>I posted a photo of me holding up the iPad to my laptop web cam to show off the basics:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-231622.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2368\" data-permalink=\"https:\/\/www.flamingspork.com\/blog\/2011\/05\/09\/friendly-exploits\/2011-05-08-231622\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-231622.jpg?fit=640%2C480&amp;ssl=1\" data-orig-size=\"640,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"2011-05-08-231622\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-231622.jpg?fit=584%2C438&amp;ssl=1\" class=\"aligncenter size-medium wp-image-2368\" title=\"2011-05-08-231622\" src=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-231622-300x225.jpg?resize=300%2C225\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-231622.jpg?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-231622.jpg?w=640&amp;ssl=1 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>And then one of what happened when I tried a HTML form (this wasn&#8217;t reproducible though&#8230; so kind of disappointing):<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-233659.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2369\" data-permalink=\"https:\/\/www.flamingspork.com\/blog\/2011\/05\/09\/friendly-exploits\/2011-05-08-233659\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-233659.jpg?fit=640%2C480&amp;ssl=1\" data-orig-size=\"640,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"2011-05-08-233659\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-233659.jpg?fit=584%2C438&amp;ssl=1\" class=\"aligncenter size-medium wp-image-2369\" title=\"2011-05-08-233659\" src=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-233659-300x225.jpg?resize=300%2C225\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-233659.jpg?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-233659.jpg?w=640&amp;ssl=1 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>What we did notice however was that HTML tags were parsed in comments on images too&#8230;. which made me wonder&#8230; It&#8217;s pretty easy to make a HTML form button that will do something&#8230; so I posted the same image again with a button that would say &#8220;Next&#8221; but would take you to a web page on one of my servers instead. It worked! I got a HTTP request! Neat! I could then present a HTML page that looked legit and do the standard things that one does to steal off you.<\/p>\n<p>But I wonder if scripts would work&#8230;. so I posted:<\/p>\n<div id=\"attachment_2370\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235247.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2370\" data-attachment-id=\"2370\" data-permalink=\"https:\/\/www.flamingspork.com\/blog\/2011\/05\/09\/friendly-exploits\/2011-05-08-235247\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235247.jpg?fit=640%2C480&amp;ssl=1\" data-orig-size=\"640,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"2011-05-08-235247\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Photos are proving more exploitable&amp;#8230;. &lt;script lang=&quot;javascript&quot;&gt;alert(&quot;pwned&quot;);&lt;\/script&gt;&lt;\/p&gt;\n\" data-large-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235247.jpg?fit=584%2C438&amp;ssl=1\" class=\"size-medium wp-image-2370\" title=\"2011-05-08-235247\" src=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235247-300x225.jpg?resize=300%2C225\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235247.jpg?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235247.jpg?w=640&amp;ssl=1 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-2370\" class=\"wp-caption-text\">Photos are proving more exploitable.... &lt;script lang=&quot;javascript&quot;&gt;alert(&quot;pwned&quot;);&lt;\/script&gt;<\/p><\/div>\n<p>and then clicked on the image on the iPad&#8230;&#8230;<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235426.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2371\" data-permalink=\"https:\/\/www.flamingspork.com\/blog\/2011\/05\/09\/friendly-exploits\/2011-05-08-235426\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235426.jpg?fit=640%2C480&amp;ssl=1\" data-orig-size=\"640,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"2011-05-08-235426\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235426.jpg?fit=584%2C438&amp;ssl=1\" class=\"aligncenter size-full wp-image-2371\" title=\"2011-05-08-235426\" src=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235426.jpg?resize=584%2C438\" alt=\"\" width=\"584\" height=\"438\" srcset=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235426.jpg?w=640&amp;ssl=1 640w, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/05\/2011-05-08-235426.jpg?resize=300%2C225&amp;ssl=1 300w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p>Gotcha!<\/p>\n<p>I could from here do anything I wanted.<\/p>\n<p>Next&#8230; I should probably report this to the developers&#8230;. or steal from my friends and make them post things to facebook implying improper relationships and general things that would get you fired.<\/p>\n<p>I went with the former&#8230; but the latter would have been fairly easy as the Facebook page for the app nicely tells me which of my friends use it. I could even target my attack!<\/p>\n<p>So I sent a warning message to friends (the 18 of them who use the Friendly app), sent a &#8220;contact the developer&#8221; message to the developers, sent out a warning on Twitter and went to bed.<\/p>\n<p>Got an email overnight back from the developer: &#8220;\u00ef\u00bb\u00bf\u00ef\u00bb\u00bfWe just pushed a server update that solves this issue.&#8221;<\/p>\n<p>Now&#8230; in my tcpdump while trying some of the earlier things I was just seeing https requests to facebook API servers from the iPad, but I don&#8217;t thing I looked too closely at images. I have no idea if they&#8217;ve actually fixed the holes and I don&#8217;t have an iPad to test it on. If you do, go try it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you happen to be friends with me on Facebook you will have seen a bunch of rather strange updates from me last night. This all started with a tweet (that was also sent to Facebook) by a friend who &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2011\/05\/09\/friendly-exploits\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[429,428,430,427,431,426],"class_list":["post-2367","post","type-post","status-publish","format-standard","hentry","category-general","tag-exploit","tag-friendly","tag-html","tag-ipad","tag-javascript","tag-security"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-Cb","jetpack-related-posts":[{"id":397,"url":"https:\/\/www.flamingspork.com\/blog\/2005\/04\/19\/andre-pang-on-csv-to-address-book\/","url_meta":{"origin":2367,"position":0},"title":"Andre Pang on CSV to Address Book","author":"Stewart Smith","date":"2005-04-19","format":false,"excerpt":"%u039Blgorithm.com.au: CSV to Address Book Importer Surely my OSX Address book VCF to Evo VCF perl script is more free software friendly. i think tihs may even be fixed now. i seem to recall a bugzilla mail recently. so maybe it's redundant! yay! move from the proprietry world of OSX\u2026","rel":"","context":"In &quot;life, the universe and everything&quot;","block_context":{"text":"life, the universe and everything","link":"https:\/\/www.flamingspork.com\/blog\/category\/life-the-universe-and-everything\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3137,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/07\/28\/finding-out-whats-next-at-barcampmel-2012-with-drizzle-sql-javascript-and-a-web-browser\/","url_meta":{"origin":2367,"position":1},"title":"Finding out What&#8217;s Next at BarCampMel 2012 with Drizzle, SQL, JavaScript and a web browser","author":"Stewart Smith","date":"2012-07-28","format":false,"excerpt":"Just for the pure insane fun of it, I accepted the challenge of \"what can you do with the text format of the schedule?\" for BarCampMel. I'm a database guy, so I wanted to load it into a database (which would be Drizzle), and I wanted it to be easy\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4850,"url":"https:\/\/www.flamingspork.com\/blog\/2023\/06\/25\/getting-your-photos-out-of-shotwell\/","url_meta":{"origin":2367,"position":2},"title":"Getting your photos out of Shotwell","author":"Stewart Smith","date":"2023-06-25","format":false,"excerpt":"Somewhat a while ago now, I wrote about how every time I return to write some software for the Mac, the preferred language has changed. The purpose of this adventure was to get my photos out of the aging Shotwell and onto my (then new) Mac and the Apple Photos\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2023\/06\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2023\/06\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2023\/06\/image.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2023\/06\/image.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":412,"url":"https:\/\/www.flamingspork.com\/blog\/2005\/05\/24\/comment-spam-protection\/","url_meta":{"origin":2367,"position":3},"title":"comment spam protection","author":"Stewart Smith","date":"2005-05-24","format":false,"excerpt":"hopefully this will help stop comment spam. using HashCash makes the client do a md5 of a string for each comment submitted. okay, so now you need javascript to comment on my blog. but frankly, that's better than me fighting urges to kill, torture and maime guilty people. (spammers, not\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4397,"url":"https:\/\/www.flamingspork.com\/blog\/2018\/08\/22\/pwnm-sync-synchronizing-patchwork-and-notmuch\/","url_meta":{"origin":2367,"position":4},"title":"pwnm-sync: Synchronizing Patchwork and Notmuch","author":"Stewart Smith","date":"2018-08-22","format":false,"excerpt":"One of the core bits of infrastructure I use as a maintainer is Patchwork (I wrote about making it faster recently). Patchwork tracks patches sent to a mailing list, allowing me as a maintainer to track the state of them (New|Under Review|Changes Requested|Accepted etc), combine them into patch bundles, look\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2018\/08\/Screenshot-from-2018-08-22-17-28-25-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":365,"url":"https:\/\/www.flamingspork.com\/blog\/2005\/02\/17\/only-18-bugs-for-memberdb-04\/","url_meta":{"origin":2367,"position":5},"title":"Only 18 bugs for MemberDB 0.4!","author":"Stewart Smith","date":"2005-02-17","format":false,"excerpt":"Yes \"only\" 18.... although the \"make installation procedure not suck\" has to be the most important. I'm very tempted to branch and make a 0.3.1 release the \"no, it really works this time\" release. mainly because there were still a few annoying bugs (being female could cause you trouble if\u2026","rel":"","context":"In &quot;linux-aus&quot;","block_context":{"text":"linux-aus","link":"https:\/\/www.flamingspork.com\/blog\/category\/linux-aus\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=2367"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2367\/revisions"}],"predecessor-version":[{"id":2372,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2367\/revisions\/2372"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=2367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=2367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=2367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}