Author Topic: Error when compiling reaver t6x backbox 4.5 amd64  (Read 4631 times)

GhostWarriors

  • Newbie
  • *
  • Posts: 2
    • View Profile
on: December 03, 2016, 07:04:53 AM
Hi all, help me please
Error when compiling reaver t6x backbox 4.5 amd64
result ./configure

Code: [Select]
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for pcap_open_live in -lpcap... yes
checking for sqlite3_open in -lsqlite3... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
configure: creating ./config.status
config.status: creating Makefile


result make
Code: [Select]

(cd lwe && make BUILD_STATIC=y libiw.a)
make[1]: Вход в каталог `/root/reaver-wps-fork-t6x-master/src/lwe'
cp wireless.21.h wireless.h
gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD     -fPIC -c -o iwlib.so iwlib.c
iwlib.c: In function ‘iw_enum_devices’:
iwlib.c:254:14: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
         fgets(buff, sizeof(buff), fh);
              ^
iwlib.c:255:14: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
         fgets(buff, sizeof(buff), fh);
              ^
iwlib.c: In function ‘iw_get_kernel_we_version’:
iwlib.c:337:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
     fgets(buff, sizeof(buff), fh);
          ^
iwlib.c:353:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
     fgets(buff, sizeof(buff), fh);
          ^
rm -f libiw.a
ar cru libiw.a iwlib.so
ranlib libiw.a
make[1]: Выход из каталога `/root/reaver-wps-fork-t6x-master/src/lwe'
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function globule.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function init.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function misc.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. sql.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function builder.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function crc.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. 80211.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function iface.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function   -c -o libwps/libwps.o libwps/libwps.c
libwps/libwps.c: In function ‘parse_wps_parameters’:
libwps/libwps.c:29:12: warning: variable ‘data_len’ set but not used [-Wunused-but-set-variable]
     size_t data_len = 0, offset = 0;
            ^
libwps/libwps.c: In function ‘parse_wps_tag’:
cc1: warning: iteration 15u invokes undefined behavior [-Waggressive-loop-optimizations]
libwps/libwps.c:86:9: note: containing loop
         for(i=0; i<sizeof(elements); i++)
         ^
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps_attr_build.o wps/wps_attr_build.c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps_attr_parse.o wps/wps_attr_parse.c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps_attr_process.o wps/wps_attr_process.c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps.o wps/wps.c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps_common.o wps/wps_common.c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps_dev_attr.o wps/wps_dev_attr.c
wps/wps_dev_attr.c: In function ‘wps_process_serial_number’:
wps/wps_dev_attr.c:345:3: warning: pointer targets in passing argument 2 of ‘pingen_belkin’ differ in signedness [-Wpointer-sign]
   printf("[Pin Gen] Pin Generated : %08d\n",pingen_belkin(mac2str(get_bssid(),'\0'), str, str_len, 0));
   ^
In file included from ./wps.h:40:0,
                 from ./defs.h:46,
                 from ./globule.h:38,
                 from wps/wps_dev_attr.c:15:
./utils/common.h:447:5: note: expected ‘const char *’ but argument is of type ‘const u8 *’
 int pingen_belkin(const char *mac, const char *serial, int len_serial, int add);
     ^
wps/wps_dev_attr.c:346:3: warning: pointer targets in passing argument 2 of ‘pingen_belkin’ differ in signedness [-Wpointer-sign]
   printf("[Pin Gen] Pin Generated (+1): %08d\n",pingen_belkin(mac2str(get_bssid(),'\0'), str, str_len, 1));
   ^
In file included from ./wps.h:40:0,
                 from ./defs.h:46,
                 from ./globule.h:38,
                 from wps/wps_dev_attr.c:15:
./utils/common.h:447:5: note: expected ‘const char *’ but argument is of type ‘const u8 *’
 int pingen_belkin(const char *mac, const char *serial, int len_serial, int add);
     ^
wps/wps_dev_attr.c:347:3: warning: pointer targets in passing argument 2 of ‘pingen_belkin’ differ in signedness [-Wpointer-sign]
   printf("[Pin Gen] Pin Generated (-1): %08d\n\n",pingen_belkin(mac2str(get_bssid(),'\0'), str, str_len, -1));
   ^
In file included from ./wps.h:40:0,
                 from ./defs.h:46,
                 from ./globule.h:38,
                 from wps/wps_dev_attr.c:15:
./utils/common.h:447:5: note: expected ‘const char *’ but argument is of type ‘const u8 *’
 int pingen_belkin(const char *mac, const char *serial, int len_serial, int add);
     ^
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps_enrollee.o wps/wps_enrollee.c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps_registrar.o wps/wps_registrar.c
wps/wps_registrar.c: In function ‘wps_process_ap_settings_r’:
wps/wps_registrar.c:2791:9: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
         wps->key = strdup(wps->cred.key);
         ^
In file included from ./defs.h:42:0,
                 from ./globule.h:38,
                 from wps/wps_registrar.c:14:
/usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘u8 *’
 extern size_t strlen (const char *__s)
               ^
wps/wps_registrar.c:2791:9: warning: pointer targets in passing argument 1 of ‘__strdup’ differ in signedness [-Wpointer-sign]
         wps->key = strdup(wps->cred.key);
         ^
In file included from /usr/include/string.h:635:0,
                 from ./defs.h:42,
                 from ./globule.h:38,
                 from wps/wps_registrar.c:14:
/usr/include/x86_64-linux-gnu/bits/string2.h:1278:14: note: expected ‘const char *’ but argument is of type ‘u8 *’
 extern char *__strdup (const char *__string) __THROW __attribute_malloc__;
              ^
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -I. -Iutils   -c -o wps/wps_ufd.o wps/wps_ufd.c
(cd utils && make)
make[1]: Вход в каталог `/root/reaver-wps-fork-t6x-master/src/utils'
  CC  base64.c
  CC  common.c
  CC  ip_addr.c
  CC  radiotap.c
  CC  trace.c
  CC  uuid.c
  CC  wpa_debug.c
  CC  wpabuf.c
  CC  os_unix.c
  CC  eloop.c
ar crT libutils.a base64.o common.o ip_addr.o radiotap.o trace.o uuid.o wpa_debug.o wpabuf.o os_unix.o eloop.o
make[1]: Выход из каталога `/root/reaver-wps-fork-t6x-master/src/utils'
(cd tls && make)
make[1]: Вход в каталог `/root/reaver-wps-fork-t6x-master/src/tls'
  CC  asn1.c
In file included from bignum.c:21:0:
libtommath.c: In function ‘mp_exptmod’:
libtommath.c:580:9: warning: variable ‘dr’ set but not used [-Wunused-but-set-variable]
     int dr;
         ^
  CC  bignum.c
  CC  pkcs1.c
  CC  pkcs5.c
  CC  pkcs8.c
  CC  rsa.c
  CC  tlsv1_client.c
  CC  tlsv1_client_read.c
  CC  tlsv1_client_write.c
  CC  tlsv1_common.c
  CC  tlsv1_cred.c
  CC  tlsv1_record.c
  CC  tlsv1_server.c
tlsv1_server_read.c: In function ‘tls_process_client_key_exchange_rsa’:
tlsv1_server_read.c:474:9: warning: variable ‘encr_len’ set but not used [-Wunused-but-set-variable]
     u16 encr_len;
         ^
  CC  tlsv1_server_read.c
  CC  tlsv1_server_write.c
  CC  x509v3.c
ar crT libtls.a asn1.o bignum.o pkcs1.o pkcs5.o pkcs8.o rsa.o tlsv1_client.o tlsv1_client_read.o tlsv1_client_write.o tlsv1_common.o tlsv1_cred.o tlsv1_record.o tlsv1_server.o tlsv1_server_read.o tlsv1_server_write.o x509v3.o
make[1]: Выход из каталога `/root/reaver-wps-fork-t6x-master/src/tls'
(cd crypto && make)
make[1]: Вход в каталог `/root/reaver-wps-fork-t6x-master/src/crypto'
  CC  aes-cbc.c
  CC  aes-ctr.c
  CC  aes-eax.c
  CC  aes-encblock.c
  CC  aes-internal.c
  CC  aes-internal-dec.c
  CC  aes-internal-enc.c
  CC  aes-omac1.c
  CC  aes-unwrap.c
  CC  aes-wrap.c
  CC  des-internal.c
  CC  dh_group5.c
  CC  dh_groups.c
  CC  md4-internal.c
  CC  md5.c
  CC  md5-internal.c
  CC  md5-non-fips.c
  CC  milenage.c
  CC  ms_funcs.c
  CC  rc4.c
  CC  sha1.c
  CC  sha1-internal.c
  CC  sha1-pbkdf2.c
  CC  sha1-tlsprf.c
  CC  sha1-tprf.c
  CC  sha256.c
  CC  sha256-internal.c
  CC  crypto_internal.c
  CC  crypto_internal-cipher.c
  CC  crypto_internal-modexp.c
  CC  crypto_internal-rsa.c
  CC  tls_internal.c
  CC  fips_prf_internal.c
ar crT libcrypto.a aes-cbc.o aes-ctr.o aes-eax.o aes-encblock.o aes-internal.o aes-internal-dec.o aes-internal-enc.o aes-omac1.o aes-unwrap.o aes-wrap.o des-internal.o dh_group5.o dh_groups.o md4-internal.o md5.o md5-internal.o md5-non-fips.o milenage.o ms_funcs.o rc4.o sha1.o sha1-internal.o sha1-pbkdf2.o sha1-tlsprf.o sha1-tprf.o sha256.o sha256-internal.o crypto_internal.o crypto_internal-cipher.o crypto_internal-modexp.o crypto_internal-rsa.o tls_internal.o fips_prf_internal.o
make[1]: Выход из каталога `/root/reaver-wps-fork-t6x-master/src/crypto'
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. wpsmon.c globule.o init.o misc.o 80211.o iface.o builder.o crc.o libwps/libwps.o wps/wps_attr_build.o wps/wps_attr_parse.o wps/wps_attr_process.o wps/wps.o wps/wps_common.o wps/wps_dev_attr.o wps/wps_enrollee.o wps/wps_registrar.o wps/wps_ufd.o utils/libutils.a crypto/libcrypto.a tls/libtls.a lwe/libiw.a -ldl -lm -lpcap -lsqlite3  -o wash
wpsmon.c: In function ‘parse_wps_settings’:
wpsmon.c:361:26: warning: unused variable ‘encryption’ [-Wunused-variable]
     enum encryption_type encryption = NONE;
                          ^
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. argsparser.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. sigint.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function sigalrm.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function keys.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function pins.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function send.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. exchange.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. session.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. cracker.c -c
gcc -DCONF_DIR='"/usr/local/etc/reaver"' -DREAVER_DATABASE='"/usr/local/etc/reaver/reaver.db"' -Wall -g -O2 -Wno-unused-function -Ilibwps -I. wpscrack.c argsparser.o globule.o init.o sigint.o iface.o sigalrm.o misc.o cracker.o sql.o session.o send.o pins.o 80211.o exchange.o builder.o keys.o crc.o libwps/libwps.o wps/wps_attr_build.o wps/wps_attr_parse.o wps/wps_attr_process.o wps/wps.o wps/wps_common.o wps/wps_dev_attr.o wps/wps_enrollee.o wps/wps_registrar.o wps/wps_ufd.o utils/libutils.a crypto/libcrypto.a tls/libtls.a lwe/libiw.a -ldl -lm -lpcap -lsqlite3  -o reaver
wpscrack.c: In function ‘main’:
wpscrack.c:134:19: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
             system(get_exec_string());

what could be the cause of the error?



ZEROF

  • Hero Member
  • *****
  • Posts: 1247
    • View Profile
    • Pen Tester
Reply #1 on: December 03, 2016, 04:05:23 PM
Hi,

First of all this are not errors, only warnings, nothing to "worry" about. Did you even try to run make install; if you get error and not warnings in this point, then you have issue. And this tool is PoC, not always up to day with system kernel, gcc etc... tool. I'm using docker for this kind of situation to build all with dependency, like that i don't touch main system settings. Maybe that is overkill for you, but in the future will be best practice.


Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*


GhostWarriors

  • Newbie
  • *
  • Posts: 2
    • View Profile
Reply #2 on: December 04, 2016, 06:23:05 AM
Thanks for the answer, but true! it was just a warning. I reinstalled the system. Now I have a router with the included wps and newly installed Backbox linux 4.5.
includes monitoring mode:
Quote
airmon-ng start wlan0
Executes the command:
Quote
reaver -i mon0 -c 1 -b {mac} -vv
I keep getting an error:
Code: [Select]
[+] Switching mon0 to channel 1
[+] Waiting for beacon from {mac}
[!] WARNING: Failed to associate with {mac} (ESSID: (null))
[!] WARNING: Failed to associate with {mac} (ESSID: (null))
[!] WARNING: Failed to associate with {mac} (ESSID: TP-LINK)
[!] WARNING: Failed to associate with {mac} (ESSID: TP-LINK)
[!] WARNING: Failed to associate with {mac} (ESSID: TP-LINK)
[+] Associated with {mac} (ESSID: TP-LINK)
[+] Trying pin 12345670
[+] Sending EAPOL START request
[+] Sending WSC NACK
[!] WPS transaction failed (code: 0x04), re-trying last pin
[+] Trying pin 12345670
[+] Sending EAPOL START request
[+] Sending WSC NACK
[!] WPS transaction failed (code: 0x04), re-trying last pin
[+] Trying pin 12345670
[+] Sending EAPOL START request
[+] Sending WSC NACK
[!] WPS transaction failed (code: 0x04), re-trying last pin
[+] Trying pin 12345670
[+] Sending EAPOL START request
[+] Sending WSC NACK
[!] WPS transaction failed (code: 0x04), re-trying last pin
^ C
[+] Nothing done, nothing to save.

reaver version:
Code: [Select]
Reaver v1.4 WiFi Protected Setup Attack Tool
Copyright (c) 2011, Tactical Network Solutions, Craig Heffner <cheffner@tacnetsol.com>

wash version: (not working)
Code: [Select]
Wash v1.4 WiFi Protected Setup Scan Tool
Copyright (c) 2011, Tactical Network Solutions, Craig Heffner <cheffner@tacnetsol.com>

I saw your page in github. There has been a lot of useful scripts such as here: https://gist.github.com/ZEROF/fb790b35098be3bafcaf
You can make a similar script to build reaver t6x 1.5 + wash 1.5 + pixie dust attack for backbox linux? It would be great!
« Last Edit: December 04, 2016, 06:34:30 AM by GhostWarriors »



ZEROF

  • Hero Member
  • *****
  • Posts: 1247
    • View Profile
    • Pen Tester
Reply #3 on: December 04, 2016, 11:19:47 AM
Hi,

To be honest, I didn't play with wifi pentesting for few years now, but i know that you miss few commands before reaver.

To check if network manager etc.are realy down:

airmon-ng check

If you get:

~# airmon-ng check
Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!

  PID Name
  718 NetworkManager
  870 dhclient
 1104 avahi-daemon
 1105 avahi-daemon
 1115 wpa_supplicant


Then you need to run airmon-ng check kill.

About wash .... never worked in real life situation for me, and i didn't even spend time to learn why. I used wireshark for this job, this is good "how to" about hanting wps with wireshark https://blog.andregasser.net/how-to-check-if-wi-fi-protected-setup-wps-is-enabled/.

In the end, I tested one more "reaver type" tool, much faster on same test: https://github.com/judocol/bully (check on github if you can find some fork, or updated version of this tool). Tool have some downside as reaver, something like "i don give a sh..." i will attack even when WPS isn't enabled and just constantly attack the AP with pin attempts.


For script, i don't see what here can be usefull for other people, but sure I can make some kind of automatization for this attack, but for how long script will be usefull, that I can't say. Maybe you can try to write something and learn some new stuff, i can be around to debug your script :).
« Last Edit: December 04, 2016, 11:22:39 AM by ZEROF »


Don't ask, read : http://wiki.backbox.org
or just run sudo rm -rf /*