Comments (2)
looking at this bash i was using a full string match as my conditional which worked before the aws template updates. looks like now we need more of an "if a string contains substring" type of conditional. similar to the code snippet below.
string='My long string'
if [[ $string == *"My long"* ]]; then
echo "It's there!"
fi
https://stackoverflow.com/questions/229551/how-to-check-if-a-string-contains-a-substring-in-bash
from awsdetonationlab.
Hello @sonofagl1tch,
After updating AMIs used in the CF template in 3f4cbfd, the template was still failing:
I disabled rolling back when the template failed so I was able to do some checks in the environment and get further information about the error. I accessed bastion machine and found out the bastion_bootstrap.sh
script is failing:
# /tmp/bastion_bootstrap.sh --banner https://raw.githubusercontent.com/sonofagl1tch/AWSDetonationLab/master/artifacts/banner_message.txt --enable true --tcp-forwarding true --x11-forwarding false
checkos Ended
BANNER_PATH = https://raw.githubusercontent.com/sonofagl1tch/AWSDetonationLab/master/artifacts/banner_message.txt
Creating Banner in /etc/ssh_banner
curl -s https://raw.githubusercontent.com/sonofagl1tch/AWSDetonationLab/master/artifacts/banner_message.txt > /etc/ssh_banner
[INFO] Installing banner ...
Setting up bastion session log in /var/log/bastion/bastion.log
ln: failed to create hard link ‘/var/log/bastion/.bastion.log’: File exists
Value of TCP_FORWARDING - true
Value of X11_FORWARDING - false
[ERROR] Unsupported Linux Bastion OS
Searching in the script's code, I found out where the error was being raised:
AWSDetonationLab/additionalInstallationScripts/bastion_bootstrap.sh
Lines 582 to 598 in e3a7078
It seems the result from
osrelease
function isn't correct. Reviewing that function:AWSDetonationLab/additionalInstallationScripts/bastion_bootstrap.sh
Lines 57 to 69 in e3a7078
It seems the following command is returning a wrong value:
# cat /etc/os-release | grep '^NAME=' | tr -d \" | sed 's/\n//g' | sed 's/NAME=//g'
Amazon Linux AMI
But I don't know if replacing content in line 61 would be a good fix, since it was changed here:
awslabs/amazon-guardduty-tester@9fb76df#diff-18583a0977c9ce589518e28d2ef9a78c
Am I using an old instance by error when I changed AMIs?
Best regards,
Marta
from awsdetonationlab.
Related Issues (20)
- add wazuh agent to all other systems in the detonationlab
- Update Inspector set up and configuration
- Add support for AWS Config HOT 1
- Add support for AWS Trust Advisor HOT 1
- Wazuh is not being correctly configured HOT 2
- automate import of kibana Visualizations and dashboards
- auto set the default index in kibana
- AWS secret key is not correctly replaced in ossec.conf HOT 1
- Windows AMI is outdated HOT 1
- Boto3 is not installed
- Add automated tests and continuous integration HOT 1
- VPCFlow configuration is not correct HOT 6
- VPCFlow interface ID viz is broken HOT 1
- add tags to all resources the detlab creates HOT 1
- add nitko to redteam instance
- fix rfiurl error
- automate the removal of s3 buckets HOT 1
- add option to choose between 1 s3 bucket for all logs or 1 s3 bucket per service HOT 2
- Add support for Wazuh v3.9.x and ELK 7.1.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awsdetonationlab.