vs. hackers

Well.. we all know how "hacking" basically occurs, bunch of ./ kids with some pretty interesting tools in their hands get the best of us... It's the case of big hosting providers also, nobody is safe these days... There's still hope! never give up to bad guys... In a weekly logs check i've discouvered several interesting hacking attempts on several domains hosted on my server. It seems like a automated scan&hack tool to check of miss configured servers or bugged software...
This time asking and getting a response regarding this issue was prompt after sending the ISP(hosting provider) a mail. The logs started like:

69.89.31.210 www.pgn.ro - [25/Nov/2009:23:47:59 +0200] "GET /index.php?c=../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../etc/resolv.conf HTTP/1.1" 200 3211 "-" "libwww-perl/5.831"
69.89.31.210 www.pgn.ro - [25/Nov/2009:23:48:00 +0200] "GET /index.php?c=../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../etc/resolv.conf HTTP/1.1" 200 3211 "-" "libwww-perl/5.831"


they didn't get through that's for sure... but still why cant we stop this action form happening (at least from the host in question). Many network administrators, in my oppinion anyway, find it easyer to deal the threat by making sure the hackers didn't get in and that's it... well all have a common idea that even if contacting the ISP it won't be enough... but sometimes it really counts, making sure that the hackers have a real fight on their hands so that it may be a real war for them to continue on...

Hello,

Thank you for the report of this activity. This type of activity is not
allowed by our terms of service. We have been able to identify several
shared hosting accounts on this and other IP addresses that appear to have
been infected with badware designed to infect yet more sites. We have
initiated appropriate action according to our terms of service agreement
with our account holders.

Please do not hesitate to contact us again if you detect further intrusion
attempts from our network.

Thank you,

Jeff
Tech Support Engineer
BlueHost.com
888.401.4678


It really pays off to see that working together could and can make a difference

IE vs restu' lumii

IE6 sux big time, IE7 sux a lil' bit, and IE8 tryes to keep the smell away from the average user... So what's to do? I mean i'm a FF fan but what about those that don't ever use IE or just use it occasionally? Here's just a few ideas why there's a difference between browsers:
1. IE6 does not support .png images
2. IE6 alignment is a bitch (don't ask)
3. IE6 CSS and XHTML standards sux...
4. Basically IE SUX!

Solutions? Well there might be some ... like creating stylesheets to match each browser demands...
Example:


<html>
<head>
<title>Do you see this page right?</title>

<![if !IE]>
<link rel="stylesheet" href="/css/OTHERStemplate.css" type="text/css" />
<![endif]>

<!--[if IE]>
<link rel="stylesheet" href="/css/IEtemplate.css" type="text/css" />
<![endif]-->

</head>
<body>
.....



Microsoft actually gave us some adivces in using IF so here's a basic "Browser quiz" to determinate some conditions:

<!--[if IE]><p>You are using Internet Explorer.</p><![endif]-->
<![if !IE]><p>You are not using Internet Explorer.</p><![endif]>

<!--[if IE 7]><p>Welcome to Internet Explorer 7!</p><![endif]-->
<!--[if !(IE 7)]><p>You are not using version 7.</p><![endif]-->

<!--[if gte IE 7]><p>You are using IE 7 or greater.</p><![endif]-->
<!--[if (IE 5)]><p>You are using IE 5 (any version).</p><![endif]-->
<!--[if (gte IE 5.5)&(lt IE 7)]><p>You are using IE 5.5 or IE 6.</p><![endif]-->
<!--[if lt IE 5.5]><p>Please upgrade your version of Internet Explorer.</p><![endif]-->

<!--[if true]>You are using an <em>uplevel</em> browser.<![endif]-->
<![if false]>You are using a <em>downlevel</em> browser.<![endif]>

<!--[if true]><![if IE 7]><p>This nested comment is displayed in IE 7.</p><![endif]><![endif]-->

Change the location of mysql database

FreeBSD

You want to change the location of the mysql databases which is by default /var/db/mysql.

safe_mysqld
If you start the mysql deamon with '/usr/local/bin/safe_mysqld' than you can just edit
this script and change the variable (it's in the begining of the script) 'DATADIR'.

mysqld
If you start the mysql deamon with 'mysqld':



Make a 'my.cnf' file, put it in /usr/local/etc and make sure it looks like this:

[client]
port = 3306
socket = /tmp/mysql.sock

# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = thread_stack=128K
datadir = [datadir]
# Start logging
log

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[mysql]
no-auto-rehash

[isamchk]
set-variable = key_buffer=16M


MySQL reads default options from the following files on Unix:

Filename Purpose
--------------------------------------------
/etc/my.cnf Global options
DATADIR/my.cnf Server-specific options
~/.my.cnf User-specific options

The following programs support option files:

mysql,
mysqladmin,
mysqld,
mysqldump,
mysqlimport,
mysql.server,
myisamchk,
myisampack.

You can use option files to specify any long option that a program supports! Run the
program with --help to get a list of available options.

An option file can contain lines of the following forms:

#comment
Comment lines start with `#' or `;'. Empty lines are ignored.
[group]
group is the name of the program or group for which you want to set options. After a
group line, any option or set-variable lines apply to the named group until the end
of the option file or another group line is given.

option=value
This is equivalent to --option=value on the command line.

set-variable = variable=value
This is equivalent to --set-variable variable=value on the command line. This syntax
must be used to set a mysqld variable.

The client group allows you to specify options that apply to all MySQL clients (not
mysqld). This is the perfect group to use to specify the password you use to connect to
the server. (But make sure the option file is readable and writable only to yourself.)

Note that for options and values, all leading and trailing blanks are automatically deleted.
You may use the escape sequences `\b', `\t', `\n', `\r', `\\' and `\s' in your value
string (`\s' == blank).

If you have a source distribution, you will find sample configuration files named
`my-xxxx.cnf' in the `support-files' directory. If you have a binary distribution, look in
the `DIR/share/mysql' directory, where DIR is the pathname to the MySQL installation
directory (typically `/usr/local').

See mysqld --help for more options

FreeBSD tips'n'tricks

Preventing users to see all running processes by 'ps' that are being run under another UID:
sysctl security.bsd.see_other_uids=0
sysctl security.bsd.see_other_gids=0



Mounting/Unmounting the CD/DVD-ROM drive
(by default FreeBSD upon cd/dvd installation will automatically install the drive and make it mountable)

mount /cdrom
umount /cdrom



Want to eject the CD/DVD-ROM drive in FreeBSD?
(firstly you must know witch filesystem is the drive: df -h)
cdcontrol -f /dev/acd0 eject

Getting detailed process information on Freebsd
procstat -a

See how many interrupts taken by each device:
vmstat -i

lsof alternatives for FreeBSD:
fstat tells you which user,command and pid opened the file, which mount point the file is and information about the open file descriptor like read/write, inode number and mount point of the opened file.Please see man page of fstat for other options.

sockstat gives you information about the opened sockets like which process/command is using it, user of the process,pid,protocol like tcp/udp,stream,dgram,etc.. and connected ports of local and remote servers.

FreeBSD 7.2 si htop


"Htop is an advanced, interactive system monitor process viewer written for Linux. It is designed to replace the Unix program top. It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage. Unlike 'top', Htop provides a full list of processes running, instead of the top resource consuming processes. Htop also uses color and gives visual information about processor, swap and memory status."

In FreeBSD 7.2
BSD must have a linux emulator enabled.

Dynamically load the linux object in the kernel:

kldload linux


Then to make this loading permanent:

linux_enable="YES" to /etc/rc.conf

After install a linux layer:

cd /usr/ports/emulators/linux_base-fc4 (Fedora Core 4 in this example)
make install distclean


Go to /etc/fstab and add the following line:

linproc /compat/linux/proc linprocfs rw 0 0


Mount the new filesystem: mount linproc and go to /usr/ports/sysutils/htop and install using regular * make install clean *

Issues:

If at htop install a error by 'lsof' occures:
pvp# make install clean
===> Configuring for lsof-4.83A,4
!!!WARNING!!! No kernel sources in /usr/src/sys or /sys


then you must use pkg_add to install lsof:

pkg_add -r lsof

afterwords htop should install just fine.

1st and last

nu am si nu o sa am niciodata un blog, tin ideile pentru mine, dar am sa arunc cateva legaturi:
thazer.deviantart.com - membru comunitate fotografi/graficieni/artisti
pvp.ro - proiect personal
pgn.ro - 2nd proiect
dude.ro - work'a'holic
reader.google.com - end of line