How we Broke PHP, Hacked Pornhub and Earned $20,000 > 자유게시판

본문 바로가기

회원메뉴

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

페이지 정보

작성자 Emilio 댓글 0건 조회 153회 작성일 24-05-31 09:41

본문

360_F_314700448_Ckh3uDxLuKEwPNGHIKF1ZgRwuVStqSft.jpgWe've got discovered two use-after-free vulnerabilities in PHP’s rubbish assortment algorithm. Those vulnerabilities had been remotely exploitable over PHP’s unserialize operate. We had been also awarded with $2,000 by the Internet Bug Bounty committee (c.f. Many thanks exit to cutz for co-authoring this text. Pornhub’s bug bounty program and its relatively high rewards on Hackerone caught our consideration. That’s why we've got taken the angle of a sophisticated attacker with the full intent to get as deep as doable into the system, specializing in one essential goal: gaining remote 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 usage of unserialize on the website. In all cases a parameter named "cookie" bought unserialized from Post data and afterwards mirrored via Set-Cookie headers. Standard exploitation methods require so referred to as Property-Oriented-Programming (POP) that involve abusing already existing classes with specifically defined "magic methods" with a purpose to trigger unwanted and malicious code paths.



abdc4e842cb024ef5fe07b124f65cc3b.1.jpgUnfortunately, it was tough for us to gather any details about Pornhub’s used frameworks and PHP objects normally. Multiple courses from common frameworks have been tested - all without success. The core unserializer alone is relatively complicated as it involves more than 1200 traces of code in PHP 5.6. Further, many internal PHP lessons have their own unserialize strategies. By supporting structures like objects, arrays, integers, strings and even references it isn't any shock that PHP’s observe file exhibits a tendency for bugs and memory corruption vulnerabilities. Sadly, there have been no recognized vulnerabilities of such sort for newer PHP variations like PHP 5.6 or PHP 7, particularly as a result of unserialize already received lots of consideration in the past (e.g. phpcodz). Hence, auditing it can be in comparison with squeezing an already tightly squeezed lemon. Finally, after so much attention and so many safety fixes its vulnerability potential should have been drained out and it needs to be secure, shouldn’t it? To find 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 instantly result in unexpected habits. This behavior was not reproducible when tested against Pornhub’s server although. Thus, we assumed a PHP 5 model. However, running the fuzzer towards a newer model of PHP 5 just generated greater than 1 TB of logs with none success. Eventually, after putting more and more effort into fuzzing we’ve stumbled upon unexpected conduct again. Several questions needed to be answered: is the issue safety related? If so can we only exploit it locally or additionally remotely? To further complicate this case the fuzzer did generate non-printable information blobs with sizes of greater than 200 KB. An incredible period of time was essential to research potential points. In spite of everything, we may extract a concise proof of idea of a working reminiscence corruption bug - a so known as use-after-free vulnerability! Upon further investigation we found that the basis trigger may very well be present in PHP’s garbage collection algorithm, a part of PHP that is totally unrelated to unserialize.



However, the interaction of each elements occurred solely after unserialize had finished its job. Consequently, xnxx it was not nicely suited to remote exploitation. After additional evaluation, gaining a deeper understanding for the problem’s root causes and lots of exhausting work an identical use-after-free vulnerability was found that appeared to be promising for remote exploitation. The high sophistication of the discovered PHP bugs and their discovery made it crucial to put in writing separate articles. You can read extra particulars in Dario’s fuzzing unserialize write-up. As well as, we've got written an article about Breaking PHP’s Garbage Collection and Unserialize. Even this promising use-after-free vulnerability was significantly difficult to use. Specifically, it involved multiple exploitation stages. 1. The stack and heap (which additionally embody any potential consumer-input) in addition to another 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 want to execute i.e. it's essential to have a sound handle of an executable reminiscence phase.

댓글목록

등록된 댓글이 없습니다.

단체명 한국장애인미래협회 | 주소 대구광역시 수성구 동대구로 45 (두산동) 삼우빌딩 3층 | 사업자 등록번호 220-82-06318
대표 중앙회장 남경우 | 전화 053-716-6968 | 팩스 053-710-6968 | 이메일 kafdp19@gmail.com | 개인정보보호책임자 남경우