Harvesting SSH Credentials: Insights from My Honeypot Network
Posted by whatbackup 22 hours ago
Comments
Comment by dspillett 18 hours ago
Comment by alexpotato 18 hours ago
I would occasionally scan the auth.log to see which users the bots were using and it was an interesting mix of:
- service accounts e.g. mysql, admin, etc
- individual names e.g. tom, ankit, alexei etc
Comment by ufmace 19 hours ago
Comment by dspillett 18 hours ago
I noticed PDQ because of a sudden and fairly constant flow of upstream data that was unusual from that machine, and finding the account & processes involved was easy. As well as installing something to run SSH scans (presumably for further propagation) and running what looked like a crypto-miner, it seemed to be forwarding HTTP(S) requests in a manner that suggested the machine had become part of a “residential proxy” network or similar. Maybe if it hadn't been so greedy I wouldn't have noticed so soon (it hadn't been able to, or hand't tried to, cover its traces, so I found the time of installation very easily as the account otherwise had no SSH activity).
Luckily there were no open root escalation attacks at the time (at least that it knew about) so I only needed to pave that account to get rid of everything, but combined with one of the LPE attacks that have been around over the years it could have caused me much more of a headache.
Comment by Bender 19 hours ago
- Install Proxies, DDoS Agents, Bitcoin mining, proxy to SMTP servers, etc...
- If anything looks interesting on their console they will log in and poke around. The order of these events depends on the sophistication of the bot script. Most are very simple.
If you the target look like you have money they may install ransomware and encrypt some of your files. Now I want to watch the Beekeeper again as corny as it was, also a fun movie.
Comment by ufmace 16 hours ago
Comment by chaz6 19 hours ago
- Installing a cryptominer or persistence tool
- Sending spam (smtp)
- Using pre-obtained credentials to log into various ecommerce/social media sites
Comment by usr1106 13 hours ago
Seems more entertaining than suitable for real analysis. At least I did not see any collected data. You can just watch what happens at this moment.
From watching it a while I came to the conclusion that adding a new authorized ssh key is a common first step.
Comment by daneel_w 19 hours ago
Comment by pastage 19 hours ago
Comment by daneel_w 21 hours ago
Comment by enjaydee 16 hours ago
Comment by dijksterhuis 16 hours ago
Comment by whatbackup 16 hours ago
Comment by 0cf8612b2e1e 21 hours ago
Comment by inigyou 21 hours ago
This is a terrible idea because it's blacklist-based security. Places like GitHub have their own ssh server that only runs the git server and nothing else.
Comment by 0cf8612b2e1e 20 hours ago
Comment by inigyou 20 hours ago
It does not stop you from, say, logging in to SSH and then starting a port forward. Or running a command in a way that bypasses the login shell. ssh will always pass it to your login shell but other ways can be vulnerable.
Comment by Bender 17 hours ago
[1] - sftp ai@nochan.netComment by BenjiWiebe 14 hours ago
Comment by trucks-refinish 4 hours ago
Comment by tuetuopay 20 hours ago
Comment by kpcyrd 17 hours ago
The "login permission" term is confusing because it's likely supposed to mean "shell requests", but SSH channel requests in general are all post auth, which could also be considered a "login". In OpenSSH you still need to explicitly configure permitted channel requests, which I think is what GP is referring to.
For git specifically I would recommend the ForceCommand feature in OpenSSH, all exec requests are then forwarded to this program, with $SSH_ORIGINAL_COMMAND set to the original command. You may then use an allow-list of commands you want to permit.
Comment by asveikau 22 hours ago
Comment by erulastiel 21 hours ago
Comment by asveikau 21 hours ago
It is a common username (see: https://en.wikipedia.org/wiki/Toor_(Unix) ), the machine I am typing this on has it.
Comment by PyWoody 21 hours ago
Comment by merpkz 20 hours ago
Comment by pudgywalsh 21 hours ago
Comment by sisve 21 hours ago
If we are going to be clever we should follow the statistics and go for 12 that where not on the toplist!!
Comment by youareinsuffera 21 hours ago
Comment by whatbackup 21 hours ago
12 - Rank 318
21 - Rank 523
I'm surprised that '12' is so low on the list.