Skip to content

Commit

Permalink
Merge pull request #375 from v1s1t0r1sh3r3/dev
Browse files Browse the repository at this point in the history
Dev to master v10.21
  • Loading branch information
OscarAkaElvis authored Jun 15, 2020
2 parents 79f6b60 + d8e9459 commit 0cb5b62
Show file tree
Hide file tree
Showing 16 changed files with 165 additions and 93 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 10.21
- Improved hostapd-wpe config for some conflicting Linux
- Dockerfile migrated to Arch (ArchStrike image as base) to avoid Debian based missing packages problem
- After PMKID capturing, now additionally can transform captured file into .cap aircrack-ng file format

### 10.20
- Big language strings array now loaded only once and printing system changed. Speed highly improved
- Fixed problem for handshake detection on captured files containing only handshake (without pmkid)
Expand Down
88 changes: 24 additions & 64 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#airgeddon Dockerfile

#Base image
FROM parrotsec/security:latest
FROM archstrike/archstrike:latest

#Credits & Data
LABEL \
Expand All @@ -13,58 +13,42 @@ LABEL \
#Env vars
ENV AIRGEDDON_URL="https://github.com/v1s1t0r1sh3r3/airgeddon.git"
ENV HASHCAT2_URL="https://github.com/v1s1t0r1sh3r3/hashcat2.0.git"
ENV PACKAGES_URL="https://github.com/v1s1t0r1sh3r3/airgeddon_deb_packages.git"
ENV DEBIAN_FRONTEND="noninteractive"

#Update system
RUN apt update

#Set locales
RUN \
apt -y install \
locales && \
locale-gen en_US.UTF-8 && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
echo 'LANG="en_US.UTF-8"' > /etc/default/locale && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8

#Env vars for locales
ENV LANG="en_US.UTF-8"
ENV LANGUAGE="en_US:en"
ENV LC_ALL="en_US.UTF-8"
RUN pacman -Syy

#Install airgeddon essential tools
RUN \
apt -y install \
pacman -S --noconfirm \
gawk \
iw \
aircrack-ng \
xterm \
iproute2 \
pciutils \
procps
procps \
tmux

#Install airgeddon internal tools
RUN \
apt -y install \
pacman -S --noconfirm \
ethtool \
usbutils \
rfkill \
x11-utils \
xorg-xdpyinfo \
wget \
ccze \
x11-xserver-utils
xorg-xset

#Install update tools
RUN \
apt -y install \
pacman -S --noconfirm \
curl \
git

#Install airgeddon optional tools
RUN \
apt -y install \
pacman -S --noconfirm \
crunch \
hashcat \
mdk3 \
Expand All @@ -73,8 +57,8 @@ RUN \
lighttpd \
iptables \
nftables \
ettercap-text-only \
isc-dhcp-server \
ettercap \
dhcp \
dsniff \
reaver \
bully \
Expand All @@ -85,7 +69,9 @@ RUN \
openssl \
hcxtools \
hcxdumptool \
beef-xss
beef-git \
sslstrip \
wireshark-cli

#Env var for display
ENV DISPLAY=":0"
Expand Down Expand Up @@ -126,41 +112,17 @@ RUN \

#Install Bettercap and some dependencies
RUN \
apt -y install \
ruby && \
gem install bettercap

#Install special or deprecated packages and dependencies
RUN \
git clone ${PACKAGES_URL} && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-attr_19.3.0-2_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-six_1.14.0-2_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-automat_0.8.0-1_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-constantly_15.1.0-1_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-hamcrest_1.9.0-2_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-idna_2.6-2_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-hyperlink_19.0.0-1_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-incremental_16.10.1-3.1_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-ipaddress_1.0.17-1_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/libffi6_3.2.1-9_amd64.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-cffi-backend_1.13.2-1_amd64.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-enum34_1.1.6-2_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-cryptography_2.8-3+b1_amd64.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-openssl_19.0.0-1_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-pyasn1_0.4.2-3_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-pyasn1-modules_0.2.1-0.2_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-service-identity_18.1.0-5_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-zope.interface_4.7.1-1+b1_amd64.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-twisted-bin_18.9.0-10_amd64.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-twisted-core_18.9.0-10_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/python-twisted-web_18.9.0-10_all.deb && \
dpkg -i /opt/airgeddon_deb_packages/amd64/sslstrip_0.9-1kali3_all.deb
pacman -S --noconfirm \
ruby \
libffi && \
gem install bettercap && \
ln -s /root/.gem/ruby/2.7.0/bin/bettercap /usr/local/bin/bettercap && \
ln -s /usr/lib/libffi.so.7 /usr/lib/libffi.so.6 && \
chmod +x /usr/local/bin/bettercap

#Clean packages
RUN \
apt clean && \
apt autoclean && \
apt autoremove -y
yes | pacman -Sccc --noconfirm

#Clean and remove useless files
RUN rm -rf /opt/airgeddon/imgs > /dev/null 2>&1 && \
Expand All @@ -172,10 +134,8 @@ RUN rm -rf /opt/airgeddon/imgs > /dev/null 2>&1 && \
rm -rf /opt/airgeddon/Dockerfile > /dev/null 2>&1 && \
rm -rf /opt/airgeddon/binaries > /dev/null 2>&1 && \
rm -rf /opt/hashcat2.0 > /dev/null 2>&1 && \
rm -rf /opt/airgeddon_deb_packages > /dev/null 2>&1 && \
rm -rf /opt/airgeddon/plugins/* > /dev/null 2>&1 && \
rm -rf /tmp/* > /dev/null 2>&1 && \
rm -rf /var/lib/apt/lists/* > /dev/null 2>&1
rm -rf /tmp/* > /dev/null 2>&1

#Expose BeEF control panel port
EXPOSE 3000
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ All the needed info about how to "install | use | enjoy" `airgeddon` is present
[Hat Tip To]: https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Hat%20Tip%20To
[Inspiration]: https://github.com/v1s1t0r1sh3r3/airgeddon/wiki/Inspiration

[Version-shield]: https://img.shields.io/badge/version-10.20-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version"
[Version-shield]: https://img.shields.io/badge/version-10.21-blue.svg?style=flat-square&colorA=273133&colorB=0093ee "Latest version"
[Bash4.2-shield]: https://img.shields.io/badge/bash-4.2%2B-blue.svg?style=flat-square&colorA=273133&colorB=00db00 "Bash 4.2 or later"
[License-shield]: https://img.shields.io/badge/license-GPL%20v3%2B-blue.svg?style=flat-square&colorA=273133&colorB=bd0000 "GPL v3+"
[Docker-shield]: https://img.shields.io/docker/cloud/automated/v1s1t0r1sh3r3/airgeddon.svg?style=flat-square&colorA=273133&colorB=a9a9a9 "Docker rules!"
Expand Down
72 changes: 57 additions & 15 deletions airgeddon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#Title........: airgeddon.sh
#Description..: This is a multi-use bash script for Linux systems to audit wireless networks.
#Author.......: v1s1t0r
#Version......: 10.20
#Version......: 10.21
#Usage........: bash airgeddon.sh
#Bash Version.: 4.2 or later

Expand Down Expand Up @@ -67,6 +67,7 @@ optional_tools_names=(
"openssl"
"hcxpcaptool"
"hcxdumptool"
"tshark"
)

update_tools=("curl")
Expand Down Expand Up @@ -117,6 +118,7 @@ declare -A possible_package_names=(
[${optional_tools_names[23]}]="openssl" #openssl
[${optional_tools_names[24]}]="hcxtools" #hcxpcaptool
[${optional_tools_names[25]}]="hcxdumptool" #hcxdumptool
[${optional_tools_names[26]}]="tshark / wireshark-cli / wireshark" #tshark
[${update_tools[0]}]="curl" #curl
)

Expand All @@ -126,10 +128,11 @@ declare -A possible_alias_names=(
)

#General vars
airgeddon_version="10.20"
language_strings_expected_version="10.20-1"
airgeddon_version="10.21"
language_strings_expected_version="10.21-1"
standardhandshake_filename="handshake-01.cap"
standardpmkid_filename="pmkid_hash.txt"
standardpmkidcap_filename="pmkid.cap"
timeout_capture_handshake="20"
timeout_capture_pmkid="25"
tmpdir="/tmp/"
Expand Down Expand Up @@ -188,7 +191,7 @@ wep_key_handler="ag.wep_key_handler.sh"
wep_processes_file="wep_processes"

#Docker vars
docker_based_distro="Parrot"
docker_based_distro="Arch"
docker_io_dir="/io/"

#WPS vars
Expand Down Expand Up @@ -7524,10 +7527,14 @@ function manage_hashcat_pot() {
{
echo "BSSID: ${bssid}"
} >> "${potenteredpath}"
else
elif [ "${1}" = "personal_pmkid" ]; then
{
echo "${hashcat_texts[${language},4]}:"
} >> "${potenteredpath}"
elif [ "${1}" = "enterprise" ]; then
if [ "${multiple_users}" -eq 1 ]; then
{
echo "${hashcat_texts[${language},3]}"
echo "${hashcat_texts[${language},3]}:"
} >> "${potenteredpath}"
else
{
Expand Down Expand Up @@ -7841,7 +7848,7 @@ function manage_wps_log() {

debug_print

wps_potpath="${user_homedir}"
wps_potpath="${default_save_path}"

if [ -z "${wps_essid}" ]; then
wpspot_filename="wps_captured_key-${wps_bssid}.txt"
Expand All @@ -7861,7 +7868,7 @@ function manage_wep_log() {

debug_print

wep_potpath="${user_homedir}"
wep_potpath="${default_save_path}"
weppot_filename="wep_captured_key-${essid}.txt"
wep_potpath="${wep_potpath}${weppot_filename}"

Expand All @@ -7876,7 +7883,7 @@ function manage_enterprise_log() {

debug_print

enterprise_potpath="${user_homedir}"
enterprise_potpath="${default_save_path}"
enterprisepot_suggested_dirname="enterprise_captured-${essid}"
enterprise_potpath="${enterprise_potpath}${enterprisepot_suggested_dirname}/"

Expand All @@ -7891,7 +7898,7 @@ function manage_enterprise_certs() {

debug_print

enterprisecertspath="${user_homedir}"
enterprisecertspath="${default_save_path}"
enterprisecerts_suggested_dirname="enterprise_certs"
enterprisecertspath="${enterprisecertspath}${enterprisecerts_suggested_dirname}/"

Expand Down Expand Up @@ -8857,7 +8864,6 @@ function set_hostapd_wpe_config() {

{
echo -e "channel=${et_channel}"
echo -e "wpe_logfile=/dev/null"
echo -e "eap_server=1"
echo -e "eap_fast_a_id=101112131415161718191a1b1c1d1e1f"
echo -e "eap_fast_a_id_info=hostapd-wpe"
Expand Down Expand Up @@ -11534,6 +11540,10 @@ function validate_path() {
enteredpath="${pathname}${standardpmkid_filename}"
suggested_filename="${standardpmkid_filename}"
;;
"pmkidcap")
enteredpath="${pathname}${standardpmkidcap_filename}"
suggested_filename="${standardpmkidcap_filename}"
;;
"aircrackpot")
suggested_filename="${aircrackpot_filename}"
aircrackpotenteredpath+="${aircrackpot_filename}"
Expand Down Expand Up @@ -11710,6 +11720,14 @@ function read_path() {
fi
validate_path "${enteredpath}" "${1}"
;;
"pmkidcap")
language_strings "${language}" 686 "green"
read_and_clean_path "enteredpath"
if [ -z "${enteredpath}" ]; then
enteredpath="${pmkidcappath}"
fi
validate_path "${enteredpath}" "${1}"
;;
"dictionary")
language_strings "${language}" 180 "green"
read_and_clean_path "DICTIONARY"
Expand Down Expand Up @@ -12039,11 +12057,35 @@ function launch_pmkid_capture() {
read_path "pmkid"
done

cp "${tmpdir}${standardpmkid_filename}" "${enteredpath}"
cp "${tmpdir}${standardpmkid_filename}" "${enteredpath}" > /dev/null 2>&1

echo
language_strings "${language}" 673 "blue"
language_strings "${language}" 115 "read"
ask_yesno 684 "yes"
if [ "${yesno}" = "y" ]; then
if hash tshark 2> /dev/null; then
tshark -r "${tmpdir}pmkid.pcapng" -R "(wlan.fc.type_subtype == 0x08 || wlan.fc.type_subtype == 0x05 || eapol && wlan.addr==${bssid})" -2 -w "${tmpdir}pmkid_transformed.cap" -F pcap > /dev/null 2>&1

pmkidcappath="${default_save_path}"
pmkidcapfilename="pmkid-${bssid}.cap"
pmkidcappath="${pmkidcappath}${pmkidcapfilename}"

validpath=1
while [[ "${validpath}" != "0" ]]; do
read_path "pmkidcap"
done

cp "${tmpdir}pmkid_transformed.cap" "${enteredpath}" > /dev/null 2>&1

echo
language_strings "${language}" 673 "blue"
language_strings "${language}" 115 "read"
else
echo
language_strings "${language}" 685 "red"
language_strings "${language}" 115 "read"
fi
fi
else
echo
language_strings "${language}" 672 "red"
Expand Down Expand Up @@ -13788,7 +13830,7 @@ function detect_arm_architecture() {

distro_already_known=0

if uname -m | grep -i "arm" > /dev/null && [[ "${distro}" != "Unknown Linux" ]]; then
if uname -m | grep -Ei "arm|aarch64" > /dev/null && [[ "${distro}" != "Unknown Linux" ]]; then

for item in "${known_arm_compatible_distros[@]}"; do
if [ "${distro}" = "${item}" ]; then
Expand Down Expand Up @@ -13985,7 +14027,7 @@ function general_checkings() {
echo -e "${yellow_color}${distro}${normal_color}"
else
if [ "${is_docker}" -eq 1 ]; then
echo -e "${yellow_color}${docker_based_distro} Linux ${pink_color}(Docker)${normal_color}"
echo -e "${yellow_color}${docker_based_distro} Linux ${pink_color}(${docker_image[${language}]})${normal_color}"
else
echo -e "${yellow_color}${distro} Linux${normal_color}"
fi
Expand Down
Binary file removed binaries/arch/airgeddon-git-10.20-1-any.pkg.tar.xz
Binary file not shown.
Binary file not shown.
Binary file removed binaries/kali/airgeddon_10.20-1_all.deb
Binary file not shown.
Binary file added binaries/kali/airgeddon_10.21-1_all.deb
Binary file not shown.
Binary file modified imgs/wiki/airgeddon_scrs1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/wiki/airgeddon_scrs2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/wiki/arch_aur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified imgs/wiki/blackarch_linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0cb5b62

Please sign in to comment.