Coder Social home page Coder Social logo

tryhackme-socl1-snort_liveattack_reverseshell's Introduction

Documentation: TryHackMe SOC L1 - Snort Live Attack Challenge - Reverse Shell

1. Introduction

  • The room invites you to a challenge where you will investigate a series of traffic data and stop malicious activity work with Snort to analyze live and captured traffic

Objective

  • Analyze the traffic with Snort and identify the anomaly first. Then you can create a rule to stop the reverse shell and capture the flag

2. Setup

Prerequisites

  • Basic knowledge of network security concepts
  • Access to the TryHackMe platform

3. Procedures

  • Start Snort in sniffer mode and try to figure out the attack source, service, and port.
    • In the CLI enter snort -vde to display the packet data, headers as well as the data link layer headers
    • Analyze the packet and look for anomalies
      • This IP with this port keeps coming up in the packets
        • snortcha3
      • It seems suspicious let us find out how often this port comes up. Enter snort -vde | grep 4444
        • snortcha8
      • We figured that the IP is using port 4444 which is a default listening port for Metasploit
        • snortcha4
      • Let's create an IPS rule in Snort to stop the attack
      • Gain root access using sudo su then in the root directory and navigate to the rules directory. Enter cd /etc/snort/rules
      • In the rules directory there are various rule sets available we need to open local.rules and add our rule. Enter nano local.rule
      • Let's add our rule. Here we are rejecting any inbound and outbound traffic coming from this source IP address
        • snortcha6
      • To run Snort in IPS mode. Enter snort -c /etc/snort/rules/local.rules so we can use the rule we created
      • We are successful in rejecting the packets. We captured the flag!
        • snortcha10
        • snortcha11

4. Attack Detection

  • Observe the console output or log files for alerts generated by the attack.
  • Note down alert details like timestamp, source IP, destination IP, type of alert, and ports.
  • Research details that come up for further information

5. Conclusion

  • We successfully blocked the attacker's IP stopping the reverse shell and capturing the flag. Snorts IPS capability is an effective tool to prevent such attacks.
  • We can prevent reverse shells by installing firewalls or enforcing the principle of least privilege

6. References

tryhackme-socl1-snort_liveattack_reverseshell's People

Contributors

abelmorad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.