cisagov / untitledgoosetool

Untitled Goose Tool is a robust and flexible hunt and incident response tool that adds novel authentication and data gathering methods in order to run a full investigation against a customer’s Azure Active Directory (AzureAD), Azure, and M365 environments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ubuntu 20.04 LTS

AloneAndUnknown opened this issue · comments

Conducting a python3 pip install

~/untitledgoosetool$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

(.venv) REDACTED@REDACTED:~/untitledgoosetool$ python3 -m pip install .

Building wheels for collected packages: goosey, wxpython
Building wheel for goosey (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/REDACTED/untitledgoosetool/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1vkwpido/setup.py'"'"'; file='"'"'/tmp/pip-req-build-1vkwpido/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-a4cxcpr2
cwd: /tmp/pip-req-build-1vkwpido/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'bdist_wheel'

ERROR: Failed building wheel for goosey
Running setup.py clean for goosey
Building wheel for wxpython (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/REDACTED/untitledgoosetool/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pf3rf2i2/wxpython/setup.py'"'"'; file='"'"'/tmp/pip-install-pf3rf2i2/wxpython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-tbiwnqpu
cwd: /tmp/pip-install-pf3rf2i2/wxpython/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'bdist_wheel'

ERROR: Failed building wheel for wxpython
Running setup.py clean for wxpython
Failed to build goosey wxpython
Installing collected packages: Pillow, six, numpy, wxpython, psutil, colored, pygtrie, Gooey, urllib3, idna, charset-normalizer, certifi, requests, pycparser, cffi, cryptography, python-dateutil, PyJWT, adal, attrs, frozenlist, multidict, yarl, aiosignal, async-timeout, aiohttp, portalocker, msal, msal-extensions, typing-extensions, azure-core, azure-identity, azure-common, azure-mgmt-core, isodate, azure-mgmt-compute, azure-mgmt-monitor, azure-mgmt-network, azure-mgmt-resource, azure-mgmt-security, oauthlib, requests-oauthlib, msrest, azure-mgmt-storage, azure-mgmt-web, azure-storage-blob, darkdetect, msrestazure, et-xmlfile, openpyxl, pyAesCrypt, pytz, blinker, pyparsing, kaitaistruct, pyasn1, hyperframe, hpack, h2, outcome, sortedcontainers, sniffio, exceptiongroup, trio, h11, wsproto, trio-websocket, selenium, pysocks, brotli, zstandard, pyOpenSSL, selenium-wire, soupsieve, BeautifulSoup4, lxml, appdirs, tqdm, webdrivermanager, goosey
Running setup.py install for wxpython ... error
ERROR: Command errored out with exit status 1:
command: /home/REDACTED/untitledgoosetool/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pf3rf2i2/wxpython/setup.py'"'"'; file='"'"'/tmp/pip-install-pf3rf2i2/wxpython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hjg03jev/install-record.txt --single-version-externally-managed --compile --install-headers /home/REDACTED/untitledgoosetool/.venv/include/site/python3.8/wxpython
cwd: /tmp/pip-install-pf3rf2i2/wxpython/
Complete output (138 lines):
running install
running build
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.

"/home/REDACTED/untitledgoosetool/.venv/bin/python3" -u build.py build
Will build using: "/home/REDACTED/untitledgoosetool/.venv/bin/python3"
3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0]
Python's architecture is 64bit
cfg.VERSION: 4.2.1

Running command: build
Running command: build_wx
wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
Configure options: ['--enable-unicode', '--with-gtk=3', '--enable-sound', '--enable-graphics_ctx', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
/tmp/pip-install-pf3rf2i2/wxpython/ext/wxWidgets/configure --enable-unicode --with-gtk=3 --enable-sound --enable-graphics_ctx --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for toolkit... gtk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the Intel C compiler... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
checking for ar... ar
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for langinfo.h... yes
checking for wchar.h... yes
checking for sys/select.h... yes
checking for cxxabi.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking size of short... 2
checking size of void *... 8
checking size of int... 4
checking size of long... 8
checking size of size_t... 8
checking size of long long... 8
checking size of wchar_t... 4
checking for va_copy... yes
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking if large file support is available... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether byte ordering is bigendian... no
checking for std::wstring in <string>... yes
checking for std::istream... yes
checking for std::ostream... yes
checking for type_traits... yes
checking for __sync_xxx_and_fetch builtins... yes
checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
checking for cos... no
checking for floor... no
checking if floating point functions link without -lm... no
checking for sin... yes
checking for ceil... yes
checking if floating point functions link with -lm... yes
checking for strtoull... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBPCRE... yes
checking for zlib.h >= 1.1.4... yes
checking for zlib.h... (cached) yes
checking for deflate in -lz... yes
checking for png.h > 0.90... no
checking for png.h... (cached) no
configure: WARNING: system png library not found or too old, will use built-in instead
checking whether png.c file exists... yes
checking for jpeglib.h... no
configure: WARNING: system jpeg library not found, will use built-in instead
checking whether jpeglib.h file exists... yes
checking for jbg_dec_init in -ljbig... no
checking for LIBTIFF... not found via pkg-config
checking for tiffio.h... no
configure: WARNING: system tiff library not found, will use built-in instead
checking whether tiff.h file exists... yes
checking for expat.h... yes
checking if expat.h is valid C++ header... yes
checking for XML_ParserCreate in -lexpat... yes
checking for LIBCURL... yes
checking for GTK+ version...
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GTK+ - version >= 3.0.0... Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.

Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
  File "build.py", line 1563, in cmd_build_wx
    wxbuild.main(wxDir(), build_options)
  File "/tmp/pip-install-pf3rf2i2/wxpython/buildtools/build_wxwidgets.py", line 379, in main
    exitIfError(wxBuilder.configure(dir=wxRootDir, options=configure_opts),
  File "/tmp/pip-install-pf3rf2i2/wxpython/buildtools/build_wxwidgets.py", line 72, in exitIfError
    raise builder.BuildError(msg)
buildtools.builder.BuildError: Error running configure
Finished command: build_wx (0m2.119s)
Finished command: build (0m2.119s)
Command '"/home/REDACTED/untitledgoosetool/.venv/bin/python3" -u build.py build' failed with exit code 1.
----------------------------------------

ERROR: Command errored out with exit status 1: /home/REDACTED/untitledgoosetool/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pf3rf2i2/wxpython/setup.py'"'"'; file='"'"'/tmp/pip-install-pf3rf2i2/wxpython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hjg03jev/install-record.txt --single-version-externally-managed --compile --install-headers /home/REDACTED/untitledgoosetool/.venv/include/site/python3.8/wxpython Check the logs for full command output.

@AloneAndUnknown Can you try installing the tool on Ubuntu 22.04 LTS?

Sure,

REDACTED~/untitledgoosetool$ python3 -m pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /home/ckbrown/untitledgoosetool
Preparing metadata (setup.py) ... done
Collecting Gooey==1.0.8.1
Using cached Gooey-1.0.8.1-py2.py3-none-any.whl (680 kB)
Collecting aiohttp==3.8.5
Using cached aiohttp-3.8.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
Collecting async-timeout==4.0.2
Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting azure-identity
Using cached azure_identity-1.13.0-py3-none-any.whl (151 kB)
Collecting azure-mgmt-compute
Using cached azure_mgmt_compute-30.1.0-py3-none-any.whl (4.9 MB)
Collecting azure-mgmt-monitor
Using cached azure_mgmt_monitor-6.0.1-py3-none-any.whl (1.3 MB)
Collecting azure-mgmt-network
Using cached azure_mgmt_network-24.0.0-py3-none-any.whl (655 kB)
Collecting azure-mgmt-resource
Using cached azure_mgmt_resource-23.0.1-py3-none-any.whl (2.5 MB)
Collecting azure-mgmt-security
Using cached azure_mgmt_security-5.0.0-py3-none-any.whl (1.1 MB)
Collecting azure-mgmt-storage
Using cached azure_mgmt_storage-21.0.0-py3-none-any.whl (2.8 MB)
Collecting azure-mgmt-web
Using cached azure_mgmt_web-7.1.0-py3-none-any.whl (4.7 MB)
Collecting azure-storage-blob
Using cached azure_storage_blob-12.17.0-py3-none-any.whl (388 kB)
Collecting colored==1.4.4
Using cached colored-1.4.4.tar.gz (36 kB)
Preparing metadata (setup.py) ... done
Collecting cryptography==41.0.2
Using cached cryptography-41.0.2-cp37-abi3-manylinux_2_28_x86_64.whl (4.3 MB)
Collecting darkdetect
Using cached darkdetect-0.8.0-py3-none-any.whl (9.0 kB)
Collecting msal==1.23.0
Using cached msal-1.23.0-py2.py3-none-any.whl (90 kB)
Collecting msrestazure
Using cached msrestazure-0.6.4-py2.py3-none-any.whl (40 kB)
Collecting openpyxl
Using cached openpyxl-3.1.2-py2.py3-none-any.whl (249 kB)
Collecting pyAesCrypt
Using cached pyAesCrypt-6.1.0-py3-none-any.whl (15 kB)
Requirement already satisfied: pytz in /usr/lib/python3/dist-packages (from goosey==1.2.4) (2022.1)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from goosey==1.2.4) (2.25.1)
Collecting selenium-wire
Using cached selenium_wire-5.1.0-py3-none-any.whl (239 kB)
Collecting selenium==4.10.0
Using cached selenium-4.10.0-py3-none-any.whl (6.7 MB)
Collecting typing-extensions>=4.1.1
Using cached typing_extensions-4.7.1-py3-none-any.whl (33 kB)
Collecting webdrivermanager
Using cached webdrivermanager-0.10.0.tar.gz (33 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
ERROR: Package 'goosey' requires a different Python: 3.10.12 not in '<=3.10.11,>=3.7'
REDACTED:~/untitledgoosetool$ python3 --version
Python 3.10.12

effin python.

@AloneAndUnknown You'll need to downgrade your python3 version to 3.10.11 or lower.

Ill be honest, i dont feel like trying to go through the python3 downgrade aptitude package manager hell. You can close this issue out. Maybe next iteration move to containerization to alleviate these types of issues.