Linux problem
-
- Posts: 1975
- Joined: Mon Jan 24, 2005 10:14 pm
Linux problem
So I had left my linux webserver running for like a week or whatever. Today I turned on the monitor and noticed that the firewall I was using had crashed. I was like "okay whatever" and restarted the firewall. Then I installed MySQL server onto it. After that I logged out and logged back in because I forgot the command to restart the GNOME panel. So when I log back in, I can't run any programs. When I do, it gives me the error "can't run program as root." The thing is, I hadn't logged in as root nor was I in the first place.
So uh. What? Have I been haxed or something? It wouldn't surprise me since I don't know that much about Linux and webserver security.
So uh. What? Have I been haxed or something? It wouldn't surprise me since I don't know that much about Linux and webserver security.
-
- Posts: 4755
- Joined: Mon Oct 22, 2001 7:00 am
Could be a mysql worm thing, are you running iptables with the mysql port blocked? what services are currently open?
Are you running debian?
if so: apt-get install chkrootkit
when done, run "chkrootkit" from command line with no options
With other distro, download the source and compile it (check the README, as my instructions are from about a year or so ago and things change in the linux community occasionally)
wget f t p : //ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
tar zxvf chkrootkit.tar.gz
cd chkrootkitxxx(whatever version blah blah)
./configure
make
make install
from the extracted directory, then again, simply run ./chkrootkit
if it does not compile or install correctly and you've had no troubles like this in the past, I would blow it away as soon as possible and re-install if you're protecting sensitive data behind it. If it's just a home firewall, you can piss around with it, do some googling on Autopsy Forensic Browser and tweaks that will help you dive into and possibly catch any shit fucks dicking with your gear. Whatever the case, it definately does not sound good--best of luck to you mate.
Are you running debian?
if so: apt-get install chkrootkit
when done, run "chkrootkit" from command line with no options
With other distro, download the source and compile it (check the README, as my instructions are from about a year or so ago and things change in the linux community occasionally)
wget f t p : //ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
tar zxvf chkrootkit.tar.gz
cd chkrootkitxxx(whatever version blah blah)
./configure
make
make install
from the extracted directory, then again, simply run ./chkrootkit
if it does not compile or install correctly and you've had no troubles like this in the past, I would blow it away as soon as possible and re-install if you're protecting sensitive data behind it. If it's just a home firewall, you can piss around with it, do some googling on Autopsy Forensic Browser and tweaks that will help you dive into and possibly catch any shit fucks dicking with your gear. Whatever the case, it definately does not sound good--best of luck to you mate.
Last edited by Underpants? on Tue Feb 14, 2006 3:30 pm, edited 1 time in total.
-
- Posts: 4755
- Joined: Mon Oct 22, 2001 7:00 am
-
- Posts: 4755
- Joined: Mon Oct 22, 2001 7:00 am
-
- Posts: 4755
- Joined: Mon Oct 22, 2001 7:00 am
Re: Linux problem
that's normal, actually if you're logged in as a regular user and trying to run admin applications like the networking control panel or tweak the services.eepberries wrote: So when I log back in, I can't run any programs. When I do, it gives me the error "can't run program as root."
If other binaries don't work as su from commandline then there's little question you're in some kind of trouble. The only sane thing to do would be a very selective backup of /etc and /var or whereever you keep any tweaks and modified files or directories and reinstall
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Problem is, if I were to root a box, `netstat` would, along with `ps`, be the first tool I replaced with a homebrew version. You might want to boot up a rescue disk for this.Underpants? wrote:also, it doesn't hurt to try a little passive promiscuity:
tethereal -i eth0
(run it first on the outside then the inside interfaces)
netstat -peat
you're looking for odd traffic and connected ports.
good times are ahead, man don't panic you'll get it sorted.
-
- Posts: 4755
- Joined: Mon Oct 22, 2001 7:00 am
-
- Posts: 4755
- Joined: Mon Oct 22, 2001 7:00 am
-
- Posts: 1975
- Joined: Mon Jan 24, 2005 10:14 pm
Actually, I tried restarting it like suggested and the problem is gone. However, what things should I do in general in terms of security? Also, there really isn't anything important on the computer. The only thing I use it for is image hosting. Besides that I don't touch it, and since I can upload to it remotely I never actually physically touch it anyway :icon26:. The only ports I have open on it (assuming it works right) are html to the internet, ssh to my main computer, and now sql to my main computer.
Really the only thing I'm worried about is the Linux computer getting compromised and then messing up the other computers on my network.
Really the only thing I'm worried about is the Linux computer getting compromised and then messing up the other computers on my network.
Last edited by eepberries on Tue Feb 14, 2006 5:40 pm, edited 1 time in total.
-
- Posts: 22175
- Joined: Sun Oct 14, 2001 7:00 am
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
-
- Posts: 4755
- Joined: Mon Oct 22, 2001 7:00 am
specify that in your first post next time, piss-cock.eepberries wrote:Also, there really isn't anything important on the computer. The only thing I use it for is image hosting.
Lock down your chains/firewall rules, and remove all unnecessary packages, using RPM, yum or apt. I wouldn't just remove the links and be comfortable, though that's all some admins will do.eepberries wrote: However, what things should I do in general in terms of security?
As far as I know your firewall should never shut down or "crash" under normal circumstances. Run a service restart and check your logs for fucked up rulesets and other errors. If you find none, suspect the worst.
I would particularly worry if your web server is running customized PHP upload or editing scripts, backends (such as php/postnuke), or blog packages.
-
- Posts: 4755
- Joined: Mon Oct 22, 2001 7:00 am
This would be good for possibly noticing connected hosts, but as this ^ guy mentioned earlier, if your box is compromised, you'll most likely see nothing from the netstat command. eep I would start with a careful check of the firewall rules first since this is what you noticed as a problem initially. Iptables/chains will filter or even mask, depending on the rule, most of the ports you'll find open in a netstat.^misantropia^ wrote:What does `netstat -tulp` (as root) say?eepberries wrote:The only ports I have open on it (assuming it works right) are html to the internet, ssh to my main computer, and now sql to my main computer.
In other words, starting here would be like walking to the corner newspaper stand before putting on your underpants, or in doombrain's case, girdle.
-
- Posts: 22175
- Joined: Sun Oct 14, 2001 7:00 am
-
- Posts: 1975
- Joined: Mon Jan 24, 2005 10:14 pm
-
- Posts: 6926
- Joined: Thu Feb 10, 2000 8:00 am
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
-
- Posts: 1975
- Joined: Mon Jan 24, 2005 10:14 pm
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
I've been using GNU/Linux - more specifically, Debian - for years now, not just to run servers but as a desktop system, too. It takes some getting used to, but after that, there's no going back to the limiting kiddie playground that is Windows.AmIdYfReAk wrote:as much as i love Linux, its a workhorse.. through and through.. i still dont feel that it does a good job as a workhorse... but not as a desktop system
"Linux, putting the power back in power user since 1991" to coin a (admittedly corny) phrase.
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
-
- Posts: 6926
- Joined: Thu Feb 10, 2000 8:00 am
to each there own^misantropia^ wrote:I've been using GNU/Linux - more specifically, Debian - for years now, not just to run servers but as a desktop system, too. It takes some getting used to, but after that, there's no going back to the limiting kiddie playground that is Windows.AmIdYfReAk wrote:as much as i love Linux, its a workhorse.. through and through.. i still dont feel that it does a good job as a workhorse... but not as a desktop system
"Linux, putting the power back in power user since 1991" to coin a (admittedly corny) phrase.

-
- Posts: 22175
- Joined: Sun Oct 14, 2001 7:00 am