Making magic with the network stack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.4 KiB

2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. # NetworkGenie
  2. ### Setup
  3. 1. Open and build the NetworkGenie app in AndroidStudio.
  4. 2. Run the app
  5. 3. Accept and enable the permissions in the app and enable intercept with top slider
  6. 4. Enable all traffic filtering settings in `Settings` -> `Network options` and `Advanced options`
  7. 5. Click the "Genie" button to go to custom packet crafting page to test
  8. ## Debugging with server
  9. 1. Create a debug server that has the sniffer.py script and netcat
  10. 2. Set the debug server IP in the variable at the top of `app/src/main/jni/netguard/debug_conn.c`
  11. 3. Open a the debug port (50508) on the debug server: `nc -k -l 50508`.
  12. 4. Start the debug server script to log outgoing app packets and test sending bakc packets to leave the Android device: `python3 sniffer.py`.
  13. 5. Run the NetworkGenie app.
  14. ### Testing
  15. 1. NetworkGenie is hardcoded (for testing purposes) to try to establish a connection to the debug server after handling 30 outgoing packets and begin forwarding all outgoing traffic to the server.
  16. 2. Scapy packets should be logged to the debug servers terminal from the python script that is printing the packet info received from the Android.
  17. 3. Input "2" or "3" to test crafting packets that will be sent through the debug connection to NetworkGenie and forwarded out the device.
  18. 4. Use packet capture to view packets crafted from debug server on the Android: `adb shell` -> `su` -> `tcpdump -i any host 9.9.9.9`.