-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atomic Red Team support #1
base: main
Are you sure you want to change the base?
Conversation
Installing Atomic-red-team invoke to windows laptop wiki |
We need to ensure the Mitre Tactic is present as lack of it fails validation
|
Parsed all known Mitre tags using script from https://github.com/sduff/mitre_attack_csv/ |
Summary: Pull Request resolved: facebookincubator#516 To enable actual clean ups and prevent errors like ``` ERROR failed to run command: could not load TTP at /home/nesusvet/security-ttpcode/ttps/infra/tupperware/ssh-to-container-as-root.yaml: could not parse action for step "start-tupperware-container": action fields did not match any valid action type ``` Changes pretty radical but I don't see why we need a custom implementation of cleanup logic for expect step Consider small change to the [expect.yaml](https://www.internalfb.com/code/fbsource/fbcode/security/redteam/purple_team/ttpforge/example-ttps/actions/expect/expect.yaml) example TTP ``` hg d diff --git a/fbcode/security/redteam/purple_team/ttpforge/example-ttps/actions/expect/expect.yaml b/fbcode/security/redteam/purple_team/ttpforge/example-ttps/actions/expect/expect.yaml --- a/fbcode/security/redteam/purple_team/ttpforge/example-ttps/actions/expect/expect.yaml +++ b/fbcode/security/redteam/purple_team/ttpforge/example-ttps/actions/expect/expect.yaml @@ -26,3 +26,4 @@ response: "John" - prompt: "Enter your age:" response: "30" + cleanup: echo "Done" ``` Try to run it on master and see NO CLEANUP instructions executed: ``` buck run security/redteam/purple_team/ttpforge:ttpforge -- run security/redteam/purple_team/ttpforge/example-ttps/actions/expect/expect.yaml File changed: fbcode//security/redteam/purple_team/ttpforge/example-ttps/actions/expect/expect.yaml Buck UI: https://www.internalfb.com/buck2/a008be5d-79d8-4591-960a-64fafbc10a44 Network: Up: 0B Down: 0B Jobs completed: 4. Time elapsed: 0.0s. BUILD SUCCEEDED INFO RUNNING TTP: Complex Expect Step with Python Script INFO ---------------------------------------- INFO Executing Step #1: "create_python_script" INFO ---------------------------------------- INFO Executing Step facebookincubator#2: "run_expect_script" Enter your name: John Enter your age: 30 Hello John, you are 30 years old! INFO ---------------------------------------- INFO All TTP steps completed successfully! INFO ======================================== INFO CLEANING UP 2 steps of TTP: "Complex Expect Step with Python Script" INFO ---------------------------------------- INFO Cleaning Up Step facebookincubator#2: "run_expect_script" INFO No Cleanup Action Defined for Step run_expect_script INFO ---------------------------------------- INFO Cleaning Up Step #1: "create_python_script" INFO No Cleanup Action Defined for Step create_python_script INFO ---------------------------------------- INFO Finished Cleanup Successfully ``` Differential Revision: D64108097 fbshipit-source-id: 2ab395b393b88ebfd0f5dd647cd75f34fce52b97
Notable errors parsing all auto-generated YAMLs:
Should we prevent empty lines or colons in long description texts? Looks like "References:" in the description text breaks the YAML parser. |
Add initial ART parse logic with tests
…ve brackets from appearing in dep steps
Rebased on upstream and force-pushed to reduce the amount of commits in PR |
Translation of ART tests to TTPForge format guide
For example
mage convertYAMLSchema ~/atomic-red-team/atomics/T1003.002
See more in docs/TranslationGuide.md