LinuxQuestions.org
Visit Jeremy's Blog.
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 03-19-2008, 12:21 PM   #1
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Rep: Reputation: 15
hacked?


just logged into my root account to install a program, and my software FOLDER hs gone, and an executable file 'software' has appeared with a file size of 1778301, with full permissions. i havent run this executable. i installed an online multiplayer game a few days ago, but that was in my limited user account, but something definatley isnt right.

would it be 'safe' to copy this 'software' executable over to a new user account and run it, to see what happens? or should i just get rid of it?

Last edited by jukebox55; 03-19-2008 at 12:22 PM.
 
Old 03-19-2008, 12:29 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Run the command "file software" to see what kind of file it is.

Report the output back here.

Forrest
 
Old 03-19-2008, 01:05 PM   #3
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
doing file software says bzip2 compressed data, block size =900k
 
Old 03-19-2008, 01:32 PM   #4
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
OK, I'm guessing it is a zipped up version of your software folder. Hard to tell what is inside without unzipping it. Run:
[code]
bzip2 -dvk software
file software.out
[code]

Report the output back here.

Forrest
 
Old 03-19-2008, 01:34 PM   #5
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
And you might type:
last
to see who and when the last logins were on your server. Comes in handy at times like these.
 
Old 03-19-2008, 01:53 PM   #6
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by forrestt View Post
Run:
Code:
bzip2 -dvk software
file software.out
Report the output back here.

Forrest
it says its a tar archive.

i also did last, but there were alot of logins that day as root and normal user which i remember doing, so i cant really tell.
 
Old 03-19-2008, 02:08 PM   #7
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by jukebox55 View Post
just logged into my root account to install a program, and my software FOLDER hs gone, and an executable file 'software' has appeared with a file size of 1778301, with full permissions. i havent run this executable. i installed an online multiplayer game a few days ago, but that was in my limited user account, but something definatley isnt right.

would it be 'safe' to copy this 'software' executable over to a new user account and run it, to see what happens? or should i just get rid of it?
If you suspected foul-play, then the last thing you should have done was to start playing-around with the suspicious (and possibly malicious) file. Getting rid of it would have been a bad idea too, as it's valuable evidence. A better approach would have been to firewall the box and start performing a basic inspection. I'm assuming you don't have an IDS installed, but if you do, you should bust-out the signatures and run a scan from a live CD once your inspection results have been recorded on separate media. Hopefully you haven't been owned (and you ascertain the origin of the file), and this will be no more than a wake-up call.

Last edited by win32sux; 03-19-2008 at 02:09 PM.
 
Old 03-19-2008, 02:21 PM   #8
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
Quote:
Originally Posted by jukebox55 View Post
it says its a tar archive.

i also did last, but there were alot of logins that day as root and normal user which i remember doing, so i cant really tell.
At least nothing is out of the ordinary. So hopefully no one was able to get in.
You can also view the root history file to see all the commands that were recently run.

more /root/.bash_history

ls -l of the suspect file will tell you the time & date it was created. That could also be a big clue.

Last edited by DotHQ; 03-19-2008 at 02:23 PM.
 
Old 03-19-2008, 02:26 PM   #9
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
win32sux, im not really very experienced with security at the moment unfortunately, but something has definately happened, and its since i played the online game.

ill check on that, DotHQ.

*EDIT* i cant see anything suspicious in the root .bash_profile

the 'software' file seems to have been created today march 19 at 16:51, which if i remember was around the time i logged in.

Last edited by jukebox55; 03-19-2008 at 02:43 PM.
 
Old 03-19-2008, 03:24 PM   #10
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
win32sux, the commands I had jukebox55 run didn't do anything to the suspected file. It should still be there in an unaltered state. And, at this point I'm pretty sure it is NOT a case of hacking (cracking).

Here is what I suspect happened. A tar of the software directory was created by some command that involved tar being piped to bzip2 but wasn't formatted in the proper way which resulted in the software directory being removed and this tarball created.

If you run the command:
Code:
mv software.out software.tar
tar -tvf software.tar
I would bet you will see the former contents of your software directory being listed.

Were you playing around w/ bzip2 or tar sometime today?

Forrest

Last edited by forrestt; 03-19-2008 at 03:33 PM.
 
Old 03-19-2008, 03:55 PM   #11
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
forrestt, your right, i think what happened was i had a new program in bzip format i wanted to install, but it was on my pendrive, so i logged into the root account, mounted the drive, then tried to mv the file into the root/software folder, but something must have happened.

when i did

'tar -tvf software.tar' it was indeed the name of the program that was on the pendrive.

i feel a bit dumb now lol. thankfully it wasnt something bad , although ive lost the 'software' folder and its contents, it doesnt matter too much.

this has taught me to start building my programs as a normal user in a safe user folder using su!

thanks forrestt, DotHQ, and win32sux. nice to know u people are around if/WHEN noobs like me screw thing up

Last edited by jukebox55; 03-19-2008 at 03:58 PM.
 
Old 03-19-2008, 04:12 PM   #12
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
If at some point you ran "cp /pendrive/filename.tar.bz2 /root/software" and it created a file called software in /root, then you already lost your software folder BEFORE that command was run.

You'll have to think back and determine if you had removed your software directory (or moved it somewhere else).

Good luck.

Forrest
 
Old 03-19-2008, 04:29 PM   #13
jukebox55
Member
 
Registered: Aug 2007
Distribution: slackware 11
Posts: 101

Original Poster
Rep: Reputation: 15
im pretty sure i didnt move the software directory. and you know whats funny, i remember glancing at the fortune message you get on log in and it said something like "we came, we conquered, we deleted your files", so i dont know what to think.

im gonna reformat and start again.
 
  


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
Am I being Hacked ? rizhun Linux - Security 4 09-07-2005 08:08 AM
Have I been hacked? af_dave Linux - Security 3 07-14-2004 02:02 PM
Got Hacked - What can I do? cli_man Linux - Security 5 12-22-2003 05:06 PM
Help! Have I been hacked? Tenover Linux - Security 1 11-19-2003 03:24 PM
Did we just get hacked? vous Linux - Security 4 11-17-2003 08:11 AM

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

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