IT

Debian Linux: kernel update 150 150 Roderick Derks

Debian Linux: kernel update

First login to your Debian machine on the command line as root. Install the prerequisites that we need to compile the new kernel:
#apt-get install kernel-package ncurses-dev fakeroot wget bzip2

Then go to /usr/src:
#cd /usr/src

Then get the latest Linux kernel source (or the kernel source you need) from    http://www.kernel.org/pub/linux/kernel/v2.6/
#wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.17.13.tar.bz2

Unpack the kernel sources:
#tar xjf linux-2.6.17.13.tar.bz2
#cd linux-2.6.17.13/

It is normally a good idea to take the configuration of your existing  kernel 2.6 as a starting point for the configuration of your new kernel. Usually the current kernel configuration is saved in a file under /boot, e.g. /boot/config-2.6.12. We will load this configuration and then do the changes we desire

#make menuconfig

Select Load an Alternate Configuration File and enter the location of the configuration file of your current kernel.

The configuration of your current kernel will be loaded, and you can now browse through the menu and change the configuration to suit your needs. When you are finished, save your new kernel configuration

Then run the following commands (please note that make dep is not needed any more for kernel 2.6):
#make-kpkg clean
#fakeroot make-kpkg –revision=custom.1.0 kernel_image

If the compilation stops with an error, run
#make clean

and then re-run the previous commands starting with
#make menuconfig

Change the kernel configuration where the error occurs. If no error occurs you will find the new kernel as a Debian package called kernel-image-2.6.17.13_custom.1.0_i386.deb under /usr/src.
#cd ../

Now you have to install some packages that are needed by kernel 2.6. Add the following line to /etc/apt/sources.list:

deb http://www.backports.org/debian/ sarge-backports main contrib
Then run:
#apt-get update
#apt-get install module-init-tools initrd-tools procps

If you are asked the following question:

"If you really want to remove modutils type 'yes':"

type yes.

It might also be necessary to update packages like bind9, quota, etc. – depending on your configuration. If you have problems with your existing packages try to get the appropriate package from www.backports.org.

Install your new kernel:
#dpkg -i kernel-image-2.6.17.13_custom.1.0_i386.deb

Create a ramdisk of your new kernel (otherwise your system will most likely not boot):

#cd /boot/
#mkinitrd -o /boot/initrd.img-2.6.17.13 2.6.17.13

We are almost finished now. We now have to edit the bootmanager.

LILO:
Edit the image=/vmlinuz stanza of your /etc/lilo.conf and add the line initrd=/boot/initrd.img-2.6.14.5:
# Boot up Linux by default.
#
default=Linux

image=/vmlinuz
label=Linux
read-only
initrd=/boot/initrd.img-2.6.17.13
# restricted
# alias=1

Run
#lilo
to update your boot loader and reboot your machine:
#shutdown -r now

GRUB:
#vi /boot/grub/menu.list
default        5
timeout        5
color cyan/blue white/blue

title        Debian GNU/Linux, kernel 2.6.17.13
root        (hd0,2)
kernel        /boot/vmlinuz-2.6.17.13 root=/dev/hda3 ro
initrd        /boot/initrd.img-2.6.17.13
savedefault
boot

title        Debian GNU/Linux, kernel 2.6.17.13 (recovery mode)
root        (hd0,2)
kernel        /boot/vmlinuz-2.6.17.13 root=/dev/hda3 ro single
initrd        /boot/initrd.img-2.6.17.13
savedefault
boot

title        Debian GNU/Linux, kernel 2.4.27-2-386
root        (hd0,2)
kernel        /boot/vmlinuz-2.4.27-2-386 root=/dev/hda3 ro
initrd        /boot/initrd.img-2.4.27-2-386
savedefault
boot

title        Debian GNU/Linux, kernel 2.4.27-2-386 (recovery mode)
root        (hd0,2)
kernel        /boot/vmlinuz-2.4.27-2-386 root=/dev/hda3 ro single
initrd        /boot/initrd.img-2.4.27-2-386
savedefault
boot

title        Other operating systems:
root

title        Microsoft Windows XP Professional
root        (hd0,0)
savedefault
makeactive
chainloader    +1

 

Everything is ok your machine should come up with the new kernel.
#uname -a

Linux command prompt: download files from internet 150 150 Roderick Derks

Linux command prompt: download files from internet

wget -c url

  for example:

wget -c http://belnet.dl.sourceforge.net/sourceforge/sslexplorer/sslexplorer-0.2.7_02-src.tar.gz

Dual boot: grub boot loader removal 150 150 Roderick Derks

Dual boot: grub boot loader removal

If you have the XP CD cd run the recovery console and use the command fixmbr
That will rewrite the master boot record for XP.
Linux: add a new harddrive and create logical volumes 150 150 Roderick Derks

Linux: add a new harddrive and create logical volumes

Is it your dream to install linux on your system? And you fullfilled that dream? And you used Linux and the space on the disk so much that you need to add e new hard drive?

Well.. this article will help you! 

read more

Windows Lifesaver Tools 150 150 Roderick Derks

Windows Lifesaver Tools

Network Tools:
Netcat, TCP/IP Swiss army knife, v1.11
url: www.vulnwatch.org/netcat/

Cryptcat, crpyto Netcat, v1.21
url: http://sourceforge.net/projects/cryptcat/

Putty, ssh client, v0.58
url: http://www.chiark.greenend.org.uk/~sgtatham/putty

WinScp, secure copy, v3.76
url: http://winscp.net/eng/download.php

connect, proxy (http and https) support for ssh, v1.95
url: http://zippo.taiyo.co.jp/~gotoh/ssh/connect.html

File Tools:
– Filemon
– Regmon

Dependency Walker, what dependant module (ex. dll's) needs a module, v2.1
url: http://dependencywalker.com/

Various Tools:
Notepad2, txt editor, v1.0.12
url: http://www.flos-freeware.ch/

Crack local Windows passwords with Backtrack v1.x 150 150 Roderick Derks

Crack local Windows passwords with Backtrack v1.x

A quick and dirty Windows password recovery:

Boot the Backtrack CD .

Change dir to your Windows mount point:
# cd /mnt/hda2/WINDOWS/system32/config
Copy the SAM and the system Registry hive to the temp dir:
# cp SAM /tmp
# cp system /tmp
Prepare our wordlist:
# cd /pentest/password/dictionaries/
# gunzip -c wordlist.txt.Z > /tmp/words.txt
# cd /tmp

As the Windows hashes (in the SAM file) are encrypted, we need this key (called bootkey) to decrypt the SAM hashes:
# bkhive system key
Now we can dump the password hashes out of the SAM file:
# samdump2 SAM key > /tmp/hashes.txt

Lets crack those hashes… the easiest way would be, if the password is in the wordlist, we use john for this case:
# john -w=words.txt -f=NT hashes.txt
No luck? Lets use the brute force method:
# john –incremental:all -f=NT hashes.txt

If this takes too long you could use ophcrack. This tool uses rainbow tables and should crack your hashes in a few seconds, but you need to download those rainbow tables (350mb or 700mb or you can generate them yourself) which are not included on the Backtrack cd (for a obvious reason…). Or you can use the oph online cracker, which should be quite fast.

Credits goes to http://www.hardware-place.com!

RPM commands 150 150 Roderick Derks

RPM commands

# rpm -ivh packages(s).rpm
install rpm file(s)

# rpm -Uvh packages(s).rpm   
upgrade system with rpms

# rpm -e package   
remove package

# rpm -q package   
show version of package installed

# rpm -q -i package   
show all package metadata

# rpm -q -f /path/file   
what package does file belong

# rpm -ql packagename > list.txt
Lists all the files in a currently installed package – there's no need to use the .rpm extension or its version number.  So if the package's full file name is: wget-1.8.2-4.72.i386.rpm   then just use wget

# rpm -ql packagename > list.txt
Lists all the files in a currently installed package – there's no need to use the .rpm extension or its version number.  So if the package's full file name is: wget-1.8.2-4.72.i386.rpm   then just use wget

# rpm -qpl packagename.rpm > list.txt
Lists all the files in an RPM file irrespective of whether it is installed.. Use the full file name, or, for instance, a shortened version wget* .

# rpm -qa > rpmlot.txt
Lists the names of all installed packages, I assume in order of their installation.

# rpm -qa | sort > rpmlot.txt
Ditto alphabetically sorted.

# rpm -qal > rpmlotfiles.txt
Lists all the files of all installed packages. There is no clear indication of what package the files belong to – but it is not too hard to figure it out:

# rpm -qf file-name
Lists the package a file belongs to.

Use ARP to assign ip address 150 150 Roderick Derks

Use ARP to assign ip address

If you install a new device, that has no ip assigned to it, but you have the mac address of this device, you can use arp and ping to assign a temporary ip address:

1) Assign ARP/IP

Windows:
> arp -s 192.168.1.123 00-aa-cc-c6-09

Linux:
# arp -i eth0 -vs 192.168.100.124 00:0E:35:1F:91:F5

2) Ping it

A "normal" ping will not work as expected here… you need to ping it with a packet-size of 113:

Windows:
> ping 192.168.1.123 -l 113

Linux:
# ping 192.168.1.124 -s 113

Putty SSH Timeouts 150 150 Roderick Derks

Putty SSH Timeouts

Putty SSH Timeouts
Application hints
If your SSH Session disconnect even if you enabled “Sending of null packets to keep session active” and “Enable TCP keepalives (SO_KEEPALIVE option)” you might want to try this..

read more

A Windows SSH server 150 150 Roderick Derks

A Windows SSH server

If you want to setup a SSH server on a Windows environment then this article should give you some answers. Use Cygwin: Cygwin is a Linux-like environment for Windows. This is very interesting for remote management of a Windows environment in a secure way. You can now also use Linux commands and that can save you a lot of trouble.

read more

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message