Open iandouglas opened 7 years ago
Thanks! glad to hear it is helpful to someone else. I tried to explain the system I use but I can add more information, you are correct. Thing is that I don't actually know much about determining compatibility for scripts like this.
Personally, I run this off of a Kali vm that I keep pretty well up-to-date. I totally understand there are syntactical differences in some of the commands that I use and the code is likely not portable to Mac as a result.
root@kali:~# uname -a
Linux kali 4.9.0-kali3-amd64 #1 SMP Debian 4.9.16-1kali1 (2017-03-24) x86_64 GNU/Linux
I use this VM for all of my bash development and testing, and before I release a new script, make sure to test it on a fresh VM so that the --setup
switch will be sure to catch all packages that are required by the script and not already installed on the distro.
Here's a list of packages that were installed on the system, NOT part of the base distribution. This list probably doesn't help, but here it is:
root@kali:~# apt list --installed | grep "\[installed\]"
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
adduser/kali-rolling,now 3.115 all [installed]
amd64-microcode/kali-rolling,now 3.20160316.3 amd64 [installed]
apt/kali-rolling,now 1.4~rc2 amd64 [installed]
apt-listchanges/kali-rolling,now 3.9 all [installed]
apt-utils/kali-rolling,now 1.4~rc2 amd64 [installed]
atmel-firmware/kali-rolling,now 1.3-4 all [installed]
base-files/kali-rolling,now 1:2016.2.2 amd64 [installed]
base-passwd/kali-rolling,now 3.5.43 amd64 [installed]
bash/kali-rolling,now 4.4-4+b1 amd64 [installed]
bash-completion/kali-rolling,now 1:2.1-4.3 all [installed]
bind9-host/kali-rolling,now 1:9.10.3.dfsg.P4-12 amd64 [installed]
blends-tasks/kali-rolling,now 0.6.96 all [installed]
bluez-firmware/kali-rolling,now 1.2-3 all [installed]
bsdmainutils/kali-rolling,now 9.0.12 amd64 [installed]
bsdutils/kali-rolling,now 1:2.29.1-1 amd64 [installed]
bzip2/kali-rolling,now 1.0.6-8.1 amd64 [installed]
console-setup/kali-rolling,now 1.160 all [installed]
coreutils/kali-rolling,now 8.26-3 amd64 [installed]
cpio/kali-rolling,now 2.11+dfsg-6 amd64 [installed]
cron/kali-rolling,now 3.0pl1-128+b1 amd64 [installed]
dahdi-firmware-nonfree/kali-rolling,now 2.11.1-1 all [installed]
dash/kali-rolling,now 0.5.8-2.4 amd64 [installed]
dbus/kali-rolling,now 1.10.16-1 amd64 [installed]
debconf/kali-rolling,now 1.5.60 all [installed]
debconf-i18n/kali-rolling,now 1.5.60 all [installed]
debian-archive-keyring/kali-rolling,now 2014.3 all [installed]
debian-faq/kali-rolling,now 8.1 all [installed]
debianutils/kali-rolling,now 4.8.1 amd64 [installed]
diffutils/kali-rolling,now 1:3.5-3 amd64 [installed]
dmidecode/kali-rolling,now 3.0-4 amd64 [installed]
dmsetup/kali-rolling,now 2:1.02.137-1 amd64 [installed]
doc-debian/kali-rolling,now 6.4 all [installed]
dpkg/kali-rolling,now 1.18.23kali1 amd64 [installed]
e2fslibs/kali-rolling,now 1.43.4-2 amd64 [installed]
e2fsprogs/kali-rolling,now 1.43.4-2 amd64 [installed]
eject/kali-rolling,now 2.1.5+deb1+cvs20081104-13.1 amd64 [installed]
file/kali-rolling,now 1:5.29-3 amd64 [installed]
findutils/kali-rolling,now 4.6.0+git+20161106-2 amd64 [installed]
firmware-amd-graphics/kali-rolling,now 20161130-2 all [installed]
firmware-atheros/kali-rolling,now 20161130-2 all [installed]
firmware-b43-installer/kali-rolling,now 1:019-3 all [installed]
firmware-b43legacy-installer/kali-rolling,now 1:019-3 all [installed]
firmware-bnx2/kali-rolling,now 20161130-2 all [installed]
firmware-bnx2x/kali-rolling,now 20161130-2 all [installed]
firmware-brcm80211/kali-rolling,now 20161130-2 all [installed]
firmware-cavium/kali-rolling,now 20161130-2 all [installed]
firmware-crystalhd/kali-rolling,now 0.0~git20120110.fdd2f19-1 all [installed]
firmware-intel-sound/kali-rolling,now 20161130-2 all [installed]
firmware-intelwimax/kali-rolling,now 20161130-2 all [installed]
firmware-ipw2x00/kali-rolling,now 20161130-2 all [installed]
firmware-ivtv/kali-rolling,now 20161130-2 all [installed]
firmware-iwlwifi/kali-rolling,now 20161130-2 all [installed]
firmware-libertas/kali-rolling,now 20161130-2 all [installed]
firmware-linux/kali-rolling,now 20161130-2 all [installed]
firmware-linux-free/kali-rolling,now 3.4 all [installed]
firmware-misc-nonfree/kali-rolling,now 20161130-2 all [installed]
firmware-myricom/kali-rolling,now 20161130-2 all [installed]
firmware-netxen/kali-rolling,now 20161130-2 all [installed]
firmware-qlogic/kali-rolling,now 20161130-2 all [installed]
firmware-realtek/kali-rolling,now 20161130-2 all [installed]
firmware-samsung/kali-rolling,now 20161130-2 all [installed]
firmware-siano/kali-rolling,now 20161130-2 all [installed]
firmware-ti-connectivity/kali-rolling,now 20161130-2 all [installed]
firmware-zd1211/kali-rolling,now 1:1.5-4 all [installed]
ftp/kali-rolling,now 0.17-34 amd64 [installed]
fuse/kali-rolling,now 2.9.7-1 amd64 [installed]
gcc-6-base/kali-rolling,now 6.3.0-6 amd64 [installed]
gettext-base/kali-rolling,now 0.19.8.1-2 amd64 [installed]
gnupg/kali-rolling,now 2.1.18-6 amd64 [installed]
gpgv/kali-rolling,now 2.1.18-6 amd64 [installed]
gpgv1/kali-rolling,now 1.4.21-2 amd64 [installed]
grep/kali-rolling,now 2.27-2 amd64 [installed]
groff-base/kali-rolling,now 1.22.3-9 amd64 [installed]
grub-common/kali-rolling,now 2.02~beta3-5 amd64 [installed]
grub-pc/kali-rolling,now 2.02~beta3-5 amd64 [installed]
gzip/kali-rolling,now 1.6-5+b1 amd64 [installed]
hdparm/kali-rolling,now 9.51+ds-1 amd64 [installed]
hostname/kali-rolling,now 3.18+b1 amd64 [installed]
ifupdown/kali-rolling,now 0.8.19 amd64 [installed]
init/kali-rolling,now 1.47kali1 amd64 [installed]
init-system-helpers/kali-rolling,now 1.47kali1 all [installed]
initscripts/kali-rolling,now 2.88dsf-59.9 amd64 [installed]
insserv/kali-rolling,now 1.14.0-5.4+b1 amd64 [installed]
intel-microcode/kali-rolling,now 3.20161104.1 amd64 [installed]
iproute2/kali-rolling,now 4.9.0-1 amd64 [installed]
iptables/kali-rolling,now 1.6.0+snapshot20161117-5 amd64 [installed]
iputils-ping/kali-rolling,now 3:20161105-1 amd64 [installed]
isc-dhcp-client/kali-rolling,now 4.3.5-3 amd64 [installed]
isc-dhcp-common/kali-rolling,now 4.3.5-3 amd64 [installed]
jq/kali-rolling,now 1.5+dfsg-1.3 amd64 [installed]
kali-archive-keyring/kali-rolling,now 2015.2 all [installed]
kali-desktop-gnome/kali-rolling,now 2017.1.4 all [installed]
kali-desktop-live/kali-rolling,now 2017.1.4 all [installed]
kali-linux/kali-rolling,now 2017.1.4 amd64 [installed]
kali-linux-full/kali-rolling,now 2017.1.4 amd64 [installed]
keyboard-configuration/kali-rolling,now 1.160 all [installed]
kmod/kali-rolling,now 23-2 amd64 [installed]
krb5-locales/kali-rolling,now 1.15-1 all [installed]
less/kali-rolling,now 481-2.1 amd64 [installed]
libacl1/kali-rolling,now 2.2.52-3+b1 amd64 [installed]
libapparmor1/kali-rolling,now 2.11.0-2 amd64 [installed]
libapt-inst2.0/kali-rolling,now 1.4~rc2 amd64 [installed]
libapt-pkg5.0/kali-rolling,now 1.4~rc2 amd64 [installed]
libattr1/kali-rolling,now 1:2.4.47-2+b2 amd64 [installed]
libaudit-common/kali-rolling,now 1:2.6.7-1 all [installed]
libaudit1/kali-rolling,now 1:2.6.7-1 amd64 [installed]
libblkid1/kali-rolling,now 2.29.1-1 amd64 [installed]
libbsd0/kali-rolling,now 0.8.3-1 amd64 [installed]
libbz2-1.0/kali-rolling,now 1.0.6-8.1 amd64 [installed]
libc-bin/kali-rolling,now 2.24-9 amd64 [installed]
libc-l10n/kali-rolling,now 2.24-9 all [installed]
libc6/kali-rolling,now 2.24-9 amd64 [installed]
libcap-ng0/kali-rolling,now 0.7.7-3+b1 amd64 [installed]
libcap2/kali-rolling,now 1:2.25-1 amd64 [installed]
libcap2-bin/kali-rolling,now 1:2.25-1 amd64 [installed]
libclass-isa-perl/kali-rolling,now 0.36-5 all [installed]
libcomerr2/kali-rolling,now 1.43.4-2 amd64 [installed]
libcryptsetup4/kali-rolling,now 2:1.7.3-3kali1 amd64 [installed]
libdb5.3/kali-rolling,now 5.3.28-12+b1 amd64 [installed]
libdebconfclient0/kali-rolling,now 0.220 amd64 [installed]
libdevmapper1.02.1/kali-rolling,now 2:1.02.137-1 amd64 [installed]
libdns-export162/kali-rolling,now 1:9.10.3.dfsg.P4-12 amd64 [installed]
libelf1/kali-rolling,now 0.168-0.2 amd64 [installed]
libestr0/kali-rolling,now 0.1.10-2 amd64 [installed]
libfdisk1/kali-rolling,now 2.29.1-1 amd64 [installed]
libffi6/kali-rolling,now 3.2.1-6 amd64 [installed]
libgcc1/kali-rolling,now 1:6.3.0-6 amd64 [installed]
libgcrypt20/kali-rolling,now 1.7.6-1 amd64 [installed]
libgdbm3/kali-rolling,now 1.8.3-14 amd64 [installed]
libgmp10/kali-rolling,now 2:6.1.2+dfsg-1 amd64 [installed]
libgnutls30/kali-rolling,now 3.5.8-3 amd64 [installed]
libgpg-error0/kali-rolling,now 1.26-2 amd64 [installed]
libhogweed4/kali-rolling,now 3.3-1+b1 amd64 [installed]
libicu57/kali-rolling,now 57.1-5 amd64 [installed]
libidn11/kali-rolling,now 1.33-1 amd64 [installed]
libip4tc0/kali-rolling,now 1.6.0+snapshot20161117-5 amd64 [installed]
libip6tc0/kali-rolling,now 1.6.0+snapshot20161117-5 amd64 [installed]
libiptc0/kali-rolling,now 1.6.0+snapshot20161117-5 amd64 [installed]
libisc-export160/kali-rolling,now 1:9.10.3.dfsg.P4-12 amd64 [installed]
libjson-c3/kali-rolling,now 0.12.1-1.1 amd64 [installed]
libkmod2/kali-rolling,now 23-2 amd64 [installed]
liblocale-gettext-perl/kali-rolling,now 1.07-3+b1 amd64 [installed]
liblockfile-bin/kali-rolling,now 1.14-1+b1 amd64 [installed]
liblogging-stdlog0/kali-rolling,now 1.0.5-2+b2 amd64 [installed]
liblz4-1/kali-rolling,now 0.0~r131-2+b1 amd64 [installed]
liblzma5/kali-rolling,now 5.2.2-1.2+b1 amd64 [installed]
libmnl0/kali-rolling,now 1.0.4-2 amd64 [installed]
libmount1/kali-rolling,now 2.29.1-1 amd64 [installed]
libncurses5/kali-rolling,now 6.0+20161126-1 amd64 [installed]
libncursesw5/kali-rolling,now 6.0+20161126-1 amd64 [installed]
libnetfilter-acct1/kali-rolling,now 1.0.2-1.1 amd64 [installed]
libnetfilter-conntrack3/kali-rolling,now 1.0.6-2 amd64 [installed]
libnettle6/kali-rolling,now 3.3-1+b1 amd64 [installed]
libnewt0.52/kali-rolling,now 0.52.19-1+b1 amd64 [installed]
libnfnetlink0/kali-rolling,now 1.0.1-3 amd64 [installed]
libp11-kit0/kali-rolling,now 0.23.3-2 amd64 [installed]
libpam-modules/kali-rolling,now 1.1.8-3.5 amd64 [installed]
libpam-modules-bin/kali-rolling,now 1.1.8-3.5 amd64 [installed]
libpam-runtime/kali-rolling,now 1.1.8-3.5 all [installed]
libpam-systemd/kali-rolling,now 232-19 amd64 [installed]
libpam0g/kali-rolling,now 1.1.8-3.5 amd64 [installed]
libpcre3/kali-rolling,now 2:8.39-2.1 amd64 [installed]
libpipeline1/kali-rolling,now 1.4.1-2 amd64 [installed]
libpopt0/kali-rolling,now 1.16-10+b2 amd64 [installed]
libprocps6/kali-rolling,now 2:3.3.12-3 amd64 [installed]
libpsl5/kali-rolling,now 0.17.0-3 amd64 [installed]
libseccomp2/kali-rolling,now 2.3.1-2.1 amd64 [installed]
libselinux1/kali-rolling,now 2.6-3 amd64 [installed]
libsemanage-common/kali-rolling,now 2.6-2 all [installed]
libsemanage1/kali-rolling,now 2.6-2 amd64 [installed]
libsepol1/kali-rolling,now 2.6-2 amd64 [installed]
libslang2/kali-rolling,now 2.3.1-5 amd64 [installed]
libsmartcols1/kali-rolling,now 2.29.1-1 amd64 [installed]
libss2/kali-rolling,now 1.43.4-2 amd64 [installed]
libssl1.0.2/kali-rolling,now 1.0.2k-1 amd64 [installed]
libstdc++6/kali-rolling,now 6.3.0-6 amd64 [installed]
libswitch-perl/kali-rolling,now 2.17-2 all [installed]
libsystemd0/kali-rolling,now 232-19 amd64 [installed]
libtasn1-6/kali-rolling,now 4.10-1 amd64 [installed]
libtext-charwidth-perl/kali-rolling,now 0.04-7+b5 amd64 [installed]
libtext-iconv-perl/kali-rolling,now 1.7-5+b4 amd64 [installed]
libtext-wrapi18n-perl/kali-rolling,now 0.06-7.1 all [installed]
libtinfo5/kali-rolling,now 6.0+20161126-1 amd64 [installed]
libudev1/kali-rolling,now 232-19 amd64 [installed]
libusb-0.1-4/kali-rolling,now 2:0.1.12-30 amd64 [installed]
libustr-1.0-1/kali-rolling,now 1.0.4-6 amd64 [installed]
libuuid1/kali-rolling,now 2.29.1-1 amd64 [installed]
linux-image-amd64/kali-rolling,now 4.9+79+kali2 amd64 [installed]
locales/kali-rolling,now 2.24-9 all [installed]
login/kali-rolling,now 1:4.4-4 amd64 [installed]
logrotate/kali-rolling,now 3.11.0-0.1 amd64 [installed]
lsb-base/kali-rolling,now 9.20161125 all [installed]
lsof/kali-rolling,now 4.89+dfsg-0.1 amd64 [installed]
man-db/kali-rolling,now 2.7.6.1-2 amd64 [installed]
manpages/kali-rolling,now 4.09-2 all [installed]
mawk/kali-rolling,now 1.3.3-17+b3 amd64 [installed]
mime-support/kali-rolling,now 3.60 all [installed]
mlocate/kali-rolling,now 0.26-2 amd64 [installed]
mount/kali-rolling,now 2.29.1-1 amd64 [installed]
multiarch-support/kali-rolling,now 2.24-9 amd64 [installed]
nano/kali-rolling,now 2.7.4-1 amd64 [installed]
ncurses-base/kali-rolling,now 6.0+20161126-1 all [installed]
ncurses-bin/kali-rolling,now 6.0+20161126-1 amd64 [installed]
ncurses-term/kali-rolling,now 6.0+20161126-1 all [installed]
net-tools/kali-rolling,now 1.60+git20161116.90da8a0-1 amd64 [installed]
netbase/kali-rolling,now 5.4 all [installed]
netcat-traditional/kali-rolling,now 1.10-41+b1 amd64 [installed]
nfacct/kali-rolling,now 1.0.1-1.1+b1 amd64 [installed]
nodejs/unknown,now 6.10.1-1nodesource1~jessie1 amd64 [installed]
open-vm-tools-desktop/kali-rolling,now 2:10.1.5-5055683-1 amd64 [installed]
openssh-client/kali-rolling,now 1:7.4p1-9 amd64 [installed]
passwd/kali-rolling,now 1:4.4-4 amd64 [installed]
patch/kali-rolling,now 2.7.5-1+b2 amd64 [installed]
paxctld/kali-rolling,now 1.2.1-1 amd64 [installed]
pciutils/kali-rolling,now 1:3.5.2-1 amd64 [installed]
perl/kali-rolling,now 5.24.1-2 amd64 [installed]
perl-base/kali-rolling,now 5.24.1-2 amd64 [installed]
php/kali-rolling,now 1:7.0+49 all [installed]
php-cli/kali-rolling,now 1:7.0+49 all [installed]
php-common/kali-rolling,now 1:49 all [installed]
php-mbstring/kali-rolling,now 1:7.0+49 all [installed]
php-xml/kali-rolling,now 1:7.0+49 all [installed]
procmail/kali-rolling,now 3.22-25+b1 amd64 [installed]
procps/kali-rolling,now 2:3.3.12-3 amd64 [installed]
python/kali-rolling,now 2.7.13-2 amd64 [installed]
python-apt/kali-rolling,now 1.4.0~beta2 amd64 [installed]
python-minimal/kali-rolling,now 2.7.13-2 amd64 [installed]
python2.7/kali-rolling,now 2.7.13-2 amd64 [installed]
readline-common/kali-rolling,now 7.0-2 all [installed]
reportbug/kali-rolling,now 7.1.5 all [installed]
rsyslog/kali-rolling,now 8.24.0-1 amd64 [installed]
sed/kali-rolling,now 4.4-1 amd64 [installed]
sensible-utils/kali-rolling,now 0.0.9 all [installed]
startpar/kali-rolling,now 0.59-3.1 amd64 [installed]
systemd/kali-rolling,now 232-19 amd64 [installed]
systemd-sysv/kali-rolling,now 232-19 amd64 [installed]
sysv-rc/kali-rolling,now 2.88dsf-59.9 all [installed]
sysvinit-utils/kali-rolling,now 2.88dsf-59.9 amd64 [installed]
tar/kali-rolling,now 1.29b-1.1 amd64 [installed]
tasksel/kali-rolling,now 3.39 all [installed]
tasksel-data/kali-rolling,now 3.39 all [installed]
telnet/kali-rolling,now 0.17-41 amd64 [installed]
time/kali-rolling,now 1.7-25.1+b1 amd64 [installed]
traceroute/kali-rolling,now 1:2.1.0-2 amd64 [installed]
tzdata/kali-rolling,now 2017a-1 all [installed]
ucf/kali-rolling,now 3.0036 all [installed]
udev/kali-rolling,now 232-19 amd64 [installed]
usbutils/kali-rolling,now 1:007-4+b1 amd64 [installed]
util-linux/kali-rolling,now 2.29.1-1 amd64 [installed]
vim-common/kali-rolling,now 2:8.0.0197-3 all [installed]
vim-tiny/kali-rolling,now 2:8.0.0197-3 amd64 [installed]
wamerican/kali-rolling,now 7.1-1 all [installed]
wget/kali-rolling,now 1.18-5 amd64 [installed]
whiptail/kali-rolling,now 0.52.19-1+b1 amd64 [installed]
xz-utils/kali-rolling,now 5.2.2-1.2+b1 amd64 [installed]
zlib1g/kali-rolling,now 1:1.2.8.dfsg-5 amd64 [installed]
I worked specifically to make the script as easy to execute as possible. (see --help
and the --nike
or --private-only
switches). Assuming that I can decide the environment to execute in, all that's needed is the target user's slack api token, and with these commands the script will install any required tools, then download the logs. Using --private-only
even runs pretty quickly (depending on how many conversations are being logged). See the benchmarks.md for some data about execution time.
Really, my suggestion is to spin up a VM to run Kali in and execute the script there. Very minimal work to pull the files out of it. Virtualization software is free or very cheap. I think Kali even comes as a live DVD as well, or it could be installed onto a USB to boot from.
Thanks for making this available. I had to hack a little code here and there to make it work on a Linux system, some of your apt-get commands are out of date (ie, php-cli should be php5-cli and I couldn't quickly find (in less than 5 seconds) a comparable package for php-xml and a few others)
To get things running on a Mac was a little tricker since there are a handful of Linux commands and grep usage that aren't supported on a Mac.
Could the README get updated with required minimum/maximum specs, ie, requires a Debian-based Linux system older than Ubuntu 14.10 LTS or something to that effect?