< Return to Video

Splunk Security Event Monitoring | Blue Team Series with Hackersploit

  • 0:01 - 0:04
    Hello, everyone. Welcome back to the Blue
  • 0:04 - 0:05
    Team training series brought to you by
  • 0:05 - 0:08
    Linode and Hackersploit. In this video,
  • 0:08 - 0:10
    we're going to be taking a look at how
  • 0:10 - 0:12
    to set up or how to perform security
  • 0:12 - 0:14
    event monitoring with Splunk, more
  • 0:14 - 0:17
    specifically, Splunk Enterprise
  • 0:17 - 0:19
    Security. Right? So the objective here
  • 0:19 - 0:21
    will be to monitor intrusions and
  • 0:21 - 0:24
    threats with Splunk. And you might be
  • 0:24 - 0:25
    asking yourself, well, how are we going to
  • 0:25 - 0:28
    do this? What setup are we using? Well, the
  • 0:28 - 0:30
    scenario that I've set up for this video
  • 0:30 - 0:33
    is we are essentially going to
  • 0:33 - 0:34
    take all the knowledge that we've
  • 0:34 - 0:38
    learned during the Snort video, and we
  • 0:38 - 0:39
    are going to essentially forward all of
  • 0:39 - 0:43
    the Snort logs into Splunk or have
  • 0:43 - 0:44
    that done automatically through the
  • 0:44 - 0:48
    Splunk Universal Forwarder so that we get
  • 0:48 - 0:50
    the latest logs when Snort is running on
  • 0:50 - 0:52
    our Ubuntu virtual machine.
  • 0:52 - 0:55
    And the objective here is to use Splunk
  • 0:55 - 0:58
    in conjunction with the Splunk's Snort app
  • 0:58 - 1:01
    to essentially visualize and identify or
  • 1:01 - 1:03
    monitor network intrusions and any
  • 1:03 - 1:07
    malicious network traffic, you know, within the
  • 1:07 - 1:09
    network that I'm monitoring.
  • 1:09 - 1:19
    [Music].
  • 1:19 - 1:22
    At a very high level, what will we be
  • 1:22 - 1:23
    covering? Well, firstly, we'll get an
  • 1:23 - 1:25
    introduction to Splunk. Now before we
  • 1:25 - 1:28
    move any further or we actually carry on,
  • 1:28 - 1:31
    I do want to note that this video is not
  • 1:31 - 1:32
    going to be focused on Splunk
  • 1:32 - 1:35
    fundamentals. I'm going
  • 1:35 - 1:36
    to assume that you already know what
  • 1:36 - 1:40
    Splunk is and how it can be used, you know,
  • 1:40 - 1:42
    and how it's used generally speaking.
  • 1:42 - 1:45
    Because Splunk is not really a tool
  • 1:45 - 1:48
    that is specific to security, for example.
  • 1:48 - 1:50
    That's why they have the Splunk
  • 1:50 - 1:53
    Enterprise Security version or edition.
  • 1:53 - 1:54
    And I'm just going to assume that you
  • 1:54 - 1:56
    know how to use Splunk at a very basic
  • 1:56 - 1:58
    level. So once we get an introduction to
  • 1:58 - 2:01
    Splunk, we'll go over Splunk Enterprise
  • 2:01 - 2:05
    Security--the Enterprise Security edition--and how it
  • 2:05 - 2:07
    can be used for security event
  • 2:07 - 2:08
    monitoring, especially in our case
  • 2:08 - 2:11
    because we want to essentially monitor
  • 2:11 - 2:13
    the intrusion detection logs
  • 2:13 - 2:15
    generated by Snort.
  • 2:15 - 2:17
    So we'll then move on to deploying
  • 2:17 - 2:19
    Splunk Enterprise Security on Linode,
  • 2:19 - 2:21
    which is absolutely fantastic because
  • 2:21 - 2:23
    they have a cloud image
  • 2:23 - 2:25
    available for it that allows you to spin
  • 2:25 - 2:26
    it up without going through the process
  • 2:26 - 2:29
    of installing it and configuring it. So
  • 2:29 - 2:31
    that'll set it up for us.
  • 2:31 - 2:33
    We'll then take a look at how to
  • 2:33 - 2:35
    configure Splunk, and how to set up the
  • 2:35 - 2:38
    Splunk Universal Forwarder on the Ubuntu
  • 2:38 - 2:40
    virtual machine that is running Snort so
  • 2:40 - 2:42
    that we can forward those logs into
  • 2:42 - 2:45
    Splunk. And then, of course, we'll take
  • 2:45 - 2:47
    a look at the Splunk Snort event
  • 2:47 - 2:50
    dashboard that will be provided to us by
  • 2:50 - 2:53
    the Splunk Snort app. So if this sounds like
  • 2:53 - 2:55
    gibberish to you, don't worry. It will make
  • 2:55 - 2:58
    sense in a couple of minutes.
  • 2:59 - 3:01
    With that being said, given the fact
  • 3:01 - 3:03
    that we're going to be using, you know,
  • 3:03 - 3:04
    we're going to be using Snort to
  • 3:04 - 3:07
    generate alerts and monitor those alerts,
  • 3:07 - 3:09
    if you have not gone through
  • 3:09 - 3:12
    the actual Snort video, please do that as
  • 3:12 - 3:14
    it'll help you set up Snort, and you can
  • 3:14 - 3:16
    then run through this demo. With that
  • 3:16 - 3:19
    being said, this is not a holistic video
  • 3:19 - 3:21
    that will cover everything you can do
  • 3:21 - 3:23
    with Splunk Enterprise Security. We are
  • 3:23 - 3:26
    just focused on the intrusion
  • 3:26 - 3:28
    detection logs produced
  • 3:28 - 3:30
    by Snort and how they can be
  • 3:30 - 3:33
    imported or forwarded to Splunk for,
  • 3:33 - 3:36
    you know, analysis and monitoring.
  • 3:36 - 3:38
    So the prerequisites are the same as
  • 3:38 - 3:40
    the previous videos. The only difference
  • 3:40 - 3:42
    is, you know, that you need to have a
  • 3:42 - 3:44
    basic familiarity with Splunk and how to
  • 3:44 - 3:46
    navigate around the various menu
  • 3:46 - 3:48
    elements and, yeah,
  • 3:48 - 3:50
    essentially just how to use it at a very
  • 3:50 - 3:51
    basic level. If you're not familiar with
  • 3:51 - 3:54
    Splunk, I'll give you a few resources at
  • 3:54 - 3:57
    the end of these slides
  • 3:57 - 3:58
    that'll help you out or help
  • 3:58 - 4:01
    you get started. Alright.
  • 4:01 - 4:02
    So let's get an introduction
  • 4:02 - 4:04
    to Splunk. So what is Splunk? That's the
  • 4:04 - 4:06
    main question. If you've never heard of
  • 4:06 - 4:08
    Splunk, Splunk is an extremely powerful
  • 4:08 - 4:10
    platform that is used to analyze data
  • 4:10 - 4:13
    and logs produced by systems or machines,
  • 4:13 - 4:16
    as Splunk likes to call them. So
  • 4:16 - 4:19
    what problem is Splunk trying to solve
  • 4:19 - 4:21
    here? Well, let's look at this from the
  • 4:21 - 4:25
    perspective of Web 2.0 or, you know, the
  • 4:25 - 4:27
    interconnected world we live in
  • 4:27 - 4:29
    today. And we're going to be looking at
  • 4:29 - 4:31
    it from the context of or from the
  • 4:31 - 4:33
    perspective of security.
  • 4:33 - 4:36
    So if we take a simple system--let's say
  • 4:36 - 4:39
    we have a Windows operating system or a
  • 4:39 - 4:41
    system running Windows--well, that Windows
  • 4:41 - 4:45
    system produces a lot of data or logs
  • 4:45 - 4:47
    that, you know, contain
  • 4:47 - 4:49
    information that, you know, at first
  • 4:49 - 4:52
    glance might not seem that important. But
  • 4:52 - 4:54
    once you start getting into specific
  • 4:54 - 4:57
    sectors like security, those logs start,
  • 4:57 - 5:00
    you know, those logs have, you know,
  • 5:00 - 5:02
    very important value to organizations.
  • 5:02 - 5:05
    Now multiply that by a thousand systems.
  • 5:05 - 5:07
    So let's say we have an organization.
  • 5:07 - 5:09
    They have a thousand computers within
  • 5:09 - 5:10
    their network or, you know, distributed
  • 5:10 - 5:14
    worldwide. And all of these systems,
  • 5:14 - 5:15
    you know, need to be secured. Their
  • 5:15 - 5:18
    security needs to be monitored. So how do
  • 5:18 - 5:21
    we monitor all of this? Well, this is
  • 5:21 - 5:23
    where Splunk comes into play. So Splunk
  • 5:23 - 5:25
    allows you to essentially funnel all of
  • 5:25 - 5:28
    this data produced by systems or
  • 5:28 - 5:31
    machines into Splunk. And then Splunk allows you
  • 5:31 - 5:33
    to monitor, search, and analyze this
  • 5:33 - 5:35
    machine-generated data and the logs
  • 5:35 - 5:38
    through a web interface. So in order to
  • 5:38 - 5:40
    use Splunk, you'll need to import your
  • 5:40 - 5:42
    own data or logs. Alternatively, you can
  • 5:42 - 5:45
    utilize the Splunk Universal Forwarder to
  • 5:45 - 5:48
    forward logs and data to Splunk for
  • 5:48 - 5:51
    analysis and, of course, visualization, etc.
  • 5:51 - 5:53
    Now, Splunk does so much more that I
  • 5:53 - 5:55
    really can't go over all of the features
  • 5:55 - 5:57
    here. But as I said, we're looking at this
  • 5:57 - 6:00
    from the lens of a security engineer.
  • 6:00 - 6:02
    Alright. So Splunk collates all the
  • 6:02 - 6:05
    data and logs from various sources and
  • 6:05 - 6:07
    provides you with a central index that
  • 6:07 - 6:09
    you can search through. Splunk also
  • 6:09 - 6:11
    provides you with robust visualization
  • 6:11 - 6:13
    and reporting tools that allow you to
  • 6:13 - 6:15
    identify the data that interests you,
  • 6:15 - 6:17
    transform the data into results, and
  • 6:17 - 6:20
    visualize the answers in the form of a
  • 6:20 - 6:23
    report, chart, graph, etc. Alright. So what
  • 6:23 - 6:25
    I'm saying here is that Splunk allows
  • 6:25 - 6:28
    you to take all of this security-related
  • 6:28 - 6:32
    logs and data and make sense of them and
  • 6:32 - 6:34
    essentially get the answers that you're
  • 6:34 - 6:36
    looking for. So, for example, from the
  • 6:36 - 6:38
    perspective of a security engineer, what
  • 6:38 - 6:40
    do you want from all of this data? Well,
  • 6:40 - 6:42
    at a very high level, you want to know
  • 6:42 - 6:44
    whether something is going wrong and
  • 6:44 - 6:46
    what could go wrong. In the context of
  • 6:46 - 6:49
    security, a network could be compromised.
  • 6:49 - 6:51
    There could be some malicious network
  • 6:51 - 6:53
    traffic or activity going on. A system
  • 6:53 - 6:56
    could be compromised, etc., etc. You get the
  • 6:56 - 6:58
    idea. So we need that data to be
  • 6:58 - 7:01
    displayed to us as a security engineer.
  • 7:01 - 7:03
    And Splunk is really one of the best
  • 7:03 - 7:05
    tools, you know, when it comes down to,
  • 7:05 - 7:08
    you know, taking a lot of data
  • 7:08 - 7:10
    and then identifying the data that
  • 7:10 - 7:12
    interests you, transforming that data
  • 7:12 - 7:15
    into results, and then visualizing that
  • 7:15 - 7:17
    data in the form of a report, chart, or
  • 7:17 - 7:20
    graph. Right. So that's really what we're
  • 7:20 - 7:22
    going to be doing. And as I said, going
  • 7:22 - 7:24
    back to the scenario, we're going to be
  • 7:24 - 7:26
    focusing on how to, you know, essentially
  • 7:26 - 7:29
    get in or how to forward
  • 7:29 - 7:33
    the logs created--or the logs and alerts created--by
  • 7:33 - 7:36
    Snort into Splunk for analysis. And
  • 7:36 - 7:39
    luckily for us, Splunk has a Snort app or
  • 7:39 - 7:41
    plug-in, if you will, that will
  • 7:41 - 7:44
    essentially simplify this process.
  • 7:44 - 7:47
    So, let's get an idea as to, you know, how we
  • 7:47 - 7:49
    can use Splunk for security event
  • 7:49 - 7:52
    monitoring. So Splunk Enterprise Security,
  • 7:52 - 7:55
    also known as Splunk ES, is a security
  • 7:55 - 7:57
    information and event management
  • 7:57 - 7:59
    solution, also known as a SIEM.
  • 7:59 - 8:01
    It is used by security
  • 8:01 - 8:04
    teams to quickly detect and respond to
  • 8:04 - 8:06
    internal and external attacks or threats
  • 8:06 - 8:10
    or intrusions. So Splunk ES can be used
  • 8:10 - 8:12
    for security event monitoring, incident
  • 8:12 - 8:16
    response, and running a SOC or Security Operations Center.
  • 8:16 - 8:18
    In this video, we'll be using Splunk ES
  • 8:18 - 8:20
    to monitor and visualize the Snort
  • 8:20 - 8:22
    intrusion alerts. This will be
  • 8:22 - 8:24
    facilitated through the help of the Snort
  • 8:24 - 8:27
    app for Splunk and the Splunk Universal
  • 8:27 - 8:29
    Forwarder. Now, the Splunk Universal Forwarder
  • 8:29 - 8:31
    is pretty much the most important
  • 8:31 - 8:33
    element of what we'll be exploring
  • 8:33 - 8:35
    because what it does--and this is really
  • 8:35 - 8:37
    cool--is it automatically
  • 8:37 - 8:39
    forwards the latest logs,
  • 8:39 - 8:42
    even when Snort is running. It forwards those
  • 8:42 - 8:45
    alerts and logs into Splunk, and you can
  • 8:45 - 8:47
    see them in real time, which is
  • 8:47 - 8:49
    absolutely fantastic.
  • 8:49 - 8:52
    So as I said, if you're new to Splunk,
  • 8:52 - 8:55
    then these resources are really helpful
  • 8:55 - 8:57
    for you. Splunk offers really great
  • 8:57 - 8:59
    tutorials and courses designed for
  • 8:59 - 9:01
    absolute beginners. You can check that
  • 9:01 - 9:03
    out by clicking on the link within this
  • 9:03 - 9:06
    slide. And you can learn more about the
  • 9:06 - 9:08
    Splunk Enterprise Security edition from
  • 9:08 - 9:10
    that particular link.
  • 9:10 - 9:12
    Now, as I said, we are going to be deploying
  • 9:12 - 9:15
    Splunk on Linode, more specifically
  • 9:15 - 9:17
    Splunk ES. And this is the lab
  • 9:17 - 9:19
    environment. So we're going to spin up,
  • 9:19 - 9:22
    you know, Splunk ES on Linode. Now, again,
  • 9:22 - 9:23
    to follow through with this, you
  • 9:23 - 9:26
    know, Linode has been absolutely fantastic
  • 9:26 - 9:28
    with, you know, by providing all of
  • 9:28 - 9:31
    you guys with a way to get $100
  • 9:31 - 9:33
    in free Linode credit. All you
  • 9:33 - 9:35
    need to do is just click the link in the
  • 9:35 - 9:37
    description section and sign up, and
  • 9:37 - 9:39
    $100 will be added to your
  • 9:39 - 9:41
    account so that you can follow along
  • 9:41 - 9:43
    with this series. So we're going to
  • 9:43 - 9:45
    set up Splunk ES on Linode. And then
  • 9:45 - 9:47
    within my internal network, we're just
  • 9:47 - 9:49
    going to have a very basic infrastructure.
  • 9:49 - 9:50
    We're going to have the Ubuntu virtual
  • 9:50 - 9:53
    machine that is running Snort. This is the
  • 9:53 - 9:55
    same virtual machine that we had set up
  • 9:55 - 9:58
    and used to set up Snort and set up
  • 9:58 - 10:00
    Suricata and the one we had used with Wazuh.
  • 10:01 - 10:04
    And, yeah, that's essentially it. We're
  • 10:04 - 10:05
    going to have a very basic
  • 10:05 - 10:06
    infrastructure where we have an attacker
  • 10:06 - 10:10
    system that I'm going to be using to perform
  • 10:10 - 10:12
    a bit of network
  • 10:12 - 10:15
    intrusion detection emulation, whereby
  • 10:15 - 10:18
    I will essentially perform or run a
  • 10:18 - 10:21
    couple of commands or scripts to
  • 10:21 - 10:23
    essentially emulate malicious network
  • 10:23 - 10:26
    activity so that these logs are
  • 10:26 - 10:28
    essentially--so this traffic is
  • 10:28 - 10:30
    essentially logged--and that'll provide
  • 10:30 - 10:33
    us with a good idea as to how helpful
  • 10:33 - 10:35
    Splunk is for security event monitoring,
  • 10:35 - 10:39
    especially in the context of network intrusions.
  • 10:40 - 10:42
    So as I said, you don't really need to
  • 10:42 - 10:44
    have a Windows workstation. You simply
  • 10:44 - 10:46
    need to have the Ubuntu VM, and you can
  • 10:46 - 10:49
    pretty much run everything from it. And,
  • 10:49 - 10:51
    of course, you can set up the Splunk
  • 10:51 - 10:54
    Enterprise Security server on Linode
  • 10:54 - 10:56
    without any issues.
  • 10:56 - 10:58
    So that's the lab environment. We can now
  • 10:58 - 11:00
    get started with the practical
  • 11:00 - 11:01
    demonstration. So I'm going to switch
  • 11:01 - 11:05
    over to my Ubuntu virtual machine.
  • 11:05 - 11:08
    Alright. So I'm back on my Ubuntu
  • 11:08 - 11:09
    virtual machine, and you can see I have
  • 11:09 - 11:11
    Linode opened up here.
  • 11:11 - 11:13
    I haven't set anything up yet because
  • 11:13 - 11:15
    we're going to be walking through the
  • 11:15 - 11:16
    process together.
  • 11:16 - 11:19
    I then have the Splunk.com website here.
  • 11:19 - 11:21
    So if you're new to Splunk, then you need
  • 11:21 - 11:23
    to create a new account in order to
  • 11:23 - 11:26
    follow along. So just head over to
  • 11:26 - 11:27
    Splunk.com and, you know,
  • 11:27 - 11:30
    register for an account. It's free.
  • 11:30 - 11:31
    Once that is done,
  • 11:31 - 11:33
    you'll need to activate your account or
  • 11:33 - 11:35
    verify your account through
  • 11:35 - 11:37
    the verification email
  • 11:37 - 11:40
    they'll send you. Once that is done,
  • 11:40 - 11:41
    we can then move forward. Because in
  • 11:41 - 11:44
    order to access the actual
  • 11:44 - 11:47
    Splunk Universal Forwarder, you'll need to
  • 11:47 - 11:49
    have an account. And of course, you
  • 11:49 - 11:51
    know, in this case, I'll be going through
  • 11:51 - 11:53
    everything as we move along in a
  • 11:53 - 11:56
    structured manner. And
  • 11:56 - 11:59
    then to perform the actual NIDS tests,
  • 12:00 - 12:02
    we are going to be using the
  • 12:02 - 12:04
    testmyNIDS.org project,
  • 12:04 - 12:06
    which is on GitHub. So this is
  • 12:06 - 12:09
    essentially a bash script
  • 12:09 - 12:11
    that allows you to--as you can see here--
  • 12:11 - 12:13
    it allows you to essentially emulate or
  • 12:13 - 12:17
    simulate malicious network traffic. So,
  • 12:17 - 12:19
    previously, we had used
  • 12:19 - 12:21
    the website technique to essentially get
  • 12:21 - 12:24
    a Linux UID, and that traffic would be
  • 12:24 - 12:26
    logged as malicious, or
  • 12:26 - 12:28
    it could be logged as a potential
  • 12:28 - 12:30
    intrusion. And we can run a few other
  • 12:30 - 12:33
    checks like HTTP basic authentication,
  • 12:33 - 12:36
    bad certificate authorities,
  • 12:36 - 12:39
    an EXE or DLL download over HTTP. So,
  • 12:39 - 12:41
    you know, we can run tests that,
  • 12:41 - 12:43
    you know, will just make our
  • 12:43 - 12:45
    intrusion detection system blow up in
  • 12:45 - 12:48
    terms of alerts. And that's what we want
  • 12:48 - 12:50
    because we want to see how that data is
  • 12:50 - 12:52
    presented to us as a security engineer
  • 12:52 - 12:55
    on Splunk. With that being said, the first
  • 12:55 - 12:58
    step, of course, is to set up Splunk ES on Linode.
  • 12:58 - 13:04
    So just click on “Create a Linode” and click on “Marketplace.”
  • 13:04 - 13:06
    And they already have Splunk here. So
  • 13:06 - 13:08
    there we are. You can click on that there.
  • 13:08 - 13:10
    And if you click on this little info
  • 13:10 - 13:12
    button here, it'll give you an idea as to
  • 13:12 - 13:14
    how to deploy it on
  • 13:14 - 13:16
    Linode. And, of course, you have more
  • 13:16 - 13:18
    information regarding Splunk. So you have
  • 13:18 - 13:20
    the documentation link there. So I'll
  • 13:20 - 13:23
    just click on Splunk.
  • 13:23 - 13:25
    Once that is clicked, we can then head
  • 13:25 - 13:27
    over here. You'll need to specify the
  • 13:27 - 13:29
    Splunk admin user. I recommend using
  • 13:29 - 13:33
    “admin” to begin with and then specify a password.
  • 13:33 - 13:36
    If you're setting up, you know, Splunk on
  • 13:36 - 13:38
    a domain, then you can specify the
  • 13:38 - 13:40
    Linode API token to essentially create
  • 13:40 - 13:42
    the DNS records--that's if you're using
  • 13:42 - 13:44
    Linode's DNS service.
  • 13:46 - 13:48
    And then, of course, you need to add
  • 13:48 - 13:50
    the admin email for the server. So in
  • 13:50 - 13:52
    this case, I can just say, for example,
  • 13:52 - 13:55
    hackersploit@gmail.com.
  • 13:56 - 13:57
    Don't spam me on this email because I
  • 13:57 - 14:00
    don't respond anyway. So we can create
  • 14:00 - 14:01
    another user.
  • 14:01 - 14:02
    This is the username for the
  • 14:02 - 14:05
    Linode admin's SSH user. Please ensure
  • 14:05 - 14:06
    that the username does not contain any...
  • 14:06 - 14:09
    so we can just call this “admin.” And then
  • 14:09 - 14:11
    for the admin user, we'll just say
  • 14:11 - 14:13
    provide that there.
  • 14:13 - 14:15
    So the image--we're going to set it up on
  • 14:15 - 14:18
    Ubuntu 20.04. The region--I’ll say London
  • 14:18 - 14:20
    because that's closest to me.
  • 14:20 - 14:22
    As for the actual Linode plan,
  • 14:22 - 14:25
    Linode ES doesn't require that many
  • 14:25 - 14:26
    resources, especially because, you know,
  • 14:26 - 14:29
    the amount of data that we're processing
  • 14:29 - 14:31
    or the logs that are being forwarded to
  • 14:31 - 14:34
    Splunk are relatively few--so less than
  • 14:34 - 14:36
    100--which, if you've used Splunk before
  • 14:36 - 14:38
    for security event monitoring, you know
  • 14:38 - 14:39
    that that is
  • 14:39 - 14:41
    really, really small. In
  • 14:41 - 14:43
    fact, Splunk will actually tell you,
  • 14:43 - 14:45
    you know, that the amount of data
  • 14:45 - 14:48
    to begin with that you have imported or
  • 14:48 - 14:51
    forwarded is too little to make any sense of.
  • 14:51 - 14:52
    But that's where the Snort app for
  • 14:52 - 14:55
    Splunk comes into play. So I'll just say
  • 14:55 - 14:56
    “Splunk,”
  • 14:56 - 14:59
    and I'll provide my root password for the server.
  • 14:59 - 15:02
    And we can click on “Create.”
  • 15:02 - 15:03
    Alright. Now,
  • 15:03 - 15:06
    once this is set up and provisioned,
  • 15:06 - 15:08
    the actual installer is going to begin.
  • 15:08 - 15:10
    So it's going to set up because there is
  • 15:10 - 15:13
    an auto-installer setup that will set up Splunk.
  • 15:13 - 15:15
    Yes. For you. So, let it
  • 15:15 - 15:17
    provision. After that's done, you can
  • 15:17 - 15:19
    launch the Lish console to avoid logging
  • 15:19 - 15:22
    in via SSH. And of course, one thing that
  • 15:22 - 15:24
    I don't need to tell you
  • 15:24 - 15:26
    is, if you're setting this up for
  • 15:26 - 15:28
    production, then you need to make sure
  • 15:28 - 15:30
    you're securing your server. So do only
  • 15:30 - 15:33
    use SSH keys for authentication with the server.
  • 15:34 - 15:36
    If you're new to hardening and securing
  • 15:36 - 15:38
    a Linux server, you can check out the
  • 15:38 - 15:39
    previous series
  • 15:39 - 15:42
    that we did with Linux--the Linux Server
  • 15:42 - 15:45
    Security series. They'll give you,
  • 15:45 - 15:47
    you know, all the information you need to
  • 15:47 - 15:50
    secure a Linux server for production.
  • 15:50 - 15:51
    With that being said, I'm just going to
  • 15:51 - 15:53
    let it provision, after which we can
  • 15:53 - 15:55
    launch the Lish console to see what's
  • 15:55 - 15:57
    going on in the background. And we can
  • 15:57 - 15:59
    then get started, you know, officially
  • 15:59 - 16:02
    with how to set up Splunk. We then need
  • 16:02 - 16:05
    to set up the Universal Forwarder.
  • 16:05 - 16:08
    So, this is booting now.
  • 16:09 - 16:11
    Alright. So the server is booted, and
  • 16:11 - 16:13
    you can see I've just opened up the Lish
  • 16:13 - 16:14
    console here
  • 16:14 - 16:16
    to essentially view what's going on. As
  • 16:16 - 16:18
    you can see, it's begun setting up
  • 16:18 - 16:20
    Splunk ES. So just give this a couple of
  • 16:20 - 16:23
    minutes to essentially begin.
  • 16:23 - 16:26
    And once it's done, it'll actually
  • 16:26 - 16:27
    tell you that, and it'll provide you with the
  • 16:27 - 16:29
    login prompt.
  • 16:29 - 16:30
    But it's probably logged in as the root
  • 16:30 - 16:32
    user already. So
  • 16:32 - 16:34
    just let this complete. I'm just going to
  • 16:34 - 16:37
    wait for this to actually conclude.
  • 16:37 - 16:40
    Alright. So once Splunk ES is done,
  • 16:40 - 16:43
    or the actual Linode is done here
  • 16:43 - 16:44
    with the setup, you can see it's going to
  • 16:44 - 16:46
    tell you "installation complete,"
  • 16:46 - 16:48
    and you can then log in. Keep this
  • 16:48 - 16:50
    window open because this is going to be
  • 16:50 - 16:51
    very important, as we'll need to
  • 16:51 - 16:53
    configure a few firewall rules.
  • 16:53 - 16:56
    By default, this Linode comes with UFW,
  • 16:56 - 16:59
    which is the uncomplicated firewall for
  • 16:59 - 17:00
    Debian, or
  • 17:00 - 17:02
    it typically comes prepackaged with
  • 17:02 - 17:05
    Debian-based distributions like Ubuntu.
  • 17:05 - 17:07
    In this case, it's already added the
  • 17:07 - 17:08
    firewall rule for the port that we
  • 17:08 - 17:10
    wanted, but just keep it open because
  • 17:10 - 17:13
    we'll need to run a few checks. So you
  • 17:13 - 17:14
    can log in there. So I'm just going to
  • 17:14 - 17:16
    log in with the credentials that I
  • 17:16 - 17:19
    specified as the root user. And I can
  • 17:19 - 17:22
    just say sudo ufw status.
  • 17:24 - 17:25
    And you can see these are all the
  • 17:25 - 17:28
    allowed rules or the actual rules
  • 17:28 - 17:30
    configured for the firewall, which is
  • 17:30 - 17:32
    looking good so far.
  • 17:32 - 17:36
    So we can access the Splunk ES instance
  • 17:36 - 17:38
    that we set up by pasting in the IP of
  • 17:38 - 17:42
    the server and opening up port 8000.
  • 17:42 - 17:44
    That's going to open up Splunk ES for
  • 17:44 - 17:46
    you. So just give this a couple of
  • 17:46 - 17:48
    seconds. There we are. And the credentials
  • 17:48 - 17:51
    that we had used were "admin" and the
  • 17:51 - 17:53
    password that I created--that, you know,
  • 17:53 - 17:55
    of course, you'll be able to
  • 17:55 - 17:57
    specify yourself. So just sign in.
  • 17:57 - 18:00
    And once that is done, you'll be
  • 18:00 - 18:05
    brought to Splunk Enterprise Security here.
  • 18:05 - 18:05
    So there we are--explore
  • 18:05 - 18:07
    Splunk Enterprise.
  • 18:10 - 18:11
    And in this case, what we're going to be
  • 18:11 - 18:14
    doing--what we're going to start off with--
  • 18:14 - 18:16
    is we need to go through a few
  • 18:16 - 18:19
    configuration changes with Splunk itself.
  • 18:20 - 18:23
    So the idea, firstly, is to configure
  • 18:23 - 18:26
    the actual receiving of data.
  • 18:26 - 18:27
    So if you head over into "Settings,"
  • 18:27 - 18:29
    you can click on "Data," then just click
  • 18:29 - 18:32
    on "Forwarding and Receiving."
  • 18:32 - 18:34
    And once that is done--once that is
  • 18:34 - 18:36
    loaded up--
  • 18:36 - 18:38
    under "Receive Data," we need to
  • 18:38 - 18:40
    configure this instance to receive data
  • 18:40 - 18:42
    forwarded from other instances. So we
  • 18:42 - 18:44
    want to configure receiving,
  • 18:44 - 18:47
    and we just want to set the default receiving port.
  • 18:47 - 18:50
    So we can say "New Receiving Port,"
  • 18:50 - 18:52
    and the port is, of course, going to be
  • 18:52 - 18:55
    the default, which is 9997--which is why
  • 18:55 - 18:57
    that firewall rule was added. So I'll
  • 18:57 - 18:58
    click on Save.
  • 18:59 - 19:01
    Alright. So once that is done, we can
  • 19:01 - 19:04
    now install the Snort app
  • 19:04 - 19:06
    for Splunk. So click on "Apps" and head
  • 19:06 - 19:08
    over into "Find More Apps."
  • 19:08 - 19:11
    And because the Ubuntu server is running--
  • 19:11 - 19:13
    or the Ubuntu VM that I'm currently
  • 19:13 - 19:16
    working on is running--Snort 2, we'll need
  • 19:16 - 19:18
    the appropriate app here. So I'll just
  • 19:18 - 19:20
    search for "Snort" there. And we're not
  • 19:20 - 19:22
    looking for the Snort 3 JSON alerts,
  • 19:22 - 19:24
    although that, you know, could be quite
  • 19:24 - 19:26
    useful, but we want the Snort alert for
  • 19:26 - 19:29
    Splunk. Alright. So this app provides
  • 19:29 - 19:31
    field extraction. So that's really great
  • 19:31 - 19:32
    because performing your own field
  • 19:32 - 19:35
    extractions using regex
  • 19:35 - 19:36
    can be quite difficult if you're a
  • 19:36 - 19:39
    beginner. So fast and full,
  • 19:39 - 19:42
    as well as dashboards, saved searches,
  • 19:42 - 19:46
    reports, event types, tags, and event
  • 19:46 - 19:48
    search interfaces. So we'll install that.
  • 19:48 - 19:50
    Now you'll need to log in with
  • 19:50 - 19:52
    your Splunk account credentials that you,
  • 19:52 - 19:55
    you know, actually created on
  • 19:55 - 19:58
    splunk.com. So I'll just fill in my
  • 19:58 - 20:00
    information really quickly.
  • 20:00 - 20:02
    Alright. So I've put in my username and
  • 20:02 - 20:04
    password. So I'll just say I'll accept
  • 20:04 - 20:06
    the terms and conditions there. So log in
  • 20:06 - 20:08
    and install.
  • 20:08 - 20:09
    That's going to install it. There we are.
  • 20:09 - 20:11
    So we'll just hit "Done."
  • 20:11 - 20:13
    Now that that is done, if we head back over
  • 20:13 - 20:16
    into our dashboard--so I'll just click on
  • 20:16 - 20:18
    Splunk Enterprise there--
  • 20:18 - 20:21
    you can now see we have Snort
  • 20:21 - 20:23
    Alert for Splunk. So that already
  • 20:23 - 20:26
    comes preconfigured with a dashboard.
  • 20:26 - 20:29
    So we'll just let this load up here.
  • 20:29 - 20:30
    And you can see that we don't have
  • 20:30 - 20:32
    any data yet. So this will display
  • 20:32 - 20:35
    your events and sources, top source
  • 20:35 - 20:36
    countries, the events. This is very
  • 20:36 - 20:38
    important--these sources, top 10
  • 20:38 - 20:41
    classification. So that'll classify
  • 20:41 - 20:44
    your alerts in terms of the
  • 20:44 - 20:47
    type, which again will make sense in a
  • 20:47 - 20:49
    couple of seconds. So now that that is
  • 20:49 - 20:52
    done, we actually need to configure
  • 20:52 - 20:54
    the actual Splunk Universal Forwarder. So
  • 20:54 - 20:56
    I'll just open that up in a new tab. It's
  • 20:56 - 20:59
    absolutely free to download the Debian
  • 20:59 - 21:02
    client or the Splunk Universal
  • 21:02 - 21:04
    Forwarder Debian package. So Universal
  • 21:04 - 21:07
    Forwarders provide reliable, secure
  • 21:07 - 21:09
    data collection from remote
  • 21:09 - 21:12
    sources and forward that data into
  • 21:12 - 21:14
    Splunk software for indexing and
  • 21:14 - 21:17
    consolidation. They can scale to tens of
  • 21:17 - 21:19
    thousands of remote systems, collecting
  • 21:19 - 21:21
    terabytes of data. So
  • 21:21 - 21:23
    again, you can actually see why Splunk is
  • 21:23 - 21:25
    so powerful and why it's widely used
  • 21:25 - 21:27
    and deployed--because of the fact that
  • 21:27 - 21:30
    you can literally be...
  • 21:30 - 21:33
    literally forward a ton of data from a
  • 21:33 - 21:36
    ton of systems into Splunk. So because
  • 21:36 - 21:38
    Snort is running on this
  • 21:38 - 21:40
    Ubuntu VM, we need the Debian package. So
  • 21:40 - 21:42
    I'll click on Linux, and we want the
  • 21:42 - 21:45
    64-bit version. Again, you can choose one
  • 21:45 - 21:47
    based on your requirements. So if you're
  • 21:47 - 21:50
    running on Red Hat, Fedora, or CentOS, you
  • 21:50 - 21:52
    can use the RPM package. So I'll just
  • 21:52 - 21:55
    download the Debian package here.
  • 21:55 - 21:56
    Give that a couple of seconds. It's then
  • 21:56 - 21:58
    going to begin downloading it, and then
  • 21:58 - 22:00
    I'll walk you through the setup process.
  • 22:00 - 22:02
    So there we are.
  • 22:02 - 22:04
    It's begun the setup.
  • 22:07 - 22:09
    And once that is done, I'll open up my
  • 22:09 - 22:11
    terminal. So that's saved in the
  • 22:11 - 22:13
    Downloads directory. So
  • 22:13 - 22:14
    if we check--if we head over into the
  • 22:14 - 22:16
    Downloads directory--you can see we have
  • 22:16 - 22:18
    the Splunk Forwarder Debian package there.
  • 22:19 - 22:22
    So what we want to do, firstly, is we want
  • 22:22 - 22:26
    to move this package into the actual /opt
  • 22:26 - 22:28
    directory on Linux, which will
  • 22:28 - 22:31
    essentially allow us to, you know,
  • 22:31 - 22:33
    to set it up as optional software. And
  • 22:33 - 22:35
    it's really good to have all that
  • 22:35 - 22:38
    optional software stored in the
  • 22:38 - 22:42
    directory. So, once that is done and
  • 22:42 - 22:44
    once that's downloaded, we can say,
  • 22:44 - 22:46
    move
  • 22:46 - 22:48
    Splunk forward into opt,
  • 22:48 - 22:50
    and we'll need sudo privileges. So I'll
  • 22:50 - 22:53
    say sudo move. There we are. And I'll just
  • 22:53 - 22:55
    type in my password. Fantastic. So
  • 22:55 - 22:57
    now navigate to the opt directory. And to
  • 22:57 - 23:00
    install this, we can say sudo apt,
  • 23:00 - 23:03
    and then we can specify install. So we
  • 23:03 - 23:05
    can say sudo apt install,
  • 23:05 - 23:07
    and then we specify the package itself.
  • 23:07 - 23:09
    So Splunk forwarder,
  • 23:09 - 23:11
    and we're just going to hit enter. That's
  • 23:11 - 23:14
    going to install it for you.
  • 23:14 - 23:17
    Give that a couple of seconds.
  • 23:19 - 23:22
    Alright. So once that is installed, if
  • 23:22 - 23:23
    you list out the contents of this
  • 23:23 - 23:25
    directory, you're gonna have a Splunk
  • 23:25 - 23:27
    forwarder directory here. So I'll say cd
  • 23:27 - 23:29
    splunkforwarder. And under the binary
  • 23:29 - 23:31
    directory, we can navigate to that here.
  • 23:31 - 23:33
    We'll need to start--
  • 23:33 - 23:36
    we'll need to start Splunk. So we will
  • 23:36 - 23:37
    say sudo,
  • 23:37 - 23:39
    and the binary we want to run is called
  • 23:39 - 23:41
    splunk, and we'll accept the license.
  • 23:41 - 23:43
    The reason we're doing this is because
  • 23:43 - 23:45
    we need to configure it. So we need to
  • 23:45 - 23:47
    specify the username and password, or, you
  • 23:47 - 23:49
    know, create a username and password.
  • 23:49 - 23:52
    And once that is done, you'll actually
  • 23:52 - 23:53
    see what that looks like. So I'll just
  • 23:53 - 23:56
    say accept the license.
  • 23:56 - 23:59
    And, you can see in this case, let's see if I
  • 23:59 - 24:01
    typed that incorrectly. That should
  • 24:01 - 24:04
    actually start. So splunk start. I did not
  • 24:04 - 24:05
    specify start there.
  • 24:05 - 24:07
    There we are. So please enter an
  • 24:07 - 24:10
    administrator name. I'll just say admin.
  • 24:10 - 24:12
    So again, Splunk software must create an
  • 24:12 - 24:14
    administrator account during startup.
  • 24:14 - 24:17
    Otherwise, you cannot log in. So create
  • 24:17 - 24:19
    credentials for the administrator account.
  • 24:21 - 24:22
    So in this case, you can
  • 24:22 - 24:24
    create whatever you want. I'm just going
  • 24:24 - 24:26
    to fill in my credentials here.
  • 24:26 - 24:29
    Alright, so I've just entered my
  • 24:29 - 24:30
    administrator username and then, of
  • 24:30 - 24:32
    course, my password. So
  • 24:32 - 24:34
    that is done.
  • 24:34 - 24:36
    So it'll go through--
  • 24:36 - 24:38
    it'll essentially go through and check
  • 24:38 - 24:40
    the prerequisites. New certs have been
  • 24:40 - 24:43
    generated in the following directory,
  • 24:43 - 24:45
    and all the preliminary checks have
  • 24:45 - 24:48
    passed. So starting the Splunk server
  • 24:48 - 24:49
    daemon--so that started. You can also
  • 24:49 - 24:52
    enable it to run on system startup. So if
  • 24:52 - 24:56
    I say, you know, for example, sudo systemctl
  • 24:57 - 24:59
    status splunk,
  • 25:00 - 25:02
    let me type that correctly here. So
  • 25:02 - 25:03
    splunk--
  • 25:03 - 25:08
    sorry, systemctl,
  • 25:08 - 25:10
    and we can say splunkd.
  • 25:10 - 25:13
    Sorry. So we can say splunk. I'm not
  • 25:13 - 25:15
    really sure why that's not loading here.
  • 25:15 - 25:18
    But I do know that the daemon is running,
  • 25:18 - 25:24
    and there should be an init daemon for that.
  • 25:24 - 25:25
    But in any case,
  • 25:25 - 25:27
    you can always start it that way.
  • 25:27 - 25:30
    Once that is done, we will need to add
  • 25:30 - 25:32
    our forward server. So we need to add
  • 25:32 - 25:35
    the address of the server--the
  • 25:35 - 25:37
    Splunk server that we're forwarding our
  • 25:37 - 25:40
    logs to. We'll move on to what
  • 25:40 - 25:42
    logs we want to forward in a second. But
  • 25:42 - 25:44
    let's do that first. So again, we're going
  • 25:44 - 25:46
    to use the
  • 25:48 - 25:51
    Splunk binary, and we're going to say forward-server.
  • 25:51 - 25:53
    And we'll just copy the IP
  • 25:53 - 25:56
    address of your Splunk server here.
  • 25:56 - 26:00
    So there we are. And I'll paste that in there.
  • 26:01 - 26:03
    And then you need to type in the port--so
  • 26:03 - 26:08
    9997, that's the port to connect to. Hit enter.
  • 26:08 - 26:11
    So splunk forward--
  • 26:11 - 26:13
    yeah, we need to add it. I keep forgetting
  • 26:13 - 26:17
    the preliminary command. So add forward-server,
  • 26:17 - 26:18
    Splunk username.
  • 26:18 - 26:22
    So in this case, let me just put
  • 26:22 - 26:26
    in my credentials here.
  • 26:27 - 26:29
    Alright. And it's going to then add the
  • 26:29 - 26:32
    forwarding to that particular address.
  • 26:32 - 26:34
    Alright. Now that that is done,
  • 26:34 - 26:35
    we actually need to
  • 26:35 - 26:38
    configure a particular file,
  • 26:38 - 26:41
    and that is going to be the outputs.conf
  • 26:41 - 26:43
    directory. If it's already set up for us,
  • 26:43 - 26:45
    which it should be,
  • 26:45 - 26:47
    then we do not need to go through the
  • 26:47 - 26:49
    initial setup. So,
  • 26:49 - 26:51
    if we head over into the following
  • 26:51 - 26:53
    directory--so I'll just take a step back--
  • 26:53 - 26:55
    we're still in the Splunk forwarder directory.
  • 26:55 - 27:00
    We'll head over into the etc directory.
  • 27:00 - 27:02
    And under system,
  • 27:02 - 27:05
    we have a file under local, I think. It is
  • 27:05 - 27:07
    called outputs here. Right? So I'm going to say
  • 27:07 - 27:10
    sudo vim outputs.conf.
  • 27:10 - 27:12
    And really, the only thing that is
  • 27:12 - 27:14
    required here is,
  • 27:14 - 27:16
    of course, just leave the default
  • 27:16 - 27:18
    configuration as is. The default group is
  • 27:18 - 27:22
    fine. So tcpout:default-autolb-group,
  • 27:22 - 27:23
    that's fine. So make sure that the
  • 27:23 - 27:26
    server option here is configured--that's
  • 27:26 - 27:29
    the most important. And the tcpout-server
  • 27:29 - 27:30
    address is also configured in
  • 27:30 - 27:32
    this format. So we don't need to make any
  • 27:32 - 27:35
    changes there. So I'll just say quit and exit.
  • 27:35 - 27:39
    Once that is done, we also need to check
  • 27:39 - 27:41
    the actual inputs configuration file.
  • 27:41 - 27:43
    But before we do that,
  • 27:43 - 27:45
    let's take a look. So if you revisit the
  • 27:45 - 27:47
    Snort video,
  • 27:47 - 27:49
    you know that all the logs are stored
  • 27:49 - 27:53
    under /var/log/snort.
  • 27:53 - 27:56
    Right? So we have the alert log,
  • 27:56 - 27:59
    and we also have--so again, based on
  • 27:59 - 28:02
    the type of alerts
  • 28:02 - 28:03
    you want generated--so, you know,
  • 28:03 - 28:05
    if I say man snort here,
  • 28:05 - 28:08
    you can see that we have the alert mode.
  • 28:08 - 28:09
    So you can use the fast mode or the
  • 28:09 - 28:11
    full mode. In this case, I'll be using the
  • 28:11 - 28:13
    fast mode,
  • 28:14 - 28:15
    and I'll give you a description of what's
  • 28:15 - 28:17
    going on here. Right? So
  • 28:17 - 28:20
    full writes the alert to the alert
  • 28:20 - 28:22
    file with the full decoded header as
  • 28:22 - 28:25
    well as the alert message, which might be
  • 28:25 - 28:27
    important. So we can also do that as well.
  • 28:27 - 28:30
    So this was from the previous--from
  • 28:30 - 28:32
    the Snort video where we
  • 28:32 - 28:33
    had run...
  • 28:33 - 28:36
    essentially run Snort and, you know,
  • 28:36 - 28:38
    where we were identifying various alerts.
  • 28:38 - 28:42
    So, what we can do is, again, we'll
  • 28:42 - 28:44
    go through what needs to be created, but
  • 28:44 - 28:46
    we can run a quick test command just to
  • 28:46 - 28:47
    see whether
  • 28:47 - 28:49
    the actual alerts are being logged
  • 28:49 - 28:50
    within the alert file, because we have
  • 28:50 - 28:53
    alert.1. Ideally, we would only want
  • 28:53 - 28:56
    to forward this file into Splunk.
  • 28:56 - 28:58
    So, in order to do this, what I'm going
  • 28:58 - 29:00
    to do now is I'm just gonna run Snort
  • 29:00 - 29:04
    really quickly. So I'm going to say sudo snort -q,
  • 29:04 - 29:06
    for quiet, and then
  • 29:06 - 29:10
    the actual directory for the logs is /var/log/snort.
  • 29:11 - 29:15
    And then we can say the interface is enp0s3.
  • 29:15 - 29:16
    Again, make sure to replace that with
  • 29:16 - 29:19
    your own interface. The alert, we can
  • 29:19 - 29:20
    say full,
  • 29:20 - 29:26
    and the configuration is /etc/snort/snort.conf.
  • 29:26 - 29:28
    I believe we had another configuration
  • 29:28 - 29:31
    file. Yeah. We had used the snort.conf file.
  • 29:31 - 29:32
    So I'll hit enter.
  • 29:32 - 29:36
    And now let me open up my file explorer here.
  • 29:36 - 29:39
    We take a look at the var directory
  • 29:39 - 29:42
    under log. And under snort,
  • 29:42 - 29:45
    we have alert. There we are. So,
  • 29:45 - 29:48
    that has been modified. The last was
  • 29:48 - 29:50
    modified
  • 29:51 - 29:54
    right over there. Okay. So that's 19. Yeah.
  • 29:54 - 29:56
    So this is the last modified. So I know
  • 29:56 - 29:58
    this file is not human-readable. We
  • 29:58 - 30:01
    are not going to be forwarding this .log file.
  • 30:01 - 30:03
    So I'll just close that there.
  • 30:03 - 30:07
    So I'm just going to try and perform a few
  • 30:07 - 30:10
    checks on the network, like a few pings,
  • 30:10 - 30:12
    just to see if that's detected.
  • 30:12 - 30:16
    So I'll just, you know, perform a ping really quickly.
  • 30:16 - 30:18
    Again, the alerts will not be logged on
  • 30:18 - 30:19
    our terminal because they're being
  • 30:19 - 30:21
    logged, you know, into the respective
  • 30:21 - 30:24
    alert file or the alert log file. So I'll
  • 30:24 - 30:26
    just perform, you know, a few pings, as
  • 30:26 - 30:28
    I was saying, which I'm doing right now
  • 30:28 - 30:30
    on the attacker system.
  • 30:30 - 30:32
    Once that is done, let's see whether
  • 30:32 - 30:34
    those changes are being highlighted in
  • 30:34 - 30:38
    alert. Indeed, they are. Okay. So now,
  • 30:40 - 30:42
    as you can see here,
  • 30:42 - 30:45
    this is the full--
  • 30:45 - 30:48
    these are... So to begin with, we had used
  • 30:48 - 30:53
    the fast alert output mode.
  • 30:54 - 30:56
    And right over here, we then have the
  • 30:56 - 31:00
    full alert mode, which I'm not really sure how
  • 31:00 - 31:02
    we want to
  • 31:02 - 31:05
    go about doing this. But you can see,
  • 31:05 - 31:07
    we can actually make a few changes.
  • 31:07 - 31:11
    What we can do is we can get rid of this traffic here.
  • 31:11 - 31:14
    But you can see the message is actually
  • 31:14 - 31:15
    being logged. So
  • 31:15 - 31:18
    we can get rid of this here
  • 31:18 - 31:26
    because we don't want to mix fast alerts
  • 31:26 - 31:32
    with the full mode. So we can just get rid of that
  • 31:32 - 31:34
    there and save that.
  • 31:34 - 31:38
    Once that is done, I'll just say--
  • 31:38 - 31:41
    we actually need permissions to modify that file.
  • 31:42 - 31:46
    But, you know, what we can do is--what I am
  • 31:46 - 31:47
    going to do actually is close without
  • 31:47 - 31:50
    saving. I'm just going to stop Snort there.
  • 31:50 - 31:52
    And I'm just going to say
  • 31:52 - 31:58
    sudo rm /var/log/snort.
  • 31:58 - 32:01
    And we're going to remove alert.
  • 32:01 - 32:04
    Alright. And we're also going to remove alert.1.
  • 32:04 - 32:05
    Alright. So I'm just going to run this
  • 32:05 - 32:08
    again, just to see that the file is generated.
  • 32:08 - 32:11
    So there we are. We have alert there.
  • 32:11 - 32:13
    So now it's much cleaner. I'll just
  • 32:13 - 32:14
    run a few pings, just to make sure that
  • 32:14 - 32:16
    the traffic is being logged--all those
  • 32:16 - 32:18
    alerts are being logged.
  • 32:18 - 32:22
    So there we are. We have a few pings there.
  • 32:22 - 32:25
    And we can also, you know, just run a few
  • 32:25 - 32:27
    checks there. Okay. So there we are. We can
  • 32:27 - 32:29
    see that those are now being logged. And
  • 32:29 - 32:32
    of course, we can change the format based on--
  • 32:32 - 32:34
    well, you can change it based on your
  • 32:34 - 32:35
    requirements. Right?
  • 32:35 - 32:36
    So
  • 32:38 - 32:40
    now that that is done,
  • 32:40 - 32:42
    what we can do is we can close that up,
  • 32:42 - 32:46
    and we can actually leave Snort running as is.
  • 32:46 - 32:49
    So what I'll do is I'm just going to
  • 32:49 - 32:51
    open up another tab.
  • 32:51 - 32:54
    So just, you know--I can say Ctrl+Shift+T.
  • 32:54 - 32:57
    There we are. And we're currently within the following
  • 32:57 - 33:02
    directory: /opt/splunkforwarder/etc/system/local.
  • 33:02 - 33:03
    So,
  • 33:03 - 33:06
    once that is done, we now need to add
  • 33:06 - 33:09
    the files that we would like to monitor
  • 33:09 - 33:12
    or that we would like to forward. Right?
  • 33:12 - 33:15
    So, the log files. I'll go back into the bin directory.
  • 33:15 - 33:18
    So there we are--cd bin--because that's
  • 33:18 - 33:19
    where we have the Splunk binary. So I'll
  • 33:19 - 33:23
    say sudo splunk.
  • 33:24 - 33:27
    And we can say add monitor.
  • 33:28 - 33:31
    And the file that we want to forward is
  • 33:31 - 33:34
    under /var/log/snort, and it is just alert.
  • 33:34 - 33:37
    Right? So that's all. That's really all
  • 33:37 - 33:39
    that we want to do. Right?
  • 33:39 - 33:42
    And we can also utilize the fast alerts,
  • 33:42 - 33:44
    but let's just do this for now.
  • 33:44 - 33:46
    We only want the alerts--we don't
  • 33:46 - 33:48
    want the actual log files that contain
  • 33:48 - 33:54
    the packets themselves. So I'll hit Enter.
  • 33:54 - 33:56
    Alright. So it's now going to forward
  • 33:56 - 33:59
    those alerts into Splunk, which pretty
  • 33:59 - 34:02
    much means that on our end, we are done.
  • 34:02 - 34:04
    However, we still need to check one more
  • 34:04 - 34:06
    configuration file. So I'll just take a
  • 34:06 - 34:08
    step back here, and we'll head over into
  • 34:08 - 34:12
    the /etc directory under apps/search,
  • 34:13 - 34:16
    and then into local.
  • 34:16 - 34:17
    I think we'll need root
  • 34:17 - 34:18
    permissions to access this. So I'll just
  • 34:18 - 34:20
    switch to the root user and head over
  • 34:20 - 34:22
    into local.
  • 34:22 - 34:27
    And we're looking for the inputs.conf file. Right?
  • 34:27 - 34:28
    We need to actually
  • 34:28 - 34:30
    configure this because this is very
  • 34:30 - 34:31
    important.
  • 34:31 - 34:36
    The first thing we want to do is--let us
  • 34:36 - 34:39
    add a new line here. And within the
  • 34:39 - 34:44
    square brackets, I'll just say [splunk-tcp].
  • 34:44 - 34:46
    And we then want to specify the port--so
  • 34:46 - 34:48
    9997.
  • 34:48 - 34:52
    Let me make sure I type that in correctly.
  • 34:52 - 34:55
    We then need to actually put in the connection.
  • 34:57 - 35:02
    So the connection_host
  • 35:02 - 35:03
    is going to be equal to the IP
  • 35:03 - 35:06
    address of the Splunk server.
  • 35:07 - 35:10
    So I'll just copy that there and paste that in there.
  • 35:11 - 35:14
    Once that is done,
  • 35:14 - 35:17
    this is fine here--disabled is set to false.
  • 35:17 - 35:20
    We want index to be equal to main.
  • 35:20 - 35:24
    And then the sourcetype
  • 35:24 - 35:28
    is going to be equal to snort_alert_full.
  • 35:29 - 35:31
    And we can then say the source is equal
  • 35:31 - 35:33
    to snort. Alright? So this is a very
  • 35:33 - 35:35
    important configuration. Let me just
  • 35:35 - 35:37
    go through those options or
  • 35:37 - 35:40
    configurations again. We have the splunk-tcp option.
  • 35:40 - 35:44
    We then have the actual connection_host.
  • 35:44 - 35:47
    The monitor is set correctly to that file.
  • 35:47 - 35:52
    It's enabled, index=main, sourcetype=snort_alert_full, source=snort.
  • 35:52 - 35:53
    Fantastic.
  • 35:53 - 35:55
    So we'll write and quit.
  • 35:55 - 35:57
    Once this is done,
  • 35:57 - 35:59
    we'll need to restart Splunk. So I'll
  • 35:59 - 36:01
    switch back to my user, Lexus, here, and
  • 36:01 - 36:05
    we'll navigate back to the bin directory.
  • 36:05 - 36:06
    So I'll say cd bin,
  • 36:06 - 36:16
    and we'll say sudo splunk restart. Alright, hit Enter.
  • 36:16 - 36:18
    It's going to stop the Splunk daemon,
  • 36:18 - 36:20
    shut it down,
  • 36:20 - 36:22
    restart it--and it's done successfully. So
  • 36:22 - 36:25
    all the checks were completed without
  • 36:25 - 36:27
    any issue. Alright, so
  • 36:27 - 36:29
    now that this is done, we can actually go
  • 36:29 - 36:31
    back into Splunk here, and we'll navigate
  • 36:31 - 36:33
    to the dashboard.
  • 36:33 - 36:36
    This is your Splunk server. Right?
  • 36:36 - 36:37
    And let's take a look at the messages
  • 36:37 - 36:40
    here. That's just a few updates--we
  • 36:40 - 36:42
    don't need to do anything there. So if we
  • 36:42 - 36:43
    click on
  • 36:43 - 36:46
    Search & Reporting, just to verify that
  • 36:46 - 36:48
    data has indeed been forwarded, I'll
  • 36:48 - 36:49
    just skip through this. If we click on
  • 36:49 - 36:51
    Data Summary,
  • 36:51 - 36:53
    under Sources, you should see that we
  • 36:53 - 36:56
    have the host. And in my case, the name of
  • 36:56 - 36:59
    the system is blackbox, so that should
  • 36:59 - 37:02
    be reflected there. So there we are--blackbox.
  • 37:02 - 37:03
    We have 42
  • 37:03 - 37:07
    logs or alerts, if you will. Sources: 42. We
  • 37:07 - 37:09
    can click on that there to just see the
  • 37:09 - 37:11
    data that has been logged. Indeed, we can
  • 37:11 - 37:13
    see that has been done correctly. So
  • 37:13 - 37:15
    sourcetype is alert.
  • 37:15 - 37:17
    We can see that it's imported, you
  • 37:17 - 37:19
    know, pretty much all the data--or, you
  • 37:19 - 37:21
    know, these are the... this is the full log
  • 37:21 - 37:24
    whereby we have the reference to that there.
  • 37:25 - 37:27
    That's weird--I didn’t actually run
  • 37:27 - 37:30
    anything weird, but there you go.
  • 37:30 - 37:33
    So now that this is done, you can
  • 37:33 - 37:35
    use Splunk to essentially visualize this
  • 37:35 - 37:37
    data however you want. So, you
  • 37:37 - 37:39
    know, I can go into Visualization,
  • 37:39 - 37:42
    and we can click on--maybe we can
  • 37:42 - 37:45
    create a...
  • 37:45 - 37:47
    we can select a few fields. So if I go
  • 37:47 - 37:50
    back into the Events here, I can select a
  • 37:50 - 37:52
    few fields that I want displayed here,
  • 37:52 - 37:54
    and I can, you know, essentially extract
  • 37:54 - 37:57
    the fields that I want with regex.
  • 37:57 - 38:00
    But I don't think this is necessary at this
  • 38:00 - 38:02
    point, because if we actually go back to
  • 38:02 - 38:04
    the dashboard
  • 38:04 - 38:06
    and we click on--
  • 38:06 - 38:10
    let's see--Snort Alerts for Splunk,
  • 38:10 - 38:11
    let's see if this is actually whether
  • 38:11 - 38:15
    this automates that process for us.
  • 38:15 - 38:17
    There we are. Actually, it looks like
  • 38:17 - 38:22
    it does. So, classification: bad-traffic.
  • 38:22 - 38:24
    So it looks like that is working.
  • 38:24 - 38:26
    What we can do now
  • 38:26 - 38:29
    is run a few--
  • 38:29 - 38:32
    we can actually utilize this script here,
  • 38:34 - 38:37
    the TestMyNIDS script here. So all
  • 38:37 - 38:39
    you need to do to run it is just copy
  • 38:39 - 38:42
    this one-liner script here--or this
  • 38:42 - 38:43
    command--that will download it into your
  • 38:43 - 38:46
    /tmp directory and will then execute it.
  • 38:46 - 38:49
    So, you know, to execute it within your
  • 38:49 - 38:52
    temp directory, you can just execute
  • 38:52 - 38:53
    the actual,
  • 38:54 - 38:56
    you know, the actual binary there. It is a
  • 38:56 - 38:59
    binary, not a script.
  • 38:59 - 39:01
    And once that is done, you can then
  • 39:01 - 39:04
    select the option here. So let me just do
  • 39:04 - 39:06
    that on my attacker system.
  • 39:06 - 39:09
    I'm just going to run it one more time. So
  • 39:09 - 39:14
    I'm just going to say ls here. And
  • 39:16 - 39:19
    if I open up the documentation--so
  • 39:19 - 39:23
    firstly, I will run
  • 39:23 - 39:27
    a quick Linux UID check. So
  • 39:27 - 39:28
    I'll just hit Enter.
  • 39:29 - 39:31
    Okay. That is done. I'll then perform an
  • 39:31 - 39:35
    HTTP basic authentication
  • 39:35 - 39:38
    and a malware user-agent. So I'm doing
  • 39:38 - 39:41
    that right now.
  • 39:41 - 39:46
    Okay. And we can run one more here. So,
  • 39:46 - 39:49
    let's see. Let's see. Let's see. We
  • 39:49 - 39:52
    can try EXE or DLL download over HTTP.
  • 39:52 - 39:56
    That is surely going to be logged,
  • 39:57 - 40:00
    or that's going to trigger an alert.
  • 40:00 - 40:01
    So,
  • 40:01 - 40:03
    do we have--that is running.
  • 40:03 - 40:05
    Alright. So Snort is running. That's great.
  • 40:05 - 40:08
    So we know that the log is being--
  • 40:08 - 40:10
    the actual alerts are being forwarded.
  • 40:10 - 40:13
    Absolutely fantastic. So let's go back in
  • 40:13 - 40:15
    here. I've already run those
  • 40:15 - 40:17
    particular checks.
  • 40:18 - 40:20
    So let me just refresh this. I know it
  • 40:20 - 40:22
    usually takes a couple of seconds to a
  • 40:22 - 40:24
    couple of minutes, but that data should
  • 40:24 - 40:26
    start--should actually be reflected. There
  • 40:26 - 40:28
    we are. Fantastic. So
  • 40:28 - 40:31
    we can see that--firstly,
  • 40:31 - 40:33
    I'll just explain the dashboard here
  • 40:33 - 40:34
    because
  • 40:34 - 40:36
    this dashboard is automatically, you
  • 40:36 - 40:38
    know, set up for you by the Snort app,
  • 40:38 - 40:40
    which is really awesome. As I said, you
  • 40:40 - 40:42
    don't need to go through that process yourself.
  • 40:43 - 40:45
    So the first graph here essentially
  • 40:45 - 40:46
    tells you your events,
  • 40:46 - 40:49
    and it also displays the, you know,
  • 40:49 - 40:50
    the total number of sources. So you can
  • 40:50 - 40:53
    see that there. You also have the time.
  • 40:53 - 40:54
    So you have your events and
  • 40:54 - 40:56
    then the timeline here. And you can
  • 40:56 - 40:59
    essentially, you know, view a trend--or the
  • 40:59 - 41:02
    trend--of events there. You then
  • 41:02 - 41:05
    have the top source countries
  • 41:05 - 41:07
    right over here. And if I just run
  • 41:07 - 41:09
    another check really quickly here
  • 41:09 - 41:11
    through the NIDS website--
  • 41:11 - 41:15
    so let me just run the curl command--
  • 41:15 - 41:17
    you should actually see that because
  • 41:17 - 41:19
    we are reaching out to, you know, there's a
  • 41:19 - 41:21
    connection made to an external server,
  • 41:21 - 41:24
    that it should reflect that info under
  • 41:24 - 41:27
    the top countries--the top source countries.
  • 41:27 - 41:29
    So we then have the events here, which,
  • 41:29 - 41:31
    you know, you can click on. And then,
  • 41:31 - 41:33
    of course, you have the sources.
  • 41:33 - 41:36
    So these are the Snort event types,
  • 41:36 - 41:38
    and these are actually the
  • 41:38 - 41:40
    classifications. So we can see potentially
  • 41:40 - 41:43
    bad traffic, attempted information leak,
  • 41:43 - 41:45
    and, you know, you can just refresh your
  • 41:45 - 41:47
    dashboard to get the latest.
  • 41:47 - 41:49
    So we'll give that a couple of seconds.
  • 41:49 - 41:53
    And you can also specify the actual interval period.
  • 41:54 - 41:56
    So I'll just wait for this. Let's
  • 41:56 - 41:59
    see if it's actually being logged or
  • 41:59 - 42:00
    whether we can see all of that. So I'll
  • 42:00 - 42:04
    just go back into the dashboard here,
  • 42:04 - 42:07
    and we'll go into Search and Reporting.
  • 42:07 - 42:10
    And we click on the actual
  • 42:10 - 42:13
    Data Summary and the Sources. We can
  • 42:13 - 42:16
    see we have Snort there, and then /var/snort/alert.
  • 42:16 - 42:20
    So we click on Snort there. Okay.
  • 42:20 - 42:22
    So this is bad traffic. That's
  • 42:22 - 42:25
    really weird because
  • 42:26 - 42:28
    the source is Snort. We had added two
  • 42:28 - 42:30
    sources there.
  • 42:30 - 42:33
    So Data Summary--
  • 42:33 - 42:35
    let me just click on that there. And if
  • 42:35 - 42:37
    we click on the sources there, this is
  • 42:37 - 42:41
    the one that we want, ideally.
  • 42:43 - 42:47
    Yeah. So that looks like the correct one there.
  • 42:50 - 42:52
    Yeah. That's the correct traffic. I
  • 42:52 - 42:55
    think that's why the actual--let me
  • 42:55 - 42:57
    see if I can find it. So Snort Alerts for
  • 42:57 - 43:01
    Splunk--let me click on the app there.
  • 43:02 - 43:04
    Show Filters. It should be displaying
  • 43:04 - 43:06
    much more than that because I know--yeah,
  • 43:06 - 43:08
    there are not just four.
  • 43:08 - 43:10
    So
  • 43:10 - 43:13
    if we actually head over into the
  • 43:13 - 43:17
    Snort Event Search here,
  • 43:18 - 43:21
    we can actually search for--you know,
  • 43:21 - 43:25
    we can utilize--yeah. So these are only--
  • 43:25 - 43:28
    this is only monitoring the pings. So
  • 43:28 - 43:30
    that's weird. I'm not really sure why we
  • 43:30 - 43:32
    have two data sources. I think it's to do
  • 43:32 - 43:34
    with the fact
  • 43:34 - 43:37
    that, you know, we had--so let me
  • 43:37 - 43:40
    just go back here.
  • 43:40 - 43:43
    Apps > Search, and sudo root.
  • 43:43 - 43:47
    Let me just check that here. So cd local,
  • 43:47 - 43:48
    vim
  • 43:48 - 43:51
    inputs.conf. So there we are. So the
  • 43:51 - 43:52
    source is Snort.
  • 43:53 - 43:56
    We already specified the source as Snort
  • 43:56 - 43:58
    there,
  • 43:58 - 44:00
    but it's also adding
  • 44:00 - 44:02
    this particular, you know, the alert,
  • 44:02 - 44:04
    as a source as well.
  • 44:04 - 44:08
    And then the source type is snort_alert_full, index main.
  • 44:08 - 44:09
    Yeah. That
  • 44:09 - 44:11
    should be working. That should be working
  • 44:11 - 44:12
    without any issues. I'm not really sure
  • 44:12 - 44:14
    why that is the case, but
  • 44:14 - 44:16
    we can actually customize what dataset
  • 44:16 - 44:18
    we want to use.
  • 44:18 - 44:19
    So
  • 44:19 - 44:22
    I think--let me actually showcase how to
  • 44:22 - 44:23
    do that right now.
  • 44:23 - 44:26
    So apologies about that. I actually
  • 44:26 - 44:28
    figured out what the issue was. It was
  • 44:28 - 44:30
    because the system I was running
  • 44:30 - 44:32
    these particular
  • 44:32 - 44:35
    attacks from wasn't even connected to
  • 44:35 - 44:37
    the local network.
  • 44:37 - 44:39
    And even though I was running
  • 44:39 - 44:41
    these attacks, I did realize that, of
  • 44:41 - 44:45
    course, they weren't working. So I've just reconnected it.
  • 44:45 - 44:47
    And what I'm going to do is I'm just going to
  • 44:47 - 44:50
    run this one more time.
  • 44:50 - 44:53
    So just give me a second here, and I'll
  • 44:53 - 44:56
    be able to do that one more time. So
  • 44:56 - 44:59
    let me just navigate to that particular
  • 44:59 - 45:00
    directory,
  • 45:00 - 45:03
    and we'll actually see whether this will work.
  • 45:03 - 45:04
    So
  • 45:04 - 45:06
    you can actually see there's much more
  • 45:06 - 45:08
    that has been captured in regards to
  • 45:08 - 45:10
    events, and I'll be explaining this
  • 45:10 - 45:12
    dashboard in a couple of seconds.
  • 45:12 - 45:15
    So let me just
  • 45:15 - 45:17
    launch that first attack there--so that
  • 45:17 - 45:19
    you know--let me just launch that first
  • 45:19 - 45:22
    type of check. And of course, I'm using
  • 45:22 - 45:26
    TestMyNIDS here. So, unfortunately,
  • 45:26 - 45:28
    that wasn't even being logged, which is
  • 45:28 - 45:30
    why I was a bit confused as to why those
  • 45:30 - 45:33
    logs are not being displayed here.
  • 45:33 - 45:36
    So I'll give that a couple of seconds,
  • 45:36 - 45:39
    and we'll be able to see this happen
  • 45:39 - 45:41
    in real time as well.
  • 45:42 - 45:45
    Alright. So that is done. So I've
  • 45:45 - 45:46
    essentially launched a couple of those
  • 45:46 - 45:48
    tests. And, as I said,
  • 45:48 - 45:51
    this is your default
  • 45:51 - 45:53
    dashboard that you're provided with here.
  • 45:53 - 45:54
    So,
  • 45:54 - 45:56
    you know, you can actually refresh
  • 45:56 - 46:00
    all of these panels here, if you will.
  • 46:00 - 46:01
    So that'll display the
  • 46:01 - 46:04
    latest. And, as I said here, because I'd
  • 46:04 - 46:08
    performed the actual check
  • 46:08 - 46:10
    and it connected to an external server,
  • 46:10 - 46:12
    you can see that the top source
  • 46:12 - 46:14
    countries are highlighted there.
  • 46:14 - 46:16
    You can also refresh the number of
  • 46:16 - 46:18
    events, as you can see here,
  • 46:18 - 46:20
    and the number of sources. So
  • 46:20 - 46:22
    you can also do that for the rest of
  • 46:22 - 46:24
    the panels. These are the top 10
  • 46:24 - 46:27
    classifications
  • 46:27 - 46:29
    in terms of events, if you will, and then
  • 46:29 - 46:32
    these Snort event types, as you can see here.
  • 46:32 - 46:34
    So, for example, in this case, we have the
  • 46:34 - 46:36
    Attack-Response ID Check, which, if we
  • 46:36 - 46:38
    click on
  • 46:38 - 46:40
    right over here,
  • 46:41 - 46:43
    you can see that it actually displays
  • 46:43 - 46:44
    that, and you can then
  • 46:44 - 46:46
    click on the signature itself. And this
  • 46:46 - 46:49
    is for statistics. Now, if you click on
  • 46:49 - 46:53
    the Snort Event Search tab right over here,
  • 46:53 - 46:55
    you can see that this allows you to
  • 46:55 - 46:57
    search based on the source IP, the source
  • 46:57 - 47:00
    port, the destination IP, destination port,
  • 47:00 - 47:02
    and the event type. So I can check for
  • 47:02 - 47:04
    attack responses based on the rule set
  • 47:04 - 47:06
    that we had used previously.
  • 47:06 - 47:09
    And I can also specify the timing. Right?
  • 47:09 - 47:12
    So that's really fantastic there.
  • 47:12 - 47:15
    So you can see that right over here, we
  • 47:15 - 47:16
    have that logged,
  • 47:16 - 47:19
    which is fantastic. And
  • 47:19 - 47:22
    if we click on the Snort World Map,
  • 47:22 - 47:24
    that'll essentially--as you'll see in a
  • 47:24 - 47:26
    couple of seconds--this will essentially
  • 47:26 - 47:29
    display the countries by the source IPs.
  • 47:29 - 47:30
    In this case, it should display the
  • 47:30 - 47:32
    United States, which makes sense.
  • 47:32 - 47:35
    And there we are. So, again, this is
  • 47:35 - 47:37
    extremely helpful, especially if you work
  • 47:37 - 47:40
    in a SOC. And as I said, there's multiple,
  • 47:40 - 47:42
    you know, security tools you can
  • 47:42 - 47:45
    integrate with Splunk.
  • 47:45 - 47:47
    Now, one thing that I wanted to highlight
  • 47:47 - 47:49
    is--you can, if you click on Edit--and I'll
  • 47:49 - 47:51
    just go back to the
  • 47:51 - 47:53
    Event Summary here because this is very
  • 47:53 - 47:55
    important--
  • 47:55 - 47:57
    you can set this as your main dashboard.
  • 47:57 - 47:59
    So if you right-click here, you can set
  • 47:59 - 48:02
    this as your home dashboard.
  • 48:02 - 48:04
    So I'll just click on that there.
  • 48:04 - 48:05
    And now you'll see on your dashboard
  • 48:05 - 48:08
    here, if I just close that top menu,
  • 48:08 - 48:10
    that'll actually be displayed there. So
  • 48:10 - 48:12
    give it a couple of seconds.
  • 48:12 - 48:15
    And, of course, you can click on the cogwheel here
  • 48:16 - 48:19
    and essentially display--whatever--
  • 48:19 - 48:22
    you know, you can specify your default
  • 48:22 - 48:23
    dashboard. Now, there are a couple of
  • 48:23 - 48:26
    other ones that are created by default.
  • 48:26 - 48:28
    But yeah, you can have that on your dashboard.
  • 48:28 - 48:31
    And, you know, if you actually click
  • 48:31 - 48:34
    on the SNORT--the SNORT alert for Splunk here--
  • 48:34 - 48:36
    and we'll just go back into that SNORT
  • 48:36 - 48:38
    event summary tab,
  • 48:38 - 48:41
    you can actually edit the way these
  • 48:41 - 48:44
    particular panels are tiled. So,
  • 48:44 - 48:46
    you know, you can convert it to a
  • 48:46 - 48:49
    prebuilt panel or, you know,
  • 48:49 - 48:50
    you can--you can actually convert it to a
  • 48:50 - 48:53
    prebuilt panel. You can get rid of it.
  • 48:53 - 48:55
    You can also move them around based
  • 48:55 - 48:57
    on your own requirements. And, in this
  • 48:57 - 49:00
    case, you can actually--let's see if I can
  • 49:00 - 49:02
    show you. You can actually select the visualization.
  • 49:02 - 49:04
    So, in this case, I think the default
  • 49:04 - 49:06
    one is fine, and you can then view the
  • 49:06 - 49:08
    report here. So
  • 49:09 - 49:11
    if we click on this one here, for example,
  • 49:11 - 49:13
    we could actually use the bar graph to
  • 49:13 - 49:17
    display the--you know--the number of--the actual--
  • 49:17 - 49:19
    the top source countries, and have
  • 49:19 - 49:22
    them displayed in a bar graph style. But
  • 49:22 - 49:23
    we can just take it back into the pie
  • 49:23 - 49:26
    chart there. And you can also change this
  • 49:26 - 49:27
    for the events as well.
  • 49:27 - 49:29
    So, you know, if we wanted to view a
  • 49:29 - 49:32
    trend, we can click on the bar graph there.
  • 49:32 - 49:34
    In this case, I don't think that's
  • 49:34 - 49:37
    formatted correctly. So if we just use
  • 49:37 - 49:39
    the default one,
  • 49:39 - 49:43
    which I believe was--I think it was--no,
  • 49:43 - 49:46
    that wasn't the one. I believe it was--
  • 49:46 - 49:48
    let's see if I can identify it here. It
  • 49:48 - 49:51
    was the number. There we are. So,
  • 49:51 - 49:54
    as I said, you can customize this based on your own--
  • 49:54 - 49:57
    you know--your own requirements. So, for example,
  • 49:57 - 50:00
    this one might do well if it was in the
  • 50:00 - 50:02
    form of a bar graph. So, you know,
  • 50:02 - 50:04
    you can utilize that if you feel that
  • 50:04 - 50:06
    that is appropriate.
  • 50:06 - 50:08
    In this case, you know, we can also
  • 50:08 - 50:12
    specify the actual--you know--we can
  • 50:12 - 50:15
    actually list the events themselves.
  • 50:15 - 50:16
    Let's see which other ones look
  • 50:16 - 50:18
    really good here.
  • 50:18 - 50:20
    And yeah, once you're done with the
  • 50:20 - 50:22
    customization, you can then cancel or
  • 50:22 - 50:25
    save based on your requirements. And you
  • 50:25 - 50:27
    can also filter on this particular tab
  • 50:27 - 50:31
    here, you know, through the source IP, destination IP, etc.
  • 50:31 - 50:35
    Let's see, what else did I want to highlight?
  • 50:35 - 50:38
    Let me just refresh this once more
  • 50:38 - 50:41
    and, you know, to essentially get the latest data.
  • 50:42 - 50:46
    And you can see, in terms of the panels,
  • 50:46 - 50:50
    this will display the last 100 attempts.
  • 50:50 - 50:53
    And you can go through them like so.
  • 50:54 - 50:56
    You can also view--I think we've gone
  • 50:56 - 50:57
    through all of them--but you have the
  • 50:57 - 50:59
    persistent sources. So, two or more days
  • 50:59 - 51:01
    of activity in the last 30 days. So you
  • 51:01 - 51:03
    actually need a lot of data for that to
  • 51:03 - 51:06
    be displayed or to give you anything useful.
  • 51:08 - 51:10
    Yep. So that is
  • 51:10 - 51:12
    what I wanted to highlight in regards to
  • 51:12 - 51:14
    the SNORT alert for Splunk app and the
  • 51:14 - 51:16
    actual dashboards, which, as I said, it
  • 51:16 - 51:17
    already does for you.
  • 51:17 - 51:19
    Now, you can create your own dashboard, as
  • 51:19 - 51:23
    I said, if I go back into Apps > Search and Reporting,
  • 51:23 - 51:25
    based on your own sources. So I'll just
  • 51:25 - 51:27
    click on Data Summary there. And if I
  • 51:27 - 51:29
    click on Sources,
  • 51:29 - 51:31
    you can click on
  • 51:31 - 51:34
    this source here, for example. And,
  • 51:34 - 51:37
    you know, in this case, we can actually
  • 51:37 - 51:40
    just click on that there. And I can click
  • 51:40 - 51:42
    on Extract Fields,
  • 51:42 - 51:43
    and you can extract the fields with
  • 51:43 - 51:46
    regex. So I'll click on Next there.
  • 51:46 - 51:48
    And you can then select the fields that
  • 51:48 - 51:50
    you want. So, for example, in this case, we
  • 51:50 - 51:53
    would want the date and time.
  • 51:53 - 51:55
    So I can just highlight that there. So I
  • 51:55 - 51:56
    can say
  • 51:56 - 52:00
    time, for example, add the extraction.
  • 52:00 - 52:02
    And then, of course, we have the source IP
  • 52:02 - 52:04
    and the port. But I'll just highlight
  • 52:04 - 52:06
    them together. But I think it's actually
  • 52:06 - 52:09
    recommended just to highlight the source IP there.
  • 52:09 - 52:15
    So source—we can say src underscore port, IP.
  • 52:16 - 52:18
    Add that extraction, and we then have the
  • 52:18 - 52:21
    destination IP, which, in this case,
  • 52:21 - 52:23
    because this is
  • 52:23 - 52:26
    an SNMP broadcast
  • 52:26 - 52:28
    request, we can--we know that that's the
  • 52:28 - 52:34
    destination IP. So I'll say dst underscore IP, add the extraction.
  • 52:34 - 52:38
    Let's see what else we can do.
  • 52:40 - 52:41
    In this case, it's saying the extraction
  • 52:41 - 52:43
    field you're extracting--if you're
  • 52:43 - 52:45
    extracting multiple fields, try removing
  • 52:45 - 52:47
    one or more fields. Start with the
  • 52:47 - 52:49
    extractions that are embedded within
  • 52:49 - 52:52
    longer strings. Okay. So let's try and use
  • 52:52 - 52:54
    another alert here
  • 52:54 - 52:58
    that was kind of interesting. Let's see.
  • 52:58 - 53:00
    It's not displaying all of them here, but
  • 53:00 - 53:03
    you get the idea. Once you're done--
  • 53:03 - 53:04
    you know, for example, I can remove
  • 53:04 - 53:06
    that field here. I'm just giving you an
  • 53:06 - 53:09
    example of that. So remove that field.
  • 53:09 - 53:12
    There we are. I can then say Next, and
  • 53:12 - 53:15
    I can click on Validate and Save based
  • 53:15 - 53:18
    on those fields there. Hit Finish.
  • 53:18 - 53:21
    And then, you know, I can go back,
  • 53:21 - 53:23
    you know, to Search and Reporting.
  • 53:23 - 53:25
    And if I wanted to create a very simple
  • 53:25 - 53:28
    visualization, which I'll show you right now--
  • 53:28 - 53:30
    even though I don't really need those
  • 53:30 - 53:32
    extracted fields, although they might be
  • 53:32 - 53:33
    useful--so
  • 53:33 - 53:36
    I can click on those extracted fields
  • 53:36 - 53:40
    now. I believe they should have been added.
  • 53:40 - 53:41
    I'm not really sure why they aren't
  • 53:41 - 53:43
    being highlighted here. There we are.
  • 53:43 - 53:45
    So source IP.
  • 53:45 - 53:48
    We can also, say, specify the source port.
  • 53:48 - 53:50
    We--oh, there they are. So
  • 53:50 - 53:52
    actually, they took a while to be
  • 53:52 - 53:54
    displayed there. So,
  • 53:54 - 53:57
    source port--that--why not? We can--
  • 53:57 - 54:00
    yeah, I think that's pretty much it. So
  • 54:00 - 54:02
    based on those, we can actually build
  • 54:02 - 54:04
    an event type. However, if we go to
  • 54:04 - 54:08
    Visualization and click on Pivot here--
  • 54:08 - 54:11
    selected fields is five--hit OK.
  • 54:11 - 54:13
    We can actually, you know, visualize this
  • 54:13 - 54:14
    however we want. So, for example, if I
  • 54:14 - 54:17
    wanted a column chart here--
  • 54:17 - 54:20
    so number one will display the count--
  • 54:20 - 54:23
    I can just add the events
  • 54:24 - 54:26
    because that's the count. And we should
  • 54:26 - 54:29
    have, at the bottom, the time, which I did
  • 54:29 - 54:33
    specify--I believe within that range there--
  • 54:34 - 54:37
    but that's not being highlighted here. So
  • 54:37 - 54:39
    the number of events--and, you know, you
  • 54:39 - 54:42
    can go ahead and click as--you can
  • 54:42 - 54:43
    essentially save it.
  • 54:43 - 54:45
    So you get the idea. You don't really
  • 54:45 - 54:47
    need to do this because we have the
  • 54:47 - 54:48
    SNORT app here,
  • 54:48 - 54:50
    which pretty much gives you the
  • 54:50 - 54:53
    summaries that are useful to you or for you.
  • 54:54 - 54:57
    And there we are. So fantastic. So that's
  • 54:57 - 54:58
    going to conclude the practical
  • 54:58 - 55:01
    demonstration side of this video.
  • 55:01 - 55:03
    So, thank you very much for watching
  • 55:03 - 55:05
    this video. If you have any questions or
  • 55:05 - 55:07
    suggestions, leave them in the comment section.
  • 55:07 - 55:09
    If you want to reach out to me, you can
  • 55:09 - 55:10
    do so via
  • 55:10 - 55:12
    Twitter or the Discord server. The links
  • 55:12 - 55:14
    to both of those are in the description
  • 55:14 - 55:17
    section. Furthermore, we are now moving on
  • 55:17 - 55:19
    to part two. So this will conclude part
  • 55:19 - 55:21
    one. Part two will be available on the
  • 55:21 - 55:25
    Linode’s ON24 platform. So, the videos
  • 55:25 - 55:27
    are available on-demand. So all you
  • 55:27 - 55:29
    need to do is just click the link
  • 55:29 - 55:32
    in the description, register for part two,
  • 55:32 - 55:34
    after which an email will be sent to you,
  • 55:34 - 55:35
    and you'll be given--you know--
  • 55:35 - 55:37
    immediate access to the videos
  • 55:37 - 55:40
    within part two. So, thank you very
  • 55:40 - 55:43
    much for watching part one. In the
  • 55:43 - 55:45
    next video, in part two, we'll get started--
  • 55:45 - 55:47
    or we'll take a look--at host intrusion
  • 55:47 - 55:50
    detection with OSSEC. So I'll be seeing
  • 55:50 - 55:51
    you in the next video.
  • 55:51 - 56:12
    [Music].
Title:
Splunk Security Event Monitoring | Blue Team Series with Hackersploit
Description:

more » « less
Video Language:
English
Duration:
56:13

English subtitles

Revisions Compare revisions