Coder Social home page Coder Social logo

find-suid's Introduction

Examples

  # Find Setuid binaries that are in $PATH. This is 100x faster than using find to scan
  # an entire file system. More often than not there is some attack surface in this area
  ./find-suid --path

  # Supply a set of paths to search. More often than not we also have an idea where a Setuid
  # binary may be. If we cant find it at this point, then we can resort to scanning the entire
  # file system
  ./find-suid --find "/sbin" "/home/sweetbbak/bin" "/root/workdir"

100 results, truncated:

time ./find-suid -p 0.01s user 0.02s system 96% cpu 0.028 total

Found Setuid Binary: /home/sweet/bin/doit
Found Setuid Binary: /home/sweet/bin/suwu
Found Setuid Binary: /bin/sg
Found Setuid Binary: /bin/umount
Found Setuid Binary: /bin/unix_chkpwd
Found Setuid Binary: /usr/bin/chage
Found Setuid Binary: /usr/bin/chsh
Found Setuid Binary: /usr/bin/expiry
Found Setuid Binary: /usr/bin/fusermount
...
Found Setuid Binary: /usr/bin/passwd
Found Setuid Binary: /usr/bin/pkexec
Found Setuid Binary: /usr/bin/readcd
Found Setuid Binary: /usr/bin/rscsi
Found Setuid Binary: /usr/bin/sg
Found Setuid Binary: /usr/bin/su
Found Setuid Binary: /usr/sbin/sg
Found Setuid Binary: /usr/sbin/su
Found Setuid Binary: /usr/sbin/sudo
Found Setuid Binary: /usr/sbin/umount
Found Setuid Binary: /usr/sbin/unix_chkpwd

Installation

  go build *.go

TODO: Add a releases page, depending on need for it.

Features

idk it finds Setuid binaries.

TODO

  • add max and min depth
  • check for more file modes
  • more robust error handling

send PR's if you want to. They are definitely welcomed.

find-suid's People

Contributors

sweetbbak avatar

Stargazers

Oleg Pykhalov avatar Tom 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.