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
I am trying to train and evaluate a PPO agent based on stable_baselines3 for Scenario2 running CybORG 2.1.
Notice: I use a reduced scenario file with only a red agent in a flat network configuration without Sleep and Impact actions for testing purposes:
Agents:
Red:
AllowedSubnets:
- FlatINT:
Hosts:
User0:
Interfaces: AllSystem info: Allactions:
- DiscoverRemoteSystems
- DiscoverNetworkServices
- ExploitRemoteService
- BlueKeep
- EternalBlue
- FTPDirectoryTraversal
- HarakaRCE
- HTTPRFI
- HTTPSRFI
- SQLInjection
- PrivilegeEscalate
- SSHBruteForceagent_type: SleepAgentreward_calculator_type: HybridImpactPwnstarting_sessions:
- hostname: User0name: RedPhishtype: RedAbstractSessionusername: SYSTEMwrappers: []Hosts:
User0:
AWS_Info: []image: windows_user_host1info:
User0:
Interfaces: AllUser1:
Interfaces: IP AddressUser2:
Interfaces: IP AddressUser3:
Interfaces: IP AddressUser4:
Interfaces: IP AddressEnterprise0:
Interfaces: IP AddressOp_Server0:
Interfaces: IP AddressConfidentialityValue: NoneAvailabilityValue: NoneUser1:
AWS_Info: []image: windows_user_host1info:
User0:
Interfaces: IP AddressUser1:
Interfaces: AllUser2:
Interfaces: IP AddressUser3:
Interfaces: IP AddressUser4:
Interfaces: IP AddressEnterprise0:
Interfaces: IP AddressOp_Server0:
Interfaces: IP AddressConfidentialityValue: LowAvailabilityValue: NoneUser2:
AWS_Info: []image: windows_user_host2info:
User0:
Interfaces: IP AddressUser1:
Interfaces: IP AddressUser2:
Interfaces: AllUser3:
Interfaces: IP AddressUser4:
Interfaces: IP AddressEnterprise0:
Interfaces: IP AddressOp_Server0:
Interfaces: IP AddressConfidentialityValue: LowAvailabilityValue: NoneUser3:
AWS_Info: []image: linux_user_host1info:
User0:
Interfaces: IP AddressUser1:
Interfaces: IP AddressUser2:
Interfaces: IP AddressUser3:
Interfaces: AllUser4:
Interfaces: IP AddressEnterprise0:
Interfaces: IP AddressOp_Server0:
Interfaces: IP AddressConfidentialityValue: LowAvailabilityValue: NoneUser4:
AWS_Info: []image: linux_user_host2info:
User0:
Interfaces: IP AddressUser1:
Interfaces: IP AddressUser2:
Interfaces: IP AddressUser3:
Interfaces: IP AddressUser4:
Interfaces: AllEnterprise0:
Interfaces: IP AddressOp_Server0:
Interfaces: IP AddressConfidentialityValue: LowAvailabilityValue: NoneEnterprise0:
AWS_Info: []image: Gatewayinfo:
User0:
Interfaces: IP AddressUser1:
Interfaces: IP AddressUser2:
Interfaces: IP AddressUser3:
Interfaces: IP AddressUser4:
Interfaces: IP AddressEnterprise0:
Interfaces: AllOp_Server0:
Interfaces: IP AddressConfidentialityValue: MediumAvailabilityValue: MediumOp_Server0:
AWS_Info: []image: OP_Serverinfo:
User0:
Interfaces: IP AddressUser1:
Interfaces: IP AddressUser2:
Interfaces: IP AddressUser3:
Interfaces: IP AddressUser4:
Interfaces: IP AddressEnterprise0:
Interfaces: IP AddressOp_Server0:
Interfaces: AllServices:
- OTServiceConfidentialityValue: HighAvailabilityValue: HighSubnets:
Flat:
Hosts:
- User0
- User1
- User2
- User3
- User4
- Enterprise0
- Op_Server0NACLs:
all:
in: allout: allSize: 7
Currently, I am receiving the following error:
Traceback (most recent call last):
File "/usr/lib64/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib64/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "[...]/cage-challenge-2/venv-3.10/lib64/python3.10/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 30, in _worker
observation, reward, done, info = env.step(data)
File "[...]/cage-challenge-2/CybORG/CybORG/Agents/Wrappers/OpenAIGymWrapper.py", line 27, in step
result = self.env.step(self.agent_name, action)
File "[...]/cage-challenge-2/CybORG/CybORG/Agents/Wrappers/EnumActionWrapper.py", line 20, in step
returnsuper().step(agent, action)
File "[...]/cage-challenge-2/CybORG/CybORG/Agents/Wrappers/BaseWrapper.py", line 16, in step
result = self.env.step(agent, action)
File "[...]/cage-challenge-2/CybORG/CybORG/Agents/Wrappers/BaseWrapper.py", line 17, in step
result.observation = self.observation_change(result.observation)
File "[...]/cage-challenge-2/CybORG/CybORG/Agents/Wrappers/RedTableWrapper.py", line 48, in observation_change
self._update_red_info(observation)
File "[...]/cage-challenge-2/CybORG/CybORG/Agents/Wrappers/RedTableWrapper.py", line 85, in _update_red_info
self._process_priv_esc(obs, hostname)
File "[...]/cage-challenge-2/CybORG/CybORG/Agents/Wrappers/RedTableWrapper.py", line 132, in _process_priv_esc
[info forinfoinself.red_info.values() if info[2] == hostname][0][4] = 'None'
IndexError: list index out of range
The problem seems to stem from the list comprehension inside the _process_priv_esc() function:
The text was updated successfully, but these errors were encountered:
Anth0rx
changed the title
"IndexError: list index out of range" caused by Enterprise0 and Enterprise1 hosts
"IndexError: list index out of range" caused by _process_priv_escFeb 16, 2023
I am trying to train and evaluate a PPO agent based on stable_baselines3 for Scenario2 running CybORG 2.1.
Notice: I use a reduced scenario file with only a red agent in a flat network configuration without
Sleep
andImpact
actions for testing purposes:Currently, I am receiving the following error:
The problem seems to stem from the list comprehension inside the
_process_priv_esc()
function:After adding an additional check on the list length the agent model learns without errors:
The text was updated successfully, but these errors were encountered: