How we Broke PHP, Hacked Pornhub and Earned $20,000 > 서비스 신청

본문 바로가기

서비스 신청

서비스 신청

How we Broke PHP, Hacked Pornhub and Earned $20,000

페이지 정보

작성자 Leandra Sams 작성일24-05-28 00:50 조회53회 댓글0건

본문

2000x2000.8.jpgWe have found two use-after-free vulnerabilities in PHP’s rubbish assortment algorithm. Those vulnerabilities were remotely exploitable over PHP’s unserialize function. We were additionally awarded with $2,000 by the Internet Bug Bounty committee (c.f. Many thanks go out to cutz for co-authoring this article. Pornhub’s bug bounty program and its comparatively excessive rewards on Hackerone caught our consideration. That’s why we now have taken the attitude of a complicated attacker with the full intent to get as deep as potential into the system, focusing on one predominant objective: gaining distant code execution capabilities. Thus, we left no stone unturned and attacked what Pornhub is built upon: PHP. After analyzing the platform we quickly detected the utilization of unserialize on the web site. In all cases a parameter named "cookie" bought unserialized from Post information and afterwards mirrored via Set-Cookie headers. Standard exploitation strategies require so known as Property-Oriented-Programming (POP) that contain abusing already current lessons with particularly defined "magic methods" in order to set off undesirable and malicious code paths.



414_1000.jpgUnfortunately, it was difficult for us to gather any details about Pornhub’s used frameworks and PHP objects basically. Multiple lessons from common frameworks have been tested - all without success. The core unserializer alone is relatively advanced because it entails greater than 1200 lines of code in PHP 5.6. Further, many inside PHP courses have their own unserialize methods. By supporting buildings like objects, arrays, integers, strings and even references it isn't any surprise that PHP’s monitor record reveals a tendency for bugs and reminiscence corruption vulnerabilities. Sadly, there have been no known vulnerabilities of such sort for xhamster newer PHP versions like PHP 5.6 or PHP 7, especially because unserialize already acquired a number of attention previously (e.g. phpcodz). Hence, auditing it can be in comparison with squeezing an already tightly squeezed lemon. Finally, after a lot attention and so many safety fixes its vulnerability potential ought to have been drained out and it ought to be secure, shouldn’t it? To seek out an answer Dario carried out a fuzzer crafted particularly for fuzzing serialized strings which have been handed to unserialize.



Running the fuzzer with PHP 7 immediately lead to unexpected habits. This habits was not reproducible when tested against Pornhub’s server although. Thus, we assumed a PHP 5 model. However, working the fuzzer towards a newer version of PHP 5 simply generated greater than 1 TB of logs without any success. Eventually, after putting an increasing number of effort into fuzzing we’ve stumbled upon unexpected behavior once more. Several questions needed to be answered: is the problem safety associated? If so can we solely exploit it locally or additionally remotely? To further complicate this situation the fuzzer did generate non-printable data blobs with sizes of greater than 200 KB. A tremendous period of time was obligatory to investigate potential issues. In any case, we might extract a concise proof of concept of a working memory corruption bug - a so known as use-after-free vulnerability! Upon additional investigation we found that the basis trigger could possibly be present in PHP’s rubbish collection algorithm, a element of PHP that is completely unrelated to unserialize.



However, the interaction of each parts occurred only after unserialize had completed its job. Consequently, it was not nicely suited for distant exploitation. After further evaluation, gaining a deeper understanding for the problem’s root causes and a lot of exhausting work the same use-after-free vulnerability was discovered that gave the impression to be promising for remote exploitation. The excessive sophistication of the found PHP bugs and their discovery made it mandatory to jot down separate articles. You may read extra details in Dario’s fuzzing unserialize write-up. In addition, we have now written an article about Breaking PHP’s Garbage Collection and Unserialize. Even this promising use-after-free vulnerability was significantly tough to take advantage of. In particular, it concerned multiple exploitation stages. 1. The stack and heap (which also include any potential person-enter) as well as any other writable segments are flagged non-executable (c.f. 2. Even if you're in a position to control the instruction pointer you want to know what you wish to execute i.e. it's essential to have a valid address of an executable reminiscence phase.

댓글목록

등록된 댓글이 없습니다.

회사명 : 팜디엠에스   |   대표 : 강도영   |   사업자등록증 : 132-86-21515   |    주소 : 경기도 남양주시 진건읍 진관로 562번길137-26
대표전화 : 031-575-0541   |   팩스 : 031-575-0542   |    C/S : 1800-0541   |   이메일 : pamdms@naver.com
Copyright © 팜DMS. All rights reserved.