Python Forum
Python Complete novice: Want to run a vulnerability script - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python Complete novice: Want to run a vulnerability script (/thread-29734.html)



Python Complete novice: Want to run a vulnerability script - bhanney23 - Sep-17-2020

Hi, I am a complete novice at Python and I wish to run a script someone has made up to check against a critical windows vulnerability. I downloaded python and I thought I had downloaded all the modules and everything needed to run this script, but I keep getting an error: Please see below

C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages>zerologon.py Dc_Name IP_address ( I put this here but I edited it for confidentiality)
Traceback (most recent call last):
  File "C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\zerologon.py", line 3, in <module>
    from impacket.dcerpc.v5 import nrpc, epm
  File "C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\impacket\dcerpc\v5\nrpc.py", line 30, in <module>
    from impacket.dcerpc.v5.samr import OLD_LARGE_INTEGER
  File "C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\impacket\dcerpc\v5\samr.py", line 29, in <module>
    from impacket.dcerpc.v5.rpcrt import DCERPCException
  File "C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\impacket\dcerpc\v5\rpcrt.py", line 24, in <module>
    from Cryptodome.Cipher import ARC4
  File "C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\Cryptodome\Cipher\__init__.py", line 27, in <module>
    from Cryptodome.Cipher._mode_ecb import _create_ecb_cipher
  File "C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\Cryptodome\Cipher\_mode_ecb.py", line 35, in <module>
    raw_ecb_lib = load_pycryptodome_raw_lib("Cryptodome.Cipher._raw_ecb", """
  File "C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\Cryptodome\Util\_raw_api.py", line 308, in load_pycryptodome_raw_lib
    raise OSError("Cannot load native module '%s': %s" % (name, ", ".join(attempts)))
OSError: Cannot load native module 'Cryptodome.Cipher._raw_ecb': Trying '_raw_ecb.cp38-win_amd64.pyd': cannot load library 'C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\Cryptodome\Util\..\Cipher\_raw_ecb.cp38-win_amd64.pyd': error 0x7e.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'C:\\Users\\bhanney\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\site-packages\\Cryptodome\\Util\\..\\Cipher\\_raw_ecb.cp38-win_amd64.pyd', Trying '_raw_ecb.pyd': cannot load library 'C:\Users\bhanney\AppData\Local\Programs\Python\Python38-32\Lib\site-packages\Cryptodome\Util\..\Cipher\_raw_ecb.pyd': error 0x7e.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'C:\\Users\\bhanney\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\site-packages\\Cryptodome\\Util\\..\\Cipher\\_raw_ecb.pyd'
Here is a link to the github script, let me know if anyone can assist because I have no clue what I'm doing wrong


RE: Python Complete novice: Want to run a vulnerability script - Aspire2Inspire - Sep-18-2020

Did you do:
 pip install -r requirements.txt 
After cloning the git repo?

These are the dependencies:
 
cffi==1.14.2
click==7.1.2
cryptography==3.1
dnspython==2.0.0
Flask==1.1.2
future==0.18.2
impacket==0.9.21
itsdangerous==1.1.0
Jinja2==2.11.2
ldap3==2.8
ldapdomaindump==0.9.3
MarkupSafe==1.1.1
pyasn1==0.4.8
pycparser==2.20
pycryptodomex==3.9.8
pyOpenSSL==19.1.0
six==1.15.0
Werkzeug==1.0.1
Do you have these all in:

 pip list 
In the environment you are working from.

OSError is raised when a system operation causes a system-related error (like above).

When you say novice what level of Python knowledge are we talking about?

Goodluck