Table of Contents
In this lab we will be relaunching our vulnerable application and running basic Splunk queries to familiarize ourselves with logging data.
- Use assumer to log into the target account. Make sure AWS_USERNAME is set to your student ID.
E.g.,
$ unset AWS_SESSION_TOKEN AWS_SECRET_ACCESS_KEY AWS_ACCESS_KEY_ID
$ assumer -a 717986480831 -r human/dso/TGT-dso-DeploymentAdmin \
-A 100352119871 -R dso/ctrl/my-app/CTL-my-app-DeploymentAdmin \
-o dso -g -u $AWS_USERNAME
- Lookup the public IP address for your instance under EC2, then SSH into your instance, start Splunk and MariaDB and run rails goat.
$ ssh -i student1.pem ec2-user@54.x.x.x
$ sudo /opt/splunkforwarder/bin/splunk start
$ sudo systemctl start mariadb.service
$ cd ~/railsgoat
$ export RAILS_ENV=mysql
$ bundle exec rake db:setup
$ bundle exec rails server -b 0.0.0.0 -p 8080
- Login to Splunk by opening the Splunk Console with your browser. The instructor will provide credentials for you.
Splunk Console: https://54.186.140.211/en-US/account/login?return_to=%2Fen-US%2F
-
Change your password by clicking your username in the upper-right navigation pane, then clicking
Edit Account. Fill out thePasswordandConfirm passwordfields, clickSave. -
Click
Search & Reportingand take the tour when prompted.
- Under the Search & Reporting app, select the search input box, enter
index=mainand adjust the timeframe toLast 15 minutesby clicking the pull down to the right of the search input box.Last 15 minutesshould appear underPresets. Click the search magnifying glass or hitEnter.
How many events you get?
-
Adjust the time to
all time, how many events you get? -
Find your host logs. First lookup your instance's DNS name in the AWS console by selecting your instance (denoted by your username). Note the
Private DNS(e.g.,ip-10.0.0.4.us-west-2.compute.internal). Then enterindex=main host=<Private DNS>in the search input box, e.g.,index=main host=ip-10.0.0.4.us-west-2.internal. -
Familiarize your self with the
sourceandsourcetypefields on the left pane. Also take a look at theInteresting Fields.
- Click
Dashboards, take the tour when prompted. - Click
Alerts, take the tour when prompted. - Click
Reports, take the tour when prompted.