LinuxQuestions.org
Visit Jeremy's Blog.
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 10-20-2003, 02:57 PM   #1
smacky
LQ Newbie
 
Registered: Oct 2003
Posts: 2

Rep: Reputation: 0
I think I've been attacked!


I sat down in front of my box today, and some strange things had happened. X had been shut down, and some weird text was typed on the (root!) console prompt. "y0 4r3 h4c3d" or something. I actually had to backspace out this text before typing a command.

I tried to start X, but the X executable was removed. I reinstalled X, and now everything seems in order. I've changed all my passwords and read all logfiles - couldn't find something unusual.

I just can't understand how this could happen. nmap shows that the only open ports on my box are sshd and smtp. This is a fully updated system (Debian unstable) - installed last week. I haven't got a firewall though.

The question is: Is a hacker able to remotely type something on my console screen (this h4xx0r message), or is it more likely that someone has accessed the box physically?
 
Old 10-20-2003, 03:20 PM   #2
iainr
Member
 
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
Your question is impossible to answer fully without knowing how likely it is that a hacker got physical access to your box. It is certainly possible that the hacker typed something remotely on your console screen.

Firstly, I suggest you reinstall your box from scratch. If someone has put in a backdoor, just changing your passwords is not enough to stop them getting in again. In addition to this, some trojan may already have been planted and a competent hacker who got root access will have covered his or her tracks by tidying up the log files.

After reinstalling, check security. Install a firewall. Check that versions of sshd and snmpd you are running to make sure there are no known security issues. Run nmap/nessus against your PC to spot anything you've missed.

If someone might have got physical access to your PC, you'll need to take steps to deal with that - securing the location of your PC to prevent further unauthorised physical access.

On the bright side, I would guess the fact that the hacker announced his/her achievement to you at least suggests that nothing too dodgy has been done to your system (i.e. nothing which requires you not to realise you've been hacked to be effective). No point taking risks though.
 
Old 10-20-2003, 03:36 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
The question is: Is a hacker
First of all it's not "hacker", it's "cracker".

able to remotely type something on my console screen (this h4xx0r message), or
Defacers are crackers who don't give sh1t about keeping access and do all those mad shouts. Crackers usually will want to keep their activities covert to retain access.
The chance a defacer will hit you and put something on your console I would say is rather small because defacers need public "recognition" to boost their (groups) ego.

is it more likely that someone has accessed the box physically?
Yes, I think that is very likely. How many people do have physical access to your system?


BTW...

some weird text was typed on the (root!) console prompt.
Do you mean at the login prompt, or in an opened root shell?

I tried to start X, but the X executable was removed.
How did you know? I mean, you just couldn't start X, or it barfed out errors, or did you check your package manager to see the package was removed?

I reinstalled X, and now everything seems in order.
One of the worst things to do when trying to assess a system has been compromised is disturb it. Doing so will destroy most possible "evidence" of a breakin.

I've changed all my passwords and read all logfiles - couldn't find something unusual.
Did the contents of the passwd/shadow files changed then?
Did you check the login records (wtmp, lastlog, btmp)? Md5sums?

This is a fully updated system (Debian unstable) - installed last week. I haven't got a firewall though.
Then you got your priorities mixed up. Please invest time in securing and hardening your system before tweaking the pwetty pwetty desktop.

Last edited by unSpawn; 10-20-2003 at 03:38 PM.
 
Old 10-20-2003, 04:35 PM   #4
smacky
LQ Newbie
 
Registered: Oct 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you for your answers.

About ten people have physical access to my system. Some of them could have done this as a stupid joke. The "weird" text was typed in an open root shell.

The startx command gave the output /etc/X11/X no such file. I removed the x-window-system package and reinstalled it.

I know I should have a firewall. I'm so stupid. Haven't fully figured out iptables yet
 
Old 10-20-2003, 06:02 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
Haven't fully figured out iptables yet
Then by all means post your questions and how far you've gotten in a new thread. We're here to help...
 
Old 10-20-2003, 06:08 PM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
hmm, try firestarter, i've never really used it myself, but i hear it's a good gui tool for setting up a firewall...
 
Old 10-21-2003, 12:17 AM   #7
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Sounds like it's incredibly likely that you were "hax0red" by someone with physical access. They probably just removed the X binary and typed some goofy text at your prompt. A quick check of the root concole's history probably would have shown rm X somewhere in there.

By the way, remember when installing a system to keep it OFF the network until after you have it locked down. One of my friends found this out the hard way when he connected a Red Had box to the Internet immediately after installing it and it was rooted within 5 minutes (automated cracking tool got lucky).

Make sure you put up a default deny firewall when you first put the box on the network. That should allow you to grab software updates and patch up the security without allowing anyone to attempt to exploit services. Only start SSH and SMTP after the box is fully patched. Remember that you must be running OpenSSH 3.7.1p2 on Linux to be free of currently known exploits.

Oh, and one more thing: if the default MTA for Debian is still Sendmail, rip that sucker out and install something else. Postfix will mimic Sendmail's functionality very closely, without all the security problems. Qmail and Exim are two other alternatives.

Last edited by chort; 10-21-2003 at 12:18 AM.
 
Old 10-21-2003, 02:39 AM   #8
jayjwa
Senior Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 1,067

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
You ain't got a little brother that likes to play tricks, do you? In the age before computers, it might have been a dead mouse in your bed, now it's "j0U've h4Xor'ed!" <sigh.....>
 
  


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
netstat - Am I being attacked? techrolla Linux - Security 4 08-02-2007 06:58 AM
Virus Attacked! matchgirl Linux - Security 7 03-06-2006 07:39 AM
Have I been attacked? tangle Linux - Security 6 08-03-2003 08:33 PM
Help. Attacked by a Python jarin scott Programming 4 06-22-2003 11:07 AM
Being Attacked? andy18 Linux - Security 1 05-11-2003 11:09 AM

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

All times are GMT -5. The time now is 01:20 AM.

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