You are not logged in.

#1 2014-07-24 10:59:43

Socal Tom
Member
Registered: 2013-04-09
Posts: 21

Strange ip has been on my server -what do I do?

I'm basically a Newb,
I ran top yesterday and discovered /user/sbin/httpd was running in several instances started by a guest account.  I reviewed the auth.log and found long streams of login attempts with multiple different names. They finally discovered an account that was created without a password I forgot about.
I've removed that account, disabled my ssh port forward. Anything else I should do? Do I report this to the authorities? If so who?
How do I check and see what else they may have done?
Thanks
Tom

Offline

#2 2014-07-24 15:25:15

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: Strange ip has been on my server -what do I do?

If the access attempts were from the same IP address you can block that IP in httpd, and by configuring your iptables firewall.
http://httpd.apache.org/docs/2.2/howto/access.html
https://wiki.archlinux.org/index.php/Iptables

Last edited by Cyrusm (2014-07-24 15:30:36)


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#3 2014-07-24 15:38:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: Strange ip has been on my server -what do I do?

Socal Tom wrote:

I'm basically a Newb,

Welcome to Arch Linux.

I ran top yesterday and discovered /user/sbin/httpd was running in several instances started by a guest account.  I reviewed the auth.log and found long streams of login attempts with multiple different names. They finally discovered an account that was created without a password I forgot about.

How is your machine attached to the Internet?  If you are behind a router on a private LAN, then you had to have opened ports and forwarded them to your machine.  One of those would have to have been port 44322 for ssh.  HTTP ports would have to be opened separately.  Does your router have a password when you access it from your LAN?  Is there a password set?  If so, an intruder would have a more difficult time making a http server accessible from the Internet.

Also, (This is important) Do you know the port numbers on which those servers were running?  I ask, because port numbers below 1024 require root access to open.  If an intruder was able to open a privileged port, then that intruder acquired root privileges and you should consider your system to be completely compromised.  Had that guest account, the one without a password, been a member of the 'wheel' group?   

I've removed that account, disabled my ssh port forward. Anything else I should do? Do I report this to the authorities? If so who?

No. No one is going to care about an intrusion into a home server.

How do I check and see what else they may have done?

You need to determine whether they obtained root privilege.  Positive evidence may exist in the logs.  Lack of evidence cannot be trusted as the data cold have been tampered. If the account was a member of 'wheel', I would not trust your system.  If you are sure they did not attain elevated privilege, you might be okay.  Knowing the port numbers would be helpful in making that determination.
If you have a router, audit it for open ports or DMZs.  Ensure that you know why and how each one is open.

Edit: Fixed port number for ssh.  I had given the port for https

Last edited by ewaller (2014-07-25 14:47:40)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2014-07-24 16:59:46

Socal Tom
Member
Registered: 2013-04-09
Posts: 21

Re: Strange ip has been on my server -what do I do?

They did not get root access as far as I can tell. The port forward was for port 22, which I believe is the default ssh port. The account was in the user group, and it appears they tried to use perl to start httpd, which is not installed on this machine.  It appears they used perl to grand start httpd, sys/init was the parent process. .This is a pogoplug I use as an openvpn server/ plex server. BTW, there were multiple IPs, I looked up 2 of them and the were from China.
Thanks for the assistance
Tom

Offline

#5 2014-07-24 17:10:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Strange ip has been on my server -what do I do?

Assume you are pwned. Nuke from orbit. Chalk it up as a learning experience.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2014-07-24 17:29:58

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: Strange ip has been on my server -what do I do?

Socal Tom wrote:

BTW, there were multiple IPs, I looked up 2 of them and the were from China.
Tom

Imagine that.  I average six attacks a day from China on my system.
I agree with Jasonwryan.  Reinstall and lock it down


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2014-07-24 17:36:25

Socal Tom
Member
Registered: 2013-04-09
Posts: 21

Re: Strange ip has been on my server -what do I do?

ewaller wrote:
Socal Tom wrote:

BTW, there were multiple IPs, I looked up 2 of them and the were from China.
Tom

Imagine that.  I average six attacks a day from China on my system.
I agree with Jasonwryan.  Reinstall and lock it down

Will do, easy enough to do, especially with archlinux arm.
Tom

Offline

#8 2014-07-24 19:03:26

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,697
Website

Re: Strange ip has been on my server -what do I do?

jasonwryan wrote:

Assume you are pwned. Nuke from orbit. Chalk it up as a learning experience.

+1.  If the person has access via ssh for example, he/she can reverse tunnel anything out of your box, vnc, http, whatever.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2014-07-25 10:53:54

czubek
Banned
Registered: 2012-03-08
Posts: 141

Re: Strange ip has been on my server -what do I do?

Based on the OP, can it be concluded that Mr. Tom's mishap occured as a result of a forgotten guest account?

Offline

#10 2014-07-25 14:51:29

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: Strange ip has been on my server -what do I do?

czubek wrote:

Based on the OP, can it be concluded that Mr. Tom's mishap occured as a result of a forgotten guest account?

I would say so.  Based upon what he wrote, It would appear the shell history file was intact.  Either that, or unsuccessful attempts to do things were logged and tagged with the user ID.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#11 2014-07-25 15:24:17

czubek
Banned
Registered: 2012-03-08
Posts: 141

Re: Strange ip has been on my server -what do I do?

@ ewaller. It makes sense that guest accounts are typically disabled by default and conscious effort is required to enable them. I did many of the recommendations contained in the "lock it down list", after reading this.

Offline

Board footer

Powered by FluxBB