<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Search query to check failed login attempt to ec2 instances in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-query-to-check-failed-login-attempt-to-ec2-instances/m-p/474949#M133525</link>
    <description>&lt;P&gt;You will need to monitor the linux secure file (/var/log/secure). Here's a &lt;A href="https://www.eurovps.com/blog/important-linux-log-files-you-must-be-monitoring/#secure"&gt;link&lt;/A&gt; that explains its function. You can get this done either by adding a &lt;A href="https://www.splunk.com/en_us/download/universal-forwarder.html"&gt;Splunk Universal Forwarder&lt;/A&gt; on the EC2 instance, or setting up the &lt;A href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance.html"&gt;CloudWatch Agent&lt;/A&gt; to monitor the file. EIther way, you need to monitor that file in order to get the login attempts to your machine. &lt;/P&gt;

&lt;P&gt;If you decide to use the Splunk UF, you can use many of the default apps found on Splunk base to monitor the secure file (e.g. &lt;A href="https://splunkbase.splunk.com/app/3476/"&gt;Linux Secure TA&lt;/A&gt; etc.) And the docs to build your own monitoring of files can be found &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/8.0.1/Data/Monitorfilesanddirectories"&gt;here&lt;/A&gt;. &lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2020 21:10:23 GMT</pubDate>
    <dc:creator>amiracle</dc:creator>
    <dc:date>2020-02-20T21:10:23Z</dc:date>
    <item>
      <title>Search query to check failed login attempt to ec2 instances</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-to-check-failed-login-attempt-to-ec2-instances/m-p/474948#M133524</link>
      <description>&lt;P&gt;Hi fellow Splunk users,&lt;/P&gt;

&lt;P&gt;I need help to set up search query (later will be saved as an alert) to check failed login attempts to our ec2 instances.&lt;BR /&gt;
In my organization, we dont allow SSH login.&lt;BR /&gt;
On top of that, I also want to see if a person tried to change any sensitive config files inside that instance.&lt;/P&gt;

&lt;P&gt;Logs are already coming from aws cloudtrail, below is what I got so far. Thanks in advance for all the help and input.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" sourcetype="aws:cloudtrail" | spath errorCode | search errorCode=AccessDenied

{ [-]
   awsRegion: eu-west-1
   errorCode: AccessDenied
   errorMessage: User: User is not authorized to perform: glue:GetSecurityConfigurations
   eventID: faf2053d-2bd2-41b3-93ff-a7e841979cea
   eventName: GetSecurityConfigurations
   eventSource: glue.amazonaws.com
   eventTime: 2020-02-20T20:43:14Z
   eventType: AwsApiCall
   eventVersion: 1.05
   recipientAccountId: 155166966842
   requestID: 86a20648-687a-4c3e-9f4a-ce07f1704217
   requestParameters: null
   responseElements: null
   sourceIPAddress: 18.221.72.80
   userAgent: aws-sdk-java/1.11.699 Linux/4.14.77-70.59.amzn1.x86_64 Java_HotSpot(TM)_64-Bit_Server_VM/25.202-b08 java/1.8.0_202 groovy/2.4.15 vendor/Oracle_Corporation
   userIdentity: { [+]
   }
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Feb 2020 20:58:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-to-check-failed-login-attempt-to-ec2-instances/m-p/474948#M133524</guid>
      <dc:creator>mufthmu</dc:creator>
      <dc:date>2020-02-20T20:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Search query to check failed login attempt to ec2 instances</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-to-check-failed-login-attempt-to-ec2-instances/m-p/474949#M133525</link>
      <description>&lt;P&gt;You will need to monitor the linux secure file (/var/log/secure). Here's a &lt;A href="https://www.eurovps.com/blog/important-linux-log-files-you-must-be-monitoring/#secure"&gt;link&lt;/A&gt; that explains its function. You can get this done either by adding a &lt;A href="https://www.splunk.com/en_us/download/universal-forwarder.html"&gt;Splunk Universal Forwarder&lt;/A&gt; on the EC2 instance, or setting up the &lt;A href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance.html"&gt;CloudWatch Agent&lt;/A&gt; to monitor the file. EIther way, you need to monitor that file in order to get the login attempts to your machine. &lt;/P&gt;

&lt;P&gt;If you decide to use the Splunk UF, you can use many of the default apps found on Splunk base to monitor the secure file (e.g. &lt;A href="https://splunkbase.splunk.com/app/3476/"&gt;Linux Secure TA&lt;/A&gt; etc.) And the docs to build your own monitoring of files can be found &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/8.0.1/Data/Monitorfilesanddirectories"&gt;here&lt;/A&gt;. &lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 21:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-to-check-failed-login-attempt-to-ec2-instances/m-p/474949#M133525</guid>
      <dc:creator>amiracle</dc:creator>
      <dc:date>2020-02-20T21:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Search query to check failed login attempt to ec2 instances</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-query-to-check-failed-login-attempt-to-ec2-instances/m-p/474950#M133526</link>
      <description>&lt;P&gt;Can you check sourceIPAddress, &lt;CODE&gt;18.221.72.80&lt;/CODE&gt;?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="main" sourcetype="aws:cloudtrail" 
| spath 
| search errorCode=AccessDenied
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will be better.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 22:03:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-query-to-check-failed-login-attempt-to-ec2-instances/m-p/474950#M133526</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-20T22:03:21Z</dc:date>
    </item>
  </channel>
</rss>

