buffer / thug

Python low-interaction honeyclient
GNU General Public License v2.0
990 stars 202 forks source link

Can this be installed on Flare-VM machines? Either with docker or in Cygwin? #284

Closed opticoax747 closed 3 years ago

opticoax747 commented 4 years ago

Tried to install this on Flare-VM virtual machine, but it errors out looking for the Thug API folder.

How can I get this to work on Flare-VM

buffer commented 4 years ago

Never played with Flare VM sorry. I am currently finalizing the Thug porting to Python 3 so I am really out of time at the moment. But I will keep the ticket open as a reminder to take a look at it as soon as I will have enough time to do that. Meanwhile can you start sharing some details about the issue you're experiencing? Thanks!

opticoax747 commented 4 years ago

Thank you, I will try to capture some of the errors today...Flare-VM has a Cygwin environment so...

opticoax747 commented 4 years ago

when i try to install it, it errors out on the requirements.txt

I tried both with pip and pip2

ERROR: Command errored out with exit status 1: command: 'c:\python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\setup.py'"'"'; file='"'"'c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\pip-egg-info' cwd: c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\ Complete output (9 lines): running egg_info creating c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\pip-egg-info\pylibemu.egg-info writing c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\pip-egg-info\pylibemu.egg-info\PKG-INFO writing top-level names to c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\pip-egg-info\pylibemu.egg-info\top_level.txt writing dependency_links to c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\pip-egg-info\pylibemu.egg-info\dependency_links.txt writing manifest file 'c:\users\ieuser\appdata\local\temp\pip-install-cyiy9i\pylibemu\pip-egg-info\pylibemu.egg-info\SOURCES.txt' pkg-config is not installed, falling back to pykg-config running 'autoreconf -v -i -f' for library 'emu' error: [Error 2] The system cannot find the file specified

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

buffer commented 4 years ago

It seems like there are some troubles while installing libemu. I suppose autoreconf is not installed. Can you install it and try again?

opticoax747 commented 4 years ago

I dont know how to do that - I tried pip2 install -U pykg-config and that worked, but still the same error

buffer commented 4 years ago

I am not a Cygwin user but I think you can do that by running Cygwin installer and installing the package. Be sure autoconf, automake and autoreconf are installed before moving on.

PS Maybe the only package you need to install is libtool but again I am not sure about it

opticoax747 commented 4 years ago

I will try this this week and let you know the results.

opticoax747 commented 4 years ago

So Autoreconf is on the computer......

c:\Tools\cygwin\bin λ ls au* autoconf autoheader autom4te autoreconf-2.13 autoscan-2.13 autoupdate-2.13 autom4te-2.69 autoreconf-2.69 autoscan-2.69 autoupdate-2.69auto autoreconf autoscan autoupdate

but still.............

ERROR: Command errored out with exit status 1:
 command: 'c:\python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\ieuser\\appdata\\local\\temp\\pip-install-o2o6er\\pylibemu\\setup.py'"'"'; __file__='"'"'c:\\users\\ieuser\\appdata\\local\\temp\\pip-install-o2o6er\\pylibemu\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'c:\users\ieuser\appdata\local\temp\pip-install-o2o6er\pylibemu\pip-egg-info'
     cwd: c:\users\ieuser\appdata\local\temp\pip-install-o2o6er\pylibemu\
Complete output (9 lines):
running egg_info
creating c:\users\ieuser\appdata\local\temp\pip-install-o2o6er\pylibemu\pip-egg-info\pylibemu.egg-info
writing c:\users\ieuser\appdata\local\temp\pip-install-o2o6er\pylibemu\pip-egg-info\pylibemu.egg-info\PKG-INFO
writing top-level names to c:\users\ieuser\appdata\local\temp\pip-install-o2o6er\pylibemu\pip-egg-info\pylibemu.egg-info\top_level.txt
writing dependency_links to c:\users\ieuser\appdata\local\temp\pip-install-o2o6er\pylibemu\pip-egg-info\pylibemu.egg-info\dependency_links.txt
writing manifest file 'c:\users\ieuser\appdata\local\temp\pip-install-o2o6er\pylibemu\pip-egg-info\pylibemu.egg-info\SOURCES.txt'
pkg-config is not installed, falling back to pykg-config
running 'autoreconf -v -i -f' for library 'emu'
error: [Error 2] The system cannot find the file specified
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

i dont know if the issue is symlinks or what, but nothing runs unless i run it directly from the directory, it seems

opticoax747 commented 4 years ago

Maybe this can help too?

λ py -2 thug.py Traceback (most recent call last): File "thug.py", line 24, in from .ThugAPI import ThugAPI ValueError: Attempted relative import in non-package

opticoax747 commented 4 years ago

Trying to run just the command thug results in

C:\Users\IEUser\Desktop\thug-master\thug-master\thug λ thug -FZM www.yahoo.com Traceback (most recent call last): File "C:\Users\IEUser\Desktop\thug-master\thug-master\thug\thug.py", line 24, in from .ThugAPI import ThugAPI ModuleNotFoundError: No module named 'main.ThugAPI'; 'main' is not a package

opticoax747 commented 4 years ago

When running from a higher level, I get a differnt error

λ py -2 -m thug-master\thug\thug.py C:\Python27\python.exe: Import by filename is not supported.

buffer commented 4 years ago

Sorry for the late reply but I am working hard to finalize the release of Thug v1.0. The new release will be based on Python 3 and hopefully should be out by the end of the week. I think focusing on the new release is maybe better considering that Python 2 will not be supported anymore. Can I kindly ask you to repeat your tests after the release and update this issue? Thanks!

opticoax747 commented 4 years ago

Ok, thanks for your reply...I will try the new thug.py to see if I can get it to work in Cygwin on VM

buffer commented 4 years ago

Wondering to figure out if you had the opportunity to perform some tests after Thug was migrated to Python 3