Commit Graph

2174 Commits

Author SHA1 Message Date
Defence Science and Technology Laboratory UK
a6dd9b850b Automated benchmark output commit for version 3.3.0 [skip ci] 2024-09-02 09:53:06 +00:00
Marek Wolan
3a6e10b772 Updated VERSION 2024-09-02 07:46:03 +00:00
Marek Wolan
049f7b7647 Update action masking to inlcude new actions 2024-08-30 15:22:05 +01:00
Nick Todd
08f742b3ec Merged PR 522: #2844: Added evaluation stage to Ray notebooks.
## Summary
Added evaluation stage to Training-an-RLLib-Agent and Training-an-RLLIB-MARL-System notebooks.

## Test process
Tested individual notebooks.
Ran all PrimAITE tests.

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [ ] 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
- [ ] attended to any **TO-DOs** left in the code

#2844: Added evaluation stage to Ray notebooks.

Related work items: #2844
2024-08-30 10:18:31 +00:00
Nick Todd
d3200f70e1 #2844: Added evaluation stage to Ray notebooks. 2024-08-30 10:23:34 +01:00
Marek Wolan
3de12573d3 Merged PR 520: Backport core changes from internal 2024-08-28 09:56:56 +00:00
Marek Wolan
a1553fb1b4 Backport core changes from internal 2024-08-28 10:20:32 +01:00
Marek Wolan
90cfe2f22b Merged PR 518: Fixed incorrect formatting on .rst and new priv esc notebook 2024-08-23 11:26:10 +00:00
Archer Bowen
9a6b1d374a Fixed incorrect formatting on .rst and new priv esc notebook 2024-08-23 12:22:56 +01:00
Marek Wolan
0e0fc96cd3 Merged PR 517: create doc page on rewards 2024-08-23 08:54:47 +00:00
Marek Wolan
fbbaf65aab create doc page on rewards 2024-08-22 18:12:37 +01:00
Christopher McCarthy
ff5a2e1bbe Merged PR 510: Privilege Escalation & Data Loss Example Notebook
## Summary
- Added a new Privilege-Escalation-and Data-Loss-Example.ipynb notebook with a more realistic scenario.
- Made some minor changes to multi_lan_internet_network_example.yaml to enable the new scenario.

## Test process
Manual end-to-end run of the notebook.

## 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
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

Related work items: #2686
2024-08-22 10:12:38 +00:00
Chris McCarthy
4a7a4fd571 #2686 - typo changes in jupyter notebook 2024-08-22 09:53:27 +01:00
Marek Wolan
c4eb60deda Merged PR 511: Fix incorrect removal of last_query_response from database client
oopsie

Related work items: #2736
2024-08-20 19:49:14 +00:00
Marek Wolan
71ec71e400 Fix incorrect removal of last_query_response from database client 2024-08-20 15:46:54 +00:00
Chris McCarthy
5d209e4ff9 #2686 - Added a new Privilege-Escalation-and Data-Loss-Example.ipynb notebook with a more realistic scenario. Made some minor changes to multi_lan_internet_network_example.yaml to enable the new scenario. 2024-08-20 15:33:39 +01:00
Archer Bowen
bceedbf72d Merged PR 504: Command and Control Full PR
## Summary
Implements the Command and Control applications to the quality and capability needed for the TAP001 expansion and lays the foundations for all the features required for TAP002 (Next Release).

The C2C suite contains three new applications:

**1. Abstract C2**

Base class for the C2 Server and the C2 Beacon. Controls the main internal logic of both applications but with a couple of abstract methods which each class defines differently.

**2. C2 Server**

The C2 Server takes red agent actions and converts the action options into C2 Commands which are then passed to the C2 Beacon.
The output of these commands is sent back to the C2 Server and then returned back to the red agent.

**3. C2 Beacon**

The C2 beacon uses the Terminal and the Ransomware Applications to perform different commands which it receives these commands and executes them and returns the output.

The C2 beacon can also be configured by the Red Agent to configure the current networking behaviour.

For a much more detailed description please refer to the .rst documentation and the notebook which demonstrate and describe the functionality very explicitly.

Lastly the wiki page also provides more information around the design work for this feature.

[Command and Control](/Welcome-to-PrimAITE!/Design/[~In-Progress~]/Command-and-Control)

Worth noting that some changes were needed that were unseen during the design page but the overall goals of the feature have been accomplished.

## Test process
Tested via notebooks and a series of e2e tests.

## 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
- [x] 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 (One remaining but unsure if it should be handled in this PR)

Related work items: #2689, #2720, #2721, #2779
2024-08-20 13:16:22 +00:00
Marek Wolan
23194e1ba8 Merged PR 508: Add option for rewards to be instantaneous
## Summary
* Changed how `GreenAdminDatabaseUnreachablePenalty`, `WebpageUnavailablePenalty`, and `WebServer404Penalty` work.
* They can now be configured with `sticky: false` in the yaml
* which means they no longer retain a positive/negative value after a successful/failed request, if the agent goes on to do nothing the next step
* refactored the calculate methods to better align with those rewards depending the previous action
* changed what is returned by some of the `describe_state` methods of sim components. They had legacy methods of returning the most recent success code which is no longer needed since the introduction of agent history

## Test process
Existing tests pass, new tests added

## 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
- [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: #2736
2024-08-20 10:40:43 +00:00
Archer Bowen
c9d62d512c #2689 fixed mismerge 2024-08-20 11:15:04 +01:00
Archer Bowen
b8767da61e #2689 Fixed merging errors with actions.py 2024-08-20 10:51:29 +01:00
Marek Wolan
1833dc3946 #2736 - typo fixes 2024-08-20 10:41:40 +01:00
Marek Wolan
98f5454f04 Merge remote-tracking branch 'origin/dev' into feature/2736-instantaneous-rewards 2024-08-20 10:40:48 +01:00
Archer Bowen
5bba4ed20e Merge remote-tracking branch 'origin/dev' into feature/2689-command-and-control 2024-08-20 09:30:43 +01:00
Nick Todd
b7ef538942 Merged PR 507: #2748: Port of PrimAITE Internal changes.
## Summary
This a port of the AgentHistoryItem DB Admin (GreenAdminDatabaseUnreachablePenalty reward) changes that were made to the PrimAITE Internal repo.
See also #2826.

## Test process
Updated tests/integration_tests/game_layer/test_rewards.py.

## 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
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [ ] attended to any **TO-DOs** left in the code

#2748: Port of PrimAITE Internal changes.

Related work items: #2748
2024-08-19 16:09:52 +00:00
Marek Wolan
15b7334f05 #2736 - Update changelog 2024-08-19 15:34:50 +01:00
Marek Wolan
538e853f26 #2736 - Add sticky reward tests and fix sticky reward behaviour 2024-08-19 15:32:25 +01:00
Czar Echavez
01f1569cc4 Merged PR 484: #2769: initial commit of user account actions
## Summary
Adding the Action Space for remote login and remote log out + change password

Updated ray to 2.32.0

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/484?_a=files&path=/tests/integration_tests/game_layer/actions/user_account_actions/test_remote_user_account_actions.py

## 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
- [ ] attended to any **TO-DOs** left in the code

#2769: initial commit of user account actions

Related work items: #2769
2024-08-19 14:31:44 +00:00
Archer Bowen
7b1584ccb7 #2689 Updated following PR 2024-08-19 15:24:24 +01:00
Marek Wolan
f344d292db #2736 - Fix up broken reward tests 2024-08-19 13:59:35 +01:00
Archer Bowen
2413a2f6a8 #2689 Fixing oversight on method call 2024-08-19 13:10:35 +01:00
Archer Bowen
f595f44ce9 #2689 Implemented fixes to _check_connection following PR 2024-08-19 13:08:31 +01:00
Nick Todd
2c71958c91 #2748: Port of PrimAITE Internal changes. 2024-08-19 12:55:45 +01:00
Marek Wolan
a997cebbc6 Apply suggestions from code review [skip ci] 2024-08-19 11:14:53 +00:00
Marek Wolan
aeca5fb6a2 #2769 - Clean up incorrect names and commented out code [skip ci] 2024-08-19 10:28:39 +01:00
Marek Wolan
05f9751fa8 #2736 - implement instantaneous rewards 2024-08-19 10:17:39 +01:00
Archer Bowen
87332873d2 #2689 Fixed issues with .rst (fixed terminal as well) 2024-08-16 15:47:41 +01:00
Archer Bowen
83b8206ce0 #2689 Added C2 Sequence diagram to docs and added additional ftp_client request tests. 2024-08-16 11:51:38 +01:00
Archer Bowen
849cb20f35 #2689 Addressed more PR comments & fixed an bug with command parsing in _command_terminal (c2 beacon) 2024-08-16 10:24:53 +01:00
Marek Wolan
d74227e34f #2769 - update changelog 2024-08-16 10:10:26 +01:00
Marek Wolan
21c0b02ff7 #2769 - update observation tests with new parameter 2024-08-16 09:21:27 +01:00
Marek Wolan
1d2705eb1b #2769 - Add user login observations 2024-08-15 20:16:11 +01:00
Archer Bowen
e5be392ea8 #2689 Updated documentation and docustrings following PR comments. 2024-08-15 17:47:33 +01:00
Archer Bowen
7d086ec35e #2689 Implemented pydantic model validation on C2 Server setup method + updated E2E notebook with data exfiltration. 2024-08-15 17:08:10 +01:00
Archer Bowen
f32b3a931f #2689 Addressed failing tests + updated c2_suite.rst to include the Data exfil command. 2024-08-15 14:41:35 +01:00
Archer Bowen
c50b005c37 #2689 Improved terminal session handling. 2024-08-15 13:10:47 +01:00
Archer Bowen
e53ac84666 #2689 Fixed small bugs, added pydantic class validation and divided the data_Exfil command on c2 beacon into two separate methods. 2024-08-15 11:36:55 +01:00
Archer Bowen
6a28f17f1b #2689 Initial draft of File exfiltration. 2024-08-14 19:49:58 +01:00
Archer Bowen
192ca814e0 Apply suggestions from code review 2024-08-13 15:49:52 +00:00
Archer Bowen
559f480062 #2689 Fixed .rst formatting issues and removed unnecessary comments. 2024-08-13 16:47:40 +01:00
Archer Bowen
d6e2994d6b Apply suggestions from code review 2024-08-13 15:43:21 +00:00