Facebook Embedding Flaw: Allowing users to embed swfs [TH]
Embedding Flash on Facebook
หลายๆคนน่าจะเคยลองโพสลิ้งyoutube,vimeoหรืออะไรต่างๆ จะพบว่าfacebookจะดึงข้อมูลจากหน้ายูทุปนั้น แล้วสร้างลิ้ง พร้อมรูปภาพและปุ่มPlayพอกดPlayคลิปก็จะรันผ่านvideo playerของยูทูป
facebookอนุญาตให้เราสามารถใช้og metadataมาระบุself-hosted objectsต่างๆ ซึ่งยูทูปก็น่าจะใช้เทคนิคนี้หรืออะไรประมารนี้ในการembed playerของยูทูปในfacebook (ไม่รู้ว่าเฟสบุคเขียนให้ยูทุปหรือยังไง)
เอาเป็นว่าเราสามารถใช้หลักการเดียวกันในการembed flashอะไรก็ได้ในเฟสบุค เช่นgame .swf etc มันจะดูเหมือนว่าเราโพสลิ้งวิดีโอ จะมีปุ่มplayให้เหมือนยูทูป แต่พอกดplayแถนที่จะไปรันวิดีโอจะทำการรันไฟล์flashของเราแถน (typeอื่นๆยังไม่ได้ลอง)
การใช้OG Metadata facebookบังคุบว่าต้องมี requirement 5อย่างนี้
og:type, og:url og:title, og:image,fb:app_id
อ่านเพิ่มเติมได้ที่
https://developers.facebook.com/docs/opengraph/
หลักการก็ไม่มีอะไรมาก สร้างเว็ปเพจลิ้งและทำการลิ้งโดเมนกับapp
สิ่งที่เราต้องทำก็คือหลอกว่าไฟล์เราเป็นvideoนั้นเอง
ปกติพอจะให้facebook ดึงvideo playerเรามาdisplayก็แค่ระบุประมารนี้
<meta property=”og:video” content=”http://localhost/?url=blah.mp4″>
อย่างที่บอกไปก่อนหน้านี้facebookอนุญาต ให้เราembed custom video playerเพื่อที่จะมารันvideo เลยallowให้เราใช้file typeให้เป็นflashได้ ซึ่งไม่กันอะไรเลย แถนที่จะใส่video playerเราก็ใส่ไฟล์flashของเราเข้าไปตามนี้
<meta property=”og:video” content=”https://dl.dropboxusercontent.com/u/206457679/boxhead2play.swf“>
<meta property=”og:video:type” content=”application/x-shockwave-flash”>
<meta property=”og:video:width” content=”800″>
<meta property=”og:video:height” content=”500″>
ทีนี้พอเราshare linkที่โฮสหน้านี้ เฟสบุคก็จะทำการdisplayเหมือนดูvideoธรรมดา พอกดplay flashเราก็จะถูกรันนั้นเอง
สำหรับใครสงสัยหลักการscrape dataของfacebookสามารถใช้toolตัวนี้ได้ในการเช็ค
https://developers.facebook.com/tools/debug
ตัวอย่างsource
http://pastebin.com/iz6mhx1B
Post from:
https://www.facebook.com/groups/2600Thailand/permalink/222781854548517/
Jeban.com Sql Injection
Post XSS on Adobe.com
This was reported on October 20 2012
The first response i received was:
Hi there Anakorn, Thank you very much for the report and proof-of-concept file. We are looking into it now, and will let you know if we have any questions. In the meantime, we ask that you do not publicly disclose this potential issue, in order to protect Adobe's customers. This has been assigned the Adobe tracking number 1398. We appreciate your discretion and cooperation. Please let us know if you have any questions. Thank you again, Tasha Adobe Product Security Incident Response Team
I did not received any response after that from the adobe team. I rechecked it again recently and found out that the url no longer exists.
Vuln url:https://www.adobe.com/cfusion/mmform/index.cfm?name=edu_rfi&promoid=KAZIX
Simply insert an xss payload “><script>alert(1)</script> in the First name,last name textbox, etc
What is weird is that it seems like it is fixed now but i never received any more info about it from adobe.
Facebook Photo.php User-Spoofing Vulnerablity [TH]
ก่อนหน้านี้โพสไปแล้วทีหนึ่งแล้วลบออกเพราะกะจะรอต่อดู แต่สรุปวันนี้ได้รับเมลconfirmแล้วว่าไม่ผ่าน “it does not appear to be a significant security risk.” เลยโพสใหม่สำหรับใครที่ยังไม่ได้อ่าน
ถึงแม้มันอาจจะไม่อันตรายเท่าไร แต่ผมมองว่ามันสามารถเอามาทำphishingหรือแกล้งคนที่ไม่รู้ หรือdefameคนได้ดีพอสมควร
ไฟล์ photo.php ในfacebook จะมีparameterหนึ่งชื่อว่า set ปกติจะเห็นตอนเปิดภาพหรือวิดีโอ photo.php?fbid=123&set=123123
valueของparameterนิจะมีcharนำต้น เช่น a. t. อะไรก็ว่าไป
ซึ่งถ้าเราทำการเปลี่ยนvalueพวกนี้ เราก็จะสามรถเปลีย่นพวกลิ้งBack To Album, Album Nameในหน้านั้นได้
charนำต้น (อาจจะมีอีก)
a. – น่าจะเป็นalbum
t. – timeline (ต้องอยู่ในfriendlistถึงเรียกได้)
pb. – photo stream
gm. – postในกลุ่ม
vb – video
ตัวอย่าง
https://www.facebook.com/photo.php?fbid=169099303296011&set=pb.4
จะสังเกตุได้ว่าชื่อalbumจะเขียนว่า Mark Zuckerberg’s Photoและลิ้งBack To Albumจะลิ้งไปphoto streamของmark zuckerbergในที่นี้ผมแค่อัพภาพหนึ่งขึ้นมาในเพจผมอันหนึ่งแล้วทำการเปลี่ยนค่าของset ให้เป้นpb.4 4ก็คือidของพี่มาคนั้นเอง ถ้าเปลี่ยนเป็นt.4 ก็จะเด้งไปtimeline (ถ้าจะใช้tต้องอยู่ในfriendlistของยูเซอนั้น) (สามารถเอาไอดีfbได้ผ่านgraph api)
note: ปกติพอเปลี่ยนชื่อเจ้าของรูป ชื่อจิงจะยังโชอยู่ใต้รูป ในลิ้งผมจะไม่เห็น ผมใช้หลักการbypass name checkของเฟสบุคและสร้างเพจขึ้นมาแบบไม่มีชื่อ
เพิ่ม
ไฟล์photo.phpนี้แปลกพอสมควรมีparameterอะไรแปลกๆเยอะอยู่ เช่นเราสามารถเรียกcrop imageขึ้นมาผ่าน makeprofile=1&makeuserprofile=1และอื่นๆ ลองหากันดูครับ
https://www.facebook.com/groups/2600Thailand/permalink/221691717990864/
WordPress 3.6 Post/Media/Pages User-Forging
This works for post,media and pages. This bug will allow normal users to forge their identity and create a post/media/pages as other users.
Based on our research so far, this allows for a user to post as another user, but this means that A) they must already be allowed to publish content, and B) they then lose the ability to edit that post. This of course is bad when you start to consider the possibility of a compromised account, or when combined with some other vulnerability or workflow that allows for an untrusted person to publish a post. It could also be dangerous on multisite, as any user on the network can be forged. – A response from WordPress
Tested on Windows 7 and Backtrack Linux.
Browsers: Firefox
Firefox Plugin uses: Tamper Data
Wordpress Version: 3.6 Latest Version
POC
Forging your post/media/pages
Post User-Forging (users must have the permission to make posts) Tested with author permission
1) Add new post or edit an old post
2) Before you press submit or update. Open up tamper data and start tampering.
3) Press submit / update in wordpress
4) Change the value of these following parameters
user_ID, post_author
to make an admin post clearly type in 1 for the value of these parameters
5) Submit
6) You should now see that the owner of the userid you inputted earlier made the post you just made.
Media User-forging (You will need any account with a permission to create media files)
1) First add a new media file
2) Edit the media file
3) Press update
4) Tamper the data just like before
5) Change the value of these following parameters
user_ID, post_author
to make an admin post clearly type in 1 for the value of these parameters
6) Submit
7) You should now see that the owner of the userid you inputted earlier created the media file
Pages User-forging
1) Same concept
Vulnerable File:
wp-admin/includes/post.php
Vulnerable Code/Line:
if ( !isset($post_data[‘user_ID’]) )
$post_data[‘user_ID’] = $GLOBALS[‘user_ID’];
http://core.trac.wordpress.org/changeset/25316
http://wordpress.org/news/2013/09/wordpress-3-6-1/
test
test
XSS Exploiting via Old Browsers Flaw on Pinterest.com
The flaw is an Image XSS using the JavaScript directive affecting the following browsers
[IE7.0|IE6.0|NS8.1-IE] [NS8.1-G|FF2.0] [O9.02].
Although new browsers have already patched this issue, it is still a security flaw.
According to a research here http://www.ie6countdown.com/
6.1% of the world’s population still uses IE6
22.2% of population in china also still uses IE6
The reflected xss is located here
pinterest.com/pin/create/button/?&media=javascript:alert(1)
The value of the parameter ‘media’ will be inserted into the img src.
<img src="javascript:alert(1)" class="pinPreviewImg" style="">
Hence javascript will be executed
Freelancer.com Stored XSS
On the 8th of August 2013, I reported a persistent cross site scripting vulnerability on freelancer.com
The bug is located in the picture upload function of the site. Attackers can basically create an image file with the attacking vectors. For eg, renaming a normal png file to <img src=”” onerror=”javascript:alert(1)”>.png and just uploading it to the site. The site will echo out the name of the image, thus javascript will be executed.
The bug was fixed on 27/08/2013
Freelancer.com Bug bounty program includes:
1) A freelancer.com t-shirt.
2) Listed on the site Hall of Fame. – http://www.freelancer.com/info/security-hall-of-fame.php
3) A whitehat hacker badge for your freelancer’s profile. -http://www.freelancer.com/u/wuming69.html
Freelancer.com Global Rank: 534