Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
06-17-2005, 03:34 AM
|
#181
|
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
try pam_tally to limit to 5 attempts for example for login also portsentry for scans from outside  and if snort is properly configured it's IPS !!!
|
|
|
|
06-24-2005, 03:39 PM
|
#182
|
|
Member
Registered: Jun 2005
Location: Wellington, New Zealand
Distribution: Fedora 9
Posts: 31
Rep:
|
I know it was really stupid, but I have a test box I built for RHEL 4 running on Centos , I am a newbie to Linux and thought it wise to mess about for a while, but I decided on a really in secure password as after I let my collegue ssh into my box I reset the password on the fly and choose it with not much care, on Tueday night it was hacked into.
Not sure what was really done to it but accordding to the history there was two rpms installed then removed, so other stuff I was not sure of done, as some files were vi'd and there was a ftp record but not sure what was done again.
I have since rebuilt my PC using Fedora's latest release and have upgraded my security to try and prevent these measures again, but I do have my old hard drive with all the data intact. If any one has some ideas on what you need to look for I can forward any file you want for inspection? I do know though that it took 503 attempts to crack in to it.
Note: I believe that mistakes are good if you learn from them.
|
|
|
|
06-24-2005, 05:38 PM
|
#183
|
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
how did you count the attempts? 503? quite a passwd or lucky?
|
|
|
|
06-24-2005, 05:56 PM
|
#184
|
|
Member
Registered: Jun 2005
Location: Wellington, New Zealand
Distribution: Fedora 9
Posts: 31
Rep:
|
I did a grep on the var/log/messges for uknown. To be honest I was supprised it took that many since the password was 'redhat' lol
I have spent the last few days quite amused by it all really.
Last edited by pobman; 06-24-2005 at 05:58 PM.
|
|
|
|
06-25-2005, 12:11 AM
|
#185
|
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
yes but how did you count the instances |grep unknown for example?
btw: someone tried user name: Pamela on my box ?!?!? it's quite amussing, but MAN NEVER ALLOW REMOTE ROOT ACCESS this will only save you time though
and think about /etc/hosts.deny --> sshd: UNKNOWN this will garantee at least to some point that not known will not have any shhd login
Moderators pls make a sticky with deleted nonsense posts  please
Last edited by johnnydangerous; 06-25-2005 at 12:19 AM.
|
|
|
|
06-25-2005, 03:49 PM
|
#186
|
|
Member
Registered: Jun 2005
Location: Wellington, New Zealand
Distribution: Fedora 9
Posts: 31
Rep:
|
If you mean how do I know there was 503 attempts I used cat /var/log/messages |grep unknown|wc -l
|
|
|
|
06-25-2005, 04:44 PM
|
#187
|
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
didn't know that nice
|
|
|
|
06-25-2005, 05:55 PM
|
#188
|
|
Member
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425
Rep:
|
Quote:
Originally posted by johnnydangerous
didn't know that nice
|
Wow... outsmarted by a noob
--Abid Kazmi
|
|
|
|
06-26-2005, 05:11 AM
|
#189
|
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
well I'm not a "grep" guru 
|
|
|
|
07-05-2005, 03:38 PM
|
#190
|
|
Member
Registered: Jun 2005
Distribution: SuSE, Red Hat
Posts: 161
Rep:
|
This is what i've been getting i suppose its related to the same problem:
Jul 4 17:40:02 linux sshd[19342]: Failed password for invalid user test from 200.67.79.197 port 48306 ssh2
Jul 4 17:40:54 linux sshd[19366]: Invalid user test from 200.67.79.197
Jul 4 17:40:54 linux sshd[19366]: Failed password for invalid user test from 200.67.79.197 port 49006 ssh2
Jul 4 17:42:20 linux sshd[19404]: Invalid user test from 200.67.79.197
Jul 4 17:42:20 linux sshd[19404]: Failed password for invalid user test from 200.67.79.197 port 50139 ssh2
Jul 4 17:42:26 linux sshd[19406]: Invalid user test from 200.67.79.197
Jul 4 17:42:26 linux sshd[19406]: Failed password for invalid user test from 200.67.79.197 port 50199 ssh2
Jul 4 17:43:06 linux sshd[19422]: Invalid user test from 200.67.79.197
Jul 4 17:43:06 linux sshd[19422]: Failed passw
|
|
|
|
07-05-2005, 05:47 PM
|
#191
|
|
Member
Registered: Feb 2003
Posts: 482
Rep:
|
with the amount of time that passing between tries, it looks more like someone doing it by hand, other than the scripts that we've been talking about.
do take the precautions that have been brought up here though.
this is more what they look like-
Jul 2 17:45:54 prometheus sshd[10752]: Illegal user michael from ::ffff:193.65.36.24
Jul 2 17:45:56 prometheus sshd[10754]: Illegal user amanda from ::ffff:193.65.36.24
Jul 2 17:45:57 prometheus sshd[10756]: Illegal user mysql from ::ffff:193.65.36.24
Jul 2 17:45:59 prometheus sshd[10758]: Illegal user rpm from ::ffff:193.65.36.24
Jul 2 17:46:01 prometheus sshd[10760]: Illegal user operator from ::ffff:193.65.36.24
Jul 2 17:46:02 prometheus sshd[10762]: Illegal user sgi from ::ffff:193.65.36.24
Jul 2 17:46:04 prometheus sshd[10764]: Illegal user Aaliyah from ::ffff:193.65.36.24
Jul 2 17:46:06 prometheus sshd[10766]: Illegal user Aaron from ::ffff:193.65.36.24
Jul 2 17:46:07 prometheus sshd[10768]: Illegal user Aba from ::ffff:193.65.36.24
Jul 2 17:46:09 prometheus sshd[10770]: Illegal user Abel from ::ffff:193.65.36.24
Jul 2 17:46:11 prometheus sshd[10772]: Illegal user Jewel from ::ffff:193.65.36.24
Jul 2 17:46:14 prometheus sshd[10776]: Illegal user users from ::ffff:193.65.36.24
Jul 2 17:46:15 prometheus sshd[10778]: Illegal user admins from ::ffff:193.65.36.24
Jul 2 17:46:17 prometheus sshd[10780]: Illegal user admins from ::ffff:193.65.36.24
see how fast they cycle through the names, and then there isn't a passwd spot either.
cheers.
|
|
|
|
07-05-2005, 05:54 PM
|
#192
|
|
Member
Registered: Feb 2003
Posts: 482
Rep:
|
one thing that i would do, is to do a whois on the ip and then send an email to the isp.
you can just use-
whois -h completewhois.com ABUSEDATA ipaddress | grep -i Abuse\ E-mail
you'll see the abuse info. i've found that some asian isps don't have an abuse, they have a security. in that case if the about line doesn't work for you within 15 seconds, then i would do a regular whois on the ip.
some people here will think sending out an email is stupid, yet with a line count of the illegals from last week totalling over 6000, it's nice to see a reply stating that they have been taken offline.
so it's up to you.
cheers.
|
|
|
|
07-06-2005, 12:49 AM
|
#193
|
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
It's a script for sure, no one will try by hand dictionary with UIDs, try pam_tally to limit the login attempts and if someone can actually tell me how to use it/..
I had "Pamela" as invalid user login attempt it's so funny
p.s. just any tip for pam_tally will do, I tried goolin' for it - no luck
Last edited by johnnydangerous; 07-06-2005 at 12:53 AM.
|
|
|
|
07-06-2005, 05:23 AM
|
#194
|
|
Member
Registered: Oct 2004
Posts: 229
Rep:
|
pam_tally only had this problem:
that once the maximum password failures has been exceeded,
SSH/PAM still give a clear indication of when you've cracked the right password.
If you give a bad password, you get a 2-second delay and a new prompt:
dummylocalhost's password:
Permission denied, please try again.
dummylocalhost's password:
If you get it right, you get the message:
dummylocalhost's password:
Read from remote host localhost: Connection reset by peer
Connection to localhost closed.
The solution is pam_abl. An auto black list module, that black lists IP's and not users. So that your users don't get blocked.
|
|
|
|
07-06-2005, 08:11 AM
|
#195
|
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
pls provide some info about pam_abl and sshd how to bind it together
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:03 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|