This is an old revision of the document!
This document describes one of the early rootkit approaches for DJI aircraft. The instructions below assume you are running on OSX. Most of these instructions will readily translate to most Linux variants.
Install your toolchain as per the instructions here. You only need to do this once… but check the instructions to see if there are any new tools that you may need.
If this is your first time using RedHerring, you will need to checkout the code from git.
cd ~/Documents/ git clone https://github.com/MAVProxyUser/P0VsRedHerring.git cd P0VsRedHerring
If you have done this before and you want to make sure you have the latest code, you just need to sync to the most recent version
cd ~/Documents/P0VsRedHerring git pull
grep start_dji_system /Applications/Assistant.app/Contents/MacOS/Data/firm_cache/*.fw.sig -r
Note the path and filename that is returned. You will need it in the next step. The filename that was returned for me was
/Applications/Assistant.app/Contents/MacOS/Data/firm_cache/wm331_0801_v01.01.03.89_20170519.pro.fw.sig
ls -l `grep start_dji_system /Applications/Assistant.app/Contents/MacOS/Data/firm_cache/*.fw.sig -r | grep ^Binary | cut -d " " -f 3`
python3 image.py **add path and filename here**
ls *bin
You should see your bin filename
file *.bin
This should return: Java archive data (JAR)
tar xvf *.bin system/bin/start_dji_system.sh
echo /system/bin/adb_en.sh >> system/bin/start_dji_system.sh
The next step will connect to your aircraft, so get it powered on and connected via USB… But this is the old one. You can PROBABLY skip this and go straight to the next step.
sudo ruby RedHerring.rb /system/bin/start_dji_system.sh system/bin/start_dji_system.sh
sudo ruby RedHerring.rb /data/.bin/grep grep
Open a new window, and start DJI assistant … connect to your aircraft, and view the list of available firmware updates… and then close DJI assistant. This will set a login cookie that will be re-used for the next command
/Applications/Assistant.app/Contents/MacOS/Assistant
/Applications/Assistant.app/Contents/MacOS/Assistant --test_server
This will take a while - but it will update the NFZ database with no active NFZ's. Quite DJI assistant once its done
adb devices
adb shell
/usr/sbin/system_profiler SPUSBDataType | grep DJI: -A 19