blasty / unwyze

123 stars 19 forks source link

compile #2

Closed xcypher78 closed 1 year ago

xcypher78 commented 1 year ago

Hello, how i can compile ?

archandanime commented 1 year ago

You need Linux/WSL2 with make and run:

> git clone https://github.com/blasty/unwyze
> cd unwyze/exploit/
> make
> ./exploit

      $$$ WYZECAM v4.36.x.x RCE exploit $$$
         -- by blasty <peter@haxx.in> --

       ... lights, camera, action!

  usage: ./exploit <target_id> <camera_ip> <attacker_ip> [cmd]

  targets:
    > 0: v4.36.10.4054
    > 1: v4.36.11.4679
    > 2: v4.36.11.5859
xcypher78 commented 1 year ago

thank you

endertable commented 11 months ago

Hi @archandanime Is that Linux/WSL2 you referring to Linux on Windows? Have you built this on any standard Linux platform. I have tried and it gives me errors that I posted on a new issues post. Also have you tried the hack with any positive results. Trying to see if can penetrate some of the new cams for wz_mini.

Thanks

archandanime commented 11 months ago

@endertable Sorry for late reply. I compiled the exploit using Arch Linux:

> gcc -v
...
gcc version 13.2.1 20230801 (GCC) 

> make
gcc -g -o exploit-debug -DDEBUG=1 -Wall -I./include $(pkg-config --cflags libssl libcrypto) src/*.c $(pkg-config --libs libssl libcrypto)
gcc -o exploit -Wall -I./include $(pkg-config --cflags libssl libcrypto) src/*.c $(pkg-config --libs libssl libcrypto)
> ls
Makefile  exploit  exploit-debug  include  src
> ./exploit

      $$$ WYZECAM v4.36.x.x RCE exploit $$$
         -- by blasty <peter@haxx.in> --

       ... lights, camera, action!

  usage: ./exploit <target_id> <camera_ip> <attacker_ip> [cmd]

  targets:
    > 0: v4.36.10.4054
    > 1: v4.36.11.4679
    > 2: v4.36.11.5859

My camera version is 4.36.3.19 for rootfs and 4.36.9.139 for app and the exploit failed with all 3 targets.

archandanime commented 11 months ago

I flashed older firmware versions but:



- v4.36.11.4679: Same result
- v4.36.11.5859: Same result

Because it can't connect to Wi-Fi, I can't test if the exploit works on those firmware versions :(

Edit: I switched back to 4.36.9.139, Wi-Fi works but the exploit didn't as mentioned above.