Comments (9)
I could repro but I had to first fix another bug in
environment_generation.py
where the agent was not installed on any node of the graph:e287436#diff-d01efcd79fb6d8316931c9a4f8a9578bc9908c4c69f2c613e606db2ebff3944f
Ouch, my bad. Forgot to mention that :-D
I'll get to test it on Monday.
from cyberbattlesim.
Temporarily fixed by replacing
with
precondition=model.Precondition(f"Linux&(~({ADMINTAG}&{ADMINTAG}))"),
from cyberbattlesim.
@jaromiru I cannot repro. Could you confirm which version of boolean.py
you have installed?
Here is what I have:
~/CyberBattleSim_public$ pip freeze | grep bool
boolean.py==3.8
Repro:
from cyberbattle.simulation.environment_generation import create_random_environment
import cyberbattle.simulation.commandcontrol as commandcontrol
env = create_random_environment('test', 10)
c2 = commandcontrol.CommandControl(env)
c2.print_all_attacks()
Output:
Empty DataFrame
Columns: []
Index: []
from cyberbattlesim.
That's weird. I have boolean.py==3.8
. The error is present. When I fix it with the fix above, the output looks like:
id status properties local_attacks remote_attacks
0 5 owned [Win7, PortSMBOpen, PortRDPOpen, DomainJoined,... [UACME55, UACME52, UACME43, UACME61, UACME45] [RDPBF, SMBBF]
Not an empty DataFrame.
Are you sure the import from cyberbattle.simulation.environment_generation import create_random_environment
is importing from your ~/CyberBattleSim_public
and not from somewhere else, maybe previously installed with pip install .
?
from cyberbattlesim.
Yes the import is loading from my source directory:
> print(commandcontrol.__file__)
/home/azureuser/CyberBattleSim_public/cyberbattle/simulation/commandcontrol.py
I am also using Python version 3.8.9, not sure if this matters. I'll keep trying to get a repro.
from cyberbattlesim.
The problem is definitely within the boolean library.
import boolean
ALGEBRA = boolean.BooleanAlgebra()
ALGEBRA.parse('1&~1').simplify() # OK
ALGEBRA.TRUE.dual = type(ALGEBRA.FALSE)
ALGEBRA.FALSE.dual = type(ALGEBRA.TRUE)
ALGEBRA.parse('1&~1').simplify() # Exception
$ pip freeze | grep boolean
boolean.py==3.8
$ python -V
Python 3.8.10
from cyberbattlesim.
I could repro but I had to first fix another bug in environment_generation.py
where the agent was not installed on any node of the graph:
e287436#diff-d01efcd79fb6d8316931c9a4f8a9578bc9908c4c69f2c613e606db2ebff3944f
from cyberbattlesim.
@jaromiru The main branch of the boolean.py package has an alternative fix for this bug. It's not yet released on PyPI though:
https://github.com/bastikr/boolean.py/pull/100/files
from cyberbattlesim.
@jaromiru I have just verified that the fix in branch master
of boolean.py
resolves the issue. You do need to remove the other workaround from actions.py
and model.py
otherwise you'll still get the exception. Since the fix is not release yet on PyPi it needs to be installed from github with:
pip install boolean.py@git+https://github.com/bastikr/boolean.py/@master#egg=numpy_stubs
I'll send a PR with a fix soon.
from cyberbattlesim.
Related Issues (20)
- Dockerfile not working HOT 7
- ModuleNotFoundError: No module named 'cyberbattle' HOT 2
- E: Unable to locate package python3.9 HOT 1
- Question about rewards in chain environment HOT 2
- Key for how the simulation is working HOT 1
- simplenv bidirectional? HOT 3
- Example agent doesn't work with conda install HOT 8
- python 3.11 not working - ValueError: mutable default <class 'cyberbattle.simulation.model.FirewallConfiguration'> HOT 9
- ValueError: mutable default <class 'cyberbattle.simulation.model.FirewallConfiguration'> for field firewall is not allowed: use default_factory HOT 3
- DQL still learning at evaluation time HOT 1
- Internal Node Id Dependent on Order of Action Execution HOT 1
- Unable to install dependencies HOT 12
- Action_space dimensions formally too large HOT 1
- Play the environment with other RL algorithms HOT 14
- A question about 'pretty_print_internal_action' HOT 2
- Making reward non-zero, what is the reason? HOT 1
- Something wrong with the node's last owned time and last reimaged time? HOT 1
- Consider designing defender as RL agent HOT 3
- init.sh doesn't work HOT 2
- How to setup machine/program for use HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyberbattlesim.