Marek Wolan
fb5242bd78
Merge agents and actions branches + fix import / subclass errors
2025-01-14 11:34:01 +00:00
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
edd2668ea4
#2869 - Update type hints and ConfigSchema variables in some agent classes
2025-01-13 15:08:48 +00:00
Charlie Crane
511abea59c
#2869 - Actioning review comments
2025-01-13 10:26:48 +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
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
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
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
dc6f2be209
#2869 - pre-commit changes
2024-12-17 12:50:14 +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
47ed585ee2
#2912 - Replace DONOTHING reference with do_nothing, tweaks following milpac actions
2024-12-12 16:08:11 +00:00
Nick Todd
e0b885cc79
#2913 : Changes to update test_sticky_rewards.py
2024-11-07 13:08:44 +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
f95ba8cbbc
#2913 : Fix remaining pydantic errors.
2024-10-22 11:01:35 +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
Archer Bowen
5bba4ed20e
Merge remote-tracking branch 'origin/dev' into feature/2689-command-and-control
2024-08-20 09:30:43 +01:00
Marek Wolan
538e853f26
#2736 - Add sticky reward tests and fix sticky reward behaviour
2024-08-19 15:32:25 +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
845a4c6bd6
#2689 Final docustring updates before PR.
2024-08-13 10:18:56 +01:00
Archer Bowen
cbf02ebf32
#2689 Updated documentation and moved _craft_packet into abstract C2
2024-08-12 14:16:21 +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
5800334dc0
Merge dev into feature branch
2024-08-12 09:02:11 +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
Charlie Crane
665c53d880
#2781 - Actioning review comments
2024-08-08 15:48:44 +01:00
Marek Wolan
fe599f7745
#2799 - Fix folder scan not being required and make it configurable
2024-08-07 12:09:44 +01:00
Charlie Crane
9fea34bb43
#2781 - Correcting terminal tests and fixing a typo in base.py
2024-08-07 11:58:17 +01:00
Charlie Crane
bd91b4be1d
#2706 - Merge branch 'dev' into feature/2706-Terminal_Sim_Component
2024-08-07 09:08:43 +01:00
Charlie Crane
6d6f21a20a
#2706 - Additional assert on new test and a guard clause on LocalTerminalConnection.execute() to check that the Terminal service is running before sending a command
2024-08-06 19:14:53 +01:00
Charlie Crane
d05fd00594
#2706 - Resolving an issue that saw disconnected terminal connections still able to send execute commands that were also then processed by the target node. Created a new class: LocalterminalConnection, for local connection objects to terminal. Calling terminal.show() when there is a local connection will have 'Local Connection' as the IP address. Receive and execute will check that the provided connection uuid is valid before actioning any commands. TerminalClientConnection objects now have an is_active flag similar to DatabaseClientConnection. Added a new test to check that terminals will reject commands from disconnected clientconnection objects.
2024-08-06 19:09:23 +01:00
Charlie Crane
1e64e87798
#2706 - Actioning Review comments
2024-08-06 09:30:27 +01:00
Nick Todd
3253dd8054
#2777 : Update test
2024-08-05 16:27:54 +01:00
Charlie Crane
4fe9753fcf
#2706 - Updated terminal.receive() to work with SSHPacket class, fixed some tests and updated RemoteTerminalConnection to hold Source_IP for easier reading
2024-08-05 15:44:52 +01:00
Charlie Crane
972b0b9712
#2706 - Added another test demonstrating an SSH connection across a network. Actioned some review comments and a minor change to other ACL Terminal tests
2024-08-05 11:19:27 +01:00
Charlie Crane
ca8e568734
#2706 - Additional tests to check terminal login to/from networknodes. Redo of test to check that a router will block SSH traffic if no ACL rule.
2024-08-05 10:58:23 +01:00
Charlie Crane
4bddf72cd3
#2706 - Initial refactor of Terminal Class following review discussion on Friday. Terminal will now return a TerminalConnection/RemoteTerminalConnection object on login.
...
The new connection object can then be used to pass commands to the target node, without needing to form a full payload item.
2024-08-05 09:29:17 +01:00
Charlie Crane
d9faa1a5da
Merge branch 'dev' into feature/2706-Terminal_Sim_Component
2024-08-02 13:34:00 +01:00