I was curious about running rayhunter on a rooted nethunter device (OnePlus 6 A6003) as I knew it provides a /dev/diag device. I already used it in combination with qcsuper. For anyone interested in the procedure I write the steps to install rayhunter on the device:
the musl build will be used to avoid dynamic linking which might not work depending on the nethunter version you are running.
cd daemon/web
npm install
npm run build
rustup target add aarch64-unknown-linux-musl cargo build --bin rayhunter-daemon --release --target aarch64-unknown-linux-musl
scp ./target/aarch64-unknown-linux-musl/release/rayhunter-daemon root@<IP>:/usr/local/bin/
make shure the binary is executable on the device:
chmod +x /usr/local/bin/rayhunter-daemon
create something like ./config.toml and move it to the device the webinterface will be available at the configured ip:port
now you can run the daemon using the terminal app of nethunter oder create a custom command in the nethunter app. (prefered)
label: rayhunter
command: /usr/local/bin/rayhunter-daemon /sdcard/rayhunter/config.toml
send to: kali
exec mode: background
runonboot: as you prefer
if you create a custom command you can also enshure the application is started on boot.
I made the needed changes in my fork of the project but didnt add support for automatic deployment via the install routine. If you are interested in adding it to the installer I will have a look after it. Im quite shure this will work for a lot of nethunter installations (with root privilage). So maybe a generic solution is possible.
I see a few different things that could be upstreamed:
deviceconfig flag as we already have for other devices.I don’t know enough about nethunter but it could be nice to also figure out an installation routine that works on the OnePlus if nethunter is not installed?
I’m attempting on Oneplus 7t. I’m getting “failed to initialize /dev/diag”. Do I need to use qcsuper?