TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 08-07-2009, 12:23 PM   #1 (permalink)
The Acquainted
 
JaoudeStudios's Avatar
 
Join Date: Jul 2009
Location: Surrey
Posts: 105
Thanks: 1
JaoudeStudios is on a distinguished road
Default Linux secure log files

My secure logs have pages and pages (megs) of...

Aug 7 14:07:35 host-78-129-251-11 sshd[8330]: Connection closed by 87.117.237.68

Is this an attack attempt?
__________________
JaoudeStudios.com | JaoudeStudios.com Forum | JaoudeStudios.com Blog
OpenSource is the road ahead...!
JaoudeStudios is offline  
Reply With Quote
Old 08-07-2009, 02:49 PM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

I'm no expert, but it sounds like it could be some sort of brute force attack.
__________________

Village Idiot is offline  
Reply With Quote
Old 08-07-2009, 03:11 PM   #3 (permalink)
The Acquainted
 
JaoudeStudios's Avatar
 
Join Date: Jul 2009
Location: Surrey
Posts: 105
Thanks: 1
JaoudeStudios is on a distinguished road
Default

But why 'connection closed' by their ip, surely it would be connection closed by my ip, or connection refused/failed.

How can I prevent this, and/or prove it is an attack?
__________________
JaoudeStudios.com | JaoudeStudios.com Forum | JaoudeStudios.com Blog
OpenSource is the road ahead...!
JaoudeStudios is offline  
Reply With Quote
Old 08-07-2009, 03:15 PM   #4 (permalink)
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 335
Thanks: 2
Enfernikus is on a distinguished road
Default

The only way to prevent a bruteforce attack is to count the number of login attempts and ban the user after so many, how ever this becomes cumbersome when a user has legitimately forgotten their password and therefore is forced to go through an entire password recovery process. Sometimes, I'll set the number somewhat high so I can avoid this ( like 10 attempts ).

The connection is closed by their IP because they're the ones trying to connect. And on failure they'll close the connection and retry a login.

Regarding what I said before, I see now it's shell access, so I would suggest simply doubling up the complexity of your password ( an un-caged ssh password should be complex already but just to make sure ) and banning that IP
__________________
My Blog
Enfernikus is offline  
Reply With Quote
Old 08-07-2009, 03:38 PM   #5 (permalink)
The Contributor
 
ioan1k's Avatar
 
Join Date: Mar 2009
Location: US
Posts: 76
Thanks: 0
ioan1k is on a distinguished road
Default

It's a bruteforce attack, they are running the attack from a server hosted on
http://www.rapidswitch.com/ ... contact them explain what has happened and give them the log information you have and I'm sure their they will disable this idiots server.

As for the attacks is this a hosted server or your own personal machine?

If it is your own machine you could just simple disable remote access to the shell if it is your own machine.

If it is a hosted server my recommendations are to disable access to the root login if it is not already done so until this is handled and update passwords for any users with access to any vulnerable areas.
__________________
My Portfolio - Work - Need freelance Work?
I've been developing 5 years now, and I learn something new everyday
ioan1k is offline  
Reply With Quote
Old 08-07-2009, 04:48 PM   #6 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Also make sure your password is very strong, I recommend at least eight characters with mixed case and at lest one number and one special character.
__________________

Village Idiot is offline  
Reply With Quote
Old 08-07-2009, 05:11 PM   #7 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

You should *always* disable direct root login access.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 08-08-2009, 08:57 AM   #8 (permalink)
The Acquainted
 
JaoudeStudios's Avatar
 
Join Date: Jul 2009
Location: Surrey
Posts: 105
Thanks: 1
JaoudeStudios is on a distinguished road
Default

Thanks for your response everyone. I was quite nervous about this yesterday.

I have a complex password and always disable direct root access. On all my boxes, home & dedicated. Some people have recommended changing the ssh port, is this worth it?

I found out it is one of RapidSwitch's monitoring servers, so I have now unblocked it from my firewall. They should publish this information to their clients so we know to ignore anything from their IPs.

While looking through my secure logs I have noticed an other IP which seems to be going to town with quite a few attempts at logging in per minute, and I have confirmed with RapidSwitch it is not any of theirs - so I might post back a bit of the log file, as the log file show something slightly different in reference to their log in attemp.
__________________
JaoudeStudios.com | JaoudeStudios.com Forum | JaoudeStudios.com Blog
OpenSource is the road ahead...!
JaoudeStudios is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to protect your php files & database if PHP fails! Sam Granger Tips & Tricks 5 02-18-2012 08:07 PM
Since when, Linux? delayedinsanity The Lounge 13 08-26-2008 12:24 PM
Retrieving Files from a Backup in Vista CMellor The Lounge 2 06-24-2008 02:34 PM
Linux Ubuntu CMellor The Lounge 8 12-22-2007 10:33 AM
Uploading Files with PHP daz Absolute Beginners 3 09-30-2007 06:23 PM


All times are GMT. The time now is 08:34 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design