-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
4,417 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- a/hostapd-2.11-wpe.patch | ||
+++ b/hostapd-2.11-wpe.patch | ||
@@ -3399,8 +3399,8 @@ | ||
"User space daemon for IEEE 802.11 AP management,\n" | ||
"IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator\n" | ||
"Copyright (c) 2002-2024, Jouni Malinen <[email protected]> " | ||
-- "and contributors\n", | ||
-+ "and contributors\n" | ||
+- "and contributors\n", | ||
++ "and contributors\n" | ||
+ "-----------------------------------------------------\n" | ||
+ "WPE (Wireless Pwnage Edition)\n" | ||
+ "This version has been cleverly modified to target\n" | ||
@@ -3567,15 +3567,7 @@ | ||
diff '--color=auto' -rupN hostapd-2.11/src/crypto/tls_openssl.c hostapd-2.11-wpe/src/crypto/tls_openssl.c | ||
--- hostapd-2.11/src/crypto/tls_openssl.c 2024-07-26 12:31:12.300000000 +0000 | ||
+++ hostapd-2.11-wpe/src/crypto/tls_openssl.c 2024-07-26 12:33:34.152000000 +0000 | ||
-@@ -29,7 +29,6 @@ | ||
- #include <openssl/opensslv.h> | ||
- #include <openssl/pkcs12.h> | ||
- #include <openssl/x509v3.h> | ||
--#include <openssl/rand.h> | ||
- #if OPENSSL_VERSION_NUMBER >= 0x30000000L | ||
- #include <openssl/core_names.h> | ||
- #include <openssl/decoder.h> | ||
-@@ -50,6 +49,7 @@ | ||
+@@ -49,6 +49,7 @@ | ||
#include "sha256.h" | ||
#include "tls.h" | ||
#include "tls_openssl.h" | ||
@@ -3583,7 +3575,7 @@ | ||
|
||
#if !defined(CONFIG_FIPS) && \ | ||
(defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || \ | ||
-@@ -205,6 +205,10 @@ static int tls_add_ca_from_keystore_enco | ||
+@@ -204,6 +205,10 @@ static int tls_add_ca_from_keystore_enco | ||
|
||
#endif /* ANDROID */ | ||
|
||
@@ -3594,7 +3586,7 @@ | ||
static int tls_openssl_ref_count = 0; | ||
static int tls_ex_idx_session = -1; | ||
|
||
-@@ -1724,7 +1728,12 @@ struct tls_connection * tls_connection_i | ||
+@@ -1723,7 +1728,12 @@ struct tls_connection * tls_connection_i | ||
|
||
conn->context = context; | ||
SSL_set_app_data(conn->ssl, conn); | ||
@@ -3608,7 +3600,7 @@ | ||
SSL_set_msg_callback_arg(conn->ssl, conn); | ||
options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | | ||
SSL_OP_SINGLE_DH_USE; | ||
-@@ -4501,6 +4510,10 @@ openssl_handshake(struct tls_connection | ||
+@@ -4500,6 +4510,10 @@ openssl_handshake(struct tls_connection | ||
struct tls_context *context = conn->context; | ||
int res; | ||
struct wpabuf *out_data; | ||
@@ -3619,7 +3611,7 @@ | ||
|
||
/* | ||
* Give TLS handshake data from the server (if available) to OpenSSL | ||
-@@ -4619,6 +4632,30 @@ openssl_handshake(struct tls_connection | ||
+@@ -4618,6 +4632,30 @@ openssl_handshake(struct tls_connection | ||
} | ||
wpabuf_put(out_data, res); | ||
|
||
@@ -3650,7 +3642,7 @@ | ||
return out_data; | ||
} | ||
|
||
-@@ -4751,6 +4788,13 @@ struct wpabuf * tls_connection_encrypt(v | ||
+@@ -4750,6 +4788,13 @@ struct wpabuf * tls_connection_encrypt(v | ||
tls_show_errors(MSG_INFO, __func__, "BIO_reset failed"); | ||
return NULL; | ||
} | ||
@@ -3664,7 +3656,7 @@ | ||
res = SSL_write(conn->ssl, wpabuf_head(in_data), wpabuf_len(in_data)); | ||
if (res < 0) { | ||
tls_show_errors(MSG_INFO, __func__, | ||
-@@ -4758,6 +4802,12 @@ struct wpabuf * tls_connection_encrypt(v | ||
+@@ -4757,6 +4802,12 @@ struct wpabuf * tls_connection_encrypt(v | ||
return NULL; | ||
} | ||
|
||
@@ -3677,7 +3669,7 @@ | ||
/* Read encrypted data to be sent to the server */ | ||
buf = wpabuf_alloc(wpabuf_len(in_data) + 300); | ||
if (buf == NULL) | ||
-@@ -6028,3 +6078,69 @@ bool tls_connection_get_own_cert_used(st | ||
+@@ -6027,3 +6078,68 @@ bool tls_connection_get_own_cert_used(st | ||
return SSL_get_certificate(conn->ssl) != NULL; | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,42 @@ | ||
# Credits BlackArch ( https://www.blackarch.org/ ). | ||
# See COPYING for license details. | ||
|
||
# NOTE: initially ripped from AUR, but we changed a lot here (style). | ||
|
||
pkgname=hostapd-wpe | ||
_pkgname=hostapd | ||
pkgver=2.9.1 | ||
_pkgver=2.9 | ||
pkgrel=3 | ||
groups=('athena' 'athena-wireless') | ||
_pkgname=hostap | ||
pkgver=2.11 | ||
pkgrel=1 | ||
pkgdesc='Modified hostapd to facilitate AP impersonation attacks.' | ||
groups=('athena' 'athena-wireless') | ||
arch=('x86_64' 'aarch64') | ||
url='https://w1.fi/hostapd/' | ||
license=('BSD') | ||
depends=('openssl-1.0' 'libnl' 'sqlite') | ||
source=("https://w1.fi/releases/$_pkgname-$_pkgver.tar.gz" | ||
"https://patches.aircrack-ng.org/wpe/hostapd-wpe/$pkgname.patch") | ||
# "https://raw.githubusercontent.com/aircrack-ng/aircrack-ng/master/patches/wpe/hostapd-wpe/$pkgname.patch") | ||
install="$pkgname.install" | ||
sha512sums=('66c729380152db18b64520bda55dfa00af3b0264f97b5de100b81a46e2593571626c4bdcf900f0988ea2131e30bc8788f75d8489dd1f57e37fd56e8098e48a9c' | ||
'c1ef9f6b9b3d3d04fa98fb9568acc45a5c52a00411a5ebbbf3a80835cc27f6cdc5003343f37964fbac2c7c1fefffdf999d620f0e39797c0c37030090735526a5') | ||
license=('BSD-3-Clause') | ||
depends=('glibc' 'libnl' 'openssl-1.0' 'sqlite') | ||
makedepends=('git') | ||
source=("git+https://w1.fi/$_pkgname.git?signed#tag=${_pkgname}_${pkgver//./_}" | ||
'0001_adj-wpe.patch' | ||
"https://raw.githubusercontent.com/aircrack-ng/aircrack-ng/master/patches/wpe/$pkgname/${_pkgname}d-$pkgver-wpe.patch") | ||
sha512sums=('de2ba10af60bc88f0f900fe4a90681d9f08318bf12f88227881f6c4f2c4c628b89515a5425242048b8867b1791f5613fbfa1c3adeecf345aeb4093cac5eb62e4' | ||
'30cb5301c0ee90ae8e1dd9f17b27e0b6ee253919251bb8cc6da3b340e632607915f30952e17e9e4cf9adc3ee062354e4b7bd55ddddc82753050dcba7ef9cd646' | ||
'c46fbd8a10045d8df09f28b37992c32b9f34604d380ff47a0158ef3afcf9b406f8788ddd8e5e1cc2478f4800de2417504d756b11ccf9628046dd8a150e1fd44c') | ||
validpgpkeys=(EC4AA0A991A5F2464582D52D2B6EF432EFC895FA) # Jouni Malinen <[email protected]> | ||
|
||
prepare() { | ||
cd "$_pkgname-$_pkgver" | ||
# Adjust aircrack-ng patch as it doesn't cleanly apply | ||
patch -Np1 --follow-symlinks -i "${srcdir}"/0001_adj-wpe.patch | ||
|
||
patch -p1 -i "$srcdir/$pkgname.patch" | ||
# Apply aircrack-ng patch | ||
patch -Np1 -d $_pkgname -i "${srcdir}"/${_pkgname}d-${pkgver}-wpe.patch | ||
} | ||
|
||
build() { | ||
cd "$_pkgname-$_pkgver/$_pkgname" | ||
|
||
make | ||
make -C $_pkgname/${_pkgname}d | ||
} | ||
|
||
package() { | ||
cd "$_pkgname-$_pkgver/$_pkgname" | ||
|
||
make DESTDIR="$pkgdir" install | ||
make DESTDIR="$pkgdir" wpe | ||
cd $_pkgname | ||
|
||
install -Dm 644 "$srcdir/$_pkgname-$_pkgver/COPYING" \ | ||
"$pkgdir/usr/share/licenses/$pkgname/COPYING" | ||
make -C ${_pkgname}d install DESTDIR="$pkgdir" BINDIR=/usr/bin | ||
|
||
mv "$pkgdir/usr/local/bin" "$pkgdir/usr/bin" | ||
rmdir "$pkgdir/usr/local" | ||
install -vDm 644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname/" | ||
} | ||
|
Oops, something went wrong.