Commit Graph

740 Commits

Author SHA1 Message Date
Charlie Crane
3cca3d4a5c #2912 - Actioning review comments. Identifiers have been removed from AbstractActions, _legacy folder has been deleted and correction to IPV4Address type hints 2025-01-13 16:12:16 +00:00
Charlie Crane
a0a5f2ca38 #2912 - Review comment actions following commit revertions 2025-01-03 15:03:01 +00:00
Charlie Crane
0ee454b13e #2912 - Rename actions/config.py to actions/software.py 2025-01-03 14:53:54 +00:00
Charlie Crane
e653afaa4c #2912 - Merge in changes on target branch 2025-01-03 14:48:18 +00:00
Charlie Crane
ab2dd6ca27 Revert "#2912 - Actioning Review Comments"
This reverts commit b11678a128.
2025-01-03 14:41:45 +00:00
Charlie Crane
b11678a128 #2912 - Actioning Review Comments 2025-01-03 14:40:00 +00:00
Marek Wolan
c5f81708ce Merge remote-tracking branch 'origin/4.0.0a1-dev' into feature/2913_Extensible_Rewards 2025-01-02 15:11:25 +00:00
Marek Wolan
491de6fc47 Revert pre-commit deleting files 2025-01-02 15:11:02 +00:00
Marek Wolan
41dc7b5b29 Merge remote-tracking branch 'origin/4.0.0a1-dev' into feature/2913_Extensible_Rewards 2025-01-02 15:05:35 +00:00
Marek Wolan
bf32271ddd Change copyright to 2025 2025-01-02 15:05:06 +00:00
Charlie Crane
47ed585ee2 #2912 - Replace DONOTHING reference with do_nothing, tweaks following milpac actions 2024-12-12 16:08:11 +00:00
Charlie Crane
e40fd053f7 #2912 - Removing print statements left in from debugging 2024-12-11 10:32:15 +00:00
Charlie Crane
068ad2f1fa #2912 - Updates to get tests to pass. Some ACL rules still misbehaving 2024-12-09 13:56:40 +00:00
Charlie Crane
d3c52d0d72 #2912 - Remove some debugging print statements and apply pre-commit lint changes 2024-11-19 18:58:51 +00:00
Charlie Crane
b4bc59f633 #2912 - Updates to actions refactor to align with rewards refactor for consistency across codebase. 2024-11-19 18:57:40 +00:00
Charlie Crane
95fbe45137 #2912 - Updates so that all tests within test_actions.py pass 2024-11-13 15:32:48 +00:00
Charlie Crane
ed020f005f #2912 - Pre-commit updates ahead of first draft PR. 2024-11-13 10:40:51 +00:00
Charlie Crane
d757bd01f0 #2912 - Updated to include __all__ and some test fixes. New extensible actions documentation page 2024-11-12 14:49:44 +00:00
Nick Todd
e0b885cc79 #2913: Changes to update test_sticky_rewards.py 2024-11-07 13:08:44 +00:00
Nick Todd
4c2ef6ea2a #2913: Updated tests 2024-11-06 14:52:22 +00:00
Nick Todd
370bcfc476 #2913: Make rewards work with config file. 2024-11-06 11:35:06 +00:00
Nick Todd
b849ea6312 #2913: Remove from_config() and refactor (WIP). 2024-11-04 17:41:43 +00:00
Nick Todd
6b29362bf9 #2913: Tidy up config files. 2024-10-31 14:42:50 +00:00
Charlie Crane
844a3a60fa #2912 - Steps to get test_actions passing the refactored actions. Some linting changes and YAML updates. 2024-10-30 18:34:05 +00:00
Nick Todd
7d977c8095 #2913: Fix config path for test. 2024-10-30 16:33:14 +00:00
Nick Todd
77219db041 #2913: Remove dns_server option from config files. 2024-10-30 16:32:49 +00:00
Nick Todd
f95ba8cbbc #2913: Fix remaining pydantic errors. 2024-10-22 11:01:35 +01:00
Nick Todd
0cf8e20e6d #2913: Update reward classes to work with pydantic. 2024-10-21 17:11:11 +01:00
Marek Wolan
43ec85a669 #2755 - refix some air space frequency issues 2024-10-11 09:52:16 +01:00
Marek Wolan
07c4860059 Add more tests for office lan creation 2024-10-04 11:36:48 +01:00
Marek Wolan
b4cc1b4379 Add tests for office lan creation 2024-10-04 11:07:49 +01:00
Marek Wolan
203ec5ec85 Add tests for port and protocol validation and update changelog 2024-09-26 16:00:59 +01:00
Marek Wolan
f1b911bc65 Change port and protocol to annotated validators 2024-09-25 16:28:22 +01:00
Marek Wolan
695891f55c Add port and protocol custom validators 2024-09-20 11:21:28 +01:00
Marek Wolan
08f1cf1fbd Fix airspace and remaining port problems from refactor 2024-09-19 15:06:29 +01:00
Marek Wolan
dd931d900b port refactor - eod commit, airspace still broken 2024-09-18 16:02:25 +01:00
=
310876cd3b 2755 Add ability to extend HostNode, NetworkNode, Service and Application outside PrimAITE. 2024-09-04 15:49:37 +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
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
538e853f26 #2736 - Add sticky reward tests and fix sticky reward behaviour 2024-08-19 15:32:25 +01:00
Marek Wolan
f344d292db #2736 - Fix up broken reward tests 2024-08-19 13:59:35 +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
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
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