Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
There is less than 24 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi guys, a couple days ago my office laptop was broken into via ssh password guessing (girlfriend was amanda/amanda!)
I have reinstalled ubuntu on that machine and have locked down(I hope) by using the UsersAllow option, PermitRootLogin option, changing the ssh port, and in the event of a compromise restricting the outgoing connections so I at least wont cause more trouble. So I think I have that machine in good shape, does anyone have more suggestions?
However, I'm interested in what was done to that machine. So I have an old powermac G4 set up on my home network that I just installed lenny on. Nothing else on it. I want to set this machine up with a few easy to guess usernames, open up the ssh port, close down the outgoing connections, and see what happens when people break in (I figure it shouldn't take long).
How can I do this? Specifically, I want to know what usernames were guessed,what the passwords guessed were, all successes/failures, times etc.
In the event of success, I want to be able to see all the commands executed, along with times.
So, I want a little more info than auth.log and .bash_history will give me, but I don't think I need a full fledged honeypot like honeyd. Plus most of the honeypot software looks fairly complicated to manage. I'm just curious.
You might want to use key based authentication and not allow username/password authentication. Or use a stronger password.
When you configure the ssh key, you can include a passphrase, which would be an entire sentence.
When you mentioned the root login option, did you disable root logins? Since someone guessed your password, they also knew your username, unless that was your root password. So "AllowUsers" while a good idea to prevent against brute force attacks on known system users won't help in itself ( unless you use the form "user@host" so you also control where you can connect from, but if you are connecting from various locations are have a dynamic IP this won't work ) if the attacker knows your username.
You might consider changing your username as well.
If the hacker obtained root access, it's game over. You need to re-install. Using sudo you can control what commands can be run and each command would be logged. If there are any holes, like allowing "sudo su" or not using an option in vim that disables escaping to the shell, it will be easy to get around this restriction. Plus you will be restricting what you can do legitimately. These are more useful for controlling what wheel members are allowed to do.
I have an old powermac G4 set up on my home network that I just installed lenny on. Nothing else on it. (..) I don't think I need a full fledged honeypot like honeyd.
A baitbox should remain controllable and auditable by the admin at all times so that does mean a trusted and well-configurable router, a DMZ and a dedicated honeypot setup. You'll also want to review and reinforce the other LAN segment(s) in case something goes wrong (or not, regular auditing should be done anyway) and have a worst case scenario procedure in place. You may find all of that over the top but what if the cracker does access your other boxen? How do you find out? When do you find out? What if the cracker finds out she's sandboxed and DDoSes you? For a prolonged period? What do you do?
Let me help you focus on what you're doing: you're explicitly allowing anyone to enter and subvert your network. Allowing hostiles in without taking proper precautions is like denying hard hats, seatbelts or prophylactics where ever necessary. Do invest time in making sure your setup does what you want it to do and nothing more.