You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I am getting the following errors while executing the project. How can I fix this? I have set up everything according tp the readme file except etc configuration. I am using macos and pycharm.
#19
Open
manasvicpatil opened this issue
Apr 2, 2024
· 2 comments
AutoPentest-DRL: Compute attack path for logical network...
Generate attack graph using MulVAL...
Process attack graph into attack matrix...
Traceback (most recent call last):
File "/Users/manasvipatil/AutoPentest-DRL/DQN/./confirm_path.py", line 9, in
MAP = generateMapClass.sendMap
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/generateMap.py", line 108, in sendMap
self.x = self.createMatrix()
^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/generateMap.py", line 20, in createMatrix
self.csvfile = open('../mulval_result/VERTICES.CSV', 'r')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../mulval_result/VERTICES.CSV'
/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/torch/init.py:696: UserWarning: torch.set_default_tensor_type() is deprecated as of PyTorch 2.1, please use torch.set_default_dtype() and torch.set_default_device() as alternatives. (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/tensor/python_tensor.cpp:453.)
_C.set_default_tensor_type(t)
Traceback (most recent call last):
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/./dqn_learn.py", line 32, in
env = gym.make('dqnenv-v0')
^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/gym/envs/registration.py", line 581, in make
env_creator = load(spec.entry_point)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/gym/envs/registration.py", line 61, in load
mod = importlib.import_module(mod_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/env/environment.py", line 12, in
class dqnEnvironment(gym.Env):
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/env/environment.py", line 14, in dqnEnvironment
MAP = np.loadtxt('../processdata/newmap.txt')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/numpy/lib/npyio.py", line 1373, in loadtxt
arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/numpy/lib/npyio.py", line 992, in _read
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/numpy/lib/_datasource.py", line 193, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/numpy/lib/_datasource.py", line 533, in open
raise FileNotFoundError(f"{path} not found.")
FileNotFoundError: ../processdata/newmap.txt not found.
Real attack error:
################################################################################
AutoPentest-DRL: Automated Penetration Testing Using Deep Reinforcement Learning
################################################################################
AutoPentest-DRL: Operation mode: Attack on real network
AutoPentest-DRL: Target topology: MulVAL_P/real_topology_1.P
AutoPentest-DRL: Get vulnerabilities in target network using Nmap...
Run Nmap on target 'webServer' (192.168.56.105)...
Password:
Starting Nmap 7.94 ( https://nmap.org ) at 2024-04-02 15:01 IST
Pre-scan script results:
| broadcast-avahi-dos:
| Discovered hosts:
| 224.0.0.251
| After NULL UDP avahi packet DoS (CVE-2011-1002).
|_ Hosts are all up (not vulnerable).
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 37.41 seconds
ERROR: Host appears to be down
ERROR: Nmap encountered a problem
AutoPentest-DRL: Nmap scanning failed => abort
The text was updated successfully, but these errors were encountered:
Logical attack error:
AutoPentest-DRL: Compute attack path for logical network...
Generate attack graph using MulVAL...
Process attack graph into attack matrix...
Traceback (most recent call last):
File "/Users/manasvipatil/AutoPentest-DRL/DQN/./confirm_path.py", line 9, in
MAP = generateMapClass.sendMap
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/generateMap.py", line 108, in sendMap
self.x = self.createMatrix()
^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/generateMap.py", line 20, in createMatrix
self.csvfile = open('../mulval_result/VERTICES.CSV', 'r')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../mulval_result/VERTICES.CSV'
/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/torch/init.py:696: UserWarning: torch.set_default_tensor_type() is deprecated as of PyTorch 2.1, please use torch.set_default_dtype() and torch.set_default_device() as alternatives. (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/torch/csrc/tensor/python_tensor.cpp:453.)
_C.set_default_tensor_type(t)
Traceback (most recent call last):
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/./dqn_learn.py", line 32, in
env = gym.make('dqnenv-v0')
^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/gym/envs/registration.py", line 581, in make
env_creator = load(spec.entry_point)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/gym/envs/registration.py", line 61, in load
mod = importlib.import_module(mod_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/env/environment.py", line 12, in
class dqnEnvironment(gym.Env):
File "/Users/manasvipatil/AutoPentest-DRL/DQN/learn/env/environment.py", line 14, in dqnEnvironment
MAP = np.loadtxt('../processdata/newmap.txt')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/numpy/lib/npyio.py", line 1373, in loadtxt
arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/numpy/lib/npyio.py", line 992, in _read
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/numpy/lib/_datasource.py", line 193, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manasvipatil/AutoPentest-DRL/venv/lib/python3.12/site-packages/numpy/lib/_datasource.py", line 533, in open
raise FileNotFoundError(f"{path} not found.")
FileNotFoundError: ../processdata/newmap.txt not found.
Real attack error:
################################################################################
AutoPentest-DRL: Automated Penetration Testing Using Deep Reinforcement Learning
################################################################################
AutoPentest-DRL: Operation mode: Attack on real network
AutoPentest-DRL: Target topology: MulVAL_P/real_topology_1.P
AutoPentest-DRL: Get vulnerabilities in target network using Nmap...
Run Nmap on target 'webServer' (192.168.56.105)...
Password:
Starting Nmap 7.94 ( https://nmap.org ) at 2024-04-02 15:01 IST
Pre-scan script results:
| broadcast-avahi-dos:
| Discovered hosts:
| 224.0.0.251
| After NULL UDP avahi packet DoS (CVE-2011-1002).
|_ Hosts are all up (not vulnerable).
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 37.41 seconds
ERROR: Host appears to be down
ERROR: Nmap encountered a problem
AutoPentest-DRL: Nmap scanning failed => abort
The text was updated successfully, but these errors were encountered: