457 Commits

Author SHA1 Message Date
Nick Todd
3cecf169ba #2829: Update and add nmne tests 2024-09-09 16:30:36 +01:00
Archer.Bowen
974aee90b3 #2842 Added additional tests to confirm terminal functionality 2024-09-06 14:09:30 +01:00
Archer Bowen
7562f6fc5c Merge remote-tracking branch 'origin/dev' into feature/2840_LOCAL_TERMINAL_COMMAND 2024-09-06 10:04:49 +01:00
Czar Echavez
1234b2dc4a Merged PR 523: #2782: initial impl of files in nodes
## Summary
Added ability to add folders and files to nodes via configuration

## Test process
https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE/pullrequest/523?_a=files&path=/tests/integration_tests/configuration_file_parsing/test_node_file_system_config.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
- [X] 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

#2782: initial impl of files in nodes

Related work items: #2782
2024-09-05 13:57:42 +00:00
Czar Echavez
e809d89c30 #2842 and #2843: implement add user and disable user actions + tests 2024-09-05 13:47:59 +01:00
=
310876cd3b 2755 Add ability to extend HostNode, NetworkNode, Service and Application outside PrimAITE. 2024-09-04 15:49:37 +01:00
Nick Todd
5608ad5ed5 #2845: Change 'obs_space_data' to 'observation'. 2024-09-04 14:25:08 +01:00
Nick Todd
1822e85eec #2845: Pre-commit fixes 2024-09-03 17:24:21 +01:00
Nick Todd
61add769c4 #2845: Add test for obs_data_space capture. 2024-09-03 17:16:48 +01:00
Czar Echavez
8e6b9f3970 #2782: added ability to create empty folders + create files with size and types + tests 2024-09-03 11:53:23 +01:00
Archer Bowen
fd3d3812f6 #2840 Documentation and minor bug fixes found in terminal and session manager. 2024-09-02 16:55:43 +01:00
Czar Echavez
a7f00c668d #2782: initial impl of files in nodes 2024-09-02 15:15:45 +01:00
Archer Bowen
0ff88e3672 #2840 Initial Implementation completed and tested. 2024-09-02 11:50:49 +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
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
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
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
6c7376ab4b #2681 Updated to include yaml file tests + include listening on multiports. 2024-08-13 09:37:11 +01:00
Archer Bowen
cbf02ebf32 #2689 Updated documentation and moved _craft_packet into abstract C2 2024-08-12 14:16:21 +01:00
Marek Wolan
929bd46d6d #2769 - Make changing password disconnect remote sessions 2024-08-12 14:16:04 +01:00
Archer Bowen
ce3805cd15 #2689 Updated c2 tests significantly and improved quality of debug logging. 2024-08-12 10:47:56 +01:00
Marek Wolan
5956721804 Merge remote-tracking branch 'origin/dev' into feature/2769-implement-user-account-action-space 2024-08-12 09:23:55 +01:00
Marek Wolan
5800334dc0 Merge dev into feature branch 2024-08-12 09:02:11 +01:00
Marek Wolan
3df55a708d #2769 - add actions and tests for terminal 2024-08-11 23:24:29 +01:00
Archer Bowen
53433ce7b6 #2689 General improvements.
1. Abstract TAP now handles .apply_timestep
2. Expanded tests
3. Added pydantic model for c2 configuration.
2024-08-09 17:53:47 +01:00
Archer Bowen
0e8e8c5681 Merge remote-tracking branch 'origin/dev' into feature/2689-command-and-control 2024-08-09 12:15:43 +01:00
Marek Wolan
f92a57cfc4 Merge remote-tracking branch 'origin/dev' into feature/2769-implement-user-account-action-space 2024-08-09 11:12:40 +01:00
Archer Bowen
ddc9acd03a #2689 Fix notebook blue agent actions not functioning correctly. 2024-08-09 11:04:12 +01:00
Chris McCarthy
a3a9ca9963 #2768 - Fixed issue causing main port to not be included in list of open ports. documented the configuration of listen_on_ports. added test that tests listen_on_ports configuration from yaml. 2024-08-08 21:20:20 +01:00
Chris McCarthy
a5652ae4b2 Merge branch 'refs/heads/dev' into feature/2768_enable-multi-port-listening-for-services-and-applications 2024-08-08 14:26:35 +01:00
Archer Bowen
9249447ea6 Merge branch 'dev' into feature/2689-command-and-control 2024-08-07 14:18:40 +01:00
Archer Bowen
b1baf023d6 #2689 Fixed up Pytests and confirmed functionality before merging from dev. 2024-08-07 14:16:50 +01:00
Marek Wolan
b193b46b7b #2799 - Update observation tests 2024-08-07 13:43:11 +01:00
Marek Wolan
b4893c4498 #2769 - Add remote ip as action parameter 2024-08-05 16:27:53 +01:00
Nick Todd
0e21137874 Merge branch 'dev' into feature/2777_set_RNG_seed 2024-08-05 11:12:30 +01:00
Nick Todd
2e4a1c37d1 #2777: Pre-commit fixes to test 2024-08-05 10:34:06 +01:00
Marek Wolan
99a5119dac Merge remote-tracking branch 'origin/dev' into feature/2769-implement-user-account-action-space 2024-08-05 10:30:17 +01:00