13o-bbr-bbq / machine_learning_security

Source code about machine learning and security.
1.96k stars 648 forks source link

Hello, I have a question #7

Closed Tren closed 6 years ago

Tren commented 6 years ago

python DeepExploit.py -t 192.168.147.135 -m train /usr/local/lib/python2.7/dist-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Using TensorFlow backend. [*] Invalid IP address: 192.168.147.135

13o-bbr-bbq commented 6 years ago

Hi, @Tren DeepExploit can not operate on the Python2.x. Maybe, your python version is Python2.7. Could you run DeepExploit on the Python3.6?

fanntom commented 6 years ago

try running using python3

Tren commented 6 years ago

[+] Execute Nmap. [] Executing... [] Start time: 2018-04-28 23:55:22 [] End time : 2018-04-28 23:55:49 [+] Get port list. [+] Get exploit list. [] Loading exploit list from local file: /root/machine_learning_security/DeepExploit/data/exploit_list.csv [+] Get payload list. [] Loading payload list from local file: /root/machine_learning_security/DeepExploit/data/payload_list.csv [+] Get exploit tree. [] Loading exploit tree from local file: /root/machine_learning_security/DeepExploit/data/exploit_tree.json. Traceback (most recent call last): File "DeepExploit.py", line 1541, in exploit_tree = get_exploit_tree(env) File "DeepExploit.py", line 1290, in get_exploit_tree fin = codecs.open(local_file, 'r', 'utf-8') File "/usr/lib/python3.6/codecs.py", line 897, in open file = builtins.open(filename, mode, buffering) FileNotFoundError: [Errno 2] No such file or directory: '/root/machine_learning_security/DeepExploit/data/exploit_tree.json.'

13o-bbr-bbq commented 6 years ago

Hi, @Tren It is bug following code. I fixed a bug, please try it.

fanntom commented 6 years ago

Please refer to issue #5

Tren commented 6 years ago

python3 DeepExploit.py -t 192.168.0.100 -m train Using TensorFlow backend.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      ██████╗ ███████╗███████╗██████╗                      

      ██╔══██╗██╔════╝██╔════╝██╔══██╗
      ██║ ██║█████╗ █████╗ ██████╔╝
      ██║ ██║██╔══╝ ██╔══╝ ██╔═══╝
      ██████╔╝███████╗███████╗██║
      ╚═════╝ ╚══════╝╚══════╝╚═╝

 ███████╗██╗  ██╗██████╗ ██╗      ██████╗ ██╗████████╗
 ██╔════╝╚██╗██╔╝██╔══██╗██║     ██╔═══██╗██║╚══██╔══╝
 █████╗   ╚███╔╝ ██████╔╝██║     ██║   ██║██║   ██║   
 ██╔══╝   ██╔██╗ ██╔═══╝ ██║     ██║   ██║██║   ██║   
 ███████╗██╔╝ ██╗██║     ███████╗╚██████╔╝██║   ██║   
 ╚══════╝╚═╝  ╚═╝╚═╝     ╚══════╝ ╚═════╝ ╚═╝   ╚═╝    (beta)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Traceback (most recent call last): File "DeepExploit.py", line 1532, in env = Metasploit(rhost) File "DeepExploit.py", line 266, in init self.client.login(msgrpc_user, msgrpc_pass) # Log in to RPC Server. File "DeepExploit.py", line 70, in login ret = self.call('auth.login', [user, password]) File "DeepExploit.py", line 64, in call self.client.request("POST", self.uri, params, self.headers) File "/usr/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/lib/python3.6/http/client.py", line 964, in send self.connect() File "/usr/lib/python3.6/http/client.py", line 936, in connect (self.host,self.port), self.timeout, self.source_address) File "/usr/lib/python3.6/socket.py", line 724, in create_connection raise err File "/usr/lib/python3.6/socket.py", line 713, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

13o-bbr-bbq commented 6 years ago

Hi, @Tren Could you check follwing.