Commit Graph

731 Commits

Author SHA1 Message Date
Charlie Crane
edd2668ea4 #2869 - Update type hints and ConfigSchema variables in some agent classes 2025-01-13 15:08:48 +00:00
Charlie Crane
32fc970cfe #2869 - Update Config for some agent classes to use pydantic.Field, amend some identifiers and agent_name variables 2025-01-13 10:51:30 +00:00
Charlie Crane
511abea59c #2869 - Actioning review comments 2025-01-13 10:26:48 +00:00
Charlie Crane
e3f4775acb #2869 - Updates to ConfigSchema declaration and addressing some review comments 2025-01-10 14:09:15 +00:00
Charlie Crane
7af9d3724f #2869 - Updates to address test failures. Updated YAML configs to remove redundant start_settings 2025-01-08 14:42:35 +00:00
Charlie Crane
66d309871f #2869 - Minor changes trying to make pytest happy 2025-01-06 11:38:07 +00:00
Charlie Crane
55ddcb7eb4 #2869 - Pull in changes from 4.0.0a1-dev and resolve conflicts 2025-01-03 09:54:11 +00:00
Charlie Crane
2108b914e3 #2869 - New Year, new changes. Actioning review comments and some changes following self-review and catchup 2025-01-02 17:41:24 +00:00
Marek Wolan
491de6fc47 Revert pre-commit deleting files 2025-01-02 15:11:02 +00:00
Marek Wolan
bf32271ddd Change copyright to 2025 2025-01-02 15:05:06 +00:00
Charlie Crane
dc6f2be209 #2869 - pre-commit changes 2024-12-17 12:50:14 +00:00
Charlie Crane
770896200b #2869 - More YAML/test fixes to address failures 2024-12-17 12:47:54 +00:00
Charlie Crane
3b1b74fb3a #2869 - Some additional test updates to amend failures. Pre-commit tbd and some cleanup 2024-12-17 12:21:28 +00:00
Charlie Crane
436a986458 #2869 - Fixed failing tests from agent refactor. Some tests still fail but this is due to updating some action names in anticipation of merging in the extensible actions refactor 2024-12-17 10:51:57 +00:00
Charlie Crane
a4fbd29bb4 #2869 - Updates to agents to make sure they can be generated from a given config. Updates to test suite to reflect code changes 2024-12-16 15:57:00 +00:00
Charlie Crane
d9a1a0e26f 2869 - Addressing some typos in agent declaration, and neatening up the agent structure within PrimAITE. 2024-12-16 11:27:14 +00:00
Charlie Crane
1798ec6fe0 #2869 - Commit before switching branches. Changes to make pydantic happy with AgentLog 2024-12-05 14:00:44 +00:00
Charlie Crane
917386d638 #2869 - Agents Refactor 2024-11-27 15:29:51 +00:00
Charlie Crane
a3dc616126 #2869 - Starter changes in refactor of agent classes for refactor to become extensible. Identifiers added to classes and beginning of the inclusion of a ConfigSchema to base AbstractAgentClass 2024-11-20 17:19:35 +00: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
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
6a28f17f1b #2689 Initial draft of File exfiltration. 2024-08-14 19:49:58 +01:00
Marek Wolan
7b7adc20f9 Merge remote-tracking branch 'origin/dev' into feature/2769-implement-user-account-action-space 2024-08-13 13:15:47 +01:00
Archer Bowen
ead302c95d #2689 Added Tests for the C2 actions (Was previously covered via the notebook - now explicitly in a test.) 2024-08-13 12:33:41 +01:00
Archer Bowen
57dcd325a0 #2689 missed the hostname... 2024-08-13 10:49:10 +01:00
Archer Bowen
1138605e2b #2689 Fixing mistakenly altered test file. 2024-08-13 10:48:17 +01:00
Archer Bowen
845a4c6bd6 #2689 Final docustring updates before PR. 2024-08-13 10:18:56 +01:00
Archer Bowen
6c7376ab4b #2681 Updated to include yaml file tests + include listening on multiports. 2024-08-13 09:37:11 +01:00