added the first kali helpers
This commit is contained in:
parent
5329336d7b
commit
756ad5f231
47
kali/airodump-script
Executable file
47
kali/airodump-script
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Usage: ./airodump-script
|
||||
# or
|
||||
# bash airodump-script
|
||||
# Description: Performs all needed steps to gather WLAN endpoints and
|
||||
# stores the results in an csv file with utc date in file name.
|
||||
# Author: Patrick Neumann (patrick@neumannsland.de)
|
||||
# Platform: Kali Linux (tested: 2018.2)
|
||||
# Version: 1.0
|
||||
# Date: 24.08.2018
|
||||
# License: GPL3
|
||||
# Warranty: This program is distributed WITHOUT ANY WARRANTY
|
||||
|
||||
# check for root
|
||||
if [[ 0 -ne "$( /usr/bin/id --user )" ]] ; then
|
||||
printf "you need to be root - EXIT!\n"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# config
|
||||
DESTINATION="/root/Documents/airodump-ng-$( date -u +%Y%m%d%H%M%S )"
|
||||
|
||||
# select wlan option
|
||||
printf "Please select a WLAN nic:\n"
|
||||
select NIC in $( ls /sys/class/net | grep -F wlan ) ; do
|
||||
if [ -n "${NIC}" ] ; then break ; fi
|
||||
done
|
||||
|
||||
# deconfigure the network
|
||||
systemctl stop NetworkManager.service
|
||||
pkill dhclient &> /dev/null
|
||||
|
||||
# bring the wlan option into monitoring mode
|
||||
airmon-ng start "${NIC}"
|
||||
|
||||
# gather as much information about WLANs as possible
|
||||
# (let run it "some" minutes end exit it with <ctrl>+<c>.)
|
||||
airodump-ng --band abg --write "${DESTINATION}" --output-format csv "${NIC}"mon
|
||||
|
||||
# stop monitoring mode
|
||||
airmon-ng stop "${NIC}"mon
|
||||
|
||||
# reconfigure the network
|
||||
systemctl start NetworkManager.service
|
||||
|
||||
exit 0
|
82
kali/make_kali-usb-stick_persistent
Executable file
82
kali/make_kali-usb-stick_persistent
Executable file
@ -0,0 +1,82 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage: ./make_kali-usb-stick_persistent [ kali.iso ]
|
||||
# or
|
||||
# bash make_kali-usb-stick_persistent [ kali.iso ]
|
||||
# Description: Writes a kali.iso to an usb stick (optional) and
|
||||
# adds persistence to it step by step.
|
||||
# Author: Patrick Neumann (patrick@neumannsland.de)
|
||||
# Platform: Kali Linux (tested: 2018.2) or
|
||||
# Debian GNU/Linux (tested: 9.5)
|
||||
# Version: 1.0
|
||||
# Date: 24.08.2018
|
||||
# License: GPL3
|
||||
# Warranty: This program is distributed WITHOUT ANY WARRANTY
|
||||
|
||||
# check for root
|
||||
if [[ 0 -ne "$( /usr/bin/id --user )" ]] ; then
|
||||
printf "you need to be root - EXIT!\n"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# usage function
|
||||
usage () {
|
||||
printf "Usage:\n"
|
||||
printf " $0 [ <kali-linux-*.iso ]\n"
|
||||
printf " (If an iso file is given it will be written to the usb stick first.)\n"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# onle zero or one args are supported
|
||||
if [ "${#}" -gt 1 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# select usb stick
|
||||
printf "Please select an usb stick:\n"
|
||||
select USBSTICK in $( ls -l /sys/dev/block | grep -E ".*usb.*[^[:digit:]]$" | awk -F "/" '{ print $NF; }' ) ; do
|
||||
if [ -n "${USBSTICK}" ] ; then break ; fi
|
||||
done
|
||||
# all block devices should be writable by root!?
|
||||
USBSTICK="/dev/${USBSTICK}"
|
||||
|
||||
# if iso file is given
|
||||
if [ "${#}" -eq 1 ]; then
|
||||
if ! [ -e "${1}" ] ; then
|
||||
printf "iso file does not exist - EXIT!\n"
|
||||
exit 3
|
||||
fi
|
||||
if ! [ -f "${1}" ] ; then
|
||||
printf "iso file is not a regular file - EXIT!\n"
|
||||
exit 4
|
||||
fi
|
||||
# all files are readable by root!?
|
||||
|
||||
ISOFILE="${1}"
|
||||
|
||||
dd if="${ISOFILE}" of="${USBSTICK}" bs=512k
|
||||
fi
|
||||
|
||||
#check if persistence is already there.
|
||||
if blkid "${USBSTICK}"3 | grep -F persistence &> /dev/null ; then
|
||||
printf "There is already a persistence on the choosen usb stick - EXIT!\n"
|
||||
exit 5
|
||||
fi
|
||||
|
||||
# add 3rd partition to the end of the usb stick
|
||||
FREE="$( parted -m /dev/sdd print free | grep -F free | tail -n 1 )"
|
||||
START="$( printf "${FREE}" | awk -F ":" '{ print $2; }' )"
|
||||
END="$( printf "${FREE}" | awk -F ":" '{ print $3; }' )"
|
||||
parted "${USBSTICK}" mkpart primary "${START}" "${END}"
|
||||
|
||||
# format 3rd partition with ext3 and label "persistence"
|
||||
mkfs.ext3 -L persistence "${USBSTICK}"3
|
||||
|
||||
# place "config" in filesystem of 3rd partition
|
||||
mkdir -p /mnt/persistence
|
||||
mount "${USBSTICK}"3 /mnt/persistence
|
||||
echo "/ union" > /mnt/persistence/persistence.conf
|
||||
umount "${USBSTICK}"3
|
||||
rmdir /mnt/persistence
|
||||
|
||||
exit 0
|
41
kali/wireshark_with_no_ip
Executable file
41
kali/wireshark_with_no_ip
Executable file
@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Usage: ./wireshark_with_no_ip
|
||||
# or
|
||||
# bash wireshark_with_no_ip
|
||||
# Description: Brings a nic up without an ip address and without arp and
|
||||
# starts wireshark really passive.
|
||||
# Author: Patrick Neumann (patrick@neumannsland.de)
|
||||
# Platform: Kali Linux (tested: 2018.2)
|
||||
# Version: 1.0
|
||||
# Date: 24.08.2018
|
||||
# License: GPL3
|
||||
# Warranty: This program is distributed WITHOUT ANY WARRANTY
|
||||
|
||||
# check for root
|
||||
if [[ 0 -ne "$( /usr/bin/id --user )" ]] ; then
|
||||
printf "you need to be root - EXIT!\n"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# select network device
|
||||
printf "Please select a NIC:\n"
|
||||
select NIC in $( ls /sys/class/net | grep -F eth ) ; do
|
||||
if [ -n "${NIC}" ] ; then break ; fi
|
||||
done
|
||||
|
||||
# deconfigure the network
|
||||
systemctl stop NetworkManager.service
|
||||
pkill dhclient &> /dev/null
|
||||
ip addr flush dev "${NIC}"
|
||||
ip route flush dev "${NIC}"
|
||||
echo > /etc/resolv.conf
|
||||
|
||||
# configure nic without ip address and without arp
|
||||
ip addr add 0.0.0.0/32 dev "${NIC}"
|
||||
ip link set "${NIC}" arp off up
|
||||
|
||||
# start wireshark
|
||||
wireshark -i "${NIC}"
|
||||
|
||||
exit 0
|
Loading…
x
Reference in New Issue
Block a user