Saturday, May 12, 2012

Set Default OS in Fedora 16

This is for dual boot OS users, there are many who prefers dual boot to keep another OS optional. For any reason if you wish to change boot sequence unlike grub, grub2 requires couple of commands to run.

Here will take example to keep Windows as default boot.
First of all find menuentry for Windows

#cat /boot/grub2/grub.cfg |grep Windows
the output will be:

menuentry "Windows 7 (loader) (on /dev/sda1)" --clas-clss window -ass os {

To set Windows menuentry as default (only entry mentioned in either " or ' from above command)
I had problem using doubble quotes in the command line. The problem was resolved when in changed the keyboard type from "US" to "US(Engish)" using


#system-config-keyboard

To set Windows menuentry as default (only entry mentioned in either " or ' from above command)

#grub2-set-default "Windows 7 (loader) (on /dev/sda1)"

Verify default entry

#grub2-editenv list

Generate updated grub.cfg

#grub2-mkconfig -o /boot/grub2/grub.cfg

If you get grub error "Environment block too small" then:
#rm -rf /boot/grub2/grubenv
and then rebuild it using
#grub2-editenv /boot/grub2/grubenv create


Now follow all the above steps.

Friday, May 11, 2012

Linux Run Levels

Linux systems today generally use seven runlevels.

Runlevels define what services or processes should be running on the system.

The init process can run the system in one of seven runlevels. The system runs only one of the eight runlevels at a time.

The main runlevels are from 0 – 6. Here's what each runlevel is for:

Runlevel 0: Halt System - To shutdown the system
Runlevel 1: Single user mode
Runlevel 2: Basic multi user mode without NFS
Runlevel 3: Full multi user mode (text based)
Runlevel 4: unused
Runlevel 5: Multi user mode with Graphical User Interface
Runlevel 6: Reboot System

Runlevels 1 and 2 are generally used for debugging purposed only, and are not used during normal operations. Most desktop linux distributions boot into runlevel 5, which starts up the Graphical Login Prompt. This allows the user to use the system with X-Windows server enabled. Most servers boot into runlevel 3, which starts the text based login prompt.

Linux runlevels can be changed on the fly using the init tool. If you want to switch from text based operations to the Graphical Interface, you just have to type in 'telinit 5' in the root prompt. This will bring up the Graphical Interface in your system.

Each runlevel can be configured by the system administrator. The "/etc/inittab" file has information on which runlevel to start the system at and lists the processes to be run at each runlevel.

Each runlevel has its own directory structure where you can define the order in which the services start. These directories are located in the /etc/rc.d/ directory, under which you have rc1.d, rc2.d, rc3.d…. rc6.d directories where the number from 0 through 6 that corresponds to the runlevel.

Refer to Wiki for runlevels on different Operating Systems.

Friday, May 4, 2012

Windows Tricks: Try out..!!

In order to achieve a faster response while in all programs in the start menu, you can easily change a registry key.

XP Instructions

1. Click the "Start" button.
2. Click "run".
3. Type "regedit" without quotes and click ok.

Note you should now be in the Registry Editor.

4. Open (double click or click the + symbol) HKEY_CURRENT_USER
5. Open (double click or click the + symbol) Control Panel
6. Open (double click or click the + symbol) Desktop
7. In the right panel, find "MenuShowDelay"
8. Right click the row and click "Modify"
9. Change the value of "400" to "0" (without quotes), or whatever you want.
10. Restart your computer.

Vista / Win 7

Same as above.

#################################################

In order to achieve a faster response while in all programs in the start menu, you can easily change a registry key.

XP Instructions

1. Click the "Start" button.
2. Click "run".
3. Type "regedit" without quotes and click ok.

Note you should now be in the Registry Editor.

4. Open (double click or click the + symbol) HKEY_CURRENT_USER
5. Open (double click or click the + symbol) Control Panel
6. Open (double click or click the + symbol) Desktop
7. In the right panel, find "MenuShowDelay"
8. Right click the row and click "Modify"
9. Change the value of "400" to "0" (without quotes), or whatever you want.
10. Restart your computer.

Vista / Win 7

Same as above.

Tuesday, May 1, 2012

Botnet

"A Botnet is a collection of software agents, or robots, that run autonomously and automatically. The term is most commonly associated with malicious software, but it can also refer to a network of computers using distributed computing software."

It all starts out with the creator of the botnet, the herder. A herder is the (master)mind behind the script that is spread around, infecting hundreds, if not thousands of computers. And each infected computer is deemed a slave to said botnet, also known as a zombie.

Botnets have recently been used mainly for DDoS attacks. These attacks can be used for a number of reasons - to put a ransom on the up-time of a site (threatening to kick it offline), to collect user credentials (as many bot scripts have keylogging functions), or simply to demonstrate the power one has over the internet.

A very rapid growth in IRC bots has been present and apparent recently. Bot scripts that connect to an IRC channel on the zombie computer can take direct commands once they are in the channel.

Spreading is necessary for a botnet. Spreading techniques that are most commonly used today range from drive-by downloads to torrents, 'cracked' software to Youtube videos, and everything in-between. And often times the herder will bind his bot to the true file that he is promoting for spreading, in which case the end-user is satisfied from the download, while he also is not suspicious of it.

Once the script is downloaded, however, the road to botnet domination still is not paved in gold. This is the point in which crypters and stubs come in...

Crypters are programs that use a number of techniques in order to prevent (or 'distract'Wink anti-virus software from detecting the virus that is being spread around. When a script avoids being detected by anti-virus, it is referred to as fully undetectable (FUD).

Some methods commonly used by crypters are:

- Adding junk code for modifying execution flow and various other reasons.
- Changing strings, encrypting strings.
- Changing variable names.
- Changing the order of all code aspects.
- Changing Assembly information.
- Adding or changing the icon.

This brings us to stubs. Stubs are usually .exe files, and sometimes .dll files. Basically, how undetectable the final script executable will be depends on the stub used. Some crypters have 'Unique Stub Generators' that come pre-packaged. Unique stubs allow scripts to be FUD for longer time periods.

Once anti-virus software 'learns' the stub, your script is no longer FUD, and you must use a new (unique) stub to make your script FUD once more.