bash commands tutorial

Learning some advance bash commands(Related to network) in bash isn’t a bad idea if you are going to troubleshoot networking problems or you are interested in other network hacks.Although you can do it in ubuntu 10.04(In some older versions too) by using a special tool named Network Tools which allows you to execute these commands in graphical mode.It can be found at system -> administrator -> Network Tools.But if you know some basic commands related to networking then it will be better.It is very simple and you can learn it within minutes.Here is the simple bash commands tutorial part 4…(If you don’t know about some simple bash commands then first read here..Bash commands for beginners )

Ping Command :

It is one of the most used commands in network testing and management.You need to know either ip address or host name of the target.The result of the ping command can be use to decide whether the target host is alive or not.The syntax of the command is ping, followed by its address(host name or IP address).
ping zzz.zzz.zzz.zzz  or ping www.yourtargetdomain.com
e.g
user@user-desktop:~$ ping www.yourtargetdomain.com
PING yourtargetdomain.com (hhh.hhh.hhh.hhh) 56(84) bytes of data.
64 bytes fr0m ubuntu.xyz.net (hhh.hhh.hhh.hhh): icmp_seq=1 ttl=49 time=287 ms
64 bytes fr0m ubuntu.xyz.net (hhh.hhh.hhh.hhh): icmp_seq=2 ttl=49 time=269 ms
64 bytes fr0m ubuntu.xyz.net (hhh.hhh.hhh.hhh): icmp_seq=3 ttl=49 time=272 ms
64 bytes fr0m hhh.hhh.hhh.hhh: icmp_seq=4 ttl=49 time=270 ms
64 bytes fr0m ubuntu.xyz.net (hhh.hhh.hhh.hhh): icmp_seq=5 ttl=49 time=287 ms
64 bytes fr0m ubuntu.xyz.net (hhh.hhh.hhh.hhh): icmp_seq=6 ttl=49 time=269 ms
64 bytes fr0m ubuntu.xyz.net (hhh.hhh.hhh.hhh): icmp_seq=7 ttl=49 time=269 ms
64 bytes fr0m ubuntu.xyz.net (hhh.hhh.hhh.hhh): icmp_seq=8 ttl=49 time=271 ms

Netstat Command :

Netstat is very useful in printing  the network connections,routing tables,network interfaces and multicast memberships.It has many advanced features that can be easily used by providing some options.Without any options it will display the list of open sockets.You can change the output by supplying options.

user@user-desktop:~$ netstat
unix  3      [ ]         STREAM     CONNECTED     9375     /home/user/.pulse/4f3877f89c59bcc05dbe2e5b4bb73a69-runtime/native
unix  3      [ ]         STREAM     CONNECTED     9374
unix  3      [ ]         STREAM     CONNECTED     9366     @/tmp/dbus-9GBsy9S5kY
unix  3      [ ]         STREAM     CONNECTED     9365
unix  3      [ ]         STREAM     CONNECTED     9322     /tmp/orbit-user/linc-5bc-0-6d4236a1652a7
unix  3      [ ]         STREAM     CONNECTED     9321
unix  3      [ ]         STREAM     CONNECTED     9320     /tmp/orbit-user/linc-602-0-19533f015c325
unix  3      [ ]         STREAM     CONNECTED     9316
unix  3      [ ]         STREAM     CONNECTED     9319     /tmp/orbit-user/linc-5fe-0-228e9d0f69c08

To display about kernel routing tables put -r , to know about the interfaces use -i and if you want the detailed statistics of each protocol then it is preferable to use -s.
e.g :
For Information about Interface :Using -i
user@user-desktop:~$ netstat -i
Kernel Interface table
Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500 0    671613      0      0 0        671024      0      0      0 BMRU
lo        16436 0    103806      0      0 0        103806      0      0      0 LRU

For routing tables :
user@user-desktop:~$ netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     *               255.255.255.0   U         0 0          0 eth0
link-local      *               255.255.0.0     U         0 0          0 eth0
default         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

Detailed statistics of protocol using -s
user@user-desktop:~$ netstat -s
Ip:
723094 total packets received
2 with invalid addresses
0 forwarded
0 incoming packets discarded
723053 incoming packets delivered
723066 requests sent out
Icmp:
367 ICMP messages received
2 input ICMP message failed.
ICMP input histogram:
destination unreachable: 353
source quenches: 14
69 ICMP messages sent
0 ICMP messages failed
ICMP output histogram:
destination unreachable: 69
IcmpMsg:
InType3: 353
InType4: 14
OutType3: 69
Tcp:
18586 active connections openings
6738 passive connection openings
3445 failed connection attempts
1310 connection resets received
13 connections established
711836 segments received
696851 segments send out
14235 segments retransmited
18 bad segments received.
7544 resets sent
Udp:
17343 packets received
69 packets to unknown port received.
0 packet receive errors
18471 packets sent

Options :
[-v] : To display some information about unconfigured address families.

[-n] : It will show the numerical address.

[-p] : To show the PID and name of the program to which each socket belongs.

[-l] : It will display only listening sockets.

[-c] : This will result in displaying the particular(selected) information every second continuously.

[-C] : Use to printing routing information fr0m its route cache.

Traceroute :

It is one of the most widely used commands,helpfull in tracing the route fr0m the a sender to a destination host.Actually it works by using TTL field of the IP protocol.For performing a trace the only required parameter is IP address or host name.There are many options available , some are desribed below.

Options :

[-I] : It uses ICMP(Internet control message access protocol) echos for probing.

[-T] : It uses TCP(Transmission control protocol) SYN for probes(Requires root power,so if you are not in root mode then start the command with sudo).

[-d] : It will enable the socket level debugging(If it is supported by your linux kernel).

[-F] : To prevent the fragmentation of the probe packets.

For Example : Tracing without any options
user@user-desktop:~$ traceroute www.yourtargetdomain.com
traceroute to www.yourtargetdomain.com (hhh.hhh.hhh.hhh), 30 hops max, 60 byte packets
1  192.168.1.1 (192.168.1.1)  1.204 ms  1.718 ms  2.220 ms
2  ABCD-XX-Static-rrr.rrr.rrr.rrr.wxybroadband.in (FFF.FFF.FFF.FFF)  19.496 ms  22.417 ms  25.827 ms
3  ABCD-XX-Static-rrr.rrr.rrr.rrr.wxybroadband.in (FFF.FFF.FFF.FFF)  21.537 ms  21.979 ms *
4  BBB.BBB.BBB.BBB (WWW.WWW.WWW.WWW)  29.870 ms  30.267 ms  33.412 ms
5  CFS-Static-NNN.NNN.NNN.NNN.mywxy.in (MMM.MMM.MMM.MMM)  260.056 ms  263.774 ms  266.282 ms
6  STWQLiteEthernet8-4.ar7.MNX1.dgyw.net (KKK.KKK.KKK.KKK)  265.844 ms  237.168 ms  424.466 ms
7  QQQ.QQQ.QQQ.QQQ (TTT.TTT.TTT.TTT)  267.514 ms  267.996 ms  268.273 ms
8  ek-dn2-core3-te9-1.rtr.ijkl.com (209.59.157.224)  274.020 ms  278.394 ms  280.310 ms
9  YYY.YYY.YYY.YYY (PPP.PPP.PPP.PPP)  281.858 ms  284.450 ms  285.917 ms
10  SSS.SSS.SSS.SSS (SSS.SSS.SSS.SSS)  290.453 ms  291.939 ms  298.095 ms
11  ubuntu.xyz.net (hhh.hhh.hhh.hhh)  301.548 ms  303.444 ms  303.724 ms

For more details on traceroute type : info traceroute in your bash shell.Actually you can learn bash commands fr0m the bash shell.Just type help command name or info command name or –help command name.

Open source website scanner : skipfish

With the rapid growth of internet, number of websites are increasing exponentially and these are the major source of information.Hence it is necessary to keep this source safe from online frauds and hacks.These days Websites are mostly hacked due to some security holes.Since most are database driven so hackers/crackers also use sql injection to get credential information from the database.XML injection and Cross site Scripting(XSS) is another most widely used hacking techniques thesedays.But all these hacks happens due to the loopholes in website design and coding.

SKIPFISH

Skipfish is an open source web security tool which can be used to scan the websites against the SQL/XML injection or XSS loopholes.
It creates a site map based on the recursive crawl and dictionary based probes,to analize the security leaks in the websites.

Features of Skipfish :

performance :
Its performence is very high as it can handle more than 500 request/sec against internet targets,more than 2000 requests/sec on
LAN network with a modest CPU and network.Advanced HTTP/1.1 features,smart response caching..and many more.

Simple to Use :
It is highly reliable and simple to use.It can create automatic wordlist based on the analysis of site content.It has probabilistic
scanning feature for allowing periodic and time-bound assessments of complex sites.

Well-Designed Security checks :
It provides security check against stored XSS(Path,parameters and headers),blind sql and XML injection.It has also the feature of signature checks for detecting vulnerabilities.

Fore more info : http://code.google.com/p/skipfish/wiki/SkipfishDoc

credit : Google Inc

speed up ubuntu 10.04

change priority in ubuntu

You know Ubuntu is one of the most famous linux-distro with good community support and users but some times you may feel that my system is not so fast as expected.Although expectations are always little greedy but you can fix this problem up to some extent by following some simple steps described below.

Priority Settings

By priority settings I mean the priority of the application programs.So you can set desired priority for your desired programs that you use more frequently.Steps to change the priority setting in ubuntu 10.04 –

step1.To change the settings first open system monitor(Administrator -> system monitor).

step2.Then click on processes.

step3.Now right click on the application you want to change the priority settings.Select change priority.

step4.Now you can adjust the priority setting.Keep in mind that the lower the value the higher will be its priority.Its value ranges fr0m -20 to +20.Set the value as you like.

step5. After adjusting the settings it will asked for user password.Enter the password.That’s all.

START UP Application Control

This is an effective method to decrease not only startup time but also to speed up the system.To control additional start up program simply follow these steps :
step1: Go to system -> preferences -> startup applications.

step2: Now check or uncheck the box depending on the need i.e uncheck all the applications that you think is not necessary.

step3: That’s all.close the window.You will see the effect when you will reboot your computer.

Removing unwanted Application Programs

It is always recommended to remove i.e uninstall the softwares that you are not using currently or not likely to use in future(some days).To remove a package or software just go to software center and click remove or go to synaptic package manager and mark the softwares for removal.Then apply the changes,the selected softwares will be removed.(You may choose complete or partial removal according to the dependencies)

Increase RAM

You know RAM is the primary memory of your computer in which is required by all the applications.Hence increasing RAM(1GB-or more) is always recommended for enhanced performence.

Choosing right Desktop

Some times you may think that KDE desktop environment is too slow.In fact it is,GNOME is little faster than the KDE.But you want more faster experience,Okay then try XFCE.You can use xfce in same installation.Go to synaptic manager and search for xfce.After completing the installing process restart the computer.Now at login screen select xfce instead of the default desktop GNOME.Enter your usename and password as usual.That’s all…enjoy xfce.

school computer hacks

 access blocked websites

Why do you Want to Hack School Computers ?

Before going to the actual matter related to the school computers first come to the point that why do you want to hack your school computers.I don’t know why? but I am giving you the common idea i.e what are the common goals that is directly or indirectly associated with the hacking of school compuetrs(I am trying to focus on some simple reasons you may have some special reasons).

Hence in general hacking school computer means

1. To gain administrative power to do some special task(That is not permitted to general user).

2. Students want to use social networking sites like MySpace,Facebook,Orkut..etc, whose access is blocked by default in most school computers.

3. They like to play online games, it may also comes against the school policy.

4. They may like to see pornographic videos or websites,and of course accessing these sites are banned by default.

5. Students also enjoy tempering with grades but administrative power as well as little research is required depending on the security policy of school.

6. In some schools accessing internet is totally banned for student account(Very bad!…unacceptable).

7. It may be obvious some times for us because we are humans and by nature we like to violate the rules.


Now it is little bit clear that why we want to hack our schools computers.Okay lets proceed to the next step –

1. Accessing blocked sites :

This is really very simple.What you have to do is just to use proxy servers.Using proxy server your computer will be connected to the proxy servers but you will be able to accessed blocked sites via proxy server , an intermediate server-computer that will do your work.Here is the list of some websites that will work as a proxy server for you.
Some websites that I had tested on my system and working fine :Just go the website and enter the website address in the url field.

http://www.gumm.org/
http://www.facebookproxy.net/
http://clickfacebook.com/
http://www.theproxyhub.com/
http://www.orkutproxy.info/
http://www.proxyfoxy.com/

Alternative Method : Get the IP address of the website i.e is blocked.Now try to connect using different form of IP address by typing in to your browser’s address bar.Type http and https interchangeably, sometimes it works.You can use the calculator(Click view scientific) to convert the number fr0m decimal to binary or decimal to hexadecimal.
e.g : http://ww.xxx.yy.zz  or https://ww.xxx.yy.zz
http://binary_equivalent
https://binary_equivalent
http://hexadecimal_equivalent
https://hexadecimal_equivalent
http://octal_equivalent
https://octal_equivalent
http://dword_value
This method will work if your school computers use DNS(Domain Name System) based protection.So if you can  edit the dns mapping files that stores on the system(may be in each computer or centrally managed by the administrator) and used by  browsers to look up the domain-IP table;then also you would be able to use blocked websites.

2. Hacking administrator account :

There are many methods to gain administrative power or to access or temper with all the important files on the system.To do this one of the simple method is to use a live cd or pendrive(It is simple.because what you have to do is to download the ISO file and burn it on a CD or you can make your pendrive bootable by following some simple steps) having any linux distribution installed(such as Ubuntu or linux Mint).

Switch on the computer and insert the live bootable cd into the tray.Now booting will be start fr0m live cd instead of hard drive(By default,in special cases press F2 or F10 or F8 to change the booting options so that computer will boot fr0m live cd or pendrive).Since the linux is able to mount all the major file systems format like NTFS,FAT16 or FAT32.Booting andloading will complete within two to five minutes.So after loading the linux into the computer’s RAM you will be able to mount and use or temper with the whole hard disc.Now you are done.Do whatever you want and after shutting down remove the cd fr0m the tray and the windows operating system will work as normal.(Assuming that you didn’t temper with the windows system file..Remember this point and be careful).

What will we do if the BIOS password is installed in the system : In general it is not the case but if it occurs then first try some default BIOS password.You can get the list of Default BIOS password on the internet after getting the name and version of the BIOS,that you will see at the time of booting.You can also try to reset the BIOS by opening the CPU case,Find the lithium Ion battery(having round shape like a silver coin).Now remove the battery and again put it in the same place after 60 seconds.
Some common passwords includes :
AMI  cmos  Biostar   BIOS  setup  password
Award  AWARD_SW  lkwpeter  AWARD_PW  AMI!SW1
j322 h6BB CONDO condo admin 589721
award_? 1322222 256256 ?award Compaq  last
AM AMI~ ascend  djonet  autocad  BIOSPASS
AMIPSWD  SZYX  zbaaaca  TzqF  t0ch20x

Alternative Method : In old versions of windows you can also use simple commands to gain administrative power at the login promopt.This can be simply done by editing the system files which stores the login information.Follow these steps :

1. At the time of booting press F8 a boot menu will come on the screen,choose DOS.

2. Now you can change your working directory by using cd command.

C:\ cd windows

3. Next,type the command to rename .pwl extensions which contains the login information.

C:\windows>ren *.pwl *.pqr

4. Now restart the computer in normal way and type anything in the password place(when the login promopt will appear)You hacked! and know enjoy the administrative power.(in this method the windows will take this password as actual).

   Credit : RKJHA