LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-06-2003, 09:12 AM   #1
antken
Member
 
Registered: Nov 2000
Posts: 368

Rep: Reputation: Disabled
setting a trap


hi,

i am unsure if one of my servers has been hacked, as a precaution to see of the hacker comes back can i set a trap of some sort to tell me if someone is logging in?

if i can set a trap how would i go about it?
 
Old 01-06-2003, 10:34 AM   #2
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
It depends where you suspect you've been hacked via, check all your log files everywhere for ip addresses or names that you dont recognize.

also try...
www.chkrootkit.org to see if they've left any back doors.

but setting a trap isn't going to do you any good if your software is still insecure, firstly upgrade your softwares to the latest versions so they're less likely to be hacked into, then try to fix things up otherwise they'll just come again and again.
 
Old 01-07-2003, 01:39 PM   #3
cuss
Member
 
Registered: Dec 2002
Posts: 63

Rep: Reputation: 15
Yes, check log files. A neat log watching tool is SWATCH (http://packetstormsecurity.nl/UNIX/IDS/indexdate.shtml). You will need perl installed to run SWATCH. Once they are both installed you can configure SWATCH to look for both failed logon attempts as well as successful logon attempts. Since there shouldn't be too many people with the rights to logon to the server you will recognize a different name or IP if they have successfully logged on. Or you may find interesting patterns such as 2 failed attempts and a successful attempt all within 1 minute or something. This would be cause for concern. Configure SWATCH to send you an email in real time whenever something suspicious happens to your server. If you are running ssh disable root logons.
 
Old 01-08-2003, 03:39 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
I agree with niknah and cuss you should first check your reporting for anomalies, and then fix your current SW setup.

Please apply this rule before every other rule: if you can't trust a system for 100 percent, reformat+reinstall. I mean your best bet is to assess tru what means the compromise happened and what damage was done. Then decide to repair, restore a backup or reformat+reinstall on the basis of your knowledge + your assessment of the damage. Also don't forget to replace all security and authentication info after restore/reinstall.

Not to cramp your stylee, but I would never give you the advice to set up a trap or use a box as honeypot if you haven't got a clue about what damage has been done already and what the crackers intentions where/are. You may well be investing more time that you'll get (usefull) info out of it.
 
Old 01-09-2003, 05:22 PM   #5
epeus
Member
 
Registered: Oct 2002
Posts: 41

Rep: Reputation: 15
on the topic of honeypots....here is a site that has some very interesting info and gear regarding honeypots

http://www.project.honeynet.org/

Ed.
 
Old 01-11-2003, 01:24 AM   #6
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
how do you disable root log-ons via ssh? and also, i see you guys mentioning reading logs, with a default install of 7.3, where would the logs be located or what are the filenames of said logs.

Last edited by Robert0380; 01-11-2003 at 01:27 AM.
 
Old 01-11-2003, 06:45 AM   #7
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
edit /etc/ssh/sshd_config(or whereever sshd_config is) and change "PermitRootLogin no"
The logs should mostly be in /var/log/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to send snmp trap & recieve trap in C program minil Programming 3 07-10-2010 09:22 AM
Kernel trap (Fatal trap 12) m!k@EL *BSD 4 09-05-2007 11:58 PM
What is trap program?? Zero-0-Effect Linux From Scratch 2 09-17-2004 09:07 PM
specific-trap? PTBmilo Linux - Security 6 05-26-2003 03:09 PM
Setting security trap... ugenn Linux - General 6 11-13-2002 11:56 AM

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

All times are GMT -5. The time now is 07:57 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