LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-11-2007, 11:54 PM   #1
Narayandutt
LQ Newbie
 
Registered: May 2006
Posts: 11

Rep: Reputation: 0
Tracking a hacker who is trying to hack My server from some part of world


Hello Everybody,
Can anyone let Me know how do I trace a
Hacker who is Hacking My Server from some part of world.
My Server is running Some of the networking services.
What would be My Steps to trace him. How would I find him. My Server is linux server.
 
Old 05-12-2007, 12:03 AM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
We need more information:

What services are you running?
What services are they attacking?
How do you know you are being attacked?
Are they using one ip address or many?
How comfortable are you with networking tools?
Have you searched the internet for the details of the attack(s) to see if you can find anything similar?
If so, what did you find and what questions do you have?


Edit: Once we have some of this information, we can talk about specific distributions and such. But you should ensure that you are running the most recently patched versions of all your services.

Last edited by frob23; 05-12-2007 at 12:05 AM.
 
Old 05-12-2007, 12:26 AM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Ok, the first thing to know is that the real world is not like the movies, in case you think that. If someone is stupid enough to hack you directly from their IP, then you can get their IP. With that, you could try to contact their ISP and find out more about them. Any decent hacker will connect through a whole series of compromised computers. You'd need to trace them back through each. And if they're going through something like tor, the odds of being able to trace them is next to nil.
 
Old 05-12-2007, 02:09 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If your box is cracked then the first thing to do is to take steps to make sure the box is fully under your control, not go off to try and find the cracker. If she left traces, or you recorded traces, then you can save that task for a later stage.

Note steps 1 tru 3 should be taken as soon as possible. The decision should be made according to what you know (or perceive) wrt damage done and the risk to data, machine and network. Other reasons usually do not lead to a valid decision. While steps 1 tru 3 should be taken ASAP, and 4 tru 6 right after, you should perform these tasks at a pace you can handle. Stress usually leads to sloppiness and making mistakes. Also try not to assume things: investigate, make certain (time and knowledge permitting).

I. First read this doc: Intruder Detection Checklist (CERT): http://www.cert.org/tech_tips/intrud...checklist.html,
II. Next record volatile information like network connections, process and open files details,
III. Next decide, based on what you know or suspect, if the box was compromised so severely that you should either shut it down completely or could mitigate the situation by disabling services and restricting access (firewall) to your management IP (range). If you decide the situation is serious enough to shut down, only boot again from a Live CD like HELIX, KNOPPIX(-STD) or equivalent,
IV. Only after stabilising prepare off-site backups (configuration and logging data, usually /etc/and /var) or dd images for an in-depth investigation. Do not make backups for direct reuse because at this stage you don't know what's been tampered with,
V. Now you got backups run any verification methods you have like file integrity checkers, package managers, chkrootkit, Rootkit Hunter (if installed),
VI. Next we need to build an understanding of the situation. So in addition to Frob's questions, what's:
- the location (home, colo, office) and purpose of the box (available services), the (perceived) date of incident and the distro/release/kernel?
- Looking at the logs you saved, data from adjacent machines, IDSes, routing devices does any of the audit data, auth data, IDS, system, daemon and firewall logs show traces of "weird behaviour", irregularities or illegitimate access?
- What software was installed?, was it all kept updated?
- Are there any setuid root files in temp dirs?
- Processes piggybacking on your LAMP setup?
- Do user shell histories reveal things?
* The more info you give us, the better we will be able to give you advice tailored to your situation.

VII. Finally if we can determine the box was compromised severely the next steps are to repartition, reformat, re-install from scratch. For that read: Steps for Recovering from a UNIX or NT System Compromise (CERT): http://www.cert.org/tech_tips/root_compromise.html
VIII. Then you want to harden the box. Maybe the LQ FAQ: Security references: http://www.linuxquestions.org/questi...threadid=45261 could help. Remember security is not applied once, you'll have to audit and adjust constantly.
 
Old 05-15-2007, 01:40 AM   #5
rch1231
Member
 
Registered: Mar 2007
Location: Bedford, Texas
Posts: 31

Rep: Reputation: 15
The first places I look:
/var/log/secure
/var/log/messages
last

secure is a log of every one that tried or succeeded logging onto your server and from where.
messages show the user name and password they attempted.
last tells you who last logged in for a period and where from.

In most cases what you are seeing is scripts that are attempting to hack your server and get in via a users weak password. (Like password or test123 etc.)
 
Old 05-15-2007, 12:06 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
secure is a log of every one that tried or succeeded logging onto your server
Spose this 'user' didn't log in. Then what? :-]


Quote:
In most cases what you are seeing is scripts that are attempting to hack your server and get in via a users weak password.
In most cases what you would see is people running ill-configured, unprotected or stale applications and no logging and no intrusion detection and no auditing...
 
Old 05-15-2007, 01:44 PM   #7
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 37
Quote:
Originally Posted by Matir
Ok, the first thing to know is that the real world is not like the movies, in case you think that. If someone is stupid enough to hack you directly from their IP, then you can get their IP. With that, you could try to contact their ISP and find out more about them. Any decent hacker will connect through a whole series of compromised computers. You'd need to trace them back through each. And if they're going through something like tor, the odds of being able to trace them is next to nil.
conntact the ISP...
if tge ISP has a contract to hold their users private information you've hit the wall
i know i got attacked from a user on the same ISP as i am
and i have some connection up in that ISP and getting info out of them was a no go...
all i could get them was for them to check it out...witch nothing happened then...

but you made a good point
who will be stupid enough to crack from their own IP...
 
Old 05-15-2007, 03:53 PM   #8
unixfool
Member
 
Registered: May 2005
Location: Northern VA
Distribution: Slackware, Ubuntu, FreeBSD, OpenBSD, OS X
Posts: 782
Blog Entries: 8

Rep: Reputation: 158Reputation: 158
Quote:
Originally Posted by Tux-Slack
but you made a good point
who will be stupid enough to crack from their own IP...
Many people don't know that their machine has been compromised and is actively scanning another machine, whether a human-being is actually doing the scanning/cracking, or a virus or other malware. Most times, this is the case, vs. someone scanning from their own account.
 
Old 11-03-2007, 03:51 PM   #9
zepplinforever13
LQ Newbie
 
Registered: Sep 2007
Location: my mom always said not to tell strangers where i live
Distribution: elive gem
Posts: 8

Rep: Reputation: 0
[QUOTE=Narayandutt;2745834]Hello Everybody,
Can anyone let Me know how do I trace a
Hacker who is Hacking My Server from some part of world.
My Server is running Some of the networking services.
What would be My Steps to trace him. How would I find him. My Server is linux server.[/QUOTE

Ok it wasn't a hacker Xr011
 
Old 11-03-2007, 04:55 PM   #10
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by zepplinforever13 View Post
Ok it wasn't a hacker Xr011
If you're going to resurrect a thread that's been dead for months, you could at the very least make sure your post makes some amount of sense. Either way, you should refrain from posting if you don't have anything constructive to say (as mentioned in the LQ Rules). Don't make a habit of this.

Last edited by win32sux; 11-03-2007 at 04:57 PM.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tracking source of hacker Boss Hoss Linux - Security 9 07-08-2006 10:32 AM
In this open source world, which part are you in?? woranl General 1 05-12-2005 05:09 AM
Your part of the world lackluster General 13 11-09-2004 06:01 PM
Hacker or Spacker? Do you hack or spack? Q*Bert General 8 05-04-2003 01:20 PM
Microsoft vs. the World, Part I sancho5 Linux - General 9 08-01-2001 04:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration