[edit] You might want to take a look at User-mode Linux
[another edit] After you have re-installed everything run a good nessus scan and deal with any issues it reports.

Code: Select all
If you never heard about LDAP before, *DON'T* enable LDAP support in
Pure-FTPd. LDAP is useless if you don't have to manage many shared accounts.

The exploit was local (you needed to log in first) so, maybe they cracked into a user account and went from there. Another reason to take gcc off of the machine.Dalrain wrote:Hmm....so I was thinking on this, and I was wondering what kernel version you were running?
You could also use networked logging ( a little tricky, but easy once learned) with syslog-ng. You could also impliment snort on another machine with a one-way sniffing cable (do a Google).Dalrain wrote:Also, I'm not sure just how important this box is, but you could always use a machine with networked logging, or go with the old trick
So, in short, you would not mind that they could emerge packages, build kernel modules or simply eat up 100% of your processor?mortix wrote:i do not think gcc is a issue here...
when someone managed to break into your server,it'just not imprtant if u have or not gcc installed..tha basic ideea is that the cracker got acces to your box,and therefor it is compromised..i think it is senseless trying to encrease secutiry from this point(once the cracker is loged into the box)...
so i prefer to let gcc on my box instead of heaving outdated software...
yes,you're rightpaul138 wrote:So, in short, you would not mind that they could emerge packages, build kernel modules or simply eat up 100% of your processor?mortix wrote:i do not think gcc is a issue here...
when someone managed to break into your server,it'just not imprtant if u have or not gcc installed..tha basic ideea is that the cracker got acces to your box,and therefor it is compromised..i think it is senseless trying to encrease secutiry from this point(once the cracker is loged into the box)...
so i prefer to let gcc on my box instead of heaving outdated software...

Precisely. If someone gets a shell you're shit out of luck. Most hacks are due to poorly configured servers, bad CGI scripts...etc. Remember the apache.org defacement when it was rooted (by grey hats as a proof of concept) because of bad configuration settings and nothing else. Security by obscurity is a joke IMO and a false confidence booster for the lazy. Real security is about doing a lot of little things right, monitoring logs and keeping current with patches.mortix wrote:the main ideea is:
if the cracker managed to login to your box(_this_ is the hard part)with or without gcc you are kaputt...
as a sysadmin you must prevent this from happening!!
and this has nothing to do with gcc.....

don't forget backups. (of everything...data AND logs)Vancouverite wrote:Precisely. If someone gets a shell you're shit out of luck. Most hacks are due to poorly configured servers, bad CGI scripts...etc. Remember the apache.org defacement when it was rooted (by grey hats as a proof of concept) because of bad configuration settings and nothing else. Security by obscurity is a joke IMO and a false confidence booster for the lazy. Real security is about doing a lot of little things right, monitoring logs and keeping current with patches.mortix wrote:the main ideea is:
if the cracker managed to login to your box(_this_ is the hard part)with or without gcc you are kaputt...
as a sysadmin you must prevent this from happening!!
and this has nothing to do with gcc.....
Code: Select all
w
id
locate httpd.conf
pwd
find / -name httpd.conf
cat /usr/local/apache/conf/httpd.conf | grep ServerName
find / -name httpd.conf
cat /usr/local/apache/conf/httpd.conf | grep ServerName
ps ax
kill -9 17371
kill -9 17208
kill -9 cd /etc
cd /etc
w
ls
cat hosts
cd /web
ls
cd domain.com
ls
cat index.htm
mv index.html index.bak.html
mv index.htm index.bak.htm
echo Perfect.BR > index.htm
ls
cat index.
cat index.htm
cd html/
ls
cd ..
cd ..
ls
w
cd domain2.com
ls
mv index.php index.bak.php
echo Perfect.BR > index.php
cd ..
cd domain3.com
ls
mv index.php index.bak.php
echo Perfect.BR > index.php
cd ..
cd domain4.com
ls
mv index.php index.bak.php
echo Perfect.BR > index.php
cd ..
ls
cd domain5.com
ls
mv index.php index.bak.php
echo Perfect.BR > index.php
cd ..
cd domain6.com
ls
mv index.php index.bak.php
echo Perfect.BR > index.php
cd html/
ls
cd /web
ls
cd domain7.com
ls
mv index.php index.bak.php
echo Perfect.BR > index.php
cd /root
rm .bash_history
ls -al
ls -la
rm /var/log
rm -rf /var/log
exit
Code: Select all
#!/bin/bash
emerge sync
emerge -u world
Those d00ds are lam3. lol, looks like beginners.Slynix wrote:http://www.dominasecurity.com/hackerz/perfectbr.htm
Don't do that! It puts a lot of needless load on the servers.chmod wrote:I am running a Gentoo 1.4 box on a dual Xeon 2.4Ghz Intel board. I installed 1.4RC2 on it and have kept it updated by emerging "-u world" every few days.
A. Look for time and date stamps that are inappropriate. Thischmod wrote: Tonight I went to a site of mine, to find the index page had been moved with a new one in it's place. Also the intruder kindly removed the /var/log directory, and my last year or so of logs.
Where do I start even looking to find out who did this? Is there a likely hole in gentoo because of this? I'm no security buff, but I have kept openssh updated, and have no other users of this machine.
Can someone help me start hunting for what caused this? I'm not as much interested in catching the cracker as I am in preventing this from happening again.
There are actualy quite a lot of them... crackers don't disclose their exploits, many don't even tell their friends.Koon wrote:As a conclusion, we sure hope there is no unknown vuln in the wild in a common package, but we cannot help you without an intimate knowledge of everything that was done and installed on your machine, the physical context around it, etc...
How do you do this? I recently installed a box in what I planned to be a server-config, included USE="-X" in my make.conf, but emerge system still installed X.paul138 wrote: Do not install X windows on a server. This has proved fatal many times (especially where web servers are concerned, it is possible to start an xterm on a remote system with the right peice of buggy code and netcat).
Is there a way to do this but still be able to install new packages on the server? For me this is my big dilemma with gentoo. Installing requires a compiler, but a compiler on a server is a security risk! Any suggestions for overcoming this paradox?If possible, remove gcc alltogether. Keep a mirror of the system at your office and build the updates as packages at the office then scp them (or take them on a CDR) to the remote machine. Use emerge -k [package] to install it, no gcc needed.
When installing programs, use the -pv options for pretend/verbose output. Remove USE flags to get rid of X dependecies as needed.chrisis wrote:How do you do this? I recently installed a box in what I planned to be a server-config, included USE="-X" in my make.conf, but emerge system still installed X.paul138 wrote:Do not install X windows on a server. This has proved fatal many times (especially where web servers are concerned, it is possible to start an xterm on a remote system with the right peice of buggy code and netcat).