Skip to content

Commit 1cad222

Browse files
authored
Merge pull request #16 from flashnuke/fix/iface_name
v1.32 -> v1.40
2 parents 8dfc7c4 + b1d04de commit 1cad222

25 files changed

+959
-477
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,32 @@ I have a separate project for that [here](https://github.com/flashnuke/wifi-deau
2525
If no credentials are present and you insist on using Deadnet, it's possible to run a dictionary-attack using a [wordlist](https://github.com/flashnuke/pass-generator) in combination with another tool that cracks Wifi handshakes to gain credentials first.
2626

2727
# Android APP
28-
<p align="center"><img src="https://github.com/user-attachments/assets/4282d5bb-c8b0-4081-a5d8-3b33800eadaa" width="450" ></p>
28+
<p align="center"><img src="https://github.com/user-attachments/assets/c85eccf8-bbf8-4904-9327-9e1c2e064eea" width="450" ></p>
2929

3030

3131
An Android APP designed to run Deadnet directly on rooted devices using a simple GUI with a couple of buttons. </br>
3232
See [the APK section](https://github.com/flashnuke/deadnet/tree/main/apk) for more.
3333

3434
# Requirements
35+
### OS
3536
Works on every OS. </br>
3637
The only difference would be in the output, which in LINUX OS would refresh the same line to log updates rather than printing new lines in other operating systems.
3738

38-
3rd party libraries can be installed by running the following command: `pip3 install -r requirements.txt` as they are listed inside the requirements file:
39+
### VM
40+
Beware that if running from a VM, the network should be set to `Bridged`
41+
42+
### Dependencies
43+
3rd party libraries can be installed by running the following command: `pip install -r requirements.txt` as they are listed inside the requirements file:
3944
```python
4045
scapy~=2.4.5
4146
```
4247
# Usage
48+
## Installation
49+
```bash
50+
git clone https://github.com/flashnuke/deadnet.git
51+
cd deadnet
52+
pip install -r requirements.txt
53+
```
4354

4455
## Poisoning ARP Cache (IPv4)
4556
The network interface is a mandatory param and should always be passed, for example (`eth0` is the most commonly used in kali):

apk/README.md

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,83 @@
11
# Deadnet APK
2-
<p align="center"><img src="https://github.com/flashnuke/deadnet/assets/59119926/fbb72f10-764c-4272-aa8c-8623f34b8ba2" width="350" ></p>
3-
A simple GUI that runs Deadnet directly on Android devices. </br> </br>
2+
<p align="center"><img src="https://github.com/user-attachments/assets/c85eccf8-bbf8-4904-9327-9e1c2e064eea" width="450" ></p>
43

5-
The APK is stored inside [bin](https://github.com/flashnuke/deadnet/tree/main/apk/bin) directory, but it can be built manually as well.
6-
</br>The code that is supposed to open network sockets and send the spoofed packets is written in C++ and compiled into native binaries that are run explicitly by the Python app.
4+
A simple Android app that runs Deadnet directly on Android devices. </br> </br>
5+
6+
The APK is stored inside [bin](https://github.com/flashnuke/deadnet/tree/main/apk/bin) directory, but can be built manually as well.
7+
</br>The attack is written in C++ and compiled into native binaries that are run explicitly by the Python app (see the `Notes.Permissions` section for more). </br>
78

89
# Requirements
9-
* Device must be rooted
10-
* Most modern devices are ARM64. The native binaries are compiled for the following machine architecture types: (ARM, ARM64, x86, x86_64), see the building section in order to compile for a different architecture type and modify the code accordingly
10+
* Device must be rooted.
11+
* Most modern devices are ARM64. The native binaries are compiled for the following machine architecture types: (ARM, ARM64, x86, x86_64), see the building section in order to compile for a different architecture type.
12+
13+
# Usage
14+
* Grant permissions.
15+
* Use the buttons - `Start`, `Stop` and `Refresh` (to refresh the current wifi connection info).
16+
* In case of an error, use the `Debug Logs` button to fetch the logs, and feel free to open a new [issue](https://github.com/flashnuke/deadnet/issues) with the debug logs included.
1117

18+
### Permissions
19+
* Some parts were compiled into native binaries due to a lack of permissions that restrict the Python interpreter from directly creating raw sockets, even when running as root.
20+
* `ACCESS_FINE_LOCATION` permission is required in order to access SSID data (i.e. wifi network name).
1221

13-
# Building
22+
# Building manually
1423
Steps to build the app manually. </br>
1524
The following tools are required:
16-
* NDK tools
17-
* Buildozer and Kivy library
25+
* NDK tools (to build the `.cpp` binaries)
26+
* Buildozer (to build the APK)
27+
28+
### Cloning the library
29+
```bash
30+
# clone the project
31+
git clone https://github.com/flashnuke/deadnet.git
32+
```
1833

1934
### Compiling the C++ Binaries
2035
The C++ binaries source code files (`src/arp.cpp` for the ARP poisoning and `src/nra.cpp` for the dead router attack) should be compiled by NDK:
2136
```bash
22-
cd deadnet/apk
23-
24-
$NDK_PATH/bin/aarch64-linux-android29-clang++ -static -o assets/nra.arm64 src/nra.cpp
25-
$NDK_PATH/bin/armv7a-linux-androideabi29-clang++ -static -o assets/nra.arm src/nra.cpp
26-
$NDK_PATH/bin/i686-linux-android29-clang++ -static -o assets/nra.x86 src/nra.cpp
27-
$NDK_PATH/bin/x86_64-linux-android29-clang++ -static -o assets/nra.x86_64 src/nra.cpp
37+
cd /tmp # DO NOT CLONE NDK INTO THE PROJECT DIRECTORY! it will mess with the build process
38+
mkdir android-ndk && cd android-ndk
39+
wget https://dl.google.com/android/repository/android-ndk-r26d-linux.zip
40+
unzip android-ndk-r26d-linux.zip
41+
export NDK_PATH=$(pwd)/android-ndk-r26d # NDK_PATH example: "NDK_PATH=/tmp/my-android-toolchain"
2842

29-
$NDK_PATH/bin/aarch64-linux-android29-clang++ -static -o assets/arp.arm64 src/arp.cpp
30-
$NDK_PATH/bin/armv7a-linux-androideabi29-clang++ -static -o assets/arp.arm src/arp.cpp
31-
$NDK_PATH/bin/i686-linux-android29-clang++ -static -o assets/arp.x86 src/arp.cpp
32-
$NDK_PATH/bin/x86_64-linux-android29-clang++ -static -o assets/arp.x86_64 src/arp.cpp
43+
# compile binaries
44+
cd <path_to_deadnet_root>/apk
45+
$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ -static -o assets/nra.arm64 src/nra.cpp
46+
$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi29-clang++ -static -o assets/nra.arm src/nra.cpp
47+
$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android29-clang++ -static -o assets/nra.x86 src/nra.cpp
48+
$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android29-clang++ -static -o assets/nra.x86_64 src/nra.cpp
3349

34-
# NDK_PATH example: "NDK_PATH=/home/ubuntu/my-android-toolchain"
50+
$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang++ -static -o assets/arp.arm64 src/arp.cpp
51+
$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi29-clang++ -static -o assets/arp.arm src/arp.cpp
52+
$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android29-clang++ -static -o assets/arp.x86 src/arp.cpp
53+
$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android29-clang++ -static -o assets/arp.x86_64 src/arp.cpp
3554
```
3655

56+
The compiled binaries will be stored under `./assets`.
57+
3758
### Building the APK
3859
```bash
39-
cd deadnet/apk
60+
# navigate to the apk directory
61+
cd <path_to_deadnet_root>/apk
62+
63+
# make sure you have python 3.10 installed
64+
python3.10 --version
65+
python3.10 -m venv venv
66+
source venv/bin/activate
67+
68+
# install buildozer - refer to ths official for more https://buildozer.readthedocs.io/en/latest/installation.html
69+
70+
# build the apk
4071
buildozer android debug # build in debug mode
4172
```
73+
The compiled APK will be stored under `./bin`.
4274

43-
# Notes
44-
### Permissions
45-
* Some parts were compiled into native binaries due to lack of permissions to open raw sockets by the Python interpreter on Android (even when root)
46-
* `ACCESS_FINE_LOCATION` permission is requested in order to access the SSID (wifi network name)
47-
75+
# Debugging
76+
### Debug Logs
77+
Quick debugging can be done using the `Debug Logs` button, which will display useful logs. </br>
78+
### ADB logcat
79+
If a more thorough debug process is needed, `adb` is the right for that. </br>
80+
Connecting the device to ADB and running `adb logcat` would show all the logs, which can be filtered further by using `adb logcat | grep -E 'python|DeadNet'`.
4881

4982
# Disclaimer
5083

apk/assets/arp.arm

-292 KB
Binary file not shown.

apk/assets/arp.arm64

-626 KB
Binary file not shown.

apk/assets/arp.x86

-469 KB
Binary file not shown.

apk/assets/arp.x86_64

-670 KB
Binary file not shown.

apk/assets/nra.arm

-2.33 MB
Binary file not shown.

apk/assets/nra.arm64

-4.25 MB
Binary file not shown.

apk/assets/nra.x86

-3.23 MB
Binary file not shown.

apk/assets/nra.x86_64

-4.11 MB
Binary file not shown.
Binary file not shown.

apk/buildozer.spec

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ version = 1.0
3737

3838
# (list) Application requirements
3939
# comma separated e.g. requirements = sqlite3,kivy
40-
requirements = python3,kivy,scapy,netifaces,ipaddress,android
40+
requirements = kivymd==1.2.0,kivy==2.3.0,android
4141

4242
# (str) Custom source folders for requirements
4343
# Sets custom source for any requirements with recipes
@@ -56,19 +56,6 @@ orientation = portrait
5656
# (list) List of service to declare
5757
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY
5858

59-
#
60-
# OSX Specific
61-
#
62-
63-
#
64-
author = flashnuke
65-
66-
# change the major version of python used by the app
67-
osx.python_version = 3
68-
69-
# Kivy version to use
70-
osx.kivy_version = 1.9.1
71-
7259
#
7360
# Android specific
7461
#
@@ -105,7 +92,7 @@ android.permissions = CHANGE_WIFI_STATE,READ_SECURE_SETTINGS,ACCESS_NETWORK_STAT
10592
android.api = 33
10693

10794
# (int) Minimum API your APK / AAB will support.
108-
#android.minapi = 21
95+
android.minapi = 21
10996

11097
# (int) Android SDK version to use
11198
#android.sdk = 20
@@ -353,53 +340,6 @@ android.allow_backup = True
353340
#p4a.extra_args =
354341

355342

356-
357-
#
358-
# iOS specific
359-
#
360-
361-
# (str) Path to a custom kivy-ios folder
362-
#ios.kivy_ios_dir = ../kivy-ios
363-
# Alternately, specify the URL and branch of a git checkout:
364-
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
365-
ios.kivy_ios_branch = master
366-
367-
# Another platform dependency: ios-deploy
368-
# Uncomment to use a custom checkout
369-
#ios.ios_deploy_dir = ../ios_deploy
370-
# Or specify URL and branch
371-
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
372-
ios.ios_deploy_branch = 1.10.0
373-
374-
# (bool) Whether or not to sign the code
375-
ios.codesign.allowed = false
376-
377-
# (str) Name of the certificate to use for signing the debug version
378-
# Get a list of available identities: buildozer ios list_identities
379-
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"
380-
381-
# (str) The development team to use for signing the debug version
382-
#ios.codesign.development_team.debug = <hexstring>
383-
384-
# (str) Name of the certificate to use for signing the release version
385-
#ios.codesign.release = %(ios.codesign.debug)s
386-
387-
# (str) The development team to use for signing the release version
388-
#ios.codesign.development_team.release = <hexstring>
389-
390-
# (str) URL pointing to .ipa file to be installed
391-
# This option should be defined along with `display_image_url` and `full_size_image_url` options.
392-
#ios.manifest.app_url =
393-
394-
# (str) URL pointing to an icon (57x57px) to be displayed during download
395-
# This option should be defined along with `app_url` and `full_size_image_url` options.
396-
#ios.manifest.display_image_url =
397-
398-
# (str) URL pointing to a large icon (512x512px) to be used by iTunes
399-
# This option should be defined along with `app_url` and `display_image_url` options.
400-
#ios.manifest.full_size_image_url =
401-
402-
403343
[buildozer]
404344

405345
# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy