Commit Graph

1189 Commits

Author SHA1 Message Date
Chris McCarthy
6b3829dc48 #2248 - Removed redundant Union from single type params 2024-02-09 11:37:47 +00:00
Chris McCarthy
cceb6208e0 #2248 - Reset the auto save pcap and syslog to False 2024-02-09 11:09:44 +00:00
Chris McCarthy
2518a42604 #2248 - Dropped old router_arp.py module. Fixed the ICMP codes as per IANA (https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml) 2024-02-09 11:03:48 +00:00
Chris McCarthy
bebfbd53be #2248 - MAde tests use new way of accessing network interfaces by their port number 2024-02-09 10:30:39 +00:00
Chris McCarthy
0acd9a2938 #2248 - Removed redundant code and added more documentation from PR suggestions 2024-02-09 10:27:22 +00:00
Chris McCarthy
a036160515 #2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation 2024-02-08 22:37:21 +00:00
Chris McCarthy
5eed467271 #2248 - synced wth dev 2024-02-08 16:15:57 +00:00
Chris McCarthy
114fb8c077 #2248 - synced wth dev 2024-02-08 15:27:02 +00:00
Marek Wolan
c3ea06aeec Merged PR 268: Make build fail if tests fail 2024-02-08 15:21:19 +00:00
Marek Wolan
1a2298ebfb Merged PR 267: Make web status rewards based on web browser instead of web server.
## Summary
- added a second green agent on client 1
- added browser history
- added a reward component based on the most recent return code in browser history
- modified the UC2 notebook to adhere to new reward.
- (also there were some issues in example_config from a previous merge that I failed to notice prior)

## Test process
New unit tests. Ran uc2 notebook to check that it produces results aligning with what is described in the markdown cells.

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [x] written **tests** for any new functionality added with this PR
- [x] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [x] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [x] attended to any **TO-DOs** left in the code

Add second green agent and make rewards based on webbrowser

Related work items: #2247
2024-02-08 15:19:24 +00:00
Marek Wolan
9b350ddd6f Apply suggestions from code review. 2024-02-08 13:20:32 +00:00
Chris McCarthy
411f0a320f #2248 - Final run over all the docstrings after running pre-commit. All tests now working. Updated CHANGELOG.md. 2024-02-08 10:53:30 +00:00
Chris McCarthy
0c96fef3ec #2248 - All tests (bar the one config file test) now working. Still need to tidy up docstrings and some docs. Almost there 2024-02-07 23:05:34 +00:00
Chris McCarthy
5e25fefa14 #2248 - Further fixes. All router integration tests now passing. 2024-02-07 19:44:40 +00:00
Marek Wolan
b7ff520d55 make task fail if tests fail 2024-02-06 18:58:50 +00:00
Marek Wolan
c35c060448 Cosmetic changes based on PR feedback 2024-02-06 17:32:15 +00:00
Marek Wolan
e500eccaf7 Finish upgrading folder actions to work with names instead of uuids & get tests fixed 2024-02-06 16:58:08 +00:00
Marek Wolan
41bc932f52 Add reward test. 2024-02-06 15:05:44 +00:00
Marek Wolan
5b5b750d4d Add second green agent and make rewards based on webbrowser 2024-02-06 14:42:59 +00:00
Chris McCarthy
7bbfd564fb #2248 - Big refactor of base with all Network Interface subclasses created to allow for proper management of ports on devices as it was starting to get messy with the Router. Some routing tests still need fixing as ARP doesn't seem to be working properly 2024-02-05 08:44:10 +00:00
Chris McCarthy
a0253ce6c4 #2248 - TSome further fixess to ARP. Also refactored PCAP to log inbound and outbound frames separately 2024-02-02 17:14:34 +00:00
Chris McCarthy
cb002d644f #2248 - Tidying up the tests so that they use updated networks 2024-02-02 16:55:43 +00:00
Chris McCarthy
dc5aeede33 #2248 - ICMP now working as a service using the session manager for transmission. Now started to comb through the tests to fix anything up. 2024-02-02 16:20:15 +00:00
Marek Wolan
cfc254753f Merged PR 265: Make requests work with names instead of uuids
## Summary
Make actions work with object names instead of UUIDs. This makes it possible to define action spaces which can act on network elements that don't exist yet (as long as you can anticipate what they will be called).

## Test process
Many new tests. Old tests pass. Notebooks run.

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [x] written **tests** for any new functionality added with this PR
- [x] updated the **documentation** if this PR changes or adds functionality
- [no time] written/updated **design docs** if this PR implements new functionality
- [x] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [x] attended to any **TO-DOs** left in the code

Related work items: #2137
2024-02-02 15:39:38 +00:00
Chris McCarthy
87d9d6da04 #2248 - Initial work has been done on moving ICMP into services. still tidying up to be done. Need to fix tests too. 2024-02-02 15:35:02 +00:00
Marek Wolan
4c6ae135cd Fix typos 2024-02-02 14:48:49 +00:00
Chris McCarthy
1964ab4635 #2248 - Lots more progress. Can now use ARP as a service properly. Also integrated the new ARP into the old ICMP which works. Next step is to more ICMP into services. 2024-02-01 23:05:14 +00:00
Chris McCarthy
9577f212f8 #2248 - Initial crack at getting ARP into a Service. Lots of refactoring has been done. It's a mess at the minute, but I can successfully send an ARP request so committing as a successful point in time 2024-02-01 22:19:55 +00:00
Marek Wolan
c163fb37ea Update request system docs. 2024-02-01 11:19:42 +00:00
Marek Wolan
261423bc78 Update changelog 2024-01-31 13:54:15 +00:00
Marek Wolan
83db5b1eb5 Fix node file delete action 2024-01-31 13:50:20 +00:00
Marek Wolan
41a7f83887 Add file scan test 2024-01-31 13:29:46 +00:00
Marek Wolan
d6a83fd1fb Update action tests to use name, not uuid 2024-01-31 11:55:38 +00:00
Marek Wolan
6aa6383fb7 Fix broken test configs 2024-01-31 11:44:56 +00:00
Marek Wolan
9f993dda57 Fix test config discrepancies 2024-01-31 10:48:40 +00:00
Marek Wolan
0dbaa66aa3 Merge remote-tracking branch 'origin/dev' into feature/2137-refactor-request-api 2024-01-31 10:05:09 +00:00
Marek Wolan
0c3304b1fd Merged PR 263: Several hotfixes
## Summary
Hotfixes from 3.0.0b4, b5, b6. These have all gone thru the PR process already we just need to sync dev back.

## Test process
Merge conflicts resolved and all automated tests pass.

## Checklist
- [x] PR is linked to a **work item**
- [x] **acceptance criteria** of linked ticket are met
- [x] performed **self-review** of the code
- [x] written **tests** for any new functionality added with this PR
- [~] updated the **documentation** if this PR changes or adds functionality
- [~] written/updated **design docs** if this PR implements new functionality
- [~] updated the **change log**
- [x] ran **pre-commit** checks for code style
- [x] attended to any **TO-DOs** left in the code

Related work items: #2161, #2173, #2174, #2175, #2176, #2179, #2208, #2218, #2219, #2220
2024-01-30 15:18:21 +00:00
Marek Wolan
def52f94e3 Add docstrings and update typos 2024-01-30 09:56:16 +00:00
Marek Wolan
bea72aa6a9 Fix ftp client connection list 2024-01-29 12:28:44 +00:00
Marek Wolan
555802baaa Merge remote-tracking branch 'origin/dev' into dev-v3.0.0b6 2024-01-29 10:26:28 +00:00
Marek Wolan
2ba05e7348 Fixed being unable to specify all addresses in acl rule 2024-01-25 15:17:09 +00:00
Marek Wolan
0056bfddee Bump version to 3.0.0b6 2024-01-25 14:59:24 +00:00
Marek Wolan
5a9eaeb185 Update the readme 2024-01-25 14:59:00 +00:00
Marek Wolan
a3a7d11ff7 Merged PR 261: Make sure notebook images get copied
Just made sure that notebook images get copied to user notebook directory.
2024-01-25 15:24:38 +00:00
Marek Wolan
51be271928 Merged PR 260: Beta 6 Fixes
Please run some of these changes locally. Read the notebook, check that it makes sense, and run the code cells to see if they produce the result you expect.

## Summary
Apologies that all these fixes are part of 1 massive PR instead of individual PRs. I thought it was going to be a quick job and it spiralled out of control.

Changes:
- Fixed a bug where ACL rules were not resetting on episode reset.
- Fixed a bug where blue agent's ACL actions were being applied against the wrong IP addresses
- Fixed a bug where deleted files and folders did not reset correctly on episode reset.
- Fixed a bug where service health status was using the actual health state instead of the visible health state
- Fixed a bug where the database file health status was using the incorrect value for negative rewards
- Fixed a bug preventing file actions from reaching their intended file
- Made database patch correctly take 2 timesteps instead of being immediate
- Made database patch only possible when the software is compromised or good, it's no longer possible when the software is OFF or RESETTING
- Temporarily disable the blue agent file delete action due to crashes. This issue is resolved in another branch that will be merged into dev soon.
- Fix a bug where ACLs were not showing up correctly in the observation space.
- Added a recap of agent actions to the `info` output of `step()`
- Added a notebook which explains UC2, demonstrates the attack, and shows off blue agent's action space, observation space, and reward function.

## Test process
New notebook verifies end-to-end UC2 functionality.

## Checklist
- [y] PR is linked to a **work item**
- [y] **acceptance criteria** of linked ticket are met
- [y] performed **self-review** of the code
- [~] written **tests** for any new functionality added with this PR
- [y] updated the **documentation** if this PR changes or adds functionality
- [n] written/updated **design docs** if this PR implements new functionality
- [y] updated the **change log**
- [y] ran **pre-commit** checks for code style
- [y] attended to any **TO-DOs** left in the code

Related work items: #2208, #2218, #2219, #2220
2024-01-25 15:15:48 +00:00
Marek Wolan
7f996ca16a Make sure notebook images get copied 2024-01-25 14:52:48 +00:00
Marek Wolan
4b98c1f630 Update uc2 notebook 2024-01-25 14:43:49 +00:00
Marek Wolan
73a75c497b Fix test 2024-01-25 13:13:50 +00:00
Marek Wolan
e7aac754a0 Update the changelog 2024-01-25 12:38:28 +00:00
Marek Wolan
99723b6578 Update notebook with more images. 2024-01-25 12:33:18 +00:00