Monday, May 9, 2011

Network Hacking (Port Scanning)

Port Scanning :- Port scanning is carried out to determine a list of open ports on the remote host that have certain services or daemons running. In port scanning, the attacker connects to various TCP and UDP ports and tries to determine which ports are in listening mode.

1) TCP Ports Scanning :- Almost all port scans are based on the client sending a packet containing a particular flag to the target port of the remote system to determine whether the port is open. Following table lists the type of flags a TCP packet header can contain.

Flag Meaning
URG (urgent) This flag tells the receiver that the data pointed at by the urgent pointer required urgently.
ACK (acknowledgment) This flag is turned on whenever sender wants to acknowledge the receipt of all data send by the receiving end.
PSH (push) The data must be passed on to the application as soon as possible.
RST (reset) There has been a problem with the connection and one wants to reset the connection with another.
SYN (synchronize) If system X wants to establish TCP connection with system Y, then it sends it's own sequence number to Y, requesting that a connection be established. Such apacket is known as synchronize sequence numbers or SYN packet.
FIN (finish) If system X has finished sending all data packets and wants to end the TCP/IP connection that it has established with Y, then it sends a packet with a FIN flag to system Y.


A typical TCP/IP three way handshake can be described as follows :
1) The client sends a SYN packet to the server.
2) The server replies with a SYN packet and acknowledges the client's SYN packet by sending an ACK packet.
3) The client acknowledges the SYN sent by the server.

Different techniques of TCP port scanning are :-
1) TCP connect port scanning
2) TCP SYN scanning (half open scanning)
3) SYN/ACK scanning
4) TCP FIN scanning
5) TCP NULL scanning
6) TCP Xmas tree scanning

2) UDP Ports Scanning :- In UDP port scanning, aUDP packet is sent to each port on the target host one by one.
If the remote port is closed, then the server replies with a Port Unreachable ICMP error message. If the port is open then no such error message is generated.

3) FTP Bounce Port Scanning :- The FTP bounce port scanning technique was discovered by Hobbit. He revealed a very interesting loophole in the FTP protocol that allowed users connected to the FTP service of a particular system to connect to any port of another system. This loophole allows anonymous port scanning.

Recommended   Tools
Nmap
http://www.insecure.org/nmap
Superscan
http://www.foundstone.com

Creating IM Bot

This quick tutorial will show you how to develop your own functional IM bot that works with Google Talk, Yahoo! Messenger, Windows Live and all other popular instant messaging clients. To get started, all you need to know are some very basic programming skills (any language would do) and web space to host your “bot”.
For this example, I have created a dummy bot called “insecure” that listens to your IM messages. To see this live, add insecure@bot.im to your GTalk buddy list and start chatting.

IM Bot

If you like to write a personal IM bot, just follow these simple steps:-
Step 1: Go to www.imified.com and register a new account with a bot.
Step 2: Now it’s time to create a bot which is actually a simple script that resides on your public web server.
It could be in PHP, Perl, Python or any other language.
Example Hello World bot:
The example below illustrates just how easy it is to create a bot.
This example is coded in PHP.
<?php
switch ($_REQUEST['step']) {
case 1:
echo "Hi, what's your name?";
break;
case 2:
echo "Hi " . $_REQUEST['value1'] . ", where do you live?";
break;
case 3:
echo "Well, welcome to this hello world bot, " . $_REQUEST['value1'] . "<br>from " . $_REQUEST['value2'] . ".<reset>";
break;
}
?>
Step 3: Once your script is ready, put it somewhere on your web server and copy the full URL to the clipboard.
Step 4: Now login to your imified account, paste the script URL

Screen Name: insecure@bot.im
Bot Script URL: http://www.insecure.in/imbot.php

Step 5: Add that im bot your friends list. That’s it.
This is a very basic bot but the possibilities are endless.
For instance, you could write a bot that will send an email to all your close friends via a simple IM message. Or you could write one that will does currency conversion.

reff : http://www.insecure.in/creating_im_bot.asp

Sunday, May 8, 2011

How to turn off Autoplay

Autoplay is very useful, but can also be a security risk.
To turn it on or off:
1. Open gpedit.msc from the run box from the start menu.
2. Navigate to Computer Configuration > Administrative Templates > System >all settings
3. Find Turn off autoplay