GithubHelp home page GithubHelp logo

Fix bug in hangup about orc HOT 5 CLOSED

0x27 avatar 0x27 commented on September 2, 2024
Fix bug in hangup

from orc.

Comments (5)

0x27 avatar 0x27 commented on September 2, 2024

Example:

$ getidle
PTY 0 is 25621 seconds idle and owned by user1
PTY 1 is 0 seconds idle and owned by root ** this is us **
PTY 2 is 663 seconds idle and owned by user2
PTY 4 is 15657 seconds idle and owned by user3
$ hangup
This is seriously rude...
Terminating PTS/
Owner of PTS is root
SSH PID is 24893
36610
42622
sh: 433: cannot create /dev/pts/: Is a directory
$ 

In this case I was not in over SSH, but over another PTY spawning backdoor - this also begs the question of why I am only targeting SSH connections - there are times when we might want to kill a user who is accessing via telnet or another remote access tool which allocates a PTY, for example.

from orc.

zMarch avatar zMarch commented on September 2, 2024

MESS WITH THE BEST
i'll have a look when i'm home and throw in some handling to stop it killing every single session

from orc.

UlrichBerntien avatar UlrichBerntien commented on September 2, 2024

I have added some checks in the hangup function in the pull request #30.
Please test it.
I will try to add argument 'all' for all sshd clients and a list of PTS numbers.

from orc.

UlrichBerntien avatar UlrichBerntien commented on September 2, 2024

In pull request #31 special arguments were added:
"hangup all" to terminate all and "hangup all other" to terminate all by not our PTS is now supported.

from orc.

0x27 avatar 0x27 commented on September 2, 2024

Appears to work fine on Debian/Ubuntu hosts I've been testing on. I'll probably have to add CentOS and such to my set of VM's though going forward as per your notes in #21

from orc.

Related Issues (20)

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.