-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSC Smart Outdoor (IP) Camera - Hack not working #42
Comments
@EpicLPer If it has 2.10x firmware you need to try this one: guino/BazzDoorbell#13 -- did you try that one already ? |
Not exactly sure what I should try there from that issue? Or do you mean instructions from the repo itself? |
@EpicLPer there's a 'Process' section on that issue, just follow it and see if it works -- that's the process that has worked for 2.9.x and 2.10.x firmware to root the device and get a ppsapp file we can patch for RTSP. |
When doing the above via the URL |
@EpicLPer did you do it after creating a ppsFactoryTool.txt file? 2.10 firmware is know to require that file before URLs work. |
Is it possible to just leave it empty? Afaik I have one on the SD Card right now yes, but I'm not entirely sure what to do or what to put in it sorry ^^" |
@EpicLPer this is the information regarding ppsFactoryTool.txt : if you don’t do it correctly it wont work. It may be worth trying port 8090 as well (from 4.x firmware) - it’s always a surprise with tuya firmware. Special note for 2.10.0 firmwae: This firmware (and newer) have port 80 closed by default -- so to use the http://admin:05656... links below you have to RIGHT CLICK this link: https://github.com/guino/Merkury720/raw/main/ppsFactoryTool.txt select "Save as.." and save this file to the root of the SD card. EDIT the file (avoid copy/paste the contents of it) and modify only the ssid and password as the file requires specific format to work. When the device detects the file (in the right format) it will disconnect and re-connect the wifi (to the ssid specified) and will OPEN port 80 so the http://admin:05656... links work. Special note for 4.0.x firmwae: This firmware (and newer) have port 80 closed by default -- so to use the http://admin:05656... links below you have to RIGHT CLICK this link: https://github.com/guino/Merkury720/raw/main/ppsFactoryTool.txt select "Save as.." and save this file to the root of the SD card. EDIT the file (avoid copy/paste the contents of it) and modify only the ssid and password as the file requires specific format to work. When the device detects the file (in the right format) it will disconnect and re-connect the wifi (to the ssid specified) and will OPEN port 8090 so the http://admin:05656... links work but you have to add :8090 to every URL, for instance: http://admin:[email protected]:8090/devices/deviceinfo. Depending on the device you have you may need to use the information and files from https://github.com/guino/Merkury1080P#conclusion |
Will try this once I'm home, thanks! :) |
Sadly this didn't seem to work :( The Camera still connects to my IOT WiFi instead of the normal one, despite me putting my normal one into the config to check if it even seems to read the file. |
Tried a different SD Card now too, sadly same result. |
@EpicLPer sorry you had no success, every now and then we have reports of issues like this where multiple SD cards and multiple attempts don't work. Many people have reported success after repartitioning/reformatting the SD Card (trying windows/linux/etc). In any case you're welcome to post the SD card contents (from your attempt) so I can review to check if there's anything wrong. |
The SD Card contents are just the ppsFactory file and nothing else. Or do I need more? And of course also the files and folders the camera puts on it when turning the cam on. |
@EpicLPer for 2.10.x firmware the ppsFactoryTool.txt file is all you need to enable URLs like (adjust IP accordingly): If you can get one of the two above working then we can try adding more files to see if it can be rooted. If neither above works then there's no way to move forward (other than opening the device). I still would recommend you post a ZIP of your ppsFactoryTool.txt file (from the SD card) so I can review it -- a lot of times people make mistakes because windows hides file extensions, etc. |
Will try one more time, I don't have to hold the Reset button or anything right? |
Just tried again holding no buttons or anything, and it still doesn't connect to my normal WiFi and instead stays on the IoT one. Here's the ZIP (with changed credentials): cam_sd.zip |
@EpicLPer your ppsFactoryTool.txt file is fine -- are you sure the SD card if FAT32 formatted ? maybe try to use the phone app to format it then copy the ppsFactoryTool.txt file to it. If the SD card isn't formatted in a compatible format the device will simply ignore it. |
Did format via the app yeah, but sadly still doesn't seem to work. |
@EpicLPer it looks like 2.10.6 is the last 2.10.x version we had rooted, They may have made more changes in this 2.10.36 to block more things -- there's no way of knowing for sure unless someone gets a firmware dump (which requires opening device + removing the flash chip to read it). |
@guino I'm "okay" when it comes to hot air soldering, but I'd have to buy some hardware to read the flash then, but would be willing to :) Always love some challenges! If you tell me what hardware to get to read the flash and all I'll try so. |
@EpicLPer if you get the firmware I can definitely look at it. Just be careful when selecting/using a flash programmer to make sure it doesn't have 5V on 3.3V pins (many CH341a programmers out there have this issue -- and there's a mod to fix them). |
@EpicLPer that is basically what I have and I did have to fix the programmer like this: https://www.youtube.com/watch?v=-ln3VIZKKaE |
I also have a ST-LINK and JR Programmer 2 still laying around from other projects but doubt I can reuse them here? I'm quite a beginner with these kind of things |
I've read up on this a bit and apparently it's also able to dump such chips via an Arduino? If so could try that, or wait on proper hardware and be less likely to damage things ^^" |
@EpicLPer great pictures. The XMC chip beside the RX/TX pads is the flash chip you need to read. The RX/TX pads (along with GND at the bottom would be for TTL-UART access which can sometimes be helpful, but you would need a TTL-UART 3.3V adapter (USB or serial), or a board with serial TTL connections (i.e. Raspberry Pi, etc). |
Do have that :) Do you have Discord or Telegram by any chance to maybe easier talk there for a bit until I have some results I can post here again? Normal conversation always bloats issues up a bit. |
@EpicLPer if you have a Pi and you're willing to solder some wires to the board we can try to dump the flash to a SD card using the bootloader. Send me an email directly (my email is on my github profile) and we can exchange contacts. |
Exact same results with LSC Smart Doorbell ! Will follow your progress with attention :) |
We already got RTSP with Audio working, but it's via a test-mode of that camera. Nothing will work tho and it won't connect to WiFi, this is literally only to see if your camera is similarly built than mine is, so then chances are high once we release a working version yours will work with it too! Please do report your results :) |
@guino I could need an advice. When i set the "wait for ntpd sync" in the background loop:
The streaming folder didn't get the actual time, because the app starts before the time is synced. When i set it in front of the loop, the camera seems to be in an endless loop (perhaps a wathdog restarts it)
On the device |
@EpicLPer i don't think someone will do it. |
Hey, folks. Any chance to get a patch to make it start offline? |
WRONG (I thought you had usleep) Another approach could be to leave the code unchanged (which tuya uses to wait for it to be 'online' with their servers) and set the variable/memory in the process directly (so it thinks it's online), that is: once your NTP service syncs. On 2.10.36 the variable that tells if mqtt is online seems to be at 0x434d1c -- so something like this could work (untested): So basically you could try (without your offline patch) to just run the command above when your NTP service syncs the time to see if the device starts 'acting' like it's online (motion notifications, recording, etc). |
@EpicLPer I just updated the repo with a feature to control the PTZ of the camera -- I think I recall you wanted that too? |
@guino Well, thats a very cool idea! I will try this in the evening. @McPrapor Above your post is an offline solution. But if i were you, i would wait until the localtime is fixed. |
@guino After many hours of ghidra surfing, i found that it looks like the app reads the hwclock, so i copied the time from system to hardware clock |
@jonesMeUp Looking at the code you can try this one (together with my first command): |
@guino well, that fix breaks the motion event. I think its a timing problem, because the stream neeeds also a few seconds to sync the date. |
@jonesMeUp for these devices, have you tried to sync the time in hack.sh (and wait) instead of running the event loop in the background ? you will have to adjust the code that changes the memory directly (so that waits for the main application to be running), but I would expect the main application to start with the correct date. The only question is 'how long' we can wait to run the daemon and anyka_ipc before any type of watchdog restarts the device. |
@guino yep, long before i put the waiting into the bg which seems to trigger a watchdog. there is no chance to wait for so long.
into the free part of |
@jonesMeUp here's what I'd try (this will SET the statusMQTT and at the same time skip the loop):
YOU MUST ALSO modify the bytes on address 0x9c548 to be: If that's not what you want to do you may give me some more detail... in any case, if you want to load the contents of statusMqtt (0x434dc1) into r3 the instruction should be: If you wanted to just set the variable from an outside script I assume that trick with echo+dd would work (as you previously confirmed): |
@jonesMeUp some other piece of information which can help.. apparently this can prevent the watchdog from resetting the device: I kept my device running for a few minutes without a reboot and without anyka_ipc running that way -- however: the biggest problem is that anyka_ipc is what configures/connects the wifi on the device (so you can sync the time) so you'd have to start and configure the wifi by hand in order to get the time before running anyka_ipc. Still could be an option if all else fails. |
@guino thx for your support! What i want ito do: Step 1:
Place this loop at 0x00065bc8 in Step 2:If this will work, i want to overwrite the loop in tuya_main() with a call to
But i don't get the ldr to work. I now it holds a reference to an address, but i don't have a clue how |
I thought 2.10.36 is available again, but looks like it's just the hack makes it believe it's running 2.10.36. |
@jonesMeUp there's not a lot to it: READ data from any address (into r3):
WRITE data to any address (from r3):
In both cases POINTER_ADDRESS will be an address containing the address to read/write, so if you wanted to read/write to 0x434d1c you would have to place the bytes So you'll need to copy all the bytes from the loop code to 0x065bc8 (assuming you have space) then you'll need some other 4 bytes (near that code) to put the address bytes
(notice the 'missing' add instruction since I'm using absolute address defined in the POINTER_ADDRESS memory location) You also have the option to use a few more instructions to build the address directly:
Either one should work as long as you have enough space -- chances are whatever code you're overwriting/deleting (to put your code in place) already uses some address nearby that you can use for a pointer_address making it simpler to write without adding jumps or multiple instructions (seems like 0x65ca8 is the perfect POINTER_ADDRESS for you). |
Yes, the hack uses a main application 2.10.36 so it reports that version to the server. I never did look into changing that since it works fine, but it could prevent us from knowing when a 2.10.36 is actually available for that device. Chances are it may come out as a different version than 2.10.36 anyway. |
@guino i used your |
I will post my actual hack.sh and the patch file as soon as the 1h problem is fixed (or if i get lost in the fix). |
@jonesMeUp Nice to hear you've made progress. I recommend you try a normal boot (i.e. no SD card) to verify the video time is correct -- if it's off by 1h without the SD card then the issue isn't related to your changes (likely just some other setting). |
@guino of course the problem is related to the offline patch. There are many functions that are only called when the device is online. I have already seen a possible location for the 1h problem:
The lines of the logfile are crying in my head, so i have to spend some time there. |
@guino after searching for endless hours in the code, without any success, i think they are cheating. |
@jonesMeUp sorry it's been a busy few days here. This is my doorbell (2.9.6 fw):
This is my indoor dumb camera (2.7.6 fw):
This is my rotating camera (2.10.36):
My local time was 14:24-29 when testing the above -- please notice I am on Eastern US timezone (despite it showing CST), but all my devices show the correct time on the video. |
@guino so i searched many hours in my patches, but the |
Cyberduck |
Hello Guino, works on fw 3.167.94.14. just got telnet access: |
Heya!
Bought a LSC Smart Outdoor (IP) Camera yesterday and tried this hack, but sadly it didn't seem to work. I added the camera to Tuya and had to update it before being able to use it (which probably was a mistake in hindsight).
The Firmware version on it right now is 2.10.36, and the only open ports I see are 53 and 6668.
If you need anything, I'm willing to open the camera up and do have soldering skills, I've also helped to dump the Sonoff cam a few years back and then figuring some things out :)
Thanks already for your help!
The text was updated successfully, but these errors were encountered: