How do i actually trace or find the source of this connected device is this? We doubt its illegal login
Posted by daygamer77@reddit | linuxadmin | View on Reddit | 51 comments
Difficult_Bend_8762@reddit
Try Wireshark
scristopher7@reddit
LOL
Difficult_Bend_8762@reddit
what?
scristopher7@reddit
Oh, sorry, I thought you were being sarcastic and was laughing at a joke that wasn't there.
Difficult_Bend_8762@reddit
no worries
scristopher7@reddit
lol
michaelpaoli@reddit
Or alternatively use u instead of l.
Once you've got the PIDs, you can also start getting more info, e.g.:
or if just a single PID:
dcolecpa@reddit
Could you please explain these commands and what they show?
stoneG0blin@reddit
Just a tip. ChatGPT could do that on the fly. I'm using it often to explain commands.
justinDavidow@reddit
The first lists the processes owned by the specific user
The second shows what files are in use by those PID's
The third is the same as the second, but for a single pid.
Effectively this is just running lsof (LIst Open Files) for processes owned by this specific session.
michaelpaoli@reddit
u/dcolecpa
Uhm, not quite. That ps command ... well Read The Fine Manual (RTFM) for ps(1), notably without - before the options, gets the BSD flavor of options, and the t option will limit it to processes that have the noted terminal as controlling terminal (terminal, not user)
And can read about ls and it's -l option likewise on the ls(1) man page. As for the /proc stuff, documented with the kernel ... exe is for the executable, and fd for the file descriptors (open numbers), and the {,} notation you can read about on the man page for your Korn/POSIX compatible shell, e.g. bash(1).
And again, not by user, or session, but by specific controlling/associated terminal, and sure, lsof likely has option(s) to do quite similar, probably even as a single command ... but what I gave doesn't even require lsof, just ps, ls, and teensy bit of shell (and really don't even need that if one expands out the arguments oneself, rather than having the shell do that - or ls could find the fd numbers under the fd directory(/ies).
dcolecpa@reddit
Thank you Michael
dcolecpa@reddit
Thank you Justin
artekau@reddit
check on your firewall?
Intergalactic_Ass@reddit
Computer, what is a pty? What is a tty? 🤦♂️
Upper-Inevitable-873@reddit
After all this I bet we find out it's you OP
autotom@reddit
lol it u
dizzygherkin@reddit
Tty2 is someone logged into the local console.
cibolajerry@reddit
Yes, but it could be coming from anywhere, though normally it is local. It could be an actual line coming in; it isn't necessarily a virtual terminal, it could be a physical terminal..
draeath@reddit
Wouldn't that be
ttyS#
and nottty#
?explodinghat@reddit
The call is coming from inside the house!
DSMRick@reddit
Best use of this meme ever.
daygamer77@reddit (OP)
Hi thanks for the response, when you say local console, it means means logged in physically?
Booty_Bumping@reddit
Pretty much. Either a screen, a serial port, or a teletypewriter.
allegedrc4@reddit
...yes...through a device physically attached to the server (or virtually if virtual).
FurryTreeSounds@reddit
If you used the "who" command to see this, the lastlog command should show you similar output.
If you're trying to figure out "what is scins actually doing?" try running ps -u scins.
-29-@reddit
The call is coming from inside the house.
sniff122@reddit
That is the local console, aka the screen that's plugged into the machine
daygamer77@reddit (OP)
Hi thanks for the response, when you say local console, it means means logged in physically?
shiftingtech@reddit
you still haven't answered the question about whether the machine in question is a physical machine, or something virtualized. As such, it's hard to give definitive answers. if it's a normal, physical computer, then that's the second session on the physical screen and keyboard.
daygamer77@reddit (OP)
Hi Sorry, its virtual..
shiftingtech@reddit
Then you need to turn your attention to whatever virtualization tool you're using. It should be able to tell you what sessions are connected
ForceBlade@reddit
So the person who logged in likely did so through the hypervisor you use. Such as logging into vsphere and opening the display of the virtual machine there
sniff122@reddit
Yeah. The physical monitor and keyboard, if it's a server it could also be via the BMC (like dell iDRAC, hp ILO, etc)
thewallacio@reddit
arp -a 192.168.110.133
and see if the MAC address vendor gives you an clues?AtlanticPortal@reddit
It's literally the row before and the row after that one.
thewallacio@reddit
🤦
ffs. downvoting myself for blatant stupidity.
DarrenRainey@reddit
tty is always the local console i.e someone physically logged into that machine. Is this a physical server or a virtual machine? If its a virtual machine check the logs for your hypervisor (Typically VMWare ESXi, XEN, Proxmox etc.) and see who last logged in around that time / was changing things on that VM.
daygamer77@reddit (OP)
Hi thanks for the resposne, this is virtual.. so you suggest to look for logs on the hypervisor? thanks for the suggestion.
VirtualDenzel@reddit
Look at the hypervisor console. Someone logged in using that.
zqpmx@reddit
This reminds me of this.
When a stranger calls
https://youtu.be/OFgy2x5-TNg
Wrenky@reddit
The call is coming from inside the house 😨
mechanicalAI@reddit
What does the hypervisor’s management console logs look like? Do you see any unauthorized or authorized logins from there? In the past I experienced the same problem and freaked out but it turned out I logged in to the VM directly from the hypervisor itself. Regardless here are a few scenarios you might find helpful to track the root of that particular login.
Steps to Take
bzImage@reddit
is this a joke ?
Dave_A480@reddit
tty means it's the physical screen/keyboard if it's bare-metal, or the virtual-machine console if it's a VM...
daygamer77@reddit (OP)
thanks for the response this is virtual
vmxnet4@reddit
Physical or Virtual machine?
If physical, it's not impossible to connect via serial console over a network (i.e.: Digi or Lantronix serial console devices). I used to set those things up at banks all the time so tellers would have a direct console terminal session to the UNIX-based banking server in the back.
If virtual, it's likely someone accessing it via the VM's console.
Probably other explanations too. Those are just 2 off the top of my head.
aqcz@reddit
tty2 is not a serial console though, that would be named ttyS2 or similar. Also those serial consoles are mostly a thing from the past nowadays, servers usually have some BMC and desktops may be able to use AMT (not sure if console works there too).
Intrepid_Anybody_277@reddit
You need to find the server/PC ornrack thisnhost is connected to.
Its.logged in it all.
serverhorror@reddit
Virtual Machine?
Try looking at the console and Alt+D2, if not: head to the server room and have a keyboard and monitor ready.
daHaus@reddit
Is that a local machine? tty2 is local