Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/extend/user.config.php on line 85

Warning: file_get_contents(https://quotation-api-cdn.dunamu.com/v1/forex/recent?codes=FRX.KRWUSD): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/extend/user.config.php on line 85

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/extend/user.config.php on line 86

Warning: file_get_contents(https://quotation-api-cdn.dunamu.com/v1/forex/recent?codes=FRX.KRWJPY): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/extend/user.config.php on line 86

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/extend/user.config.php on line 87

Warning: file_get_contents(https://quotation-api-cdn.dunamu.com/v1/forex/recent?codes=FRX.KRWCNY): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/extend/user.config.php on line 87
How we Broke PHP, Hacked Pornhub and Earned $20,000 > 온라인상담 | Book Bridge

온라인상담

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

페이지 정보

24-05-31 23:11 

본문

이메일 :
연락처 :

360_F_314700448_Ckh3uDxLuKEwPNGHIKF1ZgRwuVStqSft.jpgWe've got discovered two use-after-free vulnerabilities in PHP’s garbage assortment algorithm. Those vulnerabilities had been remotely exploitable over PHP’s unserialize operate. We have been also 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 high rewards on Hackerone caught our consideration. That’s why we now have taken the attitude of an advanced attacker with the full intent to get as deep as potential into the system, specializing in one essential aim: gaining remote code execution capabilities. Thus, we left no stone unturned and attacked what Pornhub is constructed upon: PHP. After analyzing the platform we quickly detected the utilization of unserialize on the website. In all circumstances a parameter named "cookie" acquired unserialized from Post information and afterwards mirrored via Set-Cookie headers. Standard exploitation methods require so called Property-Oriented-Programming (POP) that contain abusing already existing courses with particularly outlined "magic methods" in an effort to trigger undesirable and malicious code paths.



abdc4e842cb024ef5fe07b124f65cc3b.1.jpgUnfortunately, it was difficult for us to collect any details about Pornhub’s used frameworks and PHP objects generally. Multiple classes from widespread frameworks have been tested - all without success. The core unserializer alone is comparatively advanced as it entails more than 1200 strains of code in PHP 5.6. Further, many internal PHP classes have their very own unserialize strategies. By supporting buildings like objects, arrays, xnxx integers, strings and even references it is not any surprise that PHP’s observe document exhibits a tendency for bugs and memory corruption vulnerabilities. Sadly, there were no recognized vulnerabilities of such kind for newer PHP versions like PHP 5.6 or PHP 7, especially as a result of unserialize already acquired plenty of attention previously (e.g. phpcodz). Hence, auditing it can be in comparison with squeezing an already tightly squeezed lemon. Finally, after so much consideration and so many safety fixes its vulnerability potential should have been drained out and it ought to be secure, shouldn’t it? To search out a solution Dario carried out a fuzzer crafted particularly for fuzzing serialized strings which have been passed to unserialize.

ja.png

Running the fuzzer with PHP 7 instantly result in unexpected behavior. This conduct was not reproducible when tested towards Pornhub’s server though. Thus, we assumed a PHP 5 version. However, operating the fuzzer in opposition to a newer version of PHP 5 just generated greater than 1 TB of logs without any success. Eventually, after putting more and more effort into fuzzing we’ve stumbled upon unexpected conduct once more. Several questions needed to be answered: is the issue safety related? In that case can we only exploit it domestically or also remotely? To additional complicate this case the fuzzer did generate non-printable data blobs with sizes of greater than 200 KB. A tremendous period of time was obligatory to analyze potential issues. In spite of everything, we could extract a concise proof of concept of a working reminiscence corruption bug - a so called use-after-free vulnerability! Upon additional investigation we found that the basis trigger could possibly be found in PHP’s rubbish collection algorithm, a component of PHP that is completely unrelated to unserialize.



However, the interaction of both elements occurred only after unserialize had completed its job. Consequently, it was not properly suited for remote exploitation. After additional evaluation, gaining a deeper understanding for the problem’s root causes and a number of exhausting work an identical use-after-free vulnerability was discovered that gave the impression to be promising for distant exploitation. The excessive sophistication of the found PHP bugs and their discovery made it necessary to write down separate articles. You can read more details in Dario’s fuzzing unserialize write-up. As well as, we now have 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. Particularly, it involved multiple exploitation levels. 1. The stack and heap (which also embody any potential person-enter) as well as any other writable segments are flagged non-executable (c.f. 2. Even if you are in a position to control the instruction pointer it is advisable know what you want to execute i.e. it's essential to have a sound address of an executable reminiscence phase.

댓글목록

등록된 댓글이 없습니다.