Comments (5)
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.
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.
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.
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.
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)
- getidle fails due to awk error HOT 6
- Compatability HOT 4
- More sysinfo on launch HOT 1
- LUKS/disk crypto HOT 1
- Wiki editing and adding docs HOT 4
- LPE Suggester HOT 1
- Sourcing remote bash scripts HOT 2
- Choosing a license HOT 1
- LDAP tricks HOT 1
- Credential dumping from memory
- proxy or additional gateway support HOT 8
- Removing getnet HOT 3
- Shellcheck... HOT 1
- getnet rework discussion HOT 1
- find setuid/setcap bins? HOT 2
- Use "ip a" instead of "ifconfig" HOT 2
- Shellcode Execution HOT 1
- no-memfd in-memory elf execution (extends #79)
- checks from THC "whatserver" script.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orc.