It's A PHP Unserialization Vulnerability Jim, But Not As We Know It
summary
A class of PHP unserialize issues lets serialized metadata inside a Phar archive trigger wakeup/destruct chains when accessed via the Phar stream wrapper, and hundreds—probably thousands—of apps expose this. A patched branch of PHPGGC builds Phar polyglots (tar/JPEG tricks, stub prefixing) to plant payloads; demos achieve command execution via passthru, using FTP/file wrappers, XML‑RPC uploads and WooCommerce/Typo3/TCPDF vectors. Proofs of concept work end‑to‑end and require only file upload plus stream‑wrapper access.
AI-written summary · about
chapters (42)
- 0:00Introduction
- 1:02PHP Unserialization
- 1:20What is Serialization
- 1:47Property Oriented Programming
- 2:06Unsee realization
- 2:58Agenda
- 4:26Overview
- 4:44Reading the PHP Manual
- 5:05Remote Stream Wrappers
- 6:10PHP Stream Wrapper
- 7:27PHP glob
- 8:29stub
- 8:57execution
- 9:16manifest
- 9:42test program
- 9:52test object
- 10:04archive
- 10:19test programs
- 12:00file contents signature
- 12:23file formats
- 12:59serialized metadata
- 13:16stubs
- 13:38tar file format
- 14:20hexdump
- 15:07cat
- 16:36file
- 17:46local file inclusion
- 19:40nonet option
- 20:45PHP GAC
- 21:05The payload
- 21:56Case studies
- 22:15typo3 CMS
- 23:12Generate payload
- 29:21WordPress
- 31:23WordPress payload
- 32:21WordPress class
- 32:59WordPress demo
- 38:14TC PDF
- 43:23Defending Against It
- 44:11Takeaways
- 45:25CTF Challenge
- 46:01Question for Sam
