opensecurityresearch / hostapd-wpe Goto Github PK
View Code? Open in Web Editor NEWModified hostapd to facilitate AP impersonation attacks
Modified hostapd to facilitate AP impersonation attacks
hostapd-wpe (Wireless Pwnage Edition) [email protected] twitter: @brad_anton ------------------------------------------ The current hostapd-wpe.patch is for: hostapd-2.6.tar.gz About ---------- hostapd-wpe is the replacement for FreeRADIUS-WPE (http://www.willhackforsushi.com/?page_id=37). It implements IEEE 802.1x Authenticator and Authentication Server impersonation attacks to obtain client credentials, establish connectivity to the client, and launch other attacks where applicable. hostapd-wpe supports the following EAP types for impersonation: 1. EAP-FAST/MSCHAPv2 (Phase 0) 2. PEAP/MSCHAPv2 3. EAP-TTLS/MSCHAPv2 4. EAP-TTLS/MSCHAP 5. EAP-TTLS/CHAP 6. EAP-TTLS/PAP Once impersonation is underway, hostapd-wpe will return an EAP-Success message so that the client believes they are connected to their legitimate authenticator. For 802.11 clients, hostapd-wpe also implements Karma-style gratuitous probe responses. Inspiration for this was provided by JoMo-Kun's patch for older versions of hostapd. http://www.foofus.net/?page_id=115 hostapd-wpe also implements CVE-2014-0160 (Heartbleed) attacks against vulnerable clients. Inspiration for this was provided by the Cupid PoC: https://github.com/lgrangeia/cupid hostapd-wpe logs all data to stdout and hostapd-wpe.log Quick Usage -------- Once hostapd-wpe.patch is applied, hostapd-wpe.conf will be created at /path/to/build/hostapd/hostapd-wpe.conf. See that file for more information. Note that /path/to/build/hostapd/hostapd-wpe.eap_users will also be created, and hostapd-wpe is dependent on it. Basic usage is: hostapd-wpe hostapd-wpe.conf Credentials will be displayed on the screen and stored in hostapd-wpe.log Additional WPE command line options are: -s Return EAP-Success messages after credentials are harvested -k Gratuitous probe responses (Karma mode) -c Attempt to exploit CVE-2014-0160 (Cupid mode) Building --------- $ git clone https://github.com/OpenSecurityResearch/hostapd-wpe Ubuntu/Debian/Kali Building - ----------------------------------------------------------------------- $ apt-get update $ apt-get install libssl-dev libnl-dev if you're using Kali 2.0 install: $ apt-get install libssl-dev libnl-genl-3-dev General - ------------------------------------------------------------------------ Now apply the hostapd-wpe.patch: $ git clone https://github.com/OpenSecurityResearch/hostapd-wpe $ wget http://hostap.epitest.fi/releases/hostapd-2.6.tar.gz $ tar -zxf hostapd-2.6.tar.gz $ cd hostapd-2.6 $ patch -p1 < ../hostapd-wpe/hostapd-wpe.patch $ cd hostapd If you're using Kali 2.0 edit .config file and uncomment: CONFIG_LIBNL32=y $ make I copied the certs directory and scripts from FreeRADIUS to ease that portion of things. You should just be able to: $ cd ../../hostapd-wpe/certs $ ./bootstrap then finally just: $ cd ../../hostapd-2.6/hostapd $ sudo ./hostapd-wpe hostapd-wpe.conf Running: ---------------- With all of that complete, you can run hostapd. The patch will create a new hostapd-wpe.conf, which you'll likely need to modify in order to make it work for your attack. Once ready just run hostapd hostapd-wpe.conf Look in the output for the username/challenge/response. It'll be there and in a hostapd-wpe.log file in the directory you ran hostapd from for instance here are the EAP-FAST Phase 0 creds from stdout: username: jdslfkjs challenge: bc:87:6c:48:37:d3:92:6e response: 2d:00:61:59:56:06:02:dd:35:4a:0f:99:c8:6b:e1:fb:a3:04:ca:82:40:92:7c:f0 and as always, we feed them into asleap to crack: # asleap -C bc:87:6c:48:37:d3:92:6e -R 2d:00:61:59:56:06:02:dd:35:4a:0f:99:c8:6b:e1:fb:a3:04:ca:82:40:92:7c:f0 -W wordlist asleap 2.2 - actively recover LEAP/PPTP passwords. <[email protected]> hash bytes: b1ca NT hash: e614b958df9df49ec094b8730f0bb1ca password: bradtest Alternatively MSCHAPv2 credentials are outputted in john the rippers NETNTLM format. EAP-Success -------------- Certain EAP types do not require the server to authenticate itself, just to validate the client's submitted credentials. Since we're playing the authentication server, that means we can easily just return an EAP-Success message to the client regardless of what they send us. The client is happy because they've connected, but unfortunately are unaware that they are connected to an unapproved authenticator. At this point, the attacker can set up a dhcp server and give the client an IP and then do whatever they'd like (e.g. redirect dns, launch attacks, MiTM, etc..) MSCHAPv2 protects against this by having the server prove knowledge of the password most supplicants adhere to this policy, but we return EAP-Success just in case. Karma-Style Probes ------------------ This functionality simply waits for an client to send a directed probe, when it does, it assumes that SSID and responds to the client. Only applicable to 802.11 clients. A note on MSCHAPv2 ------------------- Microsoft offers something called "Computer Based Authentication". When a computer joins a domain it is assigned a password. This password is stored on the system and in active directory. We can harvest the MSCHAPv2 response from these systems but its going to take a lifetime to crack. Unless you're just trying to solve for the hash, and not the actual password :) One other thing to note, if the client returns all zeros, it isnt joined to a domain. Testing Heartbleed --------------- If you're running Ubuntu and want to test Heartbleed you'll need to downgrade to a vulnerable version of OpenSSL. That can be done by: wget https://launchpad.net/~ubuntu-security/+archive/ubuntu/ppa/+build/5436465/+files/openssl_1.0.1-4ubuntu5.11_i386.deb wget https://launchpad.net/~ubuntu-security/+archive/ubuntu/ppa/+build/5436465/+files/libssl-dev_1.0.1-4ubuntu5.11_i386.deb wget https://launchpad.net/~ubuntu-security/+archive/ubuntu/ppa/+build/5436465/+files/libssl-doc_1.0.1-4ubuntu5.11_all.deb wget https://launchpad.net/~ubuntu-security/+archive/ubuntu/ppa/+build/5436465/+files/libssl1.0.0_1.0.1-4ubuntu5.11_i386.deb sudo dpkg -i libssl1.0.0_1.0.1-4ubuntu5.11_i386.deb sudo dpkg --install libssl1.0.0_1.0.1-4ubuntu5.11_i386.deb \ libssl-dev_1.0.1-4ubuntu5.11_i386.deb \ libssl-doc_1.0.1-4ubuntu5.11_all.deb \ openssl_1.0.1-4ubuntu5.11_i386.deb The use wpa_supplicant to connect to hostapd-wpe -c
Hi
Would it be possible to set a fixed challenge for eap to 11:22:33:44:55:66:77:88 ?
I believe it would help to crack the netntlmv1 .
Thanks
update: 2.4 is the latest
The new version of hostapd 2.3 is out:
http://w1.fi/cgit/hostap/plain/hostapd/ChangeLog
Please port the patch as well.
Hello Team,
While trying to pentest wpa-enterprise, i have faced the issue mentioned in the subject line. From google history i came across that this issue came earlier too but you guys fixed this. Not sure why this is again hit in case of me.
Initially i installed hostapd-wpe by apt get hostapd-wpe which installed V2.9 and for that i hit the issue.
Just to mention, i am hitting the issue for non domain user.
Now, while going through the Readme and issue #19 of this repo, i followed the steps mentioned,
General -
------------------------------------------------------------------------
Now apply the hostapd-wpe.patch:
$ git clone https://github.com/OpenSecurityResearch/hostapd-wpe
$ **wget http://hostap.epitest.fi/releases/hostapd-2.6.tar.gz** -- This link is working but the link you provided in Readme is not working.
$ tar -zxf hostapd-2.6.tar.gz
$ cd hostapd-2.6
$ patch -p1 < ../hostapd-wpe/hostapd-wpe.patch
$ cd hostapd
If you're using Kali 2.0 edit .config file and uncomment:
CONFIG_LIBNL32=y
$ make
I copied the certs directory and scripts from FreeRADIUS to ease that
portion of things. You should just be able to:
$ cd ../../hostapd-wpe/certs
$ ./bootstrap
then finally just:
$ cd ../../hostapd-2.6/hostapd
$ sudo ./hostapd-wpe hostapd-wpe.conf
Now, when i try to login, below is the o/p i receive in case of hostapd-wpe version 2.6:
root@kali:~/hostapd-2.6/hostapd# ./hostapd-wpe hostapd-wpe.conf
Configuration file: hostapd-wpe.conf
Using interface wlan0 with hwaddr xxxxxxx and ssid "test"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: STA xxxxxxxx IEEE 802.11: associated
wlan0: CTRL-EVENT-EAP-STARTED xxxxxxxx
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25
mschapv2: Mon Feb 28 17:26:36 2022
username: test
challenge: 53:7a:33:3a:a2:08:38:07
response: 95:e1:4a:5b:6c:0a:18:26:8e:18:7b:da:0b:30:c4:d8:af:d3:38:ad:c5:f3:86:ae
jtr NETNTLM: test:$NETNTLM$537a333aa2083807$95e14a5b6c0a18268e187bda0b30c4d8afd338adc5f386ae
wlan0: STA 9c:30:5b:12:55:9d IEEE 802.11: disassociated
wlan0: INTERFACE-DISABLED
wlan0: INTERFACE-ENABLED
Now when i try to crack it using asleap, i get the below o/p:
root@kali:~# asleap -C 53:7a:33:3a:a2:08:38:07 -R 95:e1:4a:5b:6c:0a:18:26:8e:18:7b:da:0b:30:c4:d8:af:d3:38:ad:c5:f3:86:ae -W rockyou.txt
asleap 2.3 - actively recover LEAP/PPTP passwords. [email protected]
Using wordlist mode with "rockyou.txt".
Could not recover last 2 bytes of hash from the
challenge/response. Sorry it didn't work out.
I'd earnestly request you to please help me so that i can succeed in this. Its an earnest request to you all. @brad-anton @s0lst1c3 @SvenTo @Rogdham and all.
Thanks & Regards
Hi. Been trying to compile this on Android and I'm not sure if the patch stops it from working or if I am doing something wrong.
I've installed the Android NDK and built the tool chain like so:
cd /opt/android-ndk/build/tools
/make_standalone_toolchain.py --arch arm --api 24 --install-dir=/opt/android-ndk/arm-toolchain-api24
export CC=arm-linux-androideabi-gcc
export PATH=$PATH:/opt/android-ndk/arm-toolchain-api24/bin
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/opt/android-ndk/arm-toolchain-api24/bin/arm-linux-androideabi-
CFLAGS=' -MMD -O2 -Wall -g -I/usr/include/openssl-1.0 -I/usr/include/libnl3' LDFLAGS=' -L/usr/lib/openssl-1.0 ' make
Which gives the following output:
CC main.c
CC config_file.c
CC ../src/ap/hostapd.c
CC ../src/ap/wpa_auth_glue.c
CC ../src/ap/drv_callbacks.c
CC ../src/ap/ap_drv_ops.c
CC ../src/ap/utils.c
CC ../src/ap/authsrv.c
CC ../src/ap/ieee802_1x.c
CC ../src/ap/ap_config.c
CC ../src/ap/eap_user_db.c
CC ../src/ap/ieee802_11_auth.c
CC ../src/ap/sta_info.c
CC ../src/ap/wpa_auth.c
CC ../src/ap/tkip_countermeasures.c
CC ../src/ap/ap_mlme.c
CC ../src/ap/wpa_auth_ie.c
CC ../src/ap/preauth_auth.c
CC ../src/ap/pmksa_cache_auth.c
CC ../src/ap/ieee802_11_shared.c
CC ../src/ap/beacon.c
CC ../src/ap/bss_load.c
CC ../src/ap/neighbor_db.c
CC ../src/ap/rrm.c
CC ../src/wpe/wpe.c
CC ../src/drivers/drivers.c
CC ../src/utils/eloop.c
CC ../src/utils/common.c
CC ../src/utils/wpa_debug.c
CC ../src/utils/wpabuf.c
CC ../src/utils/os_unix.c
CC ../src/utils/ip_addr.c
CC ../src/common/ieee802_11_common.c
CC ../src/common/wpa_common.c
CC ../src/common/hw_features_common.c
CC ../src/eapol_auth/eapol_auth_sm.c
CC ../src/eapol_auth/eapol_auth_dump.c
CC ../src/radius/radius.c
CC ../src/radius/radius_client.c
CC ../src/radius/radius_das.c
CC ../src/ap/vlan_init.c
CC ../src/ap/vlan_ifconfig.c
CC ../src/ap/vlan.c
CC ../src/common/ctrl_iface_common.c
CC ctrl_iface.c
CC ../src/ap/ctrl_iface_ap.c
CC ../src/ap/iapp.c
CC ../src/ap/peerkey_auth.c
In file included from ../src/drivers/linux_wext.h:35:0,
from ../src/drivers/driver_hostap.c:12:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/wireless.h:451:12: error: 'IFNAMSIZ' undeclared here (not in a function)
char name[IFNAMSIZ];
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:48:0: warning: "NLMSG_ALIGNTO" redefined
#define NLMSG_ALIGNTO 4
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:86:0: note: this is the location of the previous definition
#define NLMSG_ALIGNTO 4U
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:49:0: warning: "NLMSG_ALIGN" redefined
#define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1))
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:87:0: note: this is the location of the previous definition
#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:51:0: warning: "NLMSG_LENGTH" redefined
#define NLMSG_LENGTH(len) ((len) + NLMSG_ALIGN(sizeof(struct nlmsghdr)))
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:90:0: note: this is the location of the previous definition
#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:53:0: warning: "NLMSG_DATA" redefined
#define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:92:0: note: this is the location of the previous definition
#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:54:0: warning: "NLMSG_NEXT" redefined
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:94:0: note: this is the location of the previous definition
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:57:0: warning: "NLMSG_OK" redefined
#define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:95:0: note: this is the location of the previous definition
#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len))
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:76:8: error: redefinition of 'struct sockaddr_nl'
struct sockaddr_nl
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:54:8: note: originally defined here
struct sockaddr_nl {
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:84:8: error: redefinition of 'struct nlmsghdr'
struct nlmsghdr
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:61:8: note: originally defined here
struct nlmsghdr {
^
../src/drivers/driver_hostap.c: In function 'hostap_init_sockets':
../src/drivers/driver_hostap.c:218:15: error: storage size of 'ifr' isn't known
struct ifreq ifr;
^
../src/drivers/driver_hostap.c:218:15: warning: unused variable 'ifr' [-Wunused-variable]
../src/drivers/driver_hostap.c: In function 'hostap_set_iface_flags':
../src/drivers/driver_hostap.c:348:15: error: storage size of 'ifr' isn't known
struct ifreq ifr;
^
../src/drivers/driver_hostap.c:348:15: warning: unused variable 'ifr' [-Wunused-variable]
../src/drivers/driver_hostap.c: In function 'hostapd_ioctl':
../src/drivers/driver_hostap.c:377:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
../src/drivers/driver_hostap.c: In function 'hostap_ioctl_prism2param':
../src/drivers/driver_hostap.c:491:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
../src/drivers/driver_hostap.c: In function 'hostap_set_ssid':
../src/drivers/driver_hostap.c:549:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
../src/drivers/driver_hostap.c: In function 'hostap_get_we_version':
../src/drivers/driver_hostap.c:912:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
../src/drivers/driver_hostap.c: In function 'hostap_set_freq':
../src/drivers/driver_hostap.c:1059:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
make: *** [Makefile:1037: ../src/drivers/driver_hostap.o] Error 1
When using mschapv2, is it possible instead of:
random_get_bytes(data->auth_challenge, CHALLENGE_LEN))
To ask the reap AP for a challenge and pass it to the target?
and then complete the circle with successful authentication?
I'm trying to set up the hostapd-wpe with a 802.11n network, but when I change the hostapd-wpe.conf file to support that standard, an error shows up when I launch hostapd-wpe. I am using the following WiFi adapter, which supports 802.11n: ALFA USB WiFi AWUS036NEH.
Here you have the error:
Configuration file: hostapd-wpe.conf
Line 514: unknown configuration item 'ieee80211n'
Line 550: unknown configuration item 'ht_capab'
2 errors found in configuration file 'hostapd-wpe.conf'
Failed to set up interface with hostapd-wpe.conf
Failed to initialize interface
And these are the lines I modified:
interface=wlan5
#0 = disabled (default)
#1 = enabled
ieee80211n=1
ht_capab=[HT40+][SHORT-GI-40][DSSS_CCK-40]
When I execute make
I get error in title; here's my stackoverflow question if you want to answer there: https://stackoverflow.com/questions/54115203/src-ap-iapp-c3710-fatal-error-netpacket-packet-h-file-not-found-hostapd
Thanks in advance
++++++++++++here is an example of what I got:++++++++++++++
username: username
challenge: ch:5e:fz:c0:0z:a0:zc:0z
response: re:3a:c3:dz:z4:40:zz:e8:z0:zf:z4:zz:3f:az:04:z0:zc:z3:zz:0f:zz:e4:8z:c5
jtr NETNTLM: username$NETNTLM$ch5efzc00za0zc0z$re3ac3dzz440zze8z0zfz4zz3faz04z0zcz3zz0fzze48zc5
++++++++++++what hashcat needs:++++++++++++++
Username:: Domain:Challenge:NTLMv2hash(aka HMAC-MD5):blob(entire NTLMv2 response except the HMAC that was in the preceding field)
++++++++++++what I am missing:++++++++++++++
Not sure. But I am expecting challenge, response and another thing.
Thank you!
I followed your steps but I got these erros while testing
"Configuration file: hostapd.conf
nl80211: Could not configure driver mode
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started"
Note: network-manager is stopped !!
Linux 4.14.50-kali-v7+
OpenSSL 1.1.0h 27 Mar 2018
CC main.c
CC config_file.c
CC ../src/ap/hostapd.c
CC ../src/ap/wpa_auth_glue.c
CC ../src/ap/drv_callbacks.c
CC ../src/ap/ap_drv_ops.c
CC ../src/ap/utils.c
CC ../src/ap/authsrv.c
CC ../src/ap/ieee802_1x.c
CC ../src/ap/ap_config.c
CC ../src/ap/eap_user_db.c
CC ../src/ap/ieee802_11_auth.c
CC ../src/ap/sta_info.c
CC ../src/ap/wpa_auth.c
CC ../src/ap/tkip_countermeasures.c
CC ../src/ap/ap_mlme.c
CC ../src/ap/wpa_auth_ie.c
CC ../src/ap/preauth_auth.c
CC ../src/ap/pmksa_cache_auth.c
CC ../src/ap/ieee802_11_shared.c
CC ../src/ap/beacon.c
CC ../src/ap/bss_load.c
CC ../src/ap/neighbor_db.c
CC ../src/ap/rrm.c
../src/wpe/wpe.c: In function 'wpe_hb_cb':
../src/wpe/wpe.c:193:27: error: 'TLS1_RT_HEARTBEAT' undeclared (first use in this function); did you mean 'DTLS1_RT_HEARTBEAT'?
if (v_content_type == TLS1_RT_HEARTBEAT) {
^~~~~~~~~~~~~~~~~
DTLS1_RT_HEARTBEAT
../src/wpe/wpe.c:193:27: note: each undeclared identifier is reported only once for each function it appears in
../src/wpe/wpe.c:195:14: error: dereferencing pointer to incomplete type 'SSL' {aka 'struct ssl_st'}
v_ssl->tlsext_hb_pending = 1;
^~
make: *** [Makefile:1037: ../src/wpe/wpe.o] Error 1
I did manage to build this application on x86_64 Debian but wasn't sure whether to just copy it over onto the pi2b+ armv7 or build it anew on the device itself . I figured building it on the device it'll be running on would be best . Thing is the openssl version isn't exactly the one the build requires . On the Debian VM i 've put a hold on the openssl version 1.0 , the arm's os is a fresh Kali-lite arm/pi2 install .I specifically wanted to test it as a portable wifi AP .
I use default Kali version of hostapt-wpe. I install it through apt repositories.
When I configure and run it it works perfect. if I enter a string username such as 'test' it accepts and print out the challenge and response. If I enter a username between 000000-599999 and 900000-999999 it still accepts and print out the hashes. However when I enter username between 600000-899999 it couldn't printout hashes. For example this is one f the simple output
`onfiguration file: /etc/hostapd-wpe/hostapd-wpe.conf
Using interface wlan0 with hwaddr 66:55:44:33:22:11 and ssid "hostapd-wpe"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: authenticated
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: associated (aid 1)
wlan0: CTRL-EVENT-EAP-STARTED 11:22:33:44:55:66
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25
mschapv2: Thu Jul 13 09:47:16 2017
username: test
challenge: ec:4f:c3:6d:be:7b:79:75
response: 72:8b:e0:16:0b:25:0e:1a:7a:39:19:2f:47:2f:4a:39:a4:8d:73:94:70:db:56:18
jtr NETNTLM: test:$NETNTLM$ec4fc36dbe7b7975$728be0160b250e1a7a39192f472f4a39a48d739470db5618
wlan0: CTRL-EVENT-EAP-FAILURE 11:22:33:44:55:66
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: authentication failed - EAP type: 0 (unknown)
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: Supplicant used different EAP type: 25 (PEAP)
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: disassociated
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: deauthenticated due to local deauth request
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: authenticated
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: associated (aid 1)
wlan0: CTRL-EVENT-EAP-STARTED 11:22:33:44:55:66
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25
mschapv2: Thu Jul 13 09:47:31 2017
username: 123456
challenge: 99:4f:26:55:3d:45:ed:1a
response: 19:b3:99:49:88:13:39:c8:7b:2b:cf:82:c0:65:ce:e2:64:8d:69:27:c8:02:52:d6
jtr NETNTLM: 123456:$NETNTLM$994f26553d45ed1a$19b39949881339c87b2bcf82c065cee2648d6927c80252d6
wlan0: CTRL-EVENT-EAP-FAILURE 11:22:33:44:55:66
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: authentication failed - EAP type: 0 (unknown)
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: Supplicant used different EAP type: 25 (PEAP)
###########################################################
{I add this line manually. I try to username as 612345 (anything is same between 600000 - 899999) and it gave the result below. I modified mac addresses purposely}
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: authenticated
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: associated (aid 1)
wlan0: CTRL-EVENT-EAP-STARTED 11:22:33:44:55:66
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
EAP-AKA: eap_sim_db not configured
wlan0: CTRL-EVENT-EAP-FAILURE 11:22:33:44:55:66
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: authentication failed - EAP type: 0 (unknown)
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: Supplicant used different EAP type: 1 (Identity)
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: authenticated
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: associated (aid 1)
wlan0: CTRL-EVENT-EAP-STARTED 11:22:33:44:55:66
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
EAP-AKA: eap_sim_db not configured
wlan0: CTRL-EVENT-EAP-FAILURE 11:22:33:44:55:66
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: authentication failed - EAP type: 0 (unknown)
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: Supplicant used different EAP type: 1 (Identity)
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: authenticated
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: associated (aid 1)
wlan0: CTRL-EVENT-EAP-STARTED 11:22:33:44:55:66
wlan0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=1
EAP-AKA: eap_sim_db not configured
wlan0: CTRL-EVENT-EAP-FAILURE 11:22:33:44:55:66
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: authentication failed - EAP type: 0 (unknown)
wlan0: STA 11:22:33:44:55:66 IEEE 802.1X: Supplicant used different EAP type: 1 (Identity)
wlan0: STA 11:22:33:44:55:66 IEEE 802.11: deauthenticated due to local deauth request
^Cwlan0: interface state ENABLED->DISABLED
wlan0: AP-DISABLED
nl80211: deinit ifname=wlan0 disabled_11b_rates=0`
Hey,
using the -k option without logging the ssid is not very helpful. I put log level on verbose debugging and startet hostapd-wpe. On my tablet I created an EAP profile with a different ssid. hostaped-wpe logged the handshake but not the ssid.
This code seems not get executed:
wpa_printf(MSG_MSGDUMP,"[WPE] Probe request from " MACSTR ", changing SSID to '%s'", MAC2STR(mgmt->sa), wpa_ssid_txt(elems.ssid, elems.ssid_len));
I want to study airgeddon on Raspberry Pi 4 OS, but it says hostapd-wpe is missing. I found that hostapd dependency is installed by default on Raspberry Pi system. Is hostapd not equivalent to hostapd-wpe? How can I install hostapd-wpe successfully? Thank you.
System version: Debian GNU/Linux 11 (bullseye)
Going through the config file i came across a setting which puzzles me somewhat, i don't think i set it myself and forgot about it either, so it must be a default active setting either inherited from the patch or was set as a hostapd default conf..I'm talking about
# IEEE 802.11 specifies two authentication algorithms. hostapd can be
# configured to allow both of these or only one. Open system authentication
# should be used with IEEE 802.1X.
# Bit fields of allowed authentication algorithms:
# bit 0 = Open System Authentication
# bit 1 = Shared Key Authentication (requires WEP)
auth_algs=3 < ?
thanks ahead for any clarification
live long & prosper ./..
Hi,
Installed hostapd-wpe by cloning https://github.com/OpenSecurityResearch/hostapd-wpe and all steps were followed as written in the documentation, including applying hostapd-wpe.patch. But each time we run asleap against the captured hashes, following is presented:
Could not recover last 2 bytes of hash from the challenge/response. Sorry it didn't work out.
There was a fix for FreeRADIUS(with_ntdomain_hack = yes) but is there anything similar required for hostapd-wpe?
Also, on another issue raised under aircrack-ng aircrack-ng/aircrack-ng#104
one user had commented that this has been fixed in 2.6 release.
Can someone clarify further on this?
Thanks,
~ A
Hi, I am using Arch linux.
I do have installed openssl-1.0, however, openssl is used by default and openssl-1.0 is in subdir...
/usr/include/openssl-1.0/openssl/
and
/usr/include/openssl/
How can I resolve this?
Edit:
Ok. I fixed this with:
CFLAGS=' -MMD -O2 -Wall -g -I/usr/include/openssl-1.0 ' LDFLAGS=' -L/usr/lib/openssl-1.0 ' make
But problem I have now is:
make[1]: Entering directory '/home/nemanjan00/projects/hostapd-2.6/src/ap'
ndisc_snoop.c:57:6: error: redefinition of ‘sta_ip6addr_del’
void sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta)
^~~~~~~~~~~~~~~
In file included from ndisc_snoop.c:20:
ndisc_snoop.h:29:20: note: previous definition of ‘sta_ip6addr_del’ was here
static inline void sta_ip6addr_del(struct hostapd_data *hapd,
^~~~~~~~~~~~~~~
ndisc_snoop.c:167:5: error: redefinition of ‘ndisc_snoop_init’
int ndisc_snoop_init(struct hostapd_data *hapd)
^~~~~~~~~~~~~~~~
In file included from ndisc_snoop.c:20:
ndisc_snoop.h:20:19: note: previous definition of ‘ndisc_snoop_init’ was here
static inline int ndisc_snoop_init(struct hostapd_data *hapd)
^~~~~~~~~~~~~~~~
ndisc_snoop.c:182:6: error: redefinition of ‘ndisc_snoop_deinit’
void ndisc_snoop_deinit(struct hostapd_data *hapd)
^~~~~~~~~~~~~~~~~~
In file included from ndisc_snoop.c:20:
ndisc_snoop.h:25:20: note: previous definition of ‘ndisc_snoop_deinit’ was here
static inline void ndisc_snoop_deinit(struct hostapd_data *hapd)
^~~~~~~~~~~~~~~~~~
https://twitter.com/W00Tock/status/1019251419310972930
Edit file "hostapd-wpe.eap_user" (You can replace PEAP with FAST)
-snip- EAP-GTC: Response password: -snip-
By configuring the eap)user file, you can request from Apple and Android devices a GTC clear text password - which is shown in the debug console, but is currently not logged.
Thank you very much.
in kali linux 2016.2 amd64
error at apt-get install libssl-dev libnl-dev
Unable to locate package libssl-dev
E: Unable to locate package libnl-dev
Hi, I'm trying to set up two APs with the same interface, because I want one of them to not be fake, so I can connect to the router via SSH. But my laptop is stuck on "Obtaining IP address". I suppose it's a problem with DHCP settings located at /etc/config/dhcp
. Someone got through this problem?
I'm running this tool on OpenWRT 15.05.
can this method if it been optimized .... show the clear password or decrypt the encrypted password with some sort of mastery key??
https://www.youtube.com/watch?v=HoihKhQWZ7k&feature=youtu.be
does hostapd-wpe provide a way to make a mitm in a WPA2 network?
I mean, without EAP authentication; just a normal wpa2 with passphrase.
I've successfully modified the configuration to provide a wpa-psk access point with the needed cipher but I can't actually log the authentications insesrted by clients.
Anyone can help me?
Or am I on the wrong project?
Thanks you all!
Hi,
I have used this tool successfully for wireless attacks before. I am now trying to use this tool for a wired rogue PEAP attack.
I can see the client connecting: vendor=0 method=1. But when I input a password in the client, the hash doesnt appear in the rogue server.
Any idea how to fix this?
Thanks
ii openssl 0.9.8k-7ubuntu8.8 Secure Socket Layer (SSL) binary and related
root@peter-laptophostapd # make
../src/wpe/wpe.c: In function ‘wpe_hb_cb’:
../src/wpe/wpe.c:193: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function)
../src/wpe/wpe.c:193: error: (Each undeclared identifier is reported only once
../src/wpe/wpe.c:193: error: for each function it appears in.)
../src/wpe/wpe.c:195: error: ‘SSL’ has no member named ‘tlsext_hb_pending’
make: *** [../src/wpe/wpe.o] Error 1
root@peter-laptophostapd #
root@kali:/Desktop# git clone https://github.com/OpenSecurityResearch/hostapd-wpe/Desktop# apt-get update
Cloning into 'hostapd-wpe'...
remote: Counting objects: 51, done.
remote: Total 51 (delta 0), reused 0 (delta 0), pack-reused 51
Unpacking objects: 100% (51/51), done.
root@kali:
Get:1 http://mirrors.ocf.berkeley.edu/kali kali-rolling InRelease [30.5 kB]
Get:2 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 Packages [15.1 MB]
Get:3 http://mirrors.ocf.berkeley.edu/kali kali-rolling/non-free amd64 Packages [165 kB]
Get:4 http://mirrors.ocf.berkeley.edu/kali kali-rolling/contrib amd64 Packages [108 kB]
Fetched 15.4 MB in 19s (794 kB/s)
Reading package lists... Done
root@kali:~/Desktop# apt-get install libssl-dev libnl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libnl-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libnl-dev' has no installation candidate
root@kali:/Desktop# apt-get install libssl-dev libnl-genl-3-dev/Desktop# git clone https://github.com/OpenSecurityResearch/hostapd-wpe
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gdebi-core iproute libcrypto++6 libjavascriptcoregtk-1.0-0 libladr4
libnm-gtk-common libqt4-opengl libqtwebkit4 libvpx3 libwebkitgtk-1.0-0
prover9 python-cluster python-darts.lib.utils.lru python-esmre python-git
python-gitdb python-guess-language python-halberd python-ipaddr
python-ndg-httpsclient python-nltk python-pdfminer python-phply python-ply
python-psutil python-pybloomfiltermmap python-pyclamd python-pycryptopp
python-pygithub python-ruamel.ordereddict python-smmap python-tblib
python-vulndb python-webkit python-xdot w3af w3af-console
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libnl-3-200 libnl-3-dev libnl-genl-3-200 libnl-route-3-200 libssl-doc
libssl1.1
The following NEW packages will be installed:
libnl-3-dev libnl-genl-3-dev libssl-dev libssl-doc libssl1.1
The following packages will be upgraded:
libnl-3-200 libnl-genl-3-200 libnl-route-3-200
3 upgraded, 5 newly installed, 0 to remove and 883 not upgraded.
Need to get 3,333 kB/4,674 kB of archives.
After this operation, 15.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-route-3-200 amd64 3.2.27-1+b1 [136 kB]
Get:2 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-genl-3-200 amd64 3.2.27-1+b1 [21.2 kB]
Get:3 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-3-200 amd64 3.2.27-1+b1 [61.6 kB]
Get:4 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-3-dev amd64 3.2.27-1+b1 [96.5 kB]
Get:5 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libnl-genl-3-dev amd64 3.2.27-1+b1 [20.4 kB]
Get:6 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libssl-dev amd64 1.1.0e-1 [1,572 kB]
Get:7 http://mirrors.ocf.berkeley.edu/kali kali-rolling/main amd64 libssl-doc all 1.1.0e-1 [1,425 kB]
Fetched 3,333 kB in 3s (882 kB/s)
Reading changelogs... Done
Preconfiguring packages ...
Selecting previously unselected package libssl1.1:amd64.
(Reading database ... 317973 files and directories currently installed.)
Preparing to unpack .../0-libssl1.1_1.1.0e-1_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.0e-1) ...
Preparing to unpack .../1-libnl-route-3-200_3.2.27-1+b1_amd64.deb ...
Unpacking libnl-route-3-200:amd64 (3.2.27-1+b1) over (3.2.27-1) ...
Preparing to unpack .../2-libnl-genl-3-200_3.2.27-1+b1_amd64.deb ...
Unpacking libnl-genl-3-200:amd64 (3.2.27-1+b1) over (3.2.27-1) ...
Preparing to unpack .../3-libnl-3-200_3.2.27-1+b1_amd64.deb ...
Unpacking libnl-3-200:amd64 (3.2.27-1+b1) over (3.2.27-1) ...
Selecting previously unselected package libnl-3-dev:amd64.
Preparing to unpack .../4-libnl-3-dev_3.2.27-1+b1_amd64.deb ...
Unpacking libnl-3-dev:amd64 (3.2.27-1+b1) ...
Selecting previously unselected package libnl-genl-3-dev:amd64.
Preparing to unpack .../5-libnl-genl-3-dev_3.2.27-1+b1_amd64.deb ...
Unpacking libnl-genl-3-dev:amd64 (3.2.27-1+b1) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../6-libssl-dev_1.1.0e-1_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.0e-1) ...
Selecting previously unselected package libssl-doc.
Preparing to unpack .../7-libssl-doc_1.1.0e-1_all.deb ...
Unpacking libssl-doc (1.1.0e-1) ...
Processing triggers for libc-bin (2.24-9) ...
Setting up libssl1.1:amd64 (1.1.0e-1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libssl-doc (1.1.0e-1) ...
Setting up libnl-3-200:amd64 (3.2.27-1+b1) ...
Setting up libssl-dev:amd64 (1.1.0e-1) ...
Setting up libnl-3-dev:amd64 (3.2.27-1+b1) ...
Setting up libnl-genl-3-200:amd64 (3.2.27-1+b1) ...
Setting up libnl-route-3-200:amd64 (3.2.27-1+b1) ...
Setting up libnl-genl-3-dev:amd64 (3.2.27-1+b1) ...
Processing triggers for libc-bin (2.24-9) ...
root@kali:
fatal: destination path 'hostapd-wpe' already exists and is not an empty directory.
root@kali:/Desktop# sudo git clone https://github.com/OpenSecurityResearch/hostapd-wpe/Desktop# wget http://hostap.epitest.fi/releases/hostapd-2.2.tar.gz
fatal: destination path 'hostapd-wpe' already exists and is not an empty directory.
root@kali:
--2017-03-29 14:33:15-- http://hostap.epitest.fi/releases/hostapd-2.2.tar.gz
Resolving hostap.epitest.fi (hostap.epitest.fi)... 212.71.239.96
Connecting to hostap.epitest.fi (hostap.epitest.fi)|212.71.239.96|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://w1.fi/releases/hostapd-2.2.tar.gz [following]
--2017-03-29 14:33:16-- http://w1.fi/releases/hostapd-2.2.tar.gz
Resolving w1.fi (w1.fi)... 212.71.239.96
Reusing existing connection to hostap.epitest.fi:80.
HTTP request sent, awaiting response... 200 OK
Length: 1586482 (1.5M) [application/x-gzip]
Saving to: ‘hostapd-2.2.tar.gz’
hostapd-2.2.tar.gz 100%[===================>] 1.51M 321KB/s in 8.2s
2017-03-29 14:33:25 (188 KB/s) - ‘hostapd-2.2.tar.gz’ saved [1586482/1586482]
grep default_days ca.cnf | sed 's/.*=//;s/^ *//'
-config ./ca.cnfopenssl ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key grep output_password ca.cnf | sed 's/.*=//;s/^ *//'
-out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
Using configuration from ./server.cnf
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 1 (0x1)
Validity
Not Before: Mar 29 18:38:08 2017 GMT
Not After : Mar 29 18:38:08 2018 GMT
Subject:
countryName = FR
stateOrProvinceName = Radius
organizationName = Example Inc.
commonName = Example Server Certificate
emailAddress = [email protected]
X509v3 extensions:
X509v3 Extended Key Usage:
TLS Web Server Authentication
Certificate is to be certified until Mar 29 18:38:08 2018 GMT (365 days)
Write out database with 1 new entries
Data Base Updated
openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:grep output_password server.cnf | sed 's/.*=//;s/^ *//'
-passout pass:grep output_password server.cnf | sed 's/.*=//;s/^ *//'
openssl pkcs12 -in server.p12 -out server.pem -passin pass:grep output_password server.cnf | sed 's/.*=//;s/^ *//'
-passout pass:grep output_password server.cnf | sed 's/.*=//;s/^ *//'
MAC verified OK
openssl verify -CAfile ca.pem server.pem
server.pem: OK
openssl x509 -inform PEM -outform DER -in ca.pem -out ca.der
root@kali:/Desktop/hostapd-wpe/certs# cd ../../hostapd-2.2/hostapd/Desktop/hostapd-2.2/hostapd# sudo ./hostapd-wpe hostapd-wpe.conf
root@kali:
sudo: ./hostapd-wpe: command not found
root@kali:/Desktop/hostapd-2.2/hostapd# ls/Desktop/hostapd-2.2/hostapd# man make
android.config hlr_auc_gw.c hostapd.wpa_psk
Android.mk hlr_auc_gw.milenage_db hostapd-wpe.conf
ChangeLog hlr_auc_gw.txt hostapd-wpe.eap_user
config_file.c hostapd.8 logwatch
config_file.d hostapd.accept main.c
config_file.h hostapd_cli.1 main.d
config_file.o hostapd_cli.c main.o
ctrl_iface.c hostapd.conf Makefile
ctrl_iface.h hostapd.deny nt_password_hash.c
defconfig hostapd.eap_user README
eap_register.c hostapd.eap_user_sqlite README-WPS
eap_register.h hostapd.radius_clients wired.conf
eap_testing.txt hostapd.sim_db wps-ap-nfc.py
hapd_module_tests.c hostapd.vlan
root@kali:
root@kali:/Desktop/hostapd-2.2/hostapd# make -B
CC main.c
CC config_file.c
CC ../src/ap/hostapd.c
CC ../src/ap/wpa_auth_glue.c
CC ../src/ap/drv_callbacks.c
CC ../src/ap/ap_drv_ops.c
CC ../src/ap/utils.c
CC ../src/ap/authsrv.c
CC ../src/ap/ieee802_1x.c
CC ../src/ap/ap_config.c
CC ../src/ap/eap_user_db.c
CC ../src/ap/ieee802_11_auth.c
CC ../src/ap/sta_info.c
CC ../src/ap/wpa_auth.c
CC ../src/ap/tkip_countermeasures.c
CC ../src/ap/ap_mlme.c
CC ../src/ap/wpa_auth_ie.c
CC ../src/ap/preauth_auth.c
CC ../src/ap/pmksa_cache_auth.c
CC ../src/ap/ieee802_11_shared.c
CC ../src/ap/beacon.c
../src/wpe/wpe.c: In function ‘wpe_hb_cb’:
../src/wpe/wpe.c:193:27: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function)
if (v_content_type == TLS1_RT_HEARTBEAT) {
^~~~~~~~~~~~~~~~~
../src/wpe/wpe.c:193:27: note: each undeclared identifier is reported only once for each function it appears in
../src/wpe/wpe.c:195:14: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’
v_ssl->tlsext_hb_pending = 1;
^
Makefile:892: recipe for target '../src/wpe/wpe.o' failed
make: *** [../src/wpe/wpe.o] Error 1
root@kali:/Desktop/hostapd-2.2/hostapd# man make/Desktop/hostapd-2.2/hostapd# make -Bi
root@kali:
CC main.c
CC config_file.c
CC ../src/ap/hostapd.c
CC ../src/ap/wpa_auth_glue.c
CC ../src/ap/drv_callbacks.c
CC ../src/ap/ap_drv_ops.c
CC ../src/ap/utils.c
CC ../src/ap/authsrv.c
CC ../src/ap/ieee802_1x.c
CC ../src/ap/ap_config.c
CC ../src/ap/eap_user_db.c
CC ../src/ap/ieee802_11_auth.c
CC ../src/ap/sta_info.c
CC ../src/ap/wpa_auth.c
CC ../src/ap/tkip_countermeasures.c
CC ../src/ap/ap_mlme.c
CC ../src/ap/wpa_auth_ie.c
CC ../src/ap/preauth_auth.c
CC ../src/ap/pmksa_cache_auth.c
CC ../src/ap/ieee802_11_shared.c
CC ../src/ap/beacon.c
../src/wpe/wpe.c: In function ‘wpe_hb_cb’:
../src/wpe/wpe.c:193:27: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function)
if (v_content_type == TLS1_RT_HEARTBEAT) {
^~~~~~~~~~~~~~~~~
../src/wpe/wpe.c:193:27: note: each undeclared identifier is reported only once for each function it appears in
../src/wpe/wpe.c:195:14: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’
v_ssl->tlsext_hb_pending = 1;
^~
Makefile:892: recipe for target '../src/wpe/wpe.o' failed
make: [../src/wpe/wpe.o] Error 1 (ignored)
CC ../src/wpe/wpe.c
CC ../src/drivers/drivers.c
CC ../src/utils/eloop.c
CC ../src/utils/common.c
CC ../src/utils/wpa_debug.c
CC ../src/utils/wpabuf.c
CC ../src/utils/os_unix.c
CC ../src/utils/ip_addr.c
CC ../src/common/ieee802_11_common.c
CC ../src/common/wpa_common.c
CC ../src/eapol_auth/eapol_auth_sm.c
CC ../src/eapol_auth/eapol_auth_dump.c
CC ../src/radius/radius.c
CC ../src/radius/radius_client.c
CC ../src/radius/radius_das.c
CC ../src/ap/vlan_init.c
CC ctrl_iface.c
CC ../src/ap/ctrl_iface_ap.c
CC ../src/crypto/md5.c
CC ../src/ap/iapp.c
CC ../src/ap/peerkey_auth.c
CC ../src/drivers/driver_hostap.c
CC ../src/drivers/driver_wired.c
CC ../src/drivers/driver_nl80211.c
CC ../src/utils/radiotap.c
CC ../src/drivers/netlink.c
CC ../src/drivers/linux_ioctl.c
CC ../src/drivers/rfkill.c
CC ../src/l2_packet/l2_packet_linux.c
CC ../src/eap_server/eap_server_md5.c
CC ../src/eap_server/eap_server_tls.c
CC ../src/eap_server/eap_server_peap.c
CC ../src/eap_common/eap_peap_common.c
CC ../src/eap_server/eap_server_ttls.c
CC ../src/eap_server/eap_server_mschapv2.c
CC ../src/eap_server/eap_server_gtc.c
CC ../src/eap_server/eap_server_sim.c
CC ../src/eap_server/eap_server_aka.c
CC ../src/eap_common/eap_sim_common.c
CC ../src/eap_server/eap_sim_db.c
CC ../src/eap_server/eap_server_pax.c
CC ../src/eap_common/eap_pax_common.c
CC ../src/eap_server/eap_server_psk.c
CC ../src/eap_common/eap_psk_common.c
CC ../src/eap_server/eap_server_sake.c
CC ../src/eap_common/eap_sake_common.c
CC ../src/eap_server/eap_server_gpsk.c
CC ../src/eap_common/eap_gpsk_common.c
CC ../src/eap_server/eap_server_pwd.c
CC ../src/eap_common/eap_pwd_common.c
CC ../src/eap_server/eap_server_eke.c
CC ../src/eap_common/eap_eke_common.c
CC ../src/eap_server/eap_server_fast.c
CC ../src/eap_common/eap_fast_common.c
CC ../src/eap_server/eap_server_ikev2.c
CC ../src/eap_server/ikev2.c
CC ../src/eap_common/eap_ikev2_common.c
CC ../src/eap_common/ikev2_common.c
CC ../src/eap_server/eap_server_tnc.c
CC ../src/eap_server/tncs.c
CC eap_register.c
CC ../src/eap_server/eap_server.c
CC ../src/eap_common/eap_common.c
CC ../src/eap_server/eap_server_methods.c
CC ../src/eap_server/eap_server_identity.c
CC ../src/crypto/ms_funcs.c
CC ../src/eap_common/chap.c
CC ../src/eap_server/eap_server_tls_common.c
../src/crypto/tls_openssl.c: In function ‘tls_init’:
../src/crypto/tls_openssl.c:805:2: warning: ‘TLSv1_method’ is deprecated [-Wdeprecated-declarations]
ssl = SSL_CTX_new(TLSv1_method());
^~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from ../src/crypto/tls_openssl.c:19:
/usr/include/openssl/ssl.h:1596:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD TLSv1_method(void)) / TLSv1.0 /
^
../src/crypto/tls_openssl.c: In function ‘tls_deinit’:
../src/crypto/tls_openssl.c:861:3: warning: ‘ERR_remove_state’ is deprecated [-Wdeprecated-declarations]
ERR_remove_state(0);
^~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from ../src/crypto/tls_openssl.c:19:
/usr/include/openssl/err.h:247:1: note: declared here
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
^
../src/crypto/tls_openssl.c: In function ‘tls_load_ca_der’:
../src/crypto/tls_openssl.c:1530:40: error: dereferencing pointer to incomplete type ‘SSL_CTX {aka struct ssl_ctx_st}’
lookup = X509_STORE_add_lookup(ssl_ctx->cert_store,
^~
../src/crypto/tls_openssl.c: In function ‘tls_connection_get_keys’:
../src/crypto/tls_openssl.c:2522:24: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’
if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL)
^~
../src/crypto/tls_openssl.c: In function ‘tls_connection_encrypt’:
../src/crypto/tls_openssl.c:2755:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_before_appdata)
^~
../src/crypto/tls_openssl.c:2758:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
res = SSL_write(conn->ssl, wpabuf_head(in_data), wpabuf_len(in_data));
^~~
../src/crypto/tls_openssl.c:2765:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_after_appdata)
^~
../src/crypto/tls_openssl.c:2770:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
buf = wpabuf_alloc(wpabuf_len(in_data) + 300);
^~~
../src/crypto/tls_openssl.c: In function ‘tls_connection_set_session_ticket_cb’:
../src/crypto/tls_openssl.c:3547:44: warning: passing argument 2 of ‘SSL_set_session_secret_cb’ from incompatible pointer type [-Wincompatible-pointer-types]
if (SSL_set_session_secret_cb(conn->ssl, tls_sess_sec_cb,
^~~~~~~~~~~~~~~
In file included from ../src/crypto/tls_openssl.c:19:0:
/usr/include/openssl/ssl.h:1801:12: note: expected ‘tls_session_secret_cb_fn {aka int ()(struct ssl_st *, void *, int *, struct stack_st_SSL_CIPHER *, const struct ssl_cipher_st **, void )}’ but argument is of type ‘int ()(SSL *, void *, int *, struct stack_st_SSL_CIPHER *, SSL_CIPHER **, void ) {aka int ()(struct ssl_st *, void *, int *, struct stack_st_SSL_CIPHER *, struct ssl_cipher_st **, void *)}’
__owur int SSL_set_session_secret_cb(SSL *s,
^~~~~~~~~~~~~~~~~~~~~~~~~
../src/crypto/tls_openssl.c: In function ‘wpe_hb_enc’:
../src/crypto/tls_openssl.c:3595:39: error: ‘SSL_TLSEXT_HB_ENABLED’ undeclared (first use in this function)
if(!conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_ENABLED ||
^~~~~~~~~~~~~~~~~~~~~
../src/crypto/tls_openssl.c:3595:39: note: each undeclared identifier is reported only once for each function it appears in
../src/crypto/tls_openssl.c:3596:43: error: ‘SSL_TLSEXT_HB_DONT_SEND_REQUESTS’ undeclared (first use in this function)
conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_DONT_SEND_REQUESTS) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/crypto/tls_openssl.c:32:0:
/root/Desktop/hostapd-2.2/src/wpe/wpe.h:42:56: warning: left-hand operand of comma expression has no effect [-Wunused-value]
#define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff),
^
../src/crypto/tls_openssl.c:3623:5: note: in expansion of macro ‘s2n’
s2n(conn->ssl->tlsext_hb_seq, p);
^~~
/root/Desktop/hostapd-2.2/src/wpe/wpe.h:43:46: warning: left-hand operand of comma expression has no effect [-Wunused-value]
c[1]=(unsigned char)(((s) )&0xff)),c+=2)
^
../src/crypto/tls_openssl.c:3623:5: note: in expansion of macro ‘s2n’
s2n(conn->ssl->tlsext_hb_seq, p);
^~~
../src/crypto/tls_openssl.c:3625:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations]
RAND_pseudo_bytes(p, 16);
^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from ../src/crypto/tls_openssl.c:19:
/usr/include/openssl/rand.h:47:1: note: declared here
DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
^
../src/crypto/tls_openssl.c:3629:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations]
RAND_pseudo_bytes(p, padding);
^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from ../src/crypto/tls_openssl.c:19:
/usr/include/openssl/rand.h:47:1: note: declared here
DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
^
../src/crypto/tls_openssl.c:3636:38: error: dereferencing pointer to incomplete type ‘SSL_METHOD {aka const struct ssl_method_st}’
if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT,
^~
../src/crypto/tls_openssl.c:3636:67: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function)
if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT,
^~~~~~~~~~~~~~~~~
../src/crypto/tls_openssl.c: In function ‘tls_connection_resumed’:
../src/crypto/tls_openssl.c:2838:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:892: recipe for target '../src/crypto/tls_openssl.o' failed
make: [../src/crypto/tls_openssl.o] Error 1 (ignored)
CC ../src/crypto/tls_openssl.c
../src/crypto/crypto_openssl.c: In function ‘openssl_digest_vector’:
../src/crypto/crypto_openssl.c:84:13: error: storage size of ‘ctx’ isn’t known
EVP_MD_CTX ctx;
^~~
../src/crypto/crypto_openssl.c:84:13: warning: unused variable ‘ctx’ [-Wunused-variable]
../src/crypto/crypto_openssl.c: In function ‘rc4_skip’:
../src/crypto/crypto_openssl.c:145:17: error: storage size of ‘ctx’ isn’t known
EVP_CIPHER_CTX ctx;
^~~
../src/crypto/crypto_openssl.c:145:17: warning: unused variable ‘ctx’ [-Wunused-variable]
In file included from /root/Desktop/hostapd-2.2/src/utils/common.h:12:0,
from ../src/crypto/crypto_openssl.c:26:
../src/crypto/crypto_openssl.c: In function ‘aes_encrypt_init’:
../src/crypto/crypto_openssl.c:221:25: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
ctx = os_malloc(sizeof(*ctx));
^~
/root/Desktop/hostapd-2.2/src/utils/os.h:478:30: note: in definition of macro ‘os_malloc’
#define os_malloc(s) malloc((s))
^
../src/crypto/crypto_openssl.c: At top level:
../src/crypto/crypto_openssl.c:353:17: error: field ‘enc’ has incomplete type
EVP_CIPHER_CTX enc;
^~~
../src/crypto/crypto_openssl.c:354:17: error: field ‘dec’ has incomplete type
EVP_CIPHER_CTX dec;
^~~
../src/crypto/crypto_openssl.c: In function ‘dh5_init’:
../src/crypto/crypto_openssl.c:478:4: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’
dh->g = BN_new();
^~
../src/crypto/crypto_openssl.c: At top level:
../src/crypto/crypto_openssl.c:596:11: error: field ‘ctx’ has incomplete type
HMAC_CTX ctx;
^~~
../src/crypto/crypto_openssl.c: In function ‘crypto_hash_init’:
../src/crypto/crypto_openssl.c:631:2: warning: implicit declaration of function ‘HMAC_CTX_init’ [-Wimplicit-function-declaration]
HMAC_CTX_init(&ctx->ctx);
^~~~~~~~~~~~~
../src/crypto/crypto_openssl.c: In function ‘crypto_hash_finish’:
../src/crypto/crypto_openssl.c:674:2: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
HMAC_CTX_cleanup(&ctx->ctx);
^~~~~~~~~~~~~~~~
../src/crypto/crypto_openssl.c: In function ‘hmac_sha1_vector’:
../src/crypto/crypto_openssl.c:706:11: error: storage size of ‘ctx’ isn’t known
HMAC_CTX ctx;
^~~
../src/crypto/crypto_openssl.c:706:11: warning: unused variable ‘ctx’ [-Wunused-variable]
../src/crypto/crypto_openssl.c: In function ‘hmac_sha256_vector’:
../src/crypto/crypto_openssl.c:747:11: error: storage size of ‘ctx’ isn’t known
HMAC_CTX ctx;
^~~
../src/crypto/crypto_openssl.c:747:11: warning: unused variable ‘ctx’ [-Wunused-variable]
Makefile:892: recipe for target '../src/crypto/crypto_openssl.o' failed
make: [../src/crypto/crypto_openssl.o] Error 1 (ignored)
CC ../src/crypto/crypto_openssl.c
CC ../src/crypto/fips_prf_openssl.c
CC ../src/crypto/aes-wrap.c
CC ../src/crypto/aes-eax.c
CC ../src/crypto/aes-ctr.c
CC ../src/crypto/aes-encblock.c
CC ../src/crypto/aes-omac1.c
CC ../src/crypto/aes-unwrap.c
CC ../src/crypto/aes-cbc.c
CC ../src/crypto/sha1-prf.c
CC ../src/crypto/sha1-tprf.c
CC ../src/crypto/sha1-tlsprf.c
CC ../src/crypto/sha256-prf.c
CC ../src/crypto/dh_groups.c
CC ../src/crypto/random.c
CC ../src/radius/radius_server.c
CC ../src/utils/base64.c
CC ../src/ap/wmm.c
CC ../src/ap/ap_list.c
CC ../src/ap/ieee802_11.c
CC ../src/ap/hw_features.c
CC ../src/ap/dfs.c
CC ../src/drivers/driver_common.c
cc: error: ../src/wpe/wpe.o: No such file or directory
cc: error: ../src/crypto/tls_openssl.o: No such file or directory
cc: error: ../src/crypto/crypto_openssl.o: No such file or directory
Makefile:918: recipe for target 'hostapd-wpe' failed
make: [hostapd-wpe] Error 1 (ignored)
LD hostapd-wpe
CC hostapd_cli.c
CC ../src/common/wpa_ctrl.c
CC ../src/utils/edit_simple.c
LD hostapd-wpe_cli
root@kali:/Desktop/hostapd-2.2/hostapd# sudo ./hostapd-wpe hostapd-wpe.conf/Desktop/hostapd-2.2/hostapd# ls
sudo: ./hostapd-wpe: command not found
root@kali:
android.config eap_testing.txt hostapd.sim_db
Android.mk hapd_module_tests.c hostapd.vlan
ChangeLog hlr_auc_gw.c hostapd.wpa_psk
config_file.c hlr_auc_gw.milenage_db hostapd-wpe_cli
config_file.d hlr_auc_gw.txt hostapd-wpe.conf
config_file.h hostapd.8 hostapd-wpe.eap_user
config_file.o hostapd.accept logwatch
ctrl_iface.c hostapd_cli.1 main.c
ctrl_iface.d hostapd_cli.c main.d
ctrl_iface.h hostapd_cli.d main.o
ctrl_iface.o hostapd_cli.o Makefile
defconfig hostapd.conf nt_password_hash.c
eap_register.c hostapd.deny README
eap_register.d hostapd.eap_user README-WPS
eap_register.h hostapd.eap_user_sqlite wired.conf
eap_register.o hostapd.radius_clients wps-ap-nfc.py
root@kali:/Desktop/hostapd-2.2/hostapd# sudo ./hostapd-wpe_cli hostapd-wpe.conf/Desktop/hostapd-2.2/hostapd# make -Bi
Failed to connect to hostapd - wpa_ctrl_open: No such file or directory
root@kali:
CC main.c
CC config_file.c
CC ../src/ap/hostapd.c
CC ../src/ap/wpa_auth_glue.c
CC ../src/ap/drv_callbacks.c
CC ../src/ap/ap_drv_ops.c
CC ../src/ap/utils.c
CC ../src/ap/authsrv.c
CC ../src/ap/ieee802_1x.c
CC ../src/ap/ap_config.c
CC ../src/ap/eap_user_db.c
CC ../src/ap/ieee802_11_auth.c
CC ../src/ap/sta_info.c
CC ../src/ap/wpa_auth.c
CC ../src/ap/tkip_countermeasures.c
CC ../src/ap/ap_mlme.c
CC ../src/ap/wpa_auth_ie.c
CC ../src/ap/preauth_auth.c
CC ../src/ap/pmksa_cache_auth.c
CC ../src/ap/ieee802_11_shared.c
CC ../src/ap/beacon.c
../src/wpe/wpe.c: In function ‘wpe_hb_cb’:
../src/wpe/wpe.c:193:27: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function)
if (v_content_type == TLS1_RT_HEARTBEAT) {
^~~~~~~~~~~~~~~~~
../src/wpe/wpe.c:193:27: note: each undeclared identifier is reported only once for each function it appears in
../src/wpe/wpe.c:195:14: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’
v_ssl->tlsext_hb_pending = 1;
^~
Makefile:892: recipe for target '../src/wpe/wpe.o' failed
make: [../src/wpe/wpe.o] Error 1 (ignored)
CC ../src/wpe/wpe.c
CC ../src/drivers/drivers.c
CC ../src/utils/eloop.c
CC ../src/utils/common.c
CC ../src/utils/wpa_debug.c
CC ../src/utils/wpabuf.c
CC ../src/utils/os_unix.c
CC ../src/utils/ip_addr.c
CC ../src/common/ieee802_11_common.c
CC ../src/common/wpa_common.c
CC ../src/eapol_auth/eapol_auth_sm.c
CC ../src/eapol_auth/eapol_auth_dump.c
CC ../src/radius/radius.c
CC ../src/radius/radius_client.c
CC ../src/radius/radius_das.c
CC ../src/ap/vlan_init.c
CC ctrl_iface.c
CC ../src/ap/ctrl_iface_ap.c
CC ../src/crypto/md5.c
CC ../src/ap/iapp.c
CC ../src/ap/peerkey_auth.c
CC ../src/drivers/driver_hostap.c
CC ../src/drivers/driver_wired.c
CC ../src/drivers/driver_nl80211.c
CC ../src/utils/radiotap.c
CC ../src/drivers/netlink.c
CC ../src/drivers/linux_ioctl.c
CC ../src/drivers/rfkill.c
CC ../src/l2_packet/l2_packet_linux.c
CC ../src/eap_server/eap_server_md5.c
CC ../src/eap_server/eap_server_tls.c
CC ../src/eap_server/eap_server_peap.c
CC ../src/eap_common/eap_peap_common.c
CC ../src/eap_server/eap_server_ttls.c
CC ../src/eap_server/eap_server_mschapv2.c
CC ../src/eap_server/eap_server_gtc.c
CC ../src/eap_server/eap_server_sim.c
CC ../src/eap_server/eap_server_aka.c
CC ../src/eap_common/eap_sim_common.c
CC ../src/eap_server/eap_sim_db.c
CC ../src/eap_server/eap_server_pax.c
CC ../src/eap_common/eap_pax_common.c
CC ../src/eap_server/eap_server_psk.c
CC ../src/eap_common/eap_psk_common.c
CC ../src/eap_server/eap_server_sake.c
CC ../src/eap_common/eap_sake_common.c
CC ../src/eap_server/eap_server_gpsk.c
CC ../src/eap_common/eap_gpsk_common.c
CC ../src/eap_server/eap_server_pwd.c
CC ../src/eap_common/eap_pwd_common.c
CC ../src/eap_server/eap_server_eke.c
CC ../src/eap_common/eap_eke_common.c
CC ../src/eap_server/eap_server_fast.c
CC ../src/eap_common/eap_fast_common.c
CC ../src/eap_server/eap_server_ikev2.c
CC ../src/eap_server/ikev2.c
CC ../src/eap_common/eap_ikev2_common.c
CC ../src/eap_common/ikev2_common.c
CC ../src/eap_server/eap_server_tnc.c
CC ../src/eap_server/tncs.c
CC eap_register.c
CC ../src/eap_server/eap_server.c
CC ../src/eap_common/eap_common.c
CC ../src/eap_server/eap_server_methods.c
CC ../src/eap_server/eap_server_identity.c
CC ../src/crypto/ms_funcs.c
CC ../src/eap_common/chap.c
CC ../src/eap_server/eap_server_tls_common.c
../src/crypto/tls_openssl.c: In function ‘tls_init’:
../src/crypto/tls_openssl.c:805:2: warning: ‘TLSv1_method’ is deprecated [-Wdeprecated-declarations]
ssl = SSL_CTX_new(TLSv1_method());
^~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from ../src/crypto/tls_openssl.c:19:
/usr/include/openssl/ssl.h:1596:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD TLSv1_method(void)) / TLSv1.0 /
^
../src/crypto/tls_openssl.c: In function ‘tls_deinit’:
../src/crypto/tls_openssl.c:861:3: warning: ‘ERR_remove_state’ is deprecated [-Wdeprecated-declarations]
ERR_remove_state(0);
^~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from ../src/crypto/tls_openssl.c:19:
/usr/include/openssl/err.h:247:1: note: declared here
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
^
../src/crypto/tls_openssl.c: In function ‘tls_load_ca_der’:
../src/crypto/tls_openssl.c:1530:40: error: dereferencing pointer to incomplete type ‘SSL_CTX {aka struct ssl_ctx_st}’
lookup = X509_STORE_add_lookup(ssl_ctx->cert_store,
^~
../src/crypto/tls_openssl.c: In function ‘tls_connection_get_keys’:
../src/crypto/tls_openssl.c:2522:24: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’
if (ssl == NULL || ssl->s3 == NULL || ssl->session == NULL)
^~
../src/crypto/tls_openssl.c: In function ‘tls_connection_encrypt’:
../src/crypto/tls_openssl.c:2755:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_before_appdata)
^~
../src/crypto/tls_openssl.c:2758:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
res = SSL_write(conn->ssl, wpabuf_head(in_data), wpabuf_len(in_data));
^~~
../src/crypto/tls_openssl.c:2765:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_after_appdata)
^~
../src/crypto/tls_openssl.c:2770:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
buf = wpabuf_alloc(wpabuf_len(in_data) + 300);
^~~
../src/crypto/tls_openssl.c: In function ‘tls_connection_set_session_ticket_cb’:
../src/crypto/tls_openssl.c:3547:44: warning: passing argument 2 of ‘SSL_set_session_secret_cb’ from incompatible pointer type [-Wincompatible-pointer-types]
if (SSL_set_session_secret_cb(conn->ssl, tls_sess_sec_cb,
^~~~~~~~~~~~~~~
In file included from ../src/crypto/tls_openssl.c:19:0:
/usr/include/openssl/ssl.h:1801:12: note: expected ‘tls_session_secret_cb_fn {aka int ()(struct ssl_st *, void *, int *, struct stack_st_SSL_CIPHER *, const struct ssl_cipher_st **, void )}’ but argument is of type ‘int ()(SSL *, void *, int *, struct stack_st_SSL_CIPHER *, SSL_CIPHER **, void ) {aka int ()(struct ssl_st *, void *, int *, struct stack_st_SSL_CIPHER *, struct ssl_cipher_st **, void *)}’
__owur int SSL_set_session_secret_cb(SSL *s,
^~~~~~~~~~~~~~~~~~~~~~~~~
../src/crypto/tls_openssl.c: In function ‘wpe_hb_enc’:
../src/crypto/tls_openssl.c:3595:39: error: ‘SSL_TLSEXT_HB_ENABLED’ undeclared (first use in this function)
if(!conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_ENABLED ||
^~~~~~~~~~~~~~~~~~~~~
../src/crypto/tls_openssl.c:3595:39: note: each undeclared identifier is reported only once for each function it appears in
../src/crypto/tls_openssl.c:3596:43: error: ‘SSL_TLSEXT_HB_DONT_SEND_REQUESTS’ undeclared (first use in this function)
conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_DONT_SEND_REQUESTS) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/crypto/tls_openssl.c:32:0:
/root/Desktop/hostapd-2.2/src/wpe/wpe.h:42:56: warning: left-hand operand of comma expression has no effect [-Wunused-value]
#define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff),
^
../src/crypto/tls_openssl.c:3623:5: note: in expansion of macro ‘s2n’
s2n(conn->ssl->tlsext_hb_seq, p);
^~~
/root/Desktop/hostapd-2.2/src/wpe/wpe.h:43:46: warning: left-hand operand of comma expression has no effect [-Wunused-value]
c[1]=(unsigned char)(((s) )&0xff)),c+=2)
^
../src/crypto/tls_openssl.c:3623:5: note: in expansion of macro ‘s2n’
s2n(conn->ssl->tlsext_hb_seq, p);
^~~
../src/crypto/tls_openssl.c:3625:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations]
RAND_pseudo_bytes(p, 16);
^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from ../src/crypto/tls_openssl.c:19:
/usr/include/openssl/rand.h:47:1: note: declared here
DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
^
../src/crypto/tls_openssl.c:3629:5: warning: ‘RAND_pseudo_bytes’ is deprecated [-Wdeprecated-declarations]
RAND_pseudo_bytes(p, padding);
^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
from /usr/include/openssl/ssl.h:61,
from ../src/crypto/tls_openssl.c:19:
/usr/include/openssl/rand.h:47:1: note: declared here
DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
^
../src/crypto/tls_openssl.c:3636:38: error: dereferencing pointer to incomplete type ‘SSL_METHOD {aka const struct ssl_method_st}’
if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT,
^~
../src/crypto/tls_openssl.c:3636:67: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function)
if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT,
^~~~~~~~~~~~~~~~~
../src/crypto/tls_openssl.c: In function ‘tls_connection_resumed’:
../src/crypto/tls_openssl.c:2838:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:892: recipe for target '../src/crypto/tls_openssl.o' failed
make: [../src/crypto/tls_openssl.o] Error 1 (ignored)
CC ../src/crypto/tls_openssl.c
../src/crypto/crypto_openssl.c: In function ‘openssl_digest_vector’:
../src/crypto/crypto_openssl.c:84:13: error: storage size of ‘ctx’ isn’t known
EVP_MD_CTX ctx;
^~~
../src/crypto/crypto_openssl.c:84:13: warning: unused variable ‘ctx’ [-Wunused-variable]
../src/crypto/crypto_openssl.c: In function ‘rc4_skip’:
../src/crypto/crypto_openssl.c:145:17: error: storage size of ‘ctx’ isn’t known
EVP_CIPHER_CTX ctx;
^~~
../src/crypto/crypto_openssl.c:145:17: warning: unused variable ‘ctx’ [-Wunused-variable]
In file included from /root/Desktop/hostapd-2.2/src/utils/common.h:12:0,
from ../src/crypto/crypto_openssl.c:26:
../src/crypto/crypto_openssl.c: In function ‘aes_encrypt_init’:
../src/crypto/crypto_openssl.c:221:25: error: dereferencing pointer to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
ctx = os_malloc(sizeof(*ctx));
^~
/root/Desktop/hostapd-2.2/src/utils/os.h:478:30: note: in definition of macro ‘os_malloc’
#define os_malloc(s) malloc((s))
^
../src/crypto/crypto_openssl.c: At top level:
../src/crypto/crypto_openssl.c:353:17: error: field ‘enc’ has incomplete type
EVP_CIPHER_CTX enc;
^~~
../src/crypto/crypto_openssl.c:354:17: error: field ‘dec’ has incomplete type
EVP_CIPHER_CTX dec;
^~~
../src/crypto/crypto_openssl.c: In function ‘dh5_init’:
../src/crypto/crypto_openssl.c:478:4: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}’
dh->g = BN_new();
^~
../src/crypto/crypto_openssl.c: At top level:
../src/crypto/crypto_openssl.c:596:11: error: field ‘ctx’ has incomplete type
HMAC_CTX ctx;
^~~
../src/crypto/crypto_openssl.c: In function ‘crypto_hash_init’:
../src/crypto/crypto_openssl.c:631:2: warning: implicit declaration of function ‘HMAC_CTX_init’ [-Wimplicit-function-declaration]
HMAC_CTX_init(&ctx->ctx);
^~~~~~~~~~~~~
../src/crypto/crypto_openssl.c: In function ‘crypto_hash_finish’:
../src/crypto/crypto_openssl.c:674:2: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
HMAC_CTX_cleanup(&ctx->ctx);
^~~~~~~~~~~~~~~~
../src/crypto/crypto_openssl.c: In function ‘hmac_sha1_vector’:
../src/crypto/crypto_openssl.c:706:11: error: storage size of ‘ctx’ isn’t known
HMAC_CTX ctx;
^~~
../src/crypto/crypto_openssl.c:706:11: warning: unused variable ‘ctx’ [-Wunused-variable]
../src/crypto/crypto_openssl.c: In function ‘hmac_sha256_vector’:
../src/crypto/crypto_openssl.c:747:11: error: storage size of ‘ctx’ isn’t known
HMAC_CTX ctx;
^~~
../src/crypto/crypto_openssl.c:747:11: warning: unused variable ‘ctx’ [-Wunused-variable]
Makefile:892: recipe for target '../src/crypto/crypto_openssl.o' failed
make: [../src/crypto/crypto_openssl.o] Error 1 (ignored)
CC ../src/crypto/crypto_openssl.c
CC ../src/crypto/fips_prf_openssl.c
CC ../src/crypto/aes-wrap.c
CC ../src/crypto/aes-eax.c
CC ../src/crypto/aes-ctr.c
CC ../src/crypto/aes-encblock.c
CC ../src/crypto/aes-omac1.c
CC ../src/crypto/aes-unwrap.c
CC ../src/crypto/aes-cbc.c
CC ../src/crypto/sha1-prf.c
CC ../src/crypto/sha1-tprf.c
CC ../src/crypto/sha1-tlsprf.c
CC ../src/crypto/sha256-prf.c
CC ../src/crypto/dh_groups.c
CC ../src/crypto/random.c
CC ../src/radius/radius_server.c
CC ../src/utils/base64.c
CC ../src/ap/wmm.c
CC ../src/ap/ap_list.c
CC ../src/ap/ieee802_11.c
CC ../src/ap/hw_features.c
CC ../src/ap/dfs.c
CC ../src/drivers/driver_common.c
cc: error: ../src/wpe/wpe.o: No such file or directory
cc: error: ../src/crypto/tls_openssl.o: No such file or directory
cc: error: ../src/crypto/crypto_openssl.o: No such file or directory
Makefile:918: recipe for target 'hostapd-wpe' failed
make: [hostapd-wpe] Error 1 (ignored)
LD hostapd-wpe
CC hostapd_cli.c
CC ../src/common/wpa_ctrl.c
CC ../src/utils/edit_simple.c
LD hostapd-wpe_cli
root@kali:~/Desktop/hostapd-2.2/hostapd#
The digininja karma patches had full support for blacklisting and whitelisting both ssid and mac addresses:
This type of feature is incredibly useful for "catch and release" testing to interfere the least possible with the production environment while still doing proper testing. Since your patches seem to actually be maintained, any chance you want to absorb these features?
If I do not set the log file in the hostapd-wpe.conf, no username/challenge/response is displayed on the screen. I just get the standard hostapd info, like authenticated, deauthed, EAP type, etc.
If I set the log file, I get this cryptic error: "WPE: Cannot file log file"
Running as root, there should be no issues....
How do I add more than one certificate? There's two certificates in this chain. I'm still new to TLS, so I might be missing something.
In this example, I have two certificates in this capture that I want to copy, and use in hostapd-wpe:
I tried comma separating them:
# May have to change these depending on build location
eap_user_file=/etc/hostapd-wpe/hostapd-wpe.eap_user
ca_cert=/etc/hostapd-wpe/certs/ca.pem
server_cert=/etc/hostapd-wpe/certs/servercert1.pem,/etc/hostapd-wpe/certs/servercert2.pem
private_key=/etc/hostapd-wpe/certs/server.key
private_key_passwd=whatever
dh_file=/etc/hostapd-wpe/certs/dh
I got:
OpenSSL: tls_global_client_cert - Failed to load client certificate error:02001002:system library:fopen:No such file or directory
How can we make sure this is documented, and the README is updated?
Originally posted by @W00t3k in #25 (comment)
Hi,
There is no decent documentation explaining different options of the tool. For instance, I want to change the EAP type to MSCHAPv2 but I couldn't find how to change it. Would you please let me know how can I change the EAP type?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.