Commit Graph

2149 Commits

Author SHA1 Message Date
Archer Bowen
b8767da61e #2689 Fixed merging errors with actions.py 2024-08-20 10:51:29 +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
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
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
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
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
c36af13a66 #2689 Updated changelog 2024-08-13 10:30:44 +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
Archer Bowen
27ec06658f #2689 Majorly updated the command and control notebook to demonstrate more configuration options and more text to explain the code cells. 2024-08-12 19:25:30 +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
c886d4b014 Merged PR 501: #2799 - Fix folder scan not being required and make it configurable
## Summary
Make folder and file requiring scanning configurable. By default it's true and the new option can be omitted to ensure compatibility with old configs.

## Test process
New tests to verify that the actual or visible file/folder states are shown when configured.

## 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

#2799 - Fix folder scan not being required and make it configurable

Related work items: #2799
2024-08-12 08:57:14 +00: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
Marek Wolan
31c46950ad Merged PR 502: Add PDF benchmark output
## Summary
Uses md2pdf (MIT License) to convert the markdown file to html then to PDF.
I updated the formatting of the charts to be more legible too.
This requires WeasyPrint which is a system package available on linux, mac and windows.

## Test process
installed weasyprint on our build machine and tried the benchmark script and it worked.

https://dev.azure.com/ma-dev-uk/PrimAITE/_git/PrimAITE?version=GBrelease/fake-release-for-testing-purposes&path=/benchmark/results/v3/v3.3.0-dev0/PrimAITE%20v3.3.0-dev0%20Benchmark%20Report.pdf

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

Related work items: #2772
2024-08-09 12:21:26 +00:00
Archer Bowen
ab91f993a5 #2689 Initial Implementation of multi-port listeners. 2024-08-09 12:45:15 +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
Archer Bowen
4241118d26 #2689 Adding slight changes to c2_Beacon & terminal that appeared when merging from dev. 2024-08-09 12:14:57 +01:00
Christopher McCarthy
ca2aef7343 Merged PR 503: Enable Multi-Port Listening for Services and Applications
## Summary
- Added a `listen_on_ports` set in the `IOSoftware` class to enable software listening on ports in addition to the main port they're assigned.
- Also added something I missed in the `CHANGELOG.md` from user login ticket 🙃

## Test process
- Tested listening on ports with a dummy listener software class and counted frames snooped on.
- Also tested that the actual software that the posts being snooped in on still works as expected.

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

Related work items: #2768
2024-08-09 10:25:33 +00: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
507abe46c2 Merge remote-tracking branch 'origin/dev' into feature/2689-command-and-control 2024-08-09 11:12:09 +01:00
Archer Bowen
ddc9acd03a #2689 Fix notebook blue agent actions not functioning correctly. 2024-08-09 11:04:12 +01:00
Marek Wolan
bf44ceaeac Apply suggestions from code review 2024-08-09 09:26:37 +00:00