8 ms·
DJI – The ART of obfuscation
- Aurornis 3y ago> The packer contains some countermeasures, as partially described in this issue, to prevent the use of dynamic tools. Fortunately, these can be easily bypassed. Does anyone have more details on this step? The linked issue is devoid of information and was closed because the person refused to release the technique publicly.
- romland 3y agoIt's a rabbit hole, but try googling "anti-debugging" (you may want to include "ptrace" or not). It's only if you are curious about it more in general, if you are wondering about this specific protector (secneo?), then that won't help you much, sadly.
- supriyo-biswas 3y agoAs I understood the protection talked about here is a bit different from ptracing your own processes, which is already talked about just above grandparent’s quoted statement. On that note, I’ll just remark how RE tutorials avoid talking about anything but the basics, and the advanced writeups handwave away the challenging parts, leaving a major void for learners.
- weinzierl 3y agoI found the courses from Josh Stroschein pretty good in that regard.
- pbhjpbhj 3y agoThe issue says at the end what worked for one respondent.
- echelon 3y agoWith cheap drones appearing to be critical to the future of warfare, is there a chance that the US will develop a domestic drone industry that rivals China's, or has that ship sailed?
- sschueller 3y agoMaybe we should stop killing each other instead of banning drones. Next thing will be assassinating people with their own phone by causing it to blow up next to their head. The tool isn't the problem, the problem is that "we" still think killing each other is some sort of solution.
- bandergirl 3y ago> Maybe we should stop killing each other instead of banning drones. Wishful thinking. Always have, always will. War is even “legal”, think about that, no repercussions for NATO countries.
- mewpmewp2 3y agoOkay and how do we stop killing each other?
- sagz 3y agoThere's also something fishy about DJI in that their Android app to control their drones is intentionally not listed on the Play Store. I've never seen a manufacturer require side loading. Anyone know why it's not on the Play Store? (On iOS it is on the App Store, well because there isn't another way till this DMA thing kicks in)
- notso411 3y ago[dead]
- bandergirl 3y ago> Anyone know why it's not on the Play Store? Can’t think of any reason that isn’t sketchy. The article gives a clue already. If the app passes Apple’s review, then it could pass Google’s review.
- rnmmrnm 3y agosee Epic suit i guess.
- sschueller 3y agoYou can side load android, you can't side load Apple (without jailbreak). Having to deal with two review processes instead of just one saves money and headaches. Also since they are dealing with US sanctions they probably had to fill out all kinds of stuff and submit that to Apple which they would also have to do for Google but again, they can just side load instead.
- LoganDark 3y ago> You can side load android, you can't side load Apple (without jailbreak). Did Cydia Impactor stop working or something? Sure you need a developer account, but then you can use the account to sideload any third-party IPA.
- malermeister 3y agoHere's a dark conspiracy theory for ya: Consumer drones (including DJIs) are being used in warfare more and more frequently, including the war in Ukraine. The Chinese government, while not openly supporting Russia, has been repeatedly accused of covertly doing so. Imagine what kind of harm a device used for reconnaissance could do if it secretly works for the other side.
- JoachimS 3y agoVery impressive analysis! Interesting that they go through all that work to protect against modern deobfuscation attacks and reversing - and then use RC4 and MD5. They may be ok in this context, but the choice is sort of odd.
- robinduckett 3y agoI'd love to see some analysis of their OTA transmission formats. Currently the DJI headsets must communicate with the drone somehow in order to receive the video stream - this means the headset is constantly transmitting to the drone and this can effect other people even on different frequencies flying drones and it makes spectating rather difficult (and racing in groups impossible, not that you would want to race DJI drones as the variable latency does not really lend itself to drone racing). There is already some signal analysis done by those in the field on Youtube but an open source method to pull packets from transmitting drones and redisplay them without transmitting to the drone would be wonderful.
- 05 3y ago> can effect other people even on different frequencies flying drones and it makes spectating rather difficult (and racing in groups impossible, It’s a solved problem, spectating is supported out of the box and frequency bands have been public for a long time. Here’s a JB video with all you need to know to coexist with analog: [1] Here’s Oscar Liang’s frequency chart (updated for O3): [2] [1] https://youtu.be/P0b99JDcUQs https://youtu.be/P0b99JDcUQs [2] https://oscarliang.com/fpv-channels/ https://oscarliang.com/fpv-channels/
- rasz 3y agoAfair DJI drone link is modified LTE radio.
- tripdout 3y agoI thought it was essentially WiFi.
- dji4321234 3y agoVery old DJI drones were 5Mhz WiFi (Atheros). Newer ones are LTE based (OcuSync).
- dji4321234 3y ago> pull packets from transmitting drones and redisplay them without transmitting to the drone You can see what happens when you try this by putting DJI FPV Goggles in Audience Mode. It's horrible and not suitable for flying. The DJI link is fundamentally two-way and aggressively uses sounding and HARQ. The solution to flying with DJI FPV users at your field is to not use Raceband 6 at all (DJI uses this for link negotiation), and otherwise look up the Raceband to DJI correlation chart and allocate separate channels as usual.
- Fb24k 3y agoStuff like this is is part of the reason the US DoD banned DJI drone usage in 2020, looks like the ban will likely extend to all federal agencies this year: https://www.govtech.com/em/emergency-blogs/disaster-zone/federal-government-will-require-purchase-of-made-in-america-drones https://www.govtech.com/em/emergency-blogs/disaster-zone/fed...
- dontlaugh 3y agoThe actual reason is jingoism, regardless of excuse.
- dan-0 3y agoOh come on. It definitely couldn't be that it's surveillance technology produced in a country known on a massive scale for stealing information via electronic means, especially against the US, right? Your statement reflects little knowledge on US national defense matters, shows a lack of knowledge about the technology, ignores recent historical knowledge of China's hacking efforts against the US, and provides zero information to back up your claim.
- casercaramel144 3y ago>a massive scale for stealing information via electronic means You mean the NSA? https://en.wikipedia.org/wiki/The_Shadow_Brokers https://en.wikipedia.org/wiki/The_Shadow_Brokers https://en.wikipedia.org/wiki/Equation_Group https://en.wikipedia.org/wiki/Equation_Group https://en.wikipedia.org/wiki/PRISM https://en.wikipedia.org/wiki/PRISM Surely we apply the same level of scrutiny to everyone right? Don't pretend that this is about China being a bad actor in the space. Everyone is a bad actor here, and arguably the NSA is worse. I'm not trying to say DJI shouldn't be banned for government applications. It definitely has a hardware kill switch back home. But let's not pretend that facebook et al + Google + Apple are any different.
- dji4321234 3y ago> But let's not pretend that facebook et al + Google + Apple are any different. Were we pretending this? Was anyone pretending this? It would likewise be quite wise for China to ban the use of products made by these companies in their own sensitive federal applications, and my understanding is that broadly, they have.
- miki123211 3y agoI wonder if this obfuscation was implemented at the behest of some government or other to make entering no-fly zones much harder. It seems overkill for something that's otherwise such a simple app.
- londons_explore 3y agoAlso, I think the 'no fly zone' stuff is entirely implemented on the drone itself and the app could be fully opensource if needed without compromising that functionality.
- miki123211 3y agoEven if this was the case, the contents of this list might change significantly between the time of manufacture and the time of use. The forcing of updates basically makes sure that the newest list is always written to the drone as soon as it is released.
- csomar 3y agoThis feels to me like an order from a Chinese project manager to have their code "obfuscated". The developers had to comply and put something that satisfies him. This doesn't matter in the least, and the conspiracy theories about this being used for military or intelligence purposes are ridiculous. Any obfuscation will be overcome and the only way around it is for DJI to release both their own hardware and software.
- matsemann 3y ago10 years ago I "reverse engineered" the protocol of their controllers so that I could use it for drone simulators on my PC. When plugging in the controller to update the firmware, I noticed their software could read stick positions. So I just dumped all the data on the serial and looked at what changed and what remained static when moving one stick all the way to the left, right etc. And just copied the patterns of whatever the software used to prod the controller. Then I used a joystick library to emulate my readings as an xbox controller. https://github.com/Matsemann/mDjiController/ https://github.com/Matsemann/mDjiController/
- sverhagen 3y agoI worked for a company that had a cloud solution to manage drone fleets, and we tried ingesting log files. We had a small team working on that, and we were grateful to use and/or learn from what was available in GitHub repositories like yours (although I don't recognize yours specifically). There was a lot of trial and error, a lot of magic numbers, and stuff was still wrong half the time. And then... they leveled up the encryption of the log files, and it was game-over. Their new solution gave limited access to vendors willing to work through the legalities. If I remember correctly, it required the log file, or at least parts of it to be uploaded to get the keys to unlock it. Not something US companies, like big utilities, were very keen on.
- Zuiii 3y agoI've always been interested in buying a dji drone but never pulled the trigger precisely because of crap like this. Give me a well documented interface and don't call home/include IoT. Is it really that hard?
- sverhagen 3y agoIt's not that hard, but that's not what DJI offers. Their business (and, who knows, maybe political) incentives are different, so they chose a closed, guarded system. By the way, it's what everyone did in the 80's/90's, so why would some contingent of companies not be that way now.
- m463 3y agoI bought a DJI mavic when it first came out - and it would not allow me to fly it - even with the small 2-stick controller - without installing the app, which required an account. I sent it back. Later, I found out HOW MUCH data was sent back to DJI. It was basically everything. It was sent to a variety of sites, with stuff like flight profiles, images, all kinds of stuff. I think open source drones are the answer.
- dji4321234 3y agoMy summary of DJI apps, which I have extensively reverse engineered, is: If you opt into DJI's Flight Record Sync service, you send them your flight records. If you send DJI the additional logs they request for a warranty claim, you send them basically every imaginable bit of data from your drone. Both of these things make sense intuitively. Overall, DJI appear to be earnestly attempting to respect data privacy, especially in their newer apps, DJI Fly and DJI Pilot 2. DJI Fly overall attempts to honor the user's flight analytics and flight log transfer preferences. DJI Pilot 2 in Local Data Mode genuinely stops using the network entirely. DJI's newer "Clear All Data" feature genuinely (but insecurely) erases all stored historic flight and user data on a drone and controller. DJI's efforts towards obfuscation seem generally directed at preventing reverse-engineering by their competitors, not hiding CCP malware. HOWEVER: DJI are a hardware company and lack competence in the software space, so they frequently make egregious mistakes which expose users to information disclosure or device security issues. This is especially bad in their older apps (DJI Go and DJI Pilot 1). They occasionally ship third-party libraries containing their own analytics and forget to disable these third-party analytics. Their information security practice seems quite bad overall, including a very prominent leak where all of their AWS data was downloaded in 2017, including synced flight logs, warranty logs, and app telemetry data. DJI's consumer apps (DJI Fly) are loaded with product-manager-requested mobile app telemetry, as are most American phone apps of all kinds, and require app login to activate a drone. This enables powerful cross-correlation against a user's activities in the app. Sufficiently advanced telemetry is indistinguishable from surveillance malware. There is no evidence of a massive conspiracy where DJI are trying to siphon data to the CCP, but a malicious actor with access to their mobile app analytics dashboard could definitely infer a lot more information than a sensitive customer would like to disclose, including locations where the app was used, with what drone model and for how long it was used for, and whether or not special no-fly zone authorization was requested from DJI. My summary of DJI is: I would use a modern DJI drone, enterprise or consumer, in a casual home or business application. However, I would only use a DJI drone with DJI Remote Controllers (which are Android tablets), not my own phone. I would activate the drone, then forget the WiFi network I used to activate it. This provides an end-run around the product telemetry features present in the app, and avoids security issues on your local device introduced by DJI's poor programming practice. DJI Enterprise hardware and software genuinely attempts to provide offline functionality. I would use it with one of the professional standalone RC units, even in a moderately sensitive situation (say, Law Enforcement use), after auditing one specific app version's behavior (to ensure they didn't accidentally introduce a library with telemetry enabled, which they've been known to do). Also, be aware that all DJI drones broadcast a local proprietary beacon, sometimes referred to as Drone ID or Aeroscope (not to be confused with US Remote ID standards), containing drone serial number and current location data. On newer consumer drones, this broadcast is encrypted. Regardless, it should be assumed that if you are flying a DJI drone, it can and will be tracked by nearby parties. This should be assumed for any drone, realistically. In the usual use case, you are controlling a giant RF emitter using another giant RF emitter.
- seoulmetro 3y agoDoes anyone know of any "decompilation"/bytecode lessons or online resources to learn more and become more comfortable with dealing with bytecode, obfuscation, etc. in Java? Keep in mind it doesn't need to teach the very basics, but just be a full in depth learning.