You are not logged in.
I've been doing some interesting reading lately about remote security and have come across some good information. One program I'm interested in trying out is called Ostiary, however its purpose is only to allow a fixed set of commands remotely, rather than just open up a shell. The page also has a good summary of the pros/cons of other techniques such as port knocking, Xringd, VPNs, etc. Might at least give you some ideas...
Offline
Ostiary looks interesting, although it has very limited abilities (at purpose). Pity you can't send an option with the commands, or at least some extra info like IP of the client to the program. Luckily it's probably very easy to add (less than 30 minutes work anyway).
That way you can run a script with Ostiary which edits sshd's config and the firewall rules so it only allows connections from your ip address. So with a tiny script you enable ssh with Ostiary, log in, and when done disable sshd again. To prevent man in the middle attacks Ostiary can be slightly changed so that it uses the client's ip address for the checksum too.
Though how paranoid you must be to do it this way I don't know. :-)
Offline
I've gave some propositions in the original "hacked?" thread including OPIE and Judd's knockd + some others.
Offline
I get brute force attempts to log in all the time. I guess hearing about phrakture's misfortunes got me a bit more concerned.
Anyways, after browsing around, I found this script which looks like it dynamically blacklists ips with too many failed login attempts. I am just now trying it out, so I have yet to find out if it works. Feel free to ssh to joeolivas.com to help me see if it works. Try something like user 'arch', so I'll know it was a friendly breakin attempt
Offline
I get brute force attempts to log in all the time. I guess hearing about phrakture's misfortunes got me a bit more concerned.
Anyways, after browsing around, I found this script which looks like it dynamically blacklists ips with too many failed login attempts. I am just now trying it out, so I have yet to find out if it works. Feel free to ssh to joeolivas.com to help me see if it works. Try something like user 'arch', so I'll know it was a friendly breakin attempt
Just tried to ssh 3 times to your server, it then blocked me completely. That's a nice idea. But don't most hackers use proxies or something so they can get a new IP at will?
EDIT: Looks like the script builders already thought of it.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
Sweet, nice to see it works. Thanks for your help....
It's pretty nice, seems to help even for weak passwords, since even if it is weak, it would (most likely, unless your password is aardvark or something)take a lot more than 4 attempts to get it right...
Offline
*hears the sound of many keys being pressed*
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Sweet, nice to see it works. Thanks for your help....
It's pretty nice, seems to help even for weak passwords, since even if it is weak, it would (most likely, unless your password is aardvark or something)take a lot more than 4 attempts to get it right...
I've just tried that script myself, and I noticed I don't have a file called /var/log/secure. Am I missing something here?
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
Just change it to /var/log/auth.log. And change iptables path to /usr/sbin/iptables.
Offline
Ah, so that's where it was
Thanks a lot.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
ChallengeResponseAuthentication=no
UsePAM yes
UseDNS no
What do these options do?
Offline
ChallengeResponseAuthentication=no
UsePAM yes
UseDNS noWhat do these options do?
UsePAM...uses pam. This enforces /etc/security/limits and stuff on the ssh shell sessions. no forkbombing over ssh.
UseDNS disables reverse dns lookups. UseDNS could arguable add security, but not much...and I was having trouble with it taking bloody forever!
ChallengeResponseAuth is something that usepam enables, but I dont really want. So, I disabled it. Check man sshd_config for more information..
Back to securing ssh, you should use a password on your ssh keys, and then use ssh-agent and ssh-add to have your passphrase validated for the session. It is very nice, and adds security. Then you can use ssh key access only.
Does arch have ssh-agent setup in the X configs?
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Does arch have ssh-agent setup in the X configs?
The startxfce4 script brings in an ssh-agent automatically, it wraps a round
the xfc4-session iirc. Also gnome opens it AFAIK.
Anyway this shouldn't be up to the distro, I think, but up to the X-setup you use.
It depends heavily on your preferences. So you can use a session manager
or a window manager to be wrapped by the agent, some prefer to have only
the terminal wrapped which opens the connection... and so on.
-neri
Offline
Heya,
just found a journal about a way a worm could use ssh-info. Maybe some other info too ...
Here is the link: http://undeadly.org/cgi?action=article& … 0511163008
greetz,
Michel
Offline