Home

shankuo (aka debianKL)

Recent Entries

You are viewing the most recent 20 entries

September 5th, 2006

10:27 am: Smashing the Stack for Fun (Modern)
Since the first article  "Smashing the Stack for Fun" by Aleph One published by Phrack v7 no49 (1998) that given us the known how to exploits buffer overflows. Now, what next...

Smashing the Stack for Fun (Modern) way,  no it about new compilers and different flavous of Linux using diff version of gcc. That makes things complicated stack exploit does not work anymore with examples from Aleph One. This add further to the stack protection feature in the Linux Kernel 2.6.x  but not Linux Kernel 2.4.x.

September 2nd, 2006

08:52 pm: Google Hacks
Got myself the O'reilly's Google Hacks, Third Editon books, notice an interesting chapter on Gmail storage can be used to keep data files and just email messages texts.



August 3rd, 2006

12:18 pm: Learning Ruby Programming
Metasploit framework 3.0 rebuild from scratch using Ruby programming instead of Perl.. that means learning another programming language ...  and luckly there is some books about Ruby programming on the Ruby website.

11:47 am: Metasploits
Currently working on the Metasploits Framework, a penetration tool to find vulnerability and exploits.  With an aide from the Penetration Tester's Open Source Toolkit By Johnny Long, Aaron W. Bayles, James C. Foster, Chris Hurley First Edition December 2005  Publisher: Syngress.

http://www.oreilly.com/catalog/1597490210/

July 16th, 2006

11:25 am: Linux Troubleshooting for System Administarator
Linux© Troubleshooting for System Administrators and Power Users
By James Kirkland, David Carmichael, Christopher L. Tinker, Gregory L. Tinker
...............................................
Publisher: Prentice Hall
Pub Date: April 27, 2006
Print ISBN-10: 0-13-185515-8
Print ISBN-13: 978-0-13-185515-1
Pages: 624
   
After reading this book, I would recommend that every Linux System Administrator and students of LPI 101/102 should have this books for reference..

May 12th, 2006

11:48 pm: Red Hat Network Installation (via NFS, FTP, HTTP)
To copy the RedHat/ directory from the installation CD-ROMs to a Linux machine which acts as an installation staging server, perform the following steps:

• For each binary CD-ROM, execute the following commands:
•
mount /mnt/cdrom
•
cp -var /mnt/cdrom/RedHat /location/of/disk/space

where /location/of/disk/space/ is a directory you create such as

/export/rhel/
•
umount /mnt/cdrom/

FTP and HTTP installations also support a second type of tree structure. To make it easier to access
the contents of the installation CD-ROMs, mount each CD-ROM or ISO image with the following

mount point on the FTP or HTTP server (where X is the number of the CD-ROM or ISO image):

/location/of/disk/space/discX/

For example:

mount -o loop CD1.iso /location/of/disk/space/disc1/

May 11th, 2006

12:24 pm: Encrypted Filesystem with Encfs
http://arg0.net/wiki/encfs

http://www.debian-administration.org/articles/204

http://www.linuxdevcenter.com/pub/a/linux/2005/04/14/encfs.html

10:05 am: Linux ACL
http://www.linux-mag.com/2003-09/acls_01.html

09:58 am: Virtual Filesystem (Build it fm an ordinary file)
http://freshmeat.net/articles/view/1387/
[snip] from the above website

First, you want to create a 20MB file by executing the following command:

$ dd if=/dev/zero of=disk-image count=40960
40960+0 records in
40960+0 records out

You created a 20 MB file because, by default, dd uses a block size of 512 bytes. That makes the size: 40960*512=20971520.

$ ls -l disk-image
-rw-rw-r-- 1 chirico chirico 20971520 Sep 3 14:24 disk-image

Next, to format this as an ext3 filesystem, you just execute the following command:

$ /sbin/mkfs -t ext3 -q disk-image
mke2fs 1.32 (09-Nov-2002)
disk-image is not a block special device.
Proceed anyway? (y,n) y

You are asked whether to proceed because this is a file, and not a block device. That is OK. We will mount this as a loopback device so that this file will simulate a block device.

Next, you need to create a directory that will serve as a mount point for the loopback device.

$ mkdir fs

You are now one step away from the last step. You just want to find out what the next available loopback device number is. Normally, loopback devices start at zero (/dev/loop0) and work their way up (/dev/loop1, /dev/loop2, ... /dev/loopn). An easy way for you to find out what loopback devices are being used is to look into /proc/mounts, since the mount command may not give you what you need.

$ cat /proc/mounts

rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
/proc /proc proc rw,nodiratime 0 0
none /sys sysfs rw 0 0
/dev/sda1 /boot ext3 rw 0 0
none /dev/pts devpts rw 0 0
/proc/bus/usb /proc/bus/usb usbdevfs rw 0 0
none /dev/shm tmpfs rw 0 0

On my computer, I have no loopback devices mounted, so I'm OK to start with zero. You must do the next command as root, or with an account that has superuser privileges.

# mount -o loop=/dev/loop0 disk-image fs

That's it. You just mounted the file as a device. Now take a look at /proc/mounts, you will see this is using /dev/loop0.

$ cat /proc/mounts

rootfs / rootfs rw 0 0
/dev/root / ext3 rw 0 0
/proc /proc proc rw,nodiratime 0 0
none /sys sysfs rw 0 0
/dev/sda1 /boot ext3 rw 0 0
none /dev/pts devpts rw 0 0
/proc/bus/usb /proc/bus/usb usbdevfs rw 0 0
none /dev/shm tmpfs rw 0 0
/dev/loop0 /home/chirico/junk/fs ext3 rw 0 0

You can now create new files, write to them, read them, and do everything you normally would do on a disk drive. First, I'll give access to the chirico account.

# chown -R chirico.chirico /home/chirico/junk/fs

Now, under the chirico account, it is possible to create files.

$ cd /home/chirico/fs
$ mkdir one two three
$ ls -l

total 15
drwx------ 2 chirico chirico 12288 Sep 3 14:28 lost+found
drwxrwxr-x 2 chirico chirico 1024 Sep 3 14:34 one
drwxrwxr-x 2 chirico chirico 1024 Sep 3 14:34 three
drwxrwxr-x 2 chirico chirico 1024 Sep 3 14:34 two

$ df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda2 17G 11G 4.6G 71% /
/dev/sda1 99M 83M 11M 89% /boot
none 62M 0 62M 0% /dev/shm
/home/chirico/junk/disk-image
20M 1.1M 18M 6% /home/chirico/junk/fs

If you need to umount the filesystem, as root, just issue the umount command. If you need to free the loopback device, execute the losetup command with the -d option. You can execute both commands as follows:

# umount /home/chirico/junk/fs
# losetup -d /dev/loop0

April 21st, 2006

04:18 pm: Cryptography Updates
Currently reading the Da Vinci Code book, can across several chapters of encryption
techniqued discovered during BD period..

Practical cryptography book.. yet another cryptography book .. still reading and practicing it now.

Powered by LiveJournal.com

Advertisement