Coder Social home page Coder Social logo

suspect's Introduction

Suspect is a simple bash script that attempts to detect common IoCs without relying on (much) signature based detection or known "bad" files.

It first looks at whether the kernel modules loaded are on disk and present in /proc/modules and kallsyms.

Afterwards, it attempts to check whether /etc/ld.so.preload exists, and if it's being hidden by a preloaded library. Preload kits are a bit out of fashion at the moment, but I felt obliged to include this check. It's accomplished by means of using the LD_PRELOAD environment variable to preload libc, which changes the order of loading preference back to close to how it should be.

Next, it does some process list stuff, primarly looking for running processes with deleted executables, and checking whether there's a lot of change in the processes. It also looks to see if any executables are compressed with UPX (I need to make this a bit more generic, instead of looking for the UPX! string, but eventually...)

It does some simple checks, like checking for executables in /tmp/, whether there's more than one root user, whether the extended attributes are set on files (commonly used by rootkits like SHv4), whether any daemon processes have spawned a shell, what processes have keepalive network connections, the number of keys in authorized_keys.

Suspect is not a replacement for comprehensive manual triage, and it won't find any php backdoors anywhere.

suspect's People

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.