seemoo-lab / nexmon

The C-based Firmware Patching Framework for Broadcom/Cypress WiFi Chips that enables Monitor Mode, Frame Injection and much more
GNU General Public License v3.0
2.39k stars 448 forks source link

Add hcxtools to utilities #183

Open JuniorJPDJ opened 6 years ago

JuniorJPDJ commented 6 years ago

Can you add hcxtools? https://github.com/ZerBea/hcxtools It have very nice wlandump utility, which I would like to use on android :/ I'm trying to figure out how to compile it with ndk, but without luck.

matthiasseemoo commented 6 years ago

I could, but currently have no time to do so. To compile it, you should write an Android.mk file and add every C file that should be included into the final binary automatically and you might need to do the same for the required libraries. I generally try to embed them statically.

On Mon, Feb 5, 2018 at 12:35 PM, JuniorJPDJ notifications@github.com wrote:

Can you add hcxtools? https://github.com/ZerBea/hcxtools It have very nice wlandump utility, which I would like to use on android :/ I'm trying to figure out how to compile it with ndk, but without luck.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/seemoo-lab/nexmon/issues/183, or mute the thread https://github.com/notifications/unsubscribe-auth/ALP_7hp1vC3PMuAQESbnA-Sa542jad08ks5tRuecgaJpZM4R5Tlh .

-- Matthias Schulz Secure Mobile Networking Lab - SEEMOO

Email: matthias.schulz@seemoo.tu-darmstadt.de Web: http://www.seemoo.de/mschulz Phone (new): +49 6151 16-25478 Fax: +49 6151 16-25471

Department of Computer Science Center for Advanced Security Research Darmstadt Technische Universität Darmstadt Mornewegstr. 32 (Office 4.2.10, Building S4/14) D-64293 Darmstadt, Germany

Droid-MAX commented 6 years ago

You can use the arm platform cross compiler tool chain directly compiled out, but first of all need to cross-compile the dependent library.

Droid-MAX commented 6 years ago

I will try compiling in my NetHunter Kali chroot environment. If successful, I will tell everyone here.

matthiasseemoo commented 6 years ago

sounds good ;-)

On Mon, Feb 5, 2018 at 1:05 PM, Droid-MAX notifications@github.com wrote:

I will try compiling in my NetHunter Kali chroot environment. If successful, I will tell everyone here.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/seemoo-lab/nexmon/issues/183#issuecomment-363065904, or mute the thread https://github.com/notifications/unsubscribe-auth/ALP_7glbF0D-nAR3c-B-f0L-I85fZ7OUks5tRu6UgaJpZM4R5Tlh .

-- Matthias Schulz Secure Mobile Networking Lab - SEEMOO

Email: matthias.schulz@seemoo.tu-darmstadt.de Web: http://www.seemoo.de/mschulz Phone (new): +49 6151 16-25478 Fax: +49 6151 16-25471

Department of Computer Science Center for Advanced Security Research Darmstadt Technische Universität Darmstadt Mornewegstr. 32 (Office 4.2.10, Building S4/14) D-64293 Darmstadt, Germany

Droid-MAX commented 6 years ago

It works, but I can't compiling it statically.

JuniorJPDJ commented 6 years ago

I'm trying to modify aircrack's Android.mk to work with ndk and hcxtools. If I'll make it work I'll do pull request

JuniorJPDJ commented 6 years ago

I can't even compile libpcap.. It crashes with errors about macros:

[arm64-v8a] Compile        : pcap <= bpf_filter.c
./bpf/net/bpf_filter.c:65:24: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if defined(__hpux) || SOLARIS
                       ^
./bpf/net/bpf_filter.c:64:18: note: expanded from macro 'SOLARIS'
#define SOLARIS (defined(sun) && (defined(__SVR4) || defined(__svr4__)))
                 ^
./bpf/net/bpf_filter.c:65:24: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
./bpf/net/bpf_filter.c:64:35: note: expanded from macro 'SOLARIS'
#define SOLARIS (defined(sun) && (defined(__SVR4) || defined(__svr4__)))
                                  ^
./bpf/net/bpf_filter.c:65:24: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
./bpf/net/bpf_filter.c:64:54: note: expanded from macro 'SOLARIS'
#define SOLARIS (defined(sun) && (defined(__SVR4) || defined(__svr4__)))
                                                     ^

I fixed sources myself

Droid-MAX commented 6 years ago

Looking forward to your good news!

JuniorJPDJ commented 6 years ago

@matthiasseemoo which android-ndk version should I target? I've some problems with newer versions, big part of utils are not compiling.

matthiasseemoo commented 6 years ago

Use the one, we mention in our Readme file.

On Mon, Feb 5, 2018 at 4:08 PM, JuniorJPDJ notifications@github.com wrote:

@matthiasseemoo https://github.com/matthiasseemoo which android-ndk version should I target? I've some problems with newer versions, big part of utils are not compiling.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/seemoo-lab/nexmon/issues/183#issuecomment-363112348, or mute the thread https://github.com/notifications/unsubscribe-auth/ALP_7qeZhnNB25_r7P3NWwMarS6qErS7ks5tRxl0gaJpZM4R5Tlh .

-- Matthias Schulz Secure Mobile Networking Lab - SEEMOO

Email: matthias.schulz@seemoo.tu-darmstadt.de Web: http://www.seemoo.de/mschulz Phone (new): +49 6151 16-25478 Fax: +49 6151 16-25471

Department of Computer Science Center for Advanced Security Research Darmstadt Technische Universität Darmstadt Mornewegstr. 32 (Office 4.2.10, Building S4/14) D-64293 Darmstadt, Germany

JuniorJPDJ commented 6 years ago

PS. Maybe you should make utils git submodules? I almost finished makefiles for hcxtools for ndk

JuniorJPDJ commented 6 years ago

@matthiasseemoo you can add this: https://github.com/JuniorJPDJ/hcxtools-android As submodule in utilities/ It works well, just tested it

matthiasseemoo commented 6 years ago

Thanks. Can you include the submodule in a pull request?

Am 05.02.2018 20:46 schrieb "JuniorJPDJ" notifications@github.com:

You can add this: https://github.com/JuniorJPDJ/hcxtools-android As submodule in utilities/ It works well, just tested it

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/seemoo-lab/nexmon/issues/183#issuecomment-363199474, or mute the thread https://github.com/notifications/unsubscribe-auth/ALP_7h287JvrNjn2J4qoY7u97n3eI9ZPks5tR1p3gaJpZM4R5Tlh .

JuniorJPDJ commented 6 years ago

I did it long ago, and it's still not merged