🕳️
The Cyber Security Library
  • The Library
  • Offensive Security
    • Solar, Exploiting log4j
      • Reconnaissance
      • Discovery
      • Proof of Concept
      • Exploitation
    • Basic Authentication Bypass
      • Username Enumeration
      • Brute Force
      • Logic Flaw
      • Cookie Tampering
    • Insekube
      • Recon with Nmap
      • Checking out the web address
      • Creating a Reverse shell
      • Inside the Kubernetes pod
      • CVE-2021-43798
    • Snort
      • What is Snort? (For the uninitiated)
      • Task exercise
      • Traffic Generator
      • Brief overview of IDS and IPS
      • Checking Snort
      • Snort Sniffer mode
      • Packet Logger mode
    • Runtime Detection Evasion
      • Learning Objectives of AMSI
      • Runtime detections
      • AMSI Overview
      • AMSI Instrumentation
      • Powershell Downgrade
      • Powershell Reflection
      • Patching AMSI
    • Red team recon using OSINT
      • Taxonomy of Reconnaissance
      • Built-in tools
      • Advanced Searching
      • Specialized Search Engines
  • Malware
    • Introduction to Malware Analysis
      • What are the different types of malware analysis
      • Doing different types of analysis
      • Anti analysis techniques
    • Ransomeware: Maze
    • Exploring Steganography
    • Simple Trojan with Python
      • The Python Trojan
      • Breaking down the python code
  • Vulnerability Management
    • Nessus
      • Introduction
      • Nessus Essentials
      • Scans
      • Authenticated Scans
      • Results
      • Running custom scans
  • Cloud
    • AWS
      • AWS CDK: Deploy and using amazon SQS Que from Repo
        • Node modules and Bootstrapping troubleshooting
        • Sending and Receiving information from the stack
        • Destroying the stack and cleaning up
      • Using Different AWS Services with Splunk
        • AWS Config
          • How Does Config work?
          • How to enable Config
          • Settings
          • Aggregation
          • Creating Config Resource
          • Creating Aggregator
          • Adding Rules
        • CloudTrail
          • What is CloudTrail?
          • Features of CloudTrail
          • Benefits of CloudTrail
          • CloudTrail Event History
          • Securing CloudTrail
        • EventBridge
          • Configuring EventBridge and Event Patterns
          • EventBridge Targets
        • CloudWatch
          • The CloudWatch Dashboard
            • Virtual Machine
          • CloudWatch Alarms and Metric Filters
            • Searching logs using metric filters
            • CloudWatch Alarms
          • CloudWatch CIS Alarms
            • SNS
        • Configuring VPC Flow Logs
          • An introduction to VPC flow logs
        • Automating Incident Response with EventBridge
          • Creating Lambda functions
        • CloudTrail SIEM Integration (Splunk)
          • AWS architecture for integrating with Splunk
      • AWS DevOps EBS Volumes
        • CloudWatch
        • EBS Volume
        • Lambda
      • EKS Creating a deployment with AWS in the command Line
        • Setting up AWS Cloud9
        • Creating a Cluster
        • Creating Deployment
      • How to CloudShell SSH in to ec2 Instances
    • Azure
      • Worker CTF (Azure DevOps)
        • Enumeration
        • Using SVN
        • Exploring the Domain
        • Cracking Azure DevOps console
      • Software development environments and Azure DevOps pipeline abuse
        • Accessing Azure Devops
        • Exploring Project Pages
  • Splunk
    • Splunk SIEM Integration
      • AWS architecture for integrating with Splunk
    • Splunk Threat Hunting Ep.6 Credential Access
  • DevOps
    • Using AWS, Docker, Jenkins and SonarQube to improve code quality
      • Updating the Cloud Instance and Getting Docker
      • Installing SonarQube
      • Creating Jenkins Server
      • Manaing SonarQube and Jenkins
    • Creating a Codebuild project and getting the output with CloudWatch Logs
      • IAM
      • CodeBuild
  • CTF's
    • THM Wonderland
      • Nmap and Gobuster
      • Entering Wonderland
      • Privilege Escalation
    • Healthcare OpenEMR system -THM Plotted EMR
      • Recon with Nmap
      • Exploring the ports found
      • Gobuster
      • Searchsploit Open emr
    • Steam Cloud CTF Exploiting Kubernetes
      • SteamCloud Privilege Escalation
    • THM Flatline CTF
      • Recon with Nmap
      • Searchsploit for freeswitch
      • Using the exploit
      • Escalating my privileges
      • Gaining access inside the Windows RDP
    • Biteme CTF
      • Recon
      • Looking into the PHP code and decoding hexadecimal
      • Python script and Bash script
      • Bruteforcing MFA Code
      • Trying to gain access via SSH
      • Inside SSH
      • Fail2ban Privilege Escalation
    • Devoops CTF
      • Enumeration
      • Exploiting Web Page
      • Creating Python exploit
    • GoBox CTF
      • Enumeration
      • Using Burpsuite and creating Reverse shell
    • Explore: Android Box
      • Enumeration
      • Initial foothold
      • Privilege escalation
Powered by GitBook
On this page
  1. Cloud
  2. AWS
  3. Using Different AWS Services with Splunk
  4. CloudTrail SIEM Integration (Splunk)

AWS architecture for integrating with Splunk

PreviousCloudTrail SIEM Integration (Splunk)NextAWS DevOps EBS Volumes

Last updated 1 year ago

You need to create an IAM user for Splunk to authenticate with your AWS account. Give this IAM user permissions by adding them to a user group with attached relevant permissions. (This is AWS's best practice; it's better than attaching policies directly to users.) You'll have to create an access key for this user, which is then held on Splunk for it to use for authentication. Splunk acts as this user by having access to their access keys. The default policy can be hardened depending on the exact scope of what you want the user to perform. The default policy allows for all functionality that the Splunk app could use, but you probably won't use every feature.

In AWS, your Cloudtrail has an option to send an S3 delivery notification. A message is published to a (SNS) topic every time a log file is delivered to the designated S3 bucket. The message sent to SNS contains details of the log file and the bucket, which is how Splunk later knows where and what to retrieve. The setting is enabled by editing a trail and enabling SNS notifications, which will give you the options shown below.

Searching logs in Splunk

Once your AWS logs are ingested into Splunk, you'll want to be able to search them and find information about what's going on.

To return all logs that have been delivered, enter * in the search bar. The drop-down menu on the right of the screen allows you to specify a time of interest.

You can also search for keywords you expect to feature in the required logs. For example, if you want to know what the user Alice456 has been up to, simply search “Alice456”. Because the username is a field in the logs, all entries attributed to this user will be returned.

You can combine these simple searches with AND, OR, and NOT logic. So, if you wanted to see logs that included the username Alice456 and had the event name ListBuckets, you could search: “Alice456” AND “ListBuckets”. Equally, if you want to see all logs about Alice456 but not console login events, you can search: “Alice456” NOT “ConsoleLogin”.

AWS determines the fields in the logs. Splunk just processes them and displays them. Sometimes, sub-sections will be hidden at first glance. You can expand them by pressing the plus symbol in square brackets.

Navigate to the IAM console and select User Groups on the left-hand side. Click SplunkAccessGroup.

Add SplunkUser to the group.

Look at the attached policy on the group to see the permissions Splunk requires.

Next,

Navigate to the CloudTrail console and select the metrolio-management-trail. Edit the trail and enable SNS notification delivery to a new SNS topic called SplunkTopic.

Navigate to the SQS console and select to create a new queue. Name the queue SplunkQueue and set the visibility timeout to five minutes. Select Create queue, leaving everything else as default.

Click your new SQS queue and select Subscribe to Amazon SNS topic.

Choose the topic you created called SplunkTopic from the dropdown menu and click Save.

Create another new SQS queue called SplunkDLQ. Again, set the visibility timeout to five minutes and leave everything else as default

Select your queue called SplunkQueue and click Edit.

In the dead-letter queue box, select it to be enabled.

Select your queue called SplunkDLQ from the dropdown marked Choose queue.

Set the maximum receives to 3.

Navigate to the IAM console and select the user SplunkUser.

On the Security Credentials panel, select Create access key.

Click to download the key as a .csv file.

In the Splunk web interface, click on the app named Splunk Add-on for AWS.

Select the Configuration tab at the top and, on the Accounts tab, select Add.

Fill in the fields with the name SplunkUser and Key ID and Secret Key from the downloaded .csv file. Leave the Region category as Global.

in the same app, go to the Inputs tab and select Create New Input.

Choose the Cloudtrail option and SQS-Based-S3.

Name the input Metrolio-Trail. Set the AWS account to SplunkUser, set the region to Europe (Ireland), and select the SplunkQueue for the SQS queue name.

Change the SQS batch size to 5 and, under Advanced Settings, set the interval to 10 seconds.

The user Hades12 is repeatedly trying to create an IAM policy. What is the name of the policy?

Policy is named below

What is the username of the user performing GetBucketPolicy against the Metrolio log bucket in the account?

What is the eventSource for the API call that Ares27 is using to list lambda functions in the account?

What is the username of the user trying to stop the metrolio-management-trail from logging? They are getting an AccessDenied exception.

This SNS topic is subscribed to by a (SQS) queue. Another SQS queue is configured as the (DLQ), which ensures any messages that aren't processed correctly don't get lost. The SQS queues are then set as input to your Splunk server. Whenever a notification is received from AWS, the Splunk server goes to the S3 bucket that CloudTrail pushes logs to and retrieves the log file. Splunk allows you to set the batch size and the interval of the log retrieval. This allows you to control how many messages it will receive at once and how often it will go and check for messages.

Simple Queue Service
dead-letter queue
Page cover image
Simple Notification Service