Archive for February, 2008

Changing mac address Ubuntu/Debian

February 28, 2008

Yo!

Finally I managed to connect to the net using my laptop. DHCP server was not giving an IP from the lease when I try to connect
from my lappy. I found out the issue – my ISP was blocking the mac address of my laptops network card 🙂 – why – who knows ! :p

So ? I thought I will change the mac. Here is a how to which I think could be useful to someone else too.

Manually set your MAC address for your network card.
—————————————————–

Edit the /etc/network/interfaces file. You can choose to use a different editor if you’d like.

sudo gedit /etc/network/interfaces

or

sudo vim /etc/network/interfaces

You should see the line for your network interface, which is usually eth0. If you have dhcp enabled, it will look like this:

auto eth0
iface eth0 inet dhcp

Just add another line below it to make it look something like this:

auto eth0
iface eth0 inet dhcp
hwaddress ether 01:05:03:04:0B:06

you can change the part after “ether” to some other balue, in the same format

Now restart networking

sudo /etc/init.d/networking restart

===========
Lazy ?

There is a tool availab le for Ubuntu to automate this – macchanger

To install
——-
sudo apt-get install macchanger

usage:
macchanger eth1
Now check the man page of macchanger for usage instructions, there are some interesting options out there.

Advertisements

Linux Kernel “vmsplice()” System Call Vulnerabilities

February 12, 2008

Subject: [SA28835] Linux Kernel “vmsplice()” System Call Vulnerabilities
Date: Tuesday 12 February 2008
From: Secunia Security Advisories
———————————————————————-

TITLE:
Linux Kernel “vmsplice()” System Call Vulnerabilities

SECUNIA ADVISORY ID:
SA28835

VERIFY ADVISORY:
http://secunia.com/advisories/28835/

CRITICAL:
Less critical

IMPACT:
Exposure of sensitive information, Privilege escalation, DoS

WHERE:
Local system

OPERATING SYSTEM:
Linux Kernel 2.6.x
http://secunia.com/product/2719/

DESCRIPTION:
Some vulnerabilities have been reported in the Linux Kernel, which
can be exploited by malicious, local users to cause a DoS (Denial of
Service), disclose potentially sensitive information, and gain
escalated privileges.

The vulnerabilities are caused due to the missing verification of
parameters within the “vmsplice_to_user()”,
“copy_from_user_mmap_sem()”, and “get_iovec_page_array()” functions
in fs/splice.c before using them to perform certain memory
operations. This can be exploited to e.g. read or write to arbitrary
kernel memory via a specially crafted “vmsplice()” system call.

Successful exploitation allows attackers to e.g. gain “root”
privileges.

Note: The affected system call first appeared in version 2.6.17.

SOLUTION:
Update to version 2.6.23.16 or 2.6.24.2.

PROVIDED AND/OR DISCOVERED BY:
Wojciech Purczynskiof iSEC Security Research and qaaz

ORIGINAL ADVISORY:
iSEC Security Research:
http://www.isec.pl/vulnerabilities/isec-0026-vmsplice_to_kernel.txt

qaaz:
http://milw0rm.com/exploits/5092
http://milw0rm.com/exploits/5093

———————————————————————-

About:
This Advisory was delivered by Secunia as a free service to help
everybody keeping their systems up to date against the latest
vulnerabilities.

Subscribe:
http://secunia.com/secunia_security_advisories/

Definitions: (Criticality, Where etc.)
http://secunia.com/about_secunia_advisories/

Please Note:
Secunia recommends that you verify all advisories you receive by
clicking the link.
Secunia NEVER sends attached files with advisories.
Secunia does not advise people to install third party patches, only
use those supplied by the vendor.

———————————————————————-

VIM QUICK REFERENCE

February 12, 2008

http://tnerual.eriogerg.free.fr/vimqrc.html

PHPMyAdmin :: Existing configuration file (./config.inc.php) is not readable.

February 12, 2008

==
When I try to access phpmyadmin on a cPanel server, i get the following error:

Existing configuration file (./config.inc.php) is not readable.
==

Solution:

#cd /usr/local/cpanel/base/3rdparty/phpMyAdmin
#chown cpanel.cpanel config.inc.php

Change Hostname Permanently on Debian or Ubuntu

February 10, 2008

Debian based systems use the file /etc/hostname to read the hostname of the computer at boot time and set it up using the init script /etc/init.d/hostname.sh

We can edit the file /etc/hostname and change the hostname and then run:

/etc/init.d/hostname.sh start

Steps:

1. sudo gedit /etc/hostname
2. Save the file with the hostname you like to set
3. sudo /etc/init.d/hostname.sh start

Ref: http://sysblogd.com/50/change-hostname-permanently-on-debian-or-ubuntu.htm

Mac Mail – Leaving a Copy of Messages on the Server (POP3 Only)

February 5, 2008

1. Select Mail / Preferences.
2. Click the Accounts button, located at the top of the window
3. Click once on your account, as it appears in the Accounts list.
4. Click the Advanced tab.
5. To avoid exceeding your email account’s storage limits,
be sure that the Remove copy from the server after
6. To avoid exceeding your email account’s storage limits, be sure that the Remove copy from the server after retrieving a message box is checked.
7. Close the Accounts window.
8. When prompted to save your changes, click the Save
button.

Unmounting virtfs mounts ::: cPanel

February 5, 2008

First of all, check if the user is running any jailshell process is running

ps aufx |grep user |grep jailshell

Kill’em

Unmount the mounts created by that user:
for i in `cat /proc/mounts |grep virtfs |grep user_name_here |awk ‘{print$2}’`; do umount $i; done

How to convert charecterset :: mysql

February 2, 2008

Two very useful links :

http://codex.wordpress.org/Converting_Database_Character_Sets
http://www.mydigitallife.info/2007/06/23/how-to-convert-character-set-and-collation-of-wordpress-database/