팝업레이어 알림

팝업레이어 알림이 없습니다.

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

페이지 정보

작성자 Kaylene Pastor 댓글 0건 조회 32회 작성일 24-06-03 23:15

본문

360_F_314700448_Ckh3uDxLuKEwPNGHIKF1ZgRwuVStqSft.jpgWe've got discovered two use-after-free vulnerabilities in PHP’s garbage assortment algorithm. Those vulnerabilities have been remotely exploitable over PHP’s unserialize perform. 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 text. Pornhub’s bug bounty program and its comparatively excessive rewards on Hackerone caught our attention. That’s why we have taken the angle of an advanced attacker with the complete intent to get as deep as attainable into the system, specializing in one fundamental 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 shortly detected the utilization of unserialize on the website. In all cases a parameter named "cookie" got unserialized from Post data and afterwards mirrored via Set-Cookie headers. Standard exploitation strategies require so known as Property-Oriented-Programming (POP) that contain abusing already present classes with particularly outlined "magic methods" in an effort to trigger unwanted and malicious code paths.



abdc4e842cb024ef5fe07b124f65cc3b.1.jpgUnfortunately, it was troublesome for us to assemble any information about Pornhub’s used frameworks and PHP objects generally. Multiple courses from frequent frameworks have been tested - all with out success. The core unserializer alone is comparatively advanced because it includes greater than 1200 lines of code in PHP 5.6. Further, many inside PHP courses have their own unserialize strategies. By supporting structures like objects, arrays, integers, xnxx strings or even references it is no shock that PHP’s monitor file reveals a tendency for bugs and memory corruption vulnerabilities. Sadly, there were no recognized vulnerabilities of such kind for newer PHP variations like PHP 5.6 or PHP 7, especially as a result of unserialize already got plenty of consideration prior to now (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 security fixes its vulnerability potential ought to have been drained out and it needs to be safe, shouldn’t it? To find an answer Dario applied a fuzzer crafted specifically for fuzzing serialized strings which have been handed to unserialize.



Running the fuzzer with PHP 7 instantly lead to unexpected habits. This behavior was not reproducible when tested in opposition to Pornhub’s server although. Thus, we assumed a PHP 5 model. However, running the fuzzer towards a newer model of PHP 5 simply generated more than 1 TB of logs with none success. Eventually, after placing increasingly effort into fuzzing we’ve stumbled upon unexpected habits once more. Several questions had to be answered: is the difficulty safety related? In that case can we solely exploit it locally or also remotely? To further complicate this example the fuzzer did generate non-printable information blobs with sizes of more than 200 KB. An amazing period of time was mandatory to analyze potential points. In any case, we may extract a concise proof of idea of a working reminiscence corruption bug - a so known as use-after-free vulnerability! Upon additional investigation we found that the foundation cause could be present in PHP’s rubbish collection algorithm, a part of PHP that is totally unrelated to unserialize.



However, the interplay of both components occurred solely after unserialize had completed its job. Consequently, it was not well suited to remote exploitation. After further evaluation, gaining a deeper understanding for the problem’s root causes and lots of exhausting work an analogous 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 necessary to jot down separate articles. You may read extra particulars in Dario’s fuzzing unserialize write-up. As well as, we've written an article about Breaking PHP’s Garbage Collection and Unserialize. Even this promising use-after-free vulnerability was considerably difficult to exploit. Specifically, it involved a number of exploitation stages. 1. The stack and heap (which also embrace any potential person-input) in addition to some other writable segments are flagged non-executable (c.f. 2. Even if you are in a position to regulate the instruction pointer it is advisable know what you want to execute i.e. it's worthwhile to have a valid deal with of an executable memory segment.

댓글목록

등록된 댓글이 없습니다.