Jump to content

Bash Bunny Support for Python3


jack.slack

Recommended Posts

Hello fellow comrades,

I have had the bash bunny for a couple of weeks now and almost every script I have attempted to run just did not work on Windows 10, with the exception of a couple credential grabbing scripts. The one I have been trying to get to work is that of the "Faster SMB Exfiltrator" script, which does require the impacket package. It did not work with the .deb package so I searched the forms for a solution. I came across a couple of posts which recommended downloading Impacket from https://github.com/CoreSecurity/impacket and installing using the python script. However, when I did, installing some of the dependencies failed with similar errors as the below:

Unpacking /tools/impacket/cryptography-35.0.0
  Running setup.py (path:/tmp/pip-Wk66OV-build/setup.py) egg_info for package from file:///tools/impacket/cryptography-35.0.0
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-Wk66OV-build/setup.py", line 84
        print(f"    Python: {'.'.join(str(v) for v in sys.version_info[:3])}")
                                                                            ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
 
  File "<string>", line 17, in <module>
 
  File "/tmp/pip-Wk66OV-build/setup.py", line 84
 
    print(f"    Python: {'.'.join(str(v) for v in sys.version_info[:3])}")
 
                                                                        ^
 
SyntaxError: invalid syntax
 
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-Wk66OV-build
Storing debug log for failure in /root/.pip/pip.log

After some more research, it turns out the errors are due to use of old version of python (bash bunny comes with python 2.7). F-string literals have been added to python since python 3.6. Obviously, I would rather install the latest version of impacket and dependencies like cryptography-35.0.0 which do require python3. So my question is does the bash bunny work with python 3 and if so up to what version? 

Link to comment
Share on other sites

I don't know by heart and currently don't have a BashBunny on me, but I don't know any reason why python3 wouldn't work on the bunny.

Wouldn't it be as simple as just installing it via apt?

apt-get update
apt-get install python3.6

 

Link to comment
Share on other sites

  • 2 weeks later...

@kuyayaThe proposed below does not work

apt-get update
apt-get install python3.6

no matter what I do, the only version I get offered is 3.4 tops!

root@bunny:~# apt update && apt upgrade -y && apt clean
Ign http://httpredir.debian.org jessie InRelease
Hit http://httpredir.debian.org jessie Release.gpg
Hit http://httpredir.debian.org jessie Release
Hit http://archive.debian.org jessie-backports InRelease
Ign http://ftp.de.debian.org stretch InRelease
Hit http://ftp.de.debian.org stretch Release.gpg
Hit http://ftp.de.debian.org stretch Release
Hit http://httpredir.debian.org jessie/main Sources
Ign http://archive.debian.org jessie-backports/main Sources/DiffIndex
Hit http://httpredir.debian.org jessie/contrib Sources
Ign http://archive.debian.org jessie-backports/main armhf Packages/DiffIndex
Hit http://ftp.de.debian.org stretch/main Sources
Ign http://archive.debian.org jessie-backports/main Translation-en/DiffIndex
Hit http://httpredir.debian.org jessie/non-free Sources
Hit http://ftp.de.debian.org stretch/main armhf Packages
Hit http://ftp.de.debian.org stretch/main Translation-en
Hit http://httpredir.debian.org jessie/main armhf Packages
Hit http://httpredir.debian.org jessie/contrib armhf Packages
Hit http://httpredir.debian.org jessie/non-free armhf Packages
Hit http://archive.debian.org jessie-backports/main Translation-en
Hit http://archive.debian.org jessie-backports/main Sources
Hit http://httpredir.debian.org jessie/contrib Translation-en
Hit http://archive.debian.org jessie-backports/main armhf Packages
Hit http://httpredir.debian.org jessie/main Translation-en
Hit http://httpredir.debian.org jessie/non-free Translation-en
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: There is no public key available for the following key IDs:
648ACFD622F3D138
 NO_PUBKEY 0E98404D386FA1D9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
E: Invalid operation clean

root@bunny:~# apt-get install python3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.6
E: Couldn't find any package by regex 'python3.6'


root@bunny:~# apt update && \
>     apt install --no-install-recommends -y build-essential software-properties -common && \
>     add-apt-repository -y ppa:deadsnakes/ppa && \
>     apt install --no-install-recommends -y python3.7 python3.7-dev python3.7 -distutils && \
>     apt clean && rm -rf /var/lib/apt/lists/*
Ign http://httpredir.debian.org jessie InRelease
Hit http://httpredir.debian.org jessie Release.gpg
Ign http://ftp.de.debian.org stretch InRelease
Hit http://archive.debian.org jessie-backports InRelease
Hit http://httpredir.debian.org jessie Release
Hit http://ftp.de.debian.org stretch Release.gpg
Hit http://ftp.de.debian.org stretch Release
Ign http://archive.debian.org jessie-backports/main Sources/DiffIndex
Ign http://archive.debian.org jessie-backports/main armhf Packages/DiffIndex
Hit http://httpredir.debian.org jessie/main Sources
Ign http://archive.debian.org jessie-backports/main Translation-en/DiffIndex
Hit http://ftp.de.debian.org stretch/main Sources
Hit http://ftp.de.debian.org stretch/main armhf Packages
Hit http://httpredir.debian.org jessie/contrib Sources
Hit http://ftp.de.debian.org stretch/main Translation-en
Hit http://archive.debian.org jessie-backports/main Translation-en
Hit http://httpredir.debian.org jessie/non-free Sources
Hit http://archive.debian.org jessie-backports/main Sources
Hit http://httpredir.debian.org jessie/main armhf Packages
Hit http://archive.debian.org jessie-backports/main armhf Packages
Hit http://httpredir.debian.org jessie/contrib armhf Packages
Hit http://httpredir.debian.org jessie/non-free armhf Packages
Hit http://httpredir.debian.org jessie/contrib Translation-en
Hit http://httpredir.debian.org jessie/main Translation-en
Hit http://httpredir.debian.org jessie/non-free Translation-en
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: There is no public key available for the following key IDs:
648ACFD622F3D138
 NO_PUBKEY 0E98404D386FA1D9
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  bzip2 dh-python dpkg-dev g++ g++-4.9 gir1.2-glib-2.0 iso-codes
  libdbus-glib-1-2 libdpkg-perl libgirepository-1.0-1 libglib2.0-0 libmpdec2
  libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib libstdc++-4.9-dev
  libtimedate-perl patch python-apt-common python3 python3-apt python3-dbus
  python3-gi python3-minimal python3-software-properties python3.4
  python3.4-minimal unattended-upgrades
Suggested packages:
  bzip2-doc debian-keyring gcc-4.9-doc libstdc++6-4.9-dbg isoquery
  libstdc++-4.9-doc ed diffutils-doc python3-doc python3-tk python3-venv
  python3-apt-dbg python-apt-doc python-dbus-doc python3-dbus-dbg
  python3.4-venv python3.4-doc binfmt-support bsd-mailx mail-transport-agent
Recommended packages:
  fakeroot libalgorithm-merge-perl libfile-fcntllock-perl libglib2.0-data
  shared-mime-info xdg-user-dirs
The following NEW packages will be installed:
  build-essential bzip2 dh-python dpkg-dev g++ g++-4.9 gir1.2-glib-2.0
  iso-codes libdbus-glib-1-2 libdpkg-perl libgirepository-1.0-1 libglib2.0-0
  libmpdec2 libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib
  libstdc++-4.9-dev libtimedate-perl patch python-apt-common python3
  python3-apt python3-dbus python3-gi python3-minimal
  python3-software-properties python3.4 python3.4-minimal
  software-properties-common unattended-upgrades
0 upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.3 MB/26.1 MB of archives.
After this operation, 75.4 MB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian/ jessie/main libglib2.0-0 armhf 2.42.1-                                                    1+b1 [2270 kB]
Get:2 http://httpredir.debian.org/debian/ jessie/main libdbus-glib-1-2 armhf 0.1                                                    02-1 [190 kB]
Get:3 http://httpredir.debian.org/debian/ jessie/main libmpdec2 armhf 2.4.1-1 [7                                                    0.7 kB]
Get:4 http://httpredir.debian.org/debian/ jessie/main libpython3.4-minimal armhf                                                     3.4.2-1 [485 kB]
Get:5 http://httpredir.debian.org/debian/ jessie/main libpython3.4-stdlib armhf                                                     3.4.2-1 [2011 kB]
Get:6 http://httpredir.debian.org/debian/ jessie/main python3.4-minimal armhf 3.                                                    4.2-1 [1364 kB]
Get:7 http://httpredir.debian.org/debian/ jessie/main python3.4 armhf 3.4.2-1 [2                                                    04 kB]
Get:8 http://httpredir.debian.org/debian/ jessie/main python3-minimal armhf 3.4.                                                    2-2 [34.6 kB]
Get:9 http://httpredir.debian.org/debian/ jessie/main libpython3-stdlib armhf 3.                                                    4.2-2 [18.1 kB]
Get:10 http://httpredir.debian.org/debian/ jessie/main python3 armhf 3.4.2-2 [21                                                    .2 kB]
Get:11 http://httpredir.debian.org/debian/ jessie/main dh-python all 1.20141111-                                                    2 [66.4 kB]
Get:12 http://httpredir.debian.org/debian/ jessie/main libgirepository-1.0-1 arm                                                    hf 1.42.0-2.2 [84.3 kB]
Get:13 http://httpredir.debian.org/debian/ jessie/main gir1.2-glib-2.0 armhf 1.4                                                    2.0-2.2 [141 kB]
Get:14 http://httpredir.debian.org/debian/ jessie/main iso-codes all 3.57-1 [226                                                    5 kB]
Get:15 http://httpredir.debian.org/debian/ jessie/main python-apt-common all 0.9                                                    .3.12 [89.9 kB]
Get:16 http://httpredir.debian.org/debian/ jessie/main python3-apt armhf 0.9.3.1                                                    2 [156 kB]
Get:17 http://httpredir.debian.org/debian/ jessie/main python3-dbus armhf 1.2.0-                                                    2+b3 [182 kB]
Get:18 http://httpredir.debian.org/debian/ jessie/main python3-gi armhf 3.14.0-1                                                     [440 kB]
Get:19 http://httpredir.debian.org/debian/ jessie/main unattended-upgrades all 0                                                    .83.3.2+deb8u1 [52.9 kB]
Get:20 http://httpredir.debian.org/debian/ jessie/main python3-software-properti                                                    es all 0.92.25debian1 [41.4 kB]
Get:21 http://httpredir.debian.org/debian/ jessie/main software-properties-commo                                                    n all 0.92.25debian1 [79.3 kB]
Fetched 10.3 MB in 20s (510 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libglib2.0-0:armhf.
(Reading database ... 55218 files and directories currently installed.)
Preparing to unpack .../libglib2.0-0_2.42.1-1+b1_armhf.deb ...
Unpacking libglib2.0-0:armhf (2.42.1-1+b1) ...
Selecting previously unselected package libdbus-glib-1-2:armhf.
Preparing to unpack .../libdbus-glib-1-2_0.102-1_armhf.deb ...
Unpacking libdbus-glib-1-2:armhf (0.102-1) ...
Selecting previously unselected package libmpdec2:armhf.
Preparing to unpack .../libmpdec2_2.4.1-1_armhf.deb ...
Unpacking libmpdec2:armhf (2.4.1-1) ...
Selecting previously unselected package libpython3.4-minimal:armhf.
Preparing to unpack .../libpython3.4-minimal_3.4.2-1_armhf.deb ...
Unpacking libpython3.4-minimal:armhf (3.4.2-1) ...
Selecting previously unselected package libpython3.4-stdlib:armhf.
Preparing to unpack .../libpython3.4-stdlib_3.4.2-1_armhf.deb ...
Unpacking libpython3.4-stdlib:armhf (3.4.2-1) ...
Selecting previously unselected package python3.4-minimal.
Preparing to unpack .../python3.4-minimal_3.4.2-1_armhf.deb ...
Unpacking python3.4-minimal (3.4.2-1) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../bzip2_1.0.6-7+b3_armhf.deb ...
Unpacking bzip2 (1.0.6-7+b3) ...
Selecting previously unselected package patch.
Preparing to unpack .../patch_2.7.5-1+deb8u1_armhf.deb ...
Unpacking patch (2.7.5-1+deb8u1) ...
Selecting previously unselected package libstdc++-4.9-dev:armhf.
Preparing to unpack .../libstdc++-4.9-dev_4.9.2-10+deb8u1_armhf.deb ...
Unpacking libstdc++-4.9-dev:armhf (4.9.2-10+deb8u1) ...
Selecting previously unselected package g++-4.9.
Preparing to unpack .../g++-4.9_4.9.2-10+deb8u1_armhf.deb ...
Unpacking g++-4.9 (4.9.2-10+deb8u1) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a4.9.2-2_armhf.deb ...
Unpacking g++ (4:4.9.2-2) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.17.27_all.deb ...
Unpacking libdpkg-perl (1.17.27) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.17.27_all.deb ...
Unpacking dpkg-dev (1.17.27) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_11.7_armhf.deb ...
Unpacking build-essential (11.7) ...
Selecting previously unselected package python3.4.
Preparing to unpack .../python3.4_3.4.2-1_armhf.deb ...
Unpacking python3.4 (3.4.2-1) ...
Selecting previously unselected package python3-minimal.
Preparing to unpack .../python3-minimal_3.4.2-2_armhf.deb ...
Unpacking python3-minimal (3.4.2-2) ...
Selecting previously unselected package libpython3-stdlib:armhf.
Preparing to unpack .../libpython3-stdlib_3.4.2-2_armhf.deb ...
Unpacking libpython3-stdlib:armhf (3.4.2-2) ...
Selecting previously unselected package python3.
Preparing to unpack .../python3_3.4.2-2_armhf.deb ...
Unpacking python3 (3.4.2-2) ...
Selecting previously unselected package dh-python.
Preparing to unpack .../dh-python_1.20141111-2_all.deb ...
Unpacking dh-python (1.20141111-2) ...
Selecting previously unselected package libgirepository-1.0-1:armhf.
Preparing to unpack .../libgirepository-1.0-1_1.42.0-2.2_armhf.deb ...
Unpacking libgirepository-1.0-1:armhf (1.42.0-2.2) ...
Selecting previously unselected package gir1.2-glib-2.0:armhf.
Preparing to unpack .../gir1.2-glib-2.0_1.42.0-2.2_armhf.deb ...
Unpacking gir1.2-glib-2.0:armhf (1.42.0-2.2) ...
Selecting previously unselected package iso-codes.
Preparing to unpack .../iso-codes_3.57-1_all.deb ...
Unpacking iso-codes (3.57-1) ...
Selecting previously unselected package python-apt-common.
Preparing to unpack .../python-apt-common_0.9.3.12_all.deb ...
Unpacking python-apt-common (0.9.3.12) ...
Selecting previously unselected package python3-apt.
Preparing to unpack .../python3-apt_0.9.3.12_armhf.deb ...
Unpacking python3-apt (0.9.3.12) ...
Selecting previously unselected package python3-dbus.
Preparing to unpack .../python3-dbus_1.2.0-2+b3_armhf.deb ...
Unpacking python3-dbus (1.2.0-2+b3) ...
Selecting previously unselected package python3-gi.
Preparing to unpack .../python3-gi_3.14.0-1_armhf.deb ...
Unpacking python3-gi (3.14.0-1) ...
Selecting previously unselected package unattended-upgrades.
Preparing to unpack .../unattended-upgrades_0.83.3.2+deb8u1_all.deb ...
Unpacking unattended-upgrades (0.83.3.2+deb8u1) ...
Selecting previously unselected package python3-software-properties.
Preparing to unpack .../python3-software-properties_0.92.25debian1_all.deb ...
Unpacking python3-software-properties (0.92.25debian1) ...
Selecting previously unselected package software-properties-common.
Preparing to unpack .../software-properties-common_0.92.25debian1_all.deb ...
Unpacking software-properties-common (0.92.25debian1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for systemd (215-17+deb8u7) ...
Processing triggers for dbus (1.8.22-0+deb8u1) ...
Setting up libglib2.0-0:armhf (2.42.1-1+b1) ...
No schema files found: doing nothing.
Setting up libdbus-glib-1-2:armhf (0.102-1) ...
Setting up libmpdec2:armhf (2.4.1-1) ...
Setting up libpython3.4-minimal:armhf (3.4.2-1) ...
Setting up libpython3.4-stdlib:armhf (3.4.2-1) ...
Setting up python3.4-minimal (3.4.2-1) ...
Setting up bzip2 (1.0.6-7+b3) ...
Setting up patch (2.7.5-1+deb8u1) ...
Setting up libstdc++-4.9-dev:armhf (4.9.2-10+deb8u1) ...
Setting up g++-4.9 (4.9.2-10+deb8u1) ...
Setting up g++ (4:4.9.2-2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mo                                                    de
Setting up libtimedate-perl (2.3000-2) ...
Setting up libdpkg-perl (1.17.27) ...
Setting up dpkg-dev (1.17.27) ...
Setting up build-essential (11.7) ...
Setting up python3.4 (3.4.2-1) ...
Setting up python3-minimal (3.4.2-2) ...
Setting up libpython3-stdlib:armhf (3.4.2-2) ...
Setting up libgirepository-1.0-1:armhf (1.42.0-2.2) ...
Setting up gir1.2-glib-2.0:armhf (1.42.0-2.2) ...
Setting up iso-codes (3.57-1) ...
Setting up python-apt-common (0.9.3.12) ...
Setting up python3 (3.4.2-2) ...
running python rtupdate hooks for python3.4...
running python post-rtupdate hooks for python3.4...
Setting up dh-python (1.20141111-2) ...
Setting up python3-apt (0.9.3.12) ...
Setting up python3-dbus (1.2.0-2+b3) ...
Setting up python3-gi (3.14.0-1) ...
Setting up unattended-upgrades (0.83.3.2+deb8u1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling ba                                                    ck to defaults
Setting up python3-software-properties (0.92.25debian1) ...
Setting up software-properties-common (0.92.25debian1) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for systemd (215-17+deb8u7) ...
Processing triggers for dbus (1.8.22-0+deb8u1) ...
gpg: keyring `/tmp/tmpzdhrrm86/secring.gpg' created
gpg: keyring `/tmp/tmpzdhrrm86/pubring.gpg' created
gpg: requesting key 6A755776 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpzdhrrm86/trustdb.gpg: trustdb created
gpg: key 6A755776: public key "Launchpad PPA for deadsnakes" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.7
E: Couldn't find any package by regex 'python3.7'
E: Unable to locate package python3.7-dev
E: Couldn't find any package by regex 'python3.7-dev'
E: Unable to locate package python3.7-distutils
E: Couldn't find any package by regex 'python3.7-distutils'

root@bunny:~# apt-get install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version.
python3 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@bunny:~# python3 --version
Python 3.4.2

 

Link to comment
Share on other sites

On 10/15/2021 at 2:21 AM, jack.slack said:

@kuyayaThe proposed below does not work

apt-get update
apt-get install python3.6

no matter what I do, the only version I get offered is 3.4 tops!

root@bunny:~# apt update && apt upgrade -y && apt clean
Ign http://httpredir.debian.org jessie InRelease
Hit http://httpredir.debian.org jessie Release.gpg
Hit http://httpredir.debian.org jessie Release
Hit http://archive.debian.org jessie-backports InRelease
Ign http://ftp.de.debian.org stretch InRelease
Hit http://ftp.de.debian.org stretch Release.gpg
Hit http://ftp.de.debian.org stretch Release
Hit http://httpredir.debian.org jessie/main Sources
Ign http://archive.debian.org jessie-backports/main Sources/DiffIndex
Hit http://httpredir.debian.org jessie/contrib Sources
Ign http://archive.debian.org jessie-backports/main armhf Packages/DiffIndex
Hit http://ftp.de.debian.org stretch/main Sources
Ign http://archive.debian.org jessie-backports/main Translation-en/DiffIndex
Hit http://httpredir.debian.org jessie/non-free Sources
Hit http://ftp.de.debian.org stretch/main armhf Packages
Hit http://ftp.de.debian.org stretch/main Translation-en
Hit http://httpredir.debian.org jessie/main armhf Packages
Hit http://httpredir.debian.org jessie/contrib armhf Packages
Hit http://httpredir.debian.org jessie/non-free armhf Packages
Hit http://archive.debian.org jessie-backports/main Translation-en
Hit http://archive.debian.org jessie-backports/main Sources
Hit http://httpredir.debian.org jessie/contrib Translation-en
Hit http://archive.debian.org jessie-backports/main armhf Packages
Hit http://httpredir.debian.org jessie/main Translation-en
Hit http://httpredir.debian.org jessie/non-free Translation-en
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: There is no public key available for the following key IDs:
648ACFD622F3D138
 NO_PUBKEY 0E98404D386FA1D9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
E: Invalid operation clean

root@bunny:~# apt-get install python3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.6
E: Couldn't find any package by regex 'python3.6'


root@bunny:~# apt update && \
>     apt install --no-install-recommends -y build-essential software-properties -common && \
>     add-apt-repository -y ppa:deadsnakes/ppa && \
>     apt install --no-install-recommends -y python3.7 python3.7-dev python3.7 -distutils && \
>     apt clean && rm -rf /var/lib/apt/lists/*
Ign http://httpredir.debian.org jessie InRelease
Hit http://httpredir.debian.org jessie Release.gpg
Ign http://ftp.de.debian.org stretch InRelease
Hit http://archive.debian.org jessie-backports InRelease
Hit http://httpredir.debian.org jessie Release
Hit http://ftp.de.debian.org stretch Release.gpg
Hit http://ftp.de.debian.org stretch Release
Ign http://archive.debian.org jessie-backports/main Sources/DiffIndex
Ign http://archive.debian.org jessie-backports/main armhf Packages/DiffIndex
Hit http://httpredir.debian.org jessie/main Sources
Ign http://archive.debian.org jessie-backports/main Translation-en/DiffIndex
Hit http://ftp.de.debian.org stretch/main Sources
Hit http://ftp.de.debian.org stretch/main armhf Packages
Hit http://httpredir.debian.org jessie/contrib Sources
Hit http://ftp.de.debian.org stretch/main Translation-en
Hit http://archive.debian.org jessie-backports/main Translation-en
Hit http://httpredir.debian.org jessie/non-free Sources
Hit http://archive.debian.org jessie-backports/main Sources
Hit http://httpredir.debian.org jessie/main armhf Packages
Hit http://archive.debian.org jessie-backports/main armhf Packages
Hit http://httpredir.debian.org jessie/contrib armhf Packages
Hit http://httpredir.debian.org jessie/non-free armhf Packages
Hit http://httpredir.debian.org jessie/contrib Translation-en
Hit http://httpredir.debian.org jessie/main Translation-en
Hit http://httpredir.debian.org jessie/non-free Translation-en
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: There is no public key available for the following key IDs:
648ACFD622F3D138
 NO_PUBKEY 0E98404D386FA1D9
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  bzip2 dh-python dpkg-dev g++ g++-4.9 gir1.2-glib-2.0 iso-codes
  libdbus-glib-1-2 libdpkg-perl libgirepository-1.0-1 libglib2.0-0 libmpdec2
  libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib libstdc++-4.9-dev
  libtimedate-perl patch python-apt-common python3 python3-apt python3-dbus
  python3-gi python3-minimal python3-software-properties python3.4
  python3.4-minimal unattended-upgrades
Suggested packages:
  bzip2-doc debian-keyring gcc-4.9-doc libstdc++6-4.9-dbg isoquery
  libstdc++-4.9-doc ed diffutils-doc python3-doc python3-tk python3-venv
  python3-apt-dbg python-apt-doc python-dbus-doc python3-dbus-dbg
  python3.4-venv python3.4-doc binfmt-support bsd-mailx mail-transport-agent
Recommended packages:
  fakeroot libalgorithm-merge-perl libfile-fcntllock-perl libglib2.0-data
  shared-mime-info xdg-user-dirs
The following NEW packages will be installed:
  build-essential bzip2 dh-python dpkg-dev g++ g++-4.9 gir1.2-glib-2.0
  iso-codes libdbus-glib-1-2 libdpkg-perl libgirepository-1.0-1 libglib2.0-0
  libmpdec2 libpython3-stdlib libpython3.4-minimal libpython3.4-stdlib
  libstdc++-4.9-dev libtimedate-perl patch python-apt-common python3
  python3-apt python3-dbus python3-gi python3-minimal
  python3-software-properties python3.4 python3.4-minimal
  software-properties-common unattended-upgrades
0 upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.3 MB/26.1 MB of archives.
After this operation, 75.4 MB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian/ jessie/main libglib2.0-0 armhf 2.42.1-                                                    1+b1 [2270 kB]
Get:2 http://httpredir.debian.org/debian/ jessie/main libdbus-glib-1-2 armhf 0.1                                                    02-1 [190 kB]
Get:3 http://httpredir.debian.org/debian/ jessie/main libmpdec2 armhf 2.4.1-1 [7                                                    0.7 kB]
Get:4 http://httpredir.debian.org/debian/ jessie/main libpython3.4-minimal armhf                                                     3.4.2-1 [485 kB]
Get:5 http://httpredir.debian.org/debian/ jessie/main libpython3.4-stdlib armhf                                                     3.4.2-1 [2011 kB]
Get:6 http://httpredir.debian.org/debian/ jessie/main python3.4-minimal armhf 3.                                                    4.2-1 [1364 kB]
Get:7 http://httpredir.debian.org/debian/ jessie/main python3.4 armhf 3.4.2-1 [2                                                    04 kB]
Get:8 http://httpredir.debian.org/debian/ jessie/main python3-minimal armhf 3.4.                                                    2-2 [34.6 kB]
Get:9 http://httpredir.debian.org/debian/ jessie/main libpython3-stdlib armhf 3.                                                    4.2-2 [18.1 kB]
Get:10 http://httpredir.debian.org/debian/ jessie/main python3 armhf 3.4.2-2 [21                                                    .2 kB]
Get:11 http://httpredir.debian.org/debian/ jessie/main dh-python all 1.20141111-                                                    2 [66.4 kB]
Get:12 http://httpredir.debian.org/debian/ jessie/main libgirepository-1.0-1 arm                                                    hf 1.42.0-2.2 [84.3 kB]
Get:13 http://httpredir.debian.org/debian/ jessie/main gir1.2-glib-2.0 armhf 1.4                                                    2.0-2.2 [141 kB]
Get:14 http://httpredir.debian.org/debian/ jessie/main iso-codes all 3.57-1 [226                                                    5 kB]
Get:15 http://httpredir.debian.org/debian/ jessie/main python-apt-common all 0.9                                                    .3.12 [89.9 kB]
Get:16 http://httpredir.debian.org/debian/ jessie/main python3-apt armhf 0.9.3.1                                                    2 [156 kB]
Get:17 http://httpredir.debian.org/debian/ jessie/main python3-dbus armhf 1.2.0-                                                    2+b3 [182 kB]
Get:18 http://httpredir.debian.org/debian/ jessie/main python3-gi armhf 3.14.0-1                                                     [440 kB]
Get:19 http://httpredir.debian.org/debian/ jessie/main unattended-upgrades all 0                                                    .83.3.2+deb8u1 [52.9 kB]
Get:20 http://httpredir.debian.org/debian/ jessie/main python3-software-properti                                                    es all 0.92.25debian1 [41.4 kB]
Get:21 http://httpredir.debian.org/debian/ jessie/main software-properties-commo                                                    n all 0.92.25debian1 [79.3 kB]
Fetched 10.3 MB in 20s (510 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libglib2.0-0:armhf.
(Reading database ... 55218 files and directories currently installed.)
Preparing to unpack .../libglib2.0-0_2.42.1-1+b1_armhf.deb ...
Unpacking libglib2.0-0:armhf (2.42.1-1+b1) ...
Selecting previously unselected package libdbus-glib-1-2:armhf.
Preparing to unpack .../libdbus-glib-1-2_0.102-1_armhf.deb ...
Unpacking libdbus-glib-1-2:armhf (0.102-1) ...
Selecting previously unselected package libmpdec2:armhf.
Preparing to unpack .../libmpdec2_2.4.1-1_armhf.deb ...
Unpacking libmpdec2:armhf (2.4.1-1) ...
Selecting previously unselected package libpython3.4-minimal:armhf.
Preparing to unpack .../libpython3.4-minimal_3.4.2-1_armhf.deb ...
Unpacking libpython3.4-minimal:armhf (3.4.2-1) ...
Selecting previously unselected package libpython3.4-stdlib:armhf.
Preparing to unpack .../libpython3.4-stdlib_3.4.2-1_armhf.deb ...
Unpacking libpython3.4-stdlib:armhf (3.4.2-1) ...
Selecting previously unselected package python3.4-minimal.
Preparing to unpack .../python3.4-minimal_3.4.2-1_armhf.deb ...
Unpacking python3.4-minimal (3.4.2-1) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../bzip2_1.0.6-7+b3_armhf.deb ...
Unpacking bzip2 (1.0.6-7+b3) ...
Selecting previously unselected package patch.
Preparing to unpack .../patch_2.7.5-1+deb8u1_armhf.deb ...
Unpacking patch (2.7.5-1+deb8u1) ...
Selecting previously unselected package libstdc++-4.9-dev:armhf.
Preparing to unpack .../libstdc++-4.9-dev_4.9.2-10+deb8u1_armhf.deb ...
Unpacking libstdc++-4.9-dev:armhf (4.9.2-10+deb8u1) ...
Selecting previously unselected package g++-4.9.
Preparing to unpack .../g++-4.9_4.9.2-10+deb8u1_armhf.deb ...
Unpacking g++-4.9 (4.9.2-10+deb8u1) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a4.9.2-2_armhf.deb ...
Unpacking g++ (4:4.9.2-2) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.17.27_all.deb ...
Unpacking libdpkg-perl (1.17.27) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.17.27_all.deb ...
Unpacking dpkg-dev (1.17.27) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_11.7_armhf.deb ...
Unpacking build-essential (11.7) ...
Selecting previously unselected package python3.4.
Preparing to unpack .../python3.4_3.4.2-1_armhf.deb ...
Unpacking python3.4 (3.4.2-1) ...
Selecting previously unselected package python3-minimal.
Preparing to unpack .../python3-minimal_3.4.2-2_armhf.deb ...
Unpacking python3-minimal (3.4.2-2) ...
Selecting previously unselected package libpython3-stdlib:armhf.
Preparing to unpack .../libpython3-stdlib_3.4.2-2_armhf.deb ...
Unpacking libpython3-stdlib:armhf (3.4.2-2) ...
Selecting previously unselected package python3.
Preparing to unpack .../python3_3.4.2-2_armhf.deb ...
Unpacking python3 (3.4.2-2) ...
Selecting previously unselected package dh-python.
Preparing to unpack .../dh-python_1.20141111-2_all.deb ...
Unpacking dh-python (1.20141111-2) ...
Selecting previously unselected package libgirepository-1.0-1:armhf.
Preparing to unpack .../libgirepository-1.0-1_1.42.0-2.2_armhf.deb ...
Unpacking libgirepository-1.0-1:armhf (1.42.0-2.2) ...
Selecting previously unselected package gir1.2-glib-2.0:armhf.
Preparing to unpack .../gir1.2-glib-2.0_1.42.0-2.2_armhf.deb ...
Unpacking gir1.2-glib-2.0:armhf (1.42.0-2.2) ...
Selecting previously unselected package iso-codes.
Preparing to unpack .../iso-codes_3.57-1_all.deb ...
Unpacking iso-codes (3.57-1) ...
Selecting previously unselected package python-apt-common.
Preparing to unpack .../python-apt-common_0.9.3.12_all.deb ...
Unpacking python-apt-common (0.9.3.12) ...
Selecting previously unselected package python3-apt.
Preparing to unpack .../python3-apt_0.9.3.12_armhf.deb ...
Unpacking python3-apt (0.9.3.12) ...
Selecting previously unselected package python3-dbus.
Preparing to unpack .../python3-dbus_1.2.0-2+b3_armhf.deb ...
Unpacking python3-dbus (1.2.0-2+b3) ...
Selecting previously unselected package python3-gi.
Preparing to unpack .../python3-gi_3.14.0-1_armhf.deb ...
Unpacking python3-gi (3.14.0-1) ...
Selecting previously unselected package unattended-upgrades.
Preparing to unpack .../unattended-upgrades_0.83.3.2+deb8u1_all.deb ...
Unpacking unattended-upgrades (0.83.3.2+deb8u1) ...
Selecting previously unselected package python3-software-properties.
Preparing to unpack .../python3-software-properties_0.92.25debian1_all.deb ...
Unpacking python3-software-properties (0.92.25debian1) ...
Selecting previously unselected package software-properties-common.
Preparing to unpack .../software-properties-common_0.92.25debian1_all.deb ...
Unpacking software-properties-common (0.92.25debian1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for systemd (215-17+deb8u7) ...
Processing triggers for dbus (1.8.22-0+deb8u1) ...
Setting up libglib2.0-0:armhf (2.42.1-1+b1) ...
No schema files found: doing nothing.
Setting up libdbus-glib-1-2:armhf (0.102-1) ...
Setting up libmpdec2:armhf (2.4.1-1) ...
Setting up libpython3.4-minimal:armhf (3.4.2-1) ...
Setting up libpython3.4-stdlib:armhf (3.4.2-1) ...
Setting up python3.4-minimal (3.4.2-1) ...
Setting up bzip2 (1.0.6-7+b3) ...
Setting up patch (2.7.5-1+deb8u1) ...
Setting up libstdc++-4.9-dev:armhf (4.9.2-10+deb8u1) ...
Setting up g++-4.9 (4.9.2-10+deb8u1) ...
Setting up g++ (4:4.9.2-2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mo                                                    de
Setting up libtimedate-perl (2.3000-2) ...
Setting up libdpkg-perl (1.17.27) ...
Setting up dpkg-dev (1.17.27) ...
Setting up build-essential (11.7) ...
Setting up python3.4 (3.4.2-1) ...
Setting up python3-minimal (3.4.2-2) ...
Setting up libpython3-stdlib:armhf (3.4.2-2) ...
Setting up libgirepository-1.0-1:armhf (1.42.0-2.2) ...
Setting up gir1.2-glib-2.0:armhf (1.42.0-2.2) ...
Setting up iso-codes (3.57-1) ...
Setting up python-apt-common (0.9.3.12) ...
Setting up python3 (3.4.2-2) ...
running python rtupdate hooks for python3.4...
running python post-rtupdate hooks for python3.4...
Setting up dh-python (1.20141111-2) ...
Setting up python3-apt (0.9.3.12) ...
Setting up python3-dbus (1.2.0-2+b3) ...
Setting up python3-gi (3.14.0-1) ...
Setting up unattended-upgrades (0.83.3.2+deb8u1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling ba                                                    ck to defaults
Setting up python3-software-properties (0.92.25debian1) ...
Setting up software-properties-common (0.92.25debian1) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for systemd (215-17+deb8u7) ...
Processing triggers for dbus (1.8.22-0+deb8u1) ...
gpg: keyring `/tmp/tmpzdhrrm86/secring.gpg' created
gpg: keyring `/tmp/tmpzdhrrm86/pubring.gpg' created
gpg: requesting key 6A755776 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpzdhrrm86/trustdb.gpg: trustdb created
gpg: key 6A755776: public key "Launchpad PPA for deadsnakes" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3.7
E: Couldn't find any package by regex 'python3.7'
E: Unable to locate package python3.7-dev
E: Couldn't find any package by regex 'python3.7-dev'
E: Unable to locate package python3.7-distutils
E: Couldn't find any package by regex 'python3.7-distutils'

root@bunny:~# apt-get install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version.
python3 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@bunny:~# python3 --version
Python 3.4.2

 

I was wrong, python3.6 isn't in the debian repository yet (it's been like that since like 5 years). You'd probably have to build it from source.

Link to comment
Share on other sites

  • 4 weeks later...

@kuyaya I have attempted to build Python from source as you suggested. I followed the instructions in this blog post to install python 3.7 - https://thilinamad.medium.com/building-python3-from-source-with-custom-openssl-installation-9821b4cc4741 

It seemed to install fine and I was able to test the python install as outlined in the blog post above even though I got this error during the make test stage

Failed to build these modules:
_ctypes

== Tests result: FAILURE then FAILURE ==

388 tests OK.

3 tests failed:
    test_asyncio test_subprocess test_urllib2net

25 tests skipped:
    test_bz2 test_ctypes test_curses test_dbm_gnu test_dbm_ndbm
    test_devpoll test_gdb test_idle test_ioctl test_kqueue test_lzma
    test_msilib test_ossaudiodev test_readline test_startfile test_tcl
    test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle
    test_winconsoleio test_winreg test_winsound test_zipfile64

3 re-run tests:
    test_asyncio test_subprocess test_urllib2net

Total duration: 2 hour 6 min
Tests result: FAILURE then FAILURE
Makefile:1086: recipe for target 'test' failed
make: *** [test] Error 2

I attempted to install the Cryptography package and others however got many errors. Tried cleaning up python and openssl install etc and re-installed however nothing worked.

I decided it would be best to reset the bash bunny as per instructions in this blog post

I followed the instructions. However, all the files including the python3 install are still there! I need a factory default state for the OS and the process above did not do it! Can I force recovery from the command line (serial mode) instead? Thanks

Link to comment
Share on other sites

I'm not going to tell you how to clean up your Bunny, but I can tell you how to get Python 3 and Impacket on the Bunny and get it working.

What I need to post is way too much information to fit in a thread on the forum, so I had to take it elsewhere. I've written a guide takes you through the steps of getting the latest Impacket running on the Bunny along with a rewritten variant of the SMB payload that is available on the Hak5 Git. See the Wiki page of the linked repo below and also the payload files.

I've verified the payload on several Win boxes. Some (1) failed (or semi failed) but others worked without any issues, among them a fully updated (to today's date) Windows 10 Home 21H1 (also W10 Enterprise based machines).

https://codeberg.org/dark_pyrro/BB2-Impacket/wiki/Setting-the-Bunny-up-for-Impacket

https://codeberg.org/dark_pyrro/BB2-Impacket/

 

Link to comment
Share on other sites

I might as well add that this (at least the Python 3 portion of what's mentioned in the post above) might help getting the latest version of Responder to work along with the QuickCreds payload. Someone posted on Discord that he/she/it had problems getting 3.0.7.0 of Responder to work on the Bunny (3.0.6.0 working fine though) and I was somewhat a part of that Discord discussion. Just download the Responder 3.0.7.0 tar.gz to the Bunny, extract it to /tools and rename the directory so that it is called responder (/tools/responder) and also install netifaces (pip3 install netifaces). Also change the QuickCreds payload so that the line that starts Responder explicitly uses python3 instead of python.

Link to comment
Share on other sites

  • 1 month later...

Hi! I followed the instructions so far provided by Dark_pyrro with no issues but I'm stuck in nano /etc/profile part, I added the paths but I'm getting end of line error:

-bash: /etc/profile: line 39: syntax error: unexpected end of file                (line 39 is the last empty line on the file)

and when doing echo as below I get nothing in return

echo $PATH

echo $RUSTUP_HOME

echo $CARGO_HOME

echo $CFLAGS

echo $LDFLAGS

 

I'm missing something and don't know exactly where, any help will be greatly appreciated.

My profile file is the following:

 

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH

if [ "$PS1" ]; then
  if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i fi export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/go/bin
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/bunny/bin:/tools:/root/.cargo/bin:/root/python3/openssl_compiled/bin
export RUSTUP_HOME=/root/.rustup
export CARGO_HOME=/root/.cargo
export CFLAGS="-I/root/python3/openssl_compiled/include"
export LDFLAGS="-L/root/python3/openssl_compiled/lib"

 

 

Link to comment
Share on other sites

Well, I'm an idiot, the fix was quite easy, was just the indentation and fix some lines, that solved the issue:

 

    fi
  done
  unset i 
    fi 
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/go/bin
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/bunny/bin:/tools:/root/.cargo/bin:/root/python3/openssl_compiled/bin
export RUSTUP_HOME=/root/.rustup
export CARGO_HOME=/root/.cargo
export CFLAGS="-I/root/python3/openssl_compiled/include"
export LDFLAGS="-L/root/python3/openssl_compiled/lib"

 

By the way I have python3 up and running thanks to the guide of Dark_pyrro, just in the final steps of his guide now

 

root@bunny:~# python3 --version
Python 3.7.9
root@bunny:~#

 

Link to comment
Share on other sites

  • 7 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...