Clickjacking in Firefox Hello


Clickjacking, the art of tricking users into clicking on links or buttons that no sane person would ever click on. But how much damage can you do by stealing a few clicks? We are in 2015, we might think that this kind of vulnerabilities would have been solved by now. But that’s not the case.

Firefox Hello

Recently Mozilla launched Firefox Hello, their free service for video and voice conversations online. After a few tests, I noticed that hello.firefox.com website does not prevent framing.
I also noticed that to invite a friend to a conversation, one must send him a link like
https://hello.firefox.com/conversationToken . The friend will have to:
1. access the link;
2. click on the “Join the conversation” button;
3. allow hello.firefox.com to use the camera and microphone.
Chances are that a person who uses hello.firefox.com a lot will allow the website to use his microphone and camera anytime, so he won’t have to go through step 3 every time. The problem is that https://hello.firefox.com/conversationToken can be loaded into an iframe and the second step can be bypassed by clickjacking. In these conditions, an attacker could gain access to a victim’s camera and microphone by using only the trust that the victim has in hello.firefox.com (the trust to give this website access to its camera and microphone anytime).

Step-by-step attack scenario

1. Brandon is the attacker, an evil person. Andreea is the target, a person that uses hello.firefox.com to chat with her friends and is naive enough to trust the website by allowing it to access the camera and microphone anytime;
2. Brandon creates a conversation on hello.firefox.com and obtains a link to invite his “friends” to chat: https://hello.firefox.com/HxfymOMuLX4 ;
3. Brandon integrates the link into a clickjacking attack. He is not a very skilled programmer, but he manages to obtain a working example that he uploads to hiswebsite ;
4. Using facebook or whatever, Brandon sends the above link to George because “he wants to show him a cute kitten”;
5. Andreea visits the target website because she loves kittens. While wishing very much that she’d be able to pet that wonder, she makes one simple click anywhere on the page (left-click, nothing special);
6. Because the “Join the conversation” button fromhttps://hello.firefox.com/HxfymOMuLX4 was positioned under the mouse and Andreea allowed hello.firefox.com to use her camera and microphone anytime, now Brandon has access to his target’s microphone and camera. Good job Brandon!
7. Andreea might notice that her camera and microphone are used, but it is still too late: probably a picture with her leaked to who-knows-who. And she was wearing her favorite pokemon t-shirt. Oh God. If she hasn’t noticed that she is recorded… I don’t want to think about this!

<html>
<head>
<title>Security Cat</title>
<script>
document.addEventListener('mousemove', function(e){
document.getElementById('click').style.left = e.clientX || e.pageX;
document.getElementById('click').style.top = e.clientY || e.pageY
}, false);
</script>
</head>
<body style="margin:0px;padding:0px;overflow:hidden">
<img src="http://www.nose2tail.co.uk/cat-matlock-derbyshire.jpg" />
<iframe id="click" frameborder="0" scrolling="no" style="overflow:none;height:30px;width:120px;opacity:0
;position:absolute;top:0px;left:0px;margin-top:-15px;margin-left:-75px
"
src='https://hello.firefox.com/HxfymOMuLX4'>
</iframe>
</body>
</html>

Bug report

I’ve reported this vulnerability to Mozilla and they acted great about it. In about 24 hours they acknowledged the problem, came out with a fix, tested it and pushed it into production. From my experience with bug reports, I can say that solving a newly reported bug in this time frame is the absolute record. Way to go guys!
Oh, and they were kind enough to acknowledge the bug with a rather huge bounty. Thank you!




تابع القراءة ←

HACKERONE USERNAME CHANGE EXPLOIT |SOCIAL ENGINEERING|



in this write up I will be explaining the exploit method that I used to perform an unauthorized username change on any Hackerone account. It was an internal system flaw without any email verification which allowed me to carry out the successful attack.





As we all know that Hackerone is one of them best and most controversial Managed bug bounty program website on the internet. And everyday researchers from all around the world test their custom exploit on the corporate applications that are sponsored by Vendors and companies.

Does Social Engineering count?

It is often seen that web application vendors and companies do not educate their employees and staff regarding social engineering attacks. Most of the time policies are not defined to counter the situations. Similarly due to a simple flaw in the Hackerone internal flow I was able to discover a way to change the username of any account on Hackerone.

How Hackerone handled Username Changes?

For all those who have been using Hackerone for a few months must know that Hackerone had a email request mechanism to change the Usernames of profiles. For example if a User had to change his username. He would have to email at support@hackerone.com to generate the email change request, which would be reviewed and then he would be granted a new username

How Hackerone email verification system failed and Exploit?

Basically Hackerone guys email process flow was the cause of this whole attack. The exploit scenario was very simple. The Hackerone email management system had no verification, which was due to two reasons.
  •  From which address the email change request was being generated.
  •  The address that is requesting the email change is associated with the account or not.
    So generating an attack scenario out of this was relatively easy
  • Victim has an account victim@gmail.com with the username victim
  • Attacker mails from attacker@gmail.com to change the username of the account (Usernames are visible to everyone on Hackerone)
  • Attacker confirms the change from his own email without any prompt to the original user
    And the username is changed.
    I created two emails and made attached one with a Hackerone account with the username: yhunterz
    I carried out the exploit from the other test email which was not associated with the email that had the username because I had a gut feeling that the system does not verify the email of the Username change request.

Social Engineering Email

As expected I was not asked for any confirmation or my email address was checked to be valid for the Username change. Just a verbal confirmation .


And within a time span of 24 hours the Username was changed.
I reported the issue to hackerone just after completing the procedure and carrying out the exploit. And they were very quick to define policies in their email management system to check for associated email address as a patch for the issue.


For the issue they rewarded me a considerable amount as a reward and a place in their eternal hall of fame. I am thankful to hackerone for this honor and I continuously look for issues to report to them that help in enhancement of their security controls.
Do post your comments about this Writeup. And provide suggestions for our next write-ups from our Advisories page.
Until the next writeup. Stay safe and Hack ON!
تابع القراءة ←

Account Takeover Using Password Reset Vulnerability

Account Takeover Using Password Reset Functionality
---------------------------------------

While researching and working on bug bounties I have found that by using Password Reset Functionality, Token & Link we can Takeover all the users account of a website if that site is vulnerable to this type of attack.

Using this vulnerability the attacker can modify the email md5 hash to any victims email md5 hash to change their password and in this way he can also reset all passwords of all the accounts and can successfully compromise the victims account as the password reset link sent to the user includes the email address md5 hash and also the password reset token can be used for other users. 


Steps to Execute the Attack:

There was a precondition that an attacker shall now the victims email id md5 hash value.

Attackers Email ID: attackeremailid@gmail.com and his password reset link:


http://testsite.com/reset-password/74o4s384549484c4k4v506t4d5a3e5n5k444j4g5j4o4c553l454h464m474/74q55426l4q5u5m5c4s5l5m5n5t2102fadb4bd021805624f06ea4c8e4d38


The 1st part in the password reset Url before '/' is password reset token and the second part is the md5 hash of the users email id in which the 1st 28 values (74q55426l4q5u5m5c4s5l5m5n5t2) are same for each users email ids and the remaining last values were different for each users email id as they were the users email id md5 hash value. So, the attacker can decrypt the email hash values easily using the online available md5 encrypters and decrypters like: http://md5decryption.com also sometimes some websites use base 64 encoding(or other encodings) which can also be easily decrypted using the online available base64 encoders and decoders like: http://ostermiller.org/calc/encode.html.


Attackers Email ID: attackeremailid@gmail.com md5 hash value:
102fadb4bd021805624f06ea4c8e4d38


Victims Email ID: victimemailid@gmail.com md5 hash value:
05ebb8fb6ec39f50d33e19cd5719084d


1st 28 values which is same for each users email id hash:
74q55426l4q5u5m5c4s5l5m5n5t2


Crafted Url to Reset the password of the Victims Email ID(i.e account)victimemailid@gmail.com:

http://testsite.com/reset-
password/74o4s384549484c4k4v506t4d5a3e5n5k444j4g5j4o4c553l454h464m474/74q55426l4q5u5m5c4s5l5m5n5t205ebb8fb6ec39f50d33e19cd5719084d

So in this way the attacker can Takeover on any users account.
                                       

Impact: 

The token generated for the activation link isn’t re-checked and no validation is done for associated emailID field, allowing an attacker to change the value to a known email address md5 hash value and reset their password. This provides a trivial route for an attacker to gain access to accounts or cause a  denial of service to users on the Application.


Recommendation: 

Input from the user should be treated as untrusted and re-validated when sent to the server. The recommended approach is to generate a onetime token which is linked to the user account, this can be passed with the onetime random token instead of the email ID hash value and expired once the password has been reset. Additionally, ensure if the identifier is not passed that this won’t default to updating all accounts.

So in this way one can Takeover on the victims accounts using the Password Reset Functionality, Token & Link also this way can be used to find same type of vulnerabilities on different websites.


Suggestions and Feedbacks are welcome.
تابع القراءة ←

من الاخطاء الشائعة لحدوث جرائم أمن المعلومات


من الأخطاء الشائعة بين الناس , كثير منا يقوم ببيع الأجهزة المستخدمة مثل الـflash drives and SM memory cards for
cameras and phones

بدون شك الغالبية من الناس لايعرف كيف يقوم بعمل  overwirte للبيانات بشكل تام ويعتقد البعض انه قد تم حذف البيانات بشكل تام
مالم تقم بـ overwrite للبيانات.

من السهل ان تتم اعادة البيانات مرة أخرى او مايسمىrecovery من قبل المخترقين

ما بتكلم في التفاصيل التقنية بشكل كامل الهدف التوعية من تسريب البيانات أو بالأخص الصور الخاصة في الأجهزه الذكيه المنتشرة بين الصغار والكبار

تقريبا هذه القضية العاشرة الي مرت على مسامعي من قبل ناس أعرفهم سواء من جنس الذكور أو الإناث بتسريب صور شخصية على مواقع التواصل الإجتماعي, تم الحصول عليها من أجهزه ذكيه بعد سرقتها
والمؤسف الجهات الحكومية المختصة في جرائم امن المعلومات سواء في الخليج العربي أو خارجه , قد لا تستطيع مد يد العون سواء بعمل ابلاغ مواقع التواصل من حذف الصور وهذه لايمنع المخترق بإعادة رفع الصور من جديد بحساب جديد
والأسواء من ذلك اذا كان بغرض الإبتزاز وطلب فديه قد لاتستطيع الجهات المختصة القبض على المجرم اذا كان من أحد الدول الغير خاضعة للعقوبات .

حتى لا تقع ضحية أحد ضعاف النفوس .

1 -لا تقم بتخزين بيانات حساسة في ذاكرة الاجهزه الذكيه او مايسمى بالحوسبة السحابية  Cloud
2 - تأكد من إزالة البيانات بشكل تام قبل بيع أي جهاز مستخدم يحتوي بيانات حساسة . أداة رائعة لمستخدمين الويندوز MediaWiper
3 -قم بتشفير البيانات بإستخدام TrueCrypt or Bitlocker

أو لأجهزة الاندرويد :
https://play.google.com/store/apps/details?id=com.paranoiaworks.unicus.android.sse&hl=en

تابع القراءة ←

العلاقة المنطقية خلف CTRL+ALT+DEL


من منظوري الشخصي أن لكل شئ علاقة بأمن المعلومات وأن شركة مثل مايكروسوفت
لن تقدم على خطوة في برمجياتها بدون منطق ونظرة أمنية .
خطر على ذهني اليوم الصباح ( لماذا )  نقوم بالضغط على مجموعة من المفاتيح الغريبة عند كل مرة نريد فيها تسجيل الدخول إلى جهاز متصل بالشبكة أو عندما تريد إغلاق بعض المهمات عند تعليق بعض البرامج ؟

----------

القصة حول CTRL+ALT+DEL كانت من قبل المهندس دايفد برادلي في أجهزة IBM , الفكرة الأصلية كانت ببساطة أن تتم إعادة تشغيل الجهاز بدون اللجوء لإطفائة , بعدها قامت شركة مايكروسوفت بتبني هذه الفكرة لمساعدة المستخدمين على ضمان أن يقوم المستخدم بإيقاف البرامج أثناء تعليق الجهاز
لو تلاحظ فقد تم إختيار المفاتيح بعناية , حتى لا يتم الضغط بدون قصد من قبل المستخدم على هذه المفاتيح وتتم إعادة التشغيل.

على أساس أن يقوم المستخدم بتأن بالضغط على هذه المفاتيح وتأكيد أن المستخدم شخصيا يود إدخال كلمة المرور وعدم وجود أو تدخل طرف ثالث يحاول الحصول على كلمة المرور أو عمل مايسى Hijack .
----------
الفكرة الأمنية تنطلق من تصميم الكرنال الخاص بنظام window على إستشعار عملية الضغط على مجموعة المفاتيح CTRL+ALT+DEL  من قبل winlogon.exe بعملية برمجية من نوع low -level language  أو مايسمى بـ برمجة الألة 0-1 
وتأكيد عدم وجود إحتيال من طرف ثالث .

لنفرض عدم وجود هذه الخاصية بإمكان أي هكر أن يقوم بعمل شاشة دخول مزيفة للويندوز والقيام بسحب كلمة المرور أثناء إدخالها ..
لا أريد التطرق لأمور الإختراق وكيف سيصل الهكر الغرض من التدوينة التعرض للمنطق الأمني.








تابع القراءة ←

الحماية ضد الإستغلال الجنسي للأطفال في الانترنت


في الربع الأول من عام 2013 وصل عدد مستخدمي الإنترنت في المملكة العربية السعودية إلى حوالي 16 مليون مستخدم أي مايعادل 54%
وفي أواخر العام لسنة 2013 تعلن شركة statista أن المملكة العربية السعودية تعد
 المركز الثالث من بين دول العالم في إستخدام الإجهزة الذكية . وليس بالأمر السئ أن نلحظ هذه التطور لكن الأسوء إن لم تكن هناك حماية أو رقابة من الدولة أو التوعية من الأهل خاصة.
وحسب إحصائيات شركات أمنية قد تعرض ثلاثة ملايين ونصف من مستخدمين الإنترنت في المملكة العربية السعودية إلي شكل من أشكال جرائم امن المعلومات خصوصا أن أشهرها كان عبارة عن إبتزاز وتشهير وجرائم إباحية إخرى .

حقيقة ما أسمعه من أرض الواقع أكثر من مايتم إعلانه في الصحف من إبتزاز وتشهير إباحي إلى أن وصل الحال إلى تجارة الإبتزاز !!    سواء إبتزاز من هم من جنس الذكور أو الإناث ..حيث يقوم الجاني بإغواء المجني عليه الى ان يقع مصيدة ابتزازه بصور فاضحة مطالبا المجني عليه مبالغ ماليه هائلة بمقابل عدم التشهير ...وهذه تعتبر أكثر الجرائم في الوقت الحالي نظرا لوجود الكثير من المواقع الاجتماعية والبرامج التي على الأجهزة الذكية مثل WHOISHERE , WECHAT ,BADO
خصوصا أننا في دولة قائمة على الإسلام والشريعة الإسلامية لابد من محاربة مثل هذه الظواهر وتجنيد سلاح أمن المعلومات للحماية ضد الإستغلال الجنسي .

طبعا كبداية يجب أن نقر بأن إستخدام الإنترنت كوسيلة من وسائل نشر المواد الاباحية و التي تتضمن تحرشا جنسيا بأطفال قُصَّر هي ظاهرة منتشرة في كل انحاء العالم و يجب محاربتها و الحد منها. لكن اذا ما أخذنا بعين الاعتبار الحجم الهائل للفضاء السايبيري و الكم الضخم من المعلومات التي تتنقل بين أجهزة المستخدمين، بالإضافة الى سهولة التخفي و صعوبة فرض قوانين صارمة في الانترنت، فإننا سرعان ما ندرك أن هذه الحرب لن تكون سهلة على الإطلاق، و تتطلب إمكانات هائلة جدا.

بعد بحث وتحري لوجود حلول ...أطلعت على التجربة البريطانية من Jim Gamble رئيس مركز حماية الاطفال ضد الإستغلال الجنسي Child Exploitation and Online Protection Centre (CEOP) http://ceop.police.uk


تم إنشاء مركز الـ CEOP قبل 5-6 سنوات تقريبا لملاحقة أي نوع من أنواع الاستغلال الجنسي عن طريق الإنترنت وتسليم المستغلين للعدالة, بالإضافة إلى توعية المجتمع بخطورة ظاهرة الإستغلال الجنسي للأطفال .ويعد المركز مركز حكومي يضم أفضل المتخصصين في أمن المعلومات بالأخص إلى تحقيق جرائم أمن المعلومات , كما أن المركز يعتبر كأي مركز دفاع داخلي يشمل قوات عسكرية مسلحة خاصة تقوم ( مثل قوات مكافحة الإرهاب ) لمداهمة المستغلين جنسيا للأطفال ,ويعد المركز تابع لـ Serious Organised Crime Agency ( SOCA ) . ويمكن التعرف أكثر بزيارة الموقع


وقد تم تصنيف طرق المستغلين جنسيا للأطفال عبر الإنترنت حسب إحصائيات مركز CEOP و خبرة السيد Jim Gamble
إلى قسمين:
1- معظم الدراسات التي شملت مناطق مختلفة في العالم تؤكد تورط أشخاص من عائلة الضحية بغاية التجارة لإستغلال الطفل وهذه إحدى الحقائق الصادمة
2- و بحسب دراسة أعدها الـ CEOP مؤخرا، فإن 56% من محاولات استدراج الاطفال عبر الانترنت تتم عبر برامج التخاطب المباشر , حيث يتم إستدراج الضحية من خلال الإنترنت لممارسة الجنس سواء كان جسديا أو صوتيا او كتابيا ...



ومن الحوادث التي ذكرها السيد Gamble التي لفتت إنتباهي في الية عمل محققي جرائم امن المعلومات في تعقب الجاني. يقول Gamble
في إحدى مشاهد التحرش الجنسي التي تحصَّل عليها المركز، كان المتحرش جنسيا بالطفل يجلس على اريكة ذات لون مميز. و تبين للمركز أن هذا النوع من الأثاث و بهذا اللون تحديدا دخل منه إلى بريطانيا ما يقارب الـ 460 قطعه فقط من خلال متجر أثاث مشهور. و في غضون ايام تحصَّل المركز على قائمة بأسماء جميع من قاموا بشراء أريكة مطابقة للتي بالمشهد، و بعد أسابيع قليلة من التحري و التقصي، تم القبض على الشخص المطلوب، و الذي تبين للأسف أنه والد الطفل الذي كان يتحرش به جنسيا في المشهد!
--------------

أوكد ان الغرض من هذه التدوينة ليس بحث أسباب ظاهرة الإستغلال الجنسي للإطفال , بل تسليط الضوء على التجربة البريطانية في محاربة هذه الظاهرة والإستفادة من خبراتهم .


وفي ألاخير : أعتقد أن الجميع أدرك مخاطر الإنترنت و الثورات التقنية وظواهر الإستغلال الجنسي .. ولايعني كون الطفل أو الطفلة في البيت أمام الجوال أو الكمبيوتر أنه في امان او منعزل عن العالم الخارجي ..فقد يضم العالم الوهمي ناس لانرغب أن يكونو برفقتهم وأرجو أن تصل الرسالة وتؤخذ التجربة البريطانية في محمل جد والتركيز في مجال تحقيق جرائم أمن المعلومات ..
لحماية أطفالنا ومجتمعنا من الإستخدام القبيح للتقنيات..



تابع القراءة ←

أفلام يجب مشاهدتها لكل شخص ناشئ في مجال أمن المعلومات


اخترت موضوع الأفلام لأن البعض يعتقد إنه من نسج الخيال وانه من المستحيل حدوث عمليات اختراق مثل طرق الإختراق في هوليوود...الحقيقة عكس ذلك ليس نسج من الخيال لكنه ليس بالأمر السهل أبدا وكل شئ ممكن !

وممكن الي له خبرة مسبقة في أمن المعلومات والاختراق قد يدرك ما اقول لكن لشخص ناشئ ويطمح في أن يتعلم وكلنا لازلنا ان نتعلم
أتمنى له مشاهدة ممتعة , وأن يبحر في عالم الخيال .
طبعا معظم أفلام هوليوود الجديدة لاتخلو من النظرة التقنية أو الخيال العلمي للكاتب ومن أخر الأفلام الي شاهدتها IRON MAN 3
صراحة اداء الممثل روبرت جونيور في السلسلة بشكل عام أكثر من ممتاز.
جملتان اعجبتني في الفلم وسوف انقل الأولى حرفيا كترجمة إلى العربية :
------
الأولى : كلنا نبدأ تملئنا البراءة نهتم فقط بالعلم ثم تدخل ذات الغرور حياتنا ثم يتبعها الهوس وعندما تنظرين إلى النجوم وتراجعي حياتك تجدي أنك بعيدة جدا عن شاطئ أحلامك الأولى.
------
الفقرة الثانية هي فكرة تتحدث عن تقديم أشرار للناس لكي يحاربوهم لكن في الحقيقة هم دمى تتحكم فيهم قوى آخرى وأعطى مثال عن بن لادن والقذافي.
آخر شيئ وهو جائزة الفلم ذكروا سوريا مع ايران وباكستان كمكان يختبئ فيه الأرهابيون المتعصبون. لاعليك فليس هذه محور الموضوع لكن فقط للتعقيب.
------------------------------

طبعا بذكر أول شئ أفلام شاهدتها شخصيا وبعض الأفلام الي صنفت من افلام الإختراق

الفلم الأول : White House Down 2013

في الحقيقة هذه الفلم سبب كتابة هذه التدوينه للأسف لم تسنح لي الفرصة مشاهدة الفلم لكن في الايام القادمة ان شاء الله .
في الفلم قاموا بإستخدام كود خاص لصديقي Vivek-Ramachandran صاحب موقع securitytube 
بدون ذكر أي حقوق او حتى وضع اسمه في لائحة closing credit
المصدر للكاتب : 
http://hackoftheday.securitytube.net/2013/04/my-code-made-it-to-hollywood-movie.html



الفلم الثاني : Hackers
الفلم من اخراج  Iain Softley وبطولة  Jonny Lee Miller, Angelina Jolie, Renoly Santiago, Matthew Lillard, Lorraine Bracco and Fisher Stevens . الفلم يحكي قصة لمجموعة من الطلاب في المدارس الثانويه موهوبين في الاختراق وتنفيذ عمليات الابتزاز عن طريق الانترنت . الفلم رائع جدا ولن يجد حلاوته وأثارته الا لمحبين عالم الاختراق والقرصنه  . 



الفلم الثالث : live free or die hard 4
يعتبر الجزء الرابع من سلسلة افلام  the Die Hard film series   للمخرج : Len Wiseman  وبطولة  Bruce Willis ، John McClane .
يحكي الفلم قصة رائعه جدا لحرب الكترونيه وكيف قام John McClane  بأيقاف حرب الكترونيه لشل حركة الولايات المتحده عن طريق مجموعه قراصنة تمكنوا من السيطره على البنيه التحتيه للولايات المتحده الامريكيه الفلم قام بسرد قصة رائعة جدا في كيف يقوم القراصنة بالهجوم الكترونيا على دولة وغزوها الكترونيا ايضا لم يخلو الفلم من الاكشن والاثاره .
استند الفلم على مقالة كتبت في مجلة  Wired magazine بعنوان وداعا للسلاح  “A Farewell to Arms” للكاتب  John Carlin. 
 كل ما حصل فيه من احداث قد تقع على ارض الواقع حقيقة وليس هناك مبالغه في الحروب الالكترونيه ماعدا مشاهد الاكشين .
حقيقة من أفضل الأفلام الي تابعتها وأفضل جملة قالها :
??“I know I’m not as smart as you guys with all this computer shit. But, hey… I’m still alive, ain’t I?”


==================================
وهذه تكملة الأئحة 

 Blade Runner (1982)
Tron (1982)
WarGames (1983)
 Real Genius (1985)
Weird Science (1985)
Sneakers (1992)
Goldeneye (1995)
The Net (1995)
Enemy of the State (1998)
The Matrix (1999)
Office Space (1999)
Pirates of Silicon Valley (1999)
Swordfish (2001)
Antitrust (2001)
The Italian Job (2003)
Foolproof (2003)
Firewall (2006)
Gamer (2009)


وإذا فاتني شئ ممكن تضيفه 
تابع القراءة ←
;