Saturday 29 October 2011

Upload source code of HTML



















<html>

A File Upload Script

<body>



if ( isset( $_FILES['fupload'] ) ) {

print "name: ". $_FILES['fupload']['name'] ."
";
print "size: ". $_FILES['fupload']['size'] ." bytes
";
print "temp name: ".$_FILES['fupload']['tmp_name'] ."
";
print "type: ". $_FILES['fupload']['type'] ."
";
print "error: ". $_FILES['fupload']['error'] ."
";

if ( $_FILES['fupload']['type'] == "image/gif" ) {

$source = $_FILES['fupload']['tmp_name'];
$target = "upload/".$_FILES['fupload']['name'];
move_uploaded_file( $source, $target );// or die ("Couldn't copy");
$size = getImageSize( $target );

$imgstr = "

;
$imgstr .= "src=\"$target\" alt=\"uploaded image\" />

";

print $imgstr;
}
}
?>

<form enctype="multipart/form-data"
action="" method="post">

"hidden" name="MAX_FILE_SIZE" value="102400" />
"file" name="fupload" />

"submit" value="upload!" />


form>
body>
html>

Friday 28 October 2011

Download XAMPP


















PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. PHP stands for Hypertext Preprocessor . The goal of the language is to allow web developers to write dynamically generated pages quickly.

You should need the server for php you can download it


For further help watch:





Friday 21 October 2011

Password-Cracking Techniques

Understanding Password-Cracking

Techniques


We get daily tons of requests regarding password cracking,
hereby we present a well researched comprehensive article adressing the same
It may bounce many of ur heads but we are sure a must mug up for Geeks nour regular visitors!!
so Gear Up! Dont give up before having a look on the entire article!




Many hacking attempts start with attempting to crack passwords. Passwords are the key piece
of information needed to access a system. Users, when creating passwords, often select passwords
that are prone to being cracked. Many reuse passwords or choose one that’s simple—such
as a pet’s name—to help them remember it. Because of this human factor, most password cracking
is successful; it can be the launching point for escalating privileges, executing applications,
hiding files, and covering tracks. Passwords may be cracked manually or with automated tools
such as a dictionary or brute-force method, each of which are covered later in this chapter.
Manual password cracking involves attempting to log on with different passwords. The
hacker follows these steps:
1.
Find a valid user account (such as Administrator or Guest).
2.
Create a list of possible passwords.
3.
Rank the passwords from high to low probability.
4.
Key in each password.
5.
Try again until a successful password is found.
A hacker can also create a script file that tries each password in a list. This is still considered
manual cracking, but it’s time consuming and not usually effective.

Boring!! isnt it!! A more efficient way of cracking a password is to gain access to the password file on a system.
Most systems



hash
(one-way encrypt) a password for storage on a system. During the
logon process, the password entered by the user is hashed using the same algorithm and then
compared to the hashed passwords stored in the file. A hacker can attempt to gain access to
the hashing algorithm stored on the server instead of trying to guess or otherwise identify the
password. If the hacker is successful, they can decrypt the passwords stored on the server.
Passwords are stored in the Security Accounts Manager (SAM) file on a
Windows system and in a password shadow file on a Linux system.



Understanding the LanManager Hash

Windows 2000 uses NT Lan Manager (NTLM) hashing to secure passwords in transit on the
network. Depending on the password, NTLM hashing can be weak and easy to break. For
example, let’s say that the password is
123456abcdef
. When this password is encrypted with
the NTLM algorithm, it’s first converted to all uppercase:
123456ABCDEF
. The password is
padded with null (blank) characters to make it 14 characters long:
123456ABCDEF__
. Before
the password is encrypted, the 14-character string is split in half:
123456A and BCDEF__.
Each string is individually encrypted, and the results are concatenated:
123456A = 6BF11E04AFAB197F
BCDEF__ = F1E9FFDCC75575B15
The hash is
6BF11E04AFAB197FF1E9FFDCC75575B15


Hacking Tools

Legion automates the password guessing in NetBIOS sessions. Legion scans multiple
IP address ranges for Windows shares and also offers a manual dictionary attack tool.
NTInfoScan is a security scanner for NT 4.0. This vulnerability scanner produces an HTMLbased
report of security issues found on the target system and other information.
L0phtCrack is a password auditing and recovery package distributed by @stake software,
which is now owned by Symantec. It performs Server Message Block (SMB) packet captures
on the local network segment and captures individual login sessions. L0phtCrack contains
dictionary, brute-force, and hybrid attack capabilities.
John the Ripper is a command-line tool designed to crack both Unix and NT passwords. The
cracked passwords are case insensitive and may not represent the real mixed-case password.
KerbCrack consists of two programs: kerbsniff and kerbcrack. The sniffer listens on the network
and captures Windows 2000/XP Kerberos logins. The cracker can be used to find the
passwords from the capture file using a brute force attack or a dictionary attack.

Cracking Windows 2000 Passwords

The SAM file in Windows contains the usernames and hashed passwords. It’s located in the
Windows\system32\config
directory. The file is locked when the operating system is running
so a hacker can’t attempt to copy the file while the machine is booted to Windows.
One option for copying the SAM file is to boot to an alternate operating system such as
DOS or Linux with a boot CD. Alternately, the file can be copied from the
repair
directory.
If a systems administrator uses the RDISK feature of Windows to back up the system, then a
compressed copy of the SAM file called
SAM._
is created in
C:\windows\repair
. To expand
this file, use the following command at the command prompt:
C:\>expand sam._ sam
After the file is uncompressed, a dictionary, hybrid, or brute-force attack can be run against
the SAM file using a tool like L0phtCrack.


Redirecting the SMB Logon to the Attacker

Another way to discover passwords on a network is to redirect the Server Message Block
(SMB) logon to an attacker’s computer so that the passwords are sent to the hacker. In order
to do this, the hacker must sniff the NTLM responses from the authentication server and trick
the victim into attempting Windows authentication with the attacker’s computer. A common
technique is to send the victim an e-mail message with an embedded hyperlink to a fraudulent

Hacking Tools

Win32CreateLocalAdminUser is a program that creates a new user with the username and
password
X
and adds the user to the local administrator’s group. This action is part of the
Metasploit Project and can be launched with the Metasploit framework on Windows.
Offline NT Password Resetter is a method of resetting the password to the administrator’s
account when the system isn’t booted to Windows. The most common method is to boot to
a Linux boot CD and then access the NTFS partition, which is no longer protected, and change
the password.
SMB server. When the hyperlink is clicked, the user unwittingly sends their credentials over
the network.


SMB Redirection

Several automated hacking tools can implement SMB redirection:


SMB Relay MITM Attacks and Countermeasures
 
An SMB relay MITM attack is when the attacker sets up a fraudulent server with a relay
address. When a victim client connects to the fraudulent server, the MITM server intercepts
the call, hashes the password, and passes the connection to the victim server.
Figure 4.1 illustrates an example of such an attack.


Hacking Tools

SMBRelay is an SMB server that captures usernames and password hashes from incoming
SMB traffic. SMBRelay can also perform man-in-the-middle attacks.
SMBRelay2 is similar to SMBRelay but uses NetBIOS names instead of IP addresses to
capture usernames and passwords.
pwdump2 is a program that extracts the password hashes from a SAM file on a Windows system.
The extracted password hashes can then be run through L0phtCrack to break the passwords.
Samdump is another program to extract NTLM hashed passwords from a SAM file.
C2MYAZZ is a spyware program that makes Windows clients send their passwords as clear
text. It displays usernames and their passwords as users attach to server resources.

SMB relay countermeasures include configuring Windows 2000 to use SMB signing, which
causes it to cryptographically sign each block of SMB communications. These settings are
found under Security Policies/Security Options.


NetBIOS DoS Attacks

A NetBIOS Denial of Service (DoS) attack sends a NetBIOS Name Release message to the NetBIOS
Name Service on a target Windows systems and forces the system to place its name in conflict
so that the name can no longer be used. This essentially blocks the client from participating in the
NetBIOS network and creates a network DoS for that system.


Password-Cracking Countermeasures

The strongest passwords possible should be implemented to protect against password cracking.
Systems should enforce 8–12 character alphanumeric passwords. The length of time the same
password should be used is discussed in the next section.
To protect against cracking of the hashing algorithm for passwords stored on the server,
you must take care to physically isolate and protect the server. The systems administrator can
use the SYSKEY utility in Windows to further protect hashes stored on the server hard disk.
The server logs should also be monitored for brute-force attacks on user accounts.
A systems administrator can implement the following security precautions to decrease the
effectiveness of a brute-force password-cracking attempt:
1.
Never leave a default password.
2.
Never use a password that can be found in a dictionary.


Hacking Tools

SMBGrind increases the speed of L0phtCrack sessions on sniffer dumps by removing duplication
and providing a way to target specific users without having to edit the dump files manually.
The SMBDie tool crashes computers running Windows 2000/XP/NT by sending specially
crafted SMB requests.
NBTdeputy can register a NetBIOS computer name on a network and respond to NetBIOS
over TCP/IP (NetBT) name-query requests. It simplifies the use of SMBRelay. The relay can be
referred to by computer name instead of IP address.


Hacking Tools

NBName can disable entire LANs and prevent machines from rejoining them. Nodes on a Net-
BIOS network infected by the tool think that their names are already in use by other machines.
3.
Never use a password related to the host name, domain name, or anything else that can
be found with whois.
4.
Never use a password related to your hobbies, pets, relatives, or date of birth.
5.
Use a word that has more than 21 characters from a dictionary as a password.
This subject is discussed further in the section “Monitoring Event Viewer Logs.”
In the following sections, we’ll look at two measures you can take to strengthen passwords
and prevent password-cracking.



Password Change Interval

Passwords should expire after a certain amount of time so that users are forced to change
their passwords. If the password interval is set too low, then users will forget their current
passwords; as a result, a systems administrator will have to reset users’ passwords frequently.
On the other hand, if passwords are allowed to be used for too long, then security
may be compromised. The recommended password-change interval is every 30 days. In
addition, it’s recommended that users not be allowed to reuse the last three passwords.
You cannot completely block brute-force password attacks if the hacker
switches the proxy server where the source packet is generated. A systems
administrator can only add security features to decrease the likelihood that
brute-force password attacks will be useful.


Monitoring Event Viewer Logs

Administrators should monitor Event Viewer logs to recognize any intrusion attempts either
before they take place or while they’re occurring. Generally, several failed attempts are logged
in the system logs before a successful intrusion or password attack. The security logs are only
as good as the systems administrators who monitor them.
Tools such as VisualLast aid a network administrator in deciphering and analyzing the
security log files. VisualLast provides greater insight into the NT event logs so the administrator can assess the activity of the network more accurately and efficiently. The program is designed to allow network administrators to view and report individual users’ logon and logoff times; these events may be searched according to time frame, which is invaluable to security analysts who are looking for intrusion details.
The event log located at
c:\\windows\system32\config\Sec.Event.Evt
contains the
trace of an attacker's brute-force attempts.

How to trace an IP of remote system (web+messenger)

Introduction:

Welcome to another rahulhackingarticles tutorial.
In here I have figure out some very easy but cool ways to trace out the geographical location and various other infos like ISP details etc of a remote computer using its IP.
Well I guess its one of the most important must learn manul for boys out there if you want to impress your friends particularly gals whom you’ll meet online in a chat room and tell them their geographical locations and ISP details and make them surprised and impressed J.
In the practical execution of this manual you don’t have to work much as it is very simple only you have to use your brain to understand some symbols and some format of expressions and use your IQ to execute things the right way.

What is IP and how to get the IP of a remote system::

Getting the IP or Internet Protocol of a remote system is the most important and the first step of hacking into it. Probably it is the first thing a hacker do to get info for researching on a system. Well IP is a unique number assigned to each computer on a network. It is this unique address which represents the system on the network. Generally the IP of a particular system changes each time you log on to the network by dialing to your ISP and it is assigned to you by your ISP. IP of a system which is always on the network remains generally the same. Generally those kind of systems are most likely to suffer a hacking attack because of its stable IP. Using IP you can even execute system commands on the victim’s computer.
Lets take the example of the following IP address: 202.144.49.110 Now the first part, the numbers before the first decimal i.e. 209 is the Network number or the Network Prefix.. This means that it identifies the number of the network in which the host is. The second part i.e. 144 is the Host Number that is it identifies the number of the host within the Network. This means that in the same Network, the network number is same. In order to provide flexibility in the size of the Network, here are different classes of IP addresses:

Address Class Dotted Decimal Notation Ranges
Class A ( /8 Prefixes) 1.xxx.xxx.xxx through 126.xxx.xxx.xxx
Class B ( /16 Prefixes) 128.0.xxx.xxx through 191.255.xxx.xxx
Class C ( /24 Prefixes) 192.0.0.xxx through 223.255.255.xxx

The various classes will be clearer after reading the next few lines.

Each Class A Network Address contains a 8 bit Network Prefix followed by a 24-bit host number. They are considered to be primitive. They are referred to as "/8''s" or just "8's" as they have an 8-bit Network prefix.
In a Class B Network Address there is a 16 bit Network Prefix followed by a 16-bit Host number. It is referred to as "16's".

A class C Network address contains a 24-bit Network Prefix and a 8 bit Host number. It is referred to as
"24's" and is commonly used by most ISP's.

Due to the growing size of the Internet the Network Administrators faced many problems. The Internet routing tables were beginning to grow and now the administrators had to request another network number from the Internet before a new network could be installed at their site. This is where sub-netting came in.

Now if your ISP is a big one and if it provides you with dynamic IP addresses then you will most probably see that whenever you log on to the net, your IP address will have the same first 24 bits and only the last 8 bits will keep changing. This is due to the fact that when sub-netting comes in then the IP Addresses structure becomes:

xxx.xxx.zzz.yyy

where the first 2 parts are Network Prefix numbers and the zzz is the Subnet number and the yyy is the host number. So you are always connected to the same Subnet within the same Network. As a result the first 3 parts will remain the same and only the last part i.e. yyy is variable.
***********************

For Example, if say an ISP xyz is given the IP: 203.98.12.xx Network address then you can be awarded any IP, whose first three fields are 203.98.12. Get it?

So, basically this means that each ISP has a particular range in which to allocate all its subscribers. Or in other words, all subscribers or all people connected to the internet using the same ISP, will have to be in this range. This in effect would mean that all people using the same ISP are likely to have the same first three fields of their IP Addresses.

This means that if you have done a lot of (By this I really mean a lot) of research, then you could figure out which ISP a person is using by simply looking at his IP. The ISP name could then be used to figure out the city and the country of the person. Right? Let me take an example to stress as to how cumbersome but easy (once the research is done) the above method can be.

In my country, say there are three main ISP’s:

ISP Name Network Address Allotted

ISP I 203.94.47.xx
ISP II 202.92.12.xx
ISP III 203.91.35.xx

Now, if I get to know the IP of an e-pal of mine, and it reads: 203.91.35.12, then I can pretty easily figure out that he uses ISP III to connect to the internet. Right? You might say that any idiot would be able to do this. Well, yes and no. You see, the above method of finding out the ISP of a person was successful only because we already had the ISP and Network Address Allotted list with us. So, what my point is, that the above method can be successful only after a lot of research and experimentation. And, I do think such research can be helpful sometimes.

Also, this would not work, if you take it all on in larger scale. What if the IP that you have belongs to someone living in a remote igloo in the North Pole? You could not possibly get the Network Addresses of all the ISP’s in the world, could you? If yes please send it to me J.

Well now I guess you have pretty good knowledge about what an IP is and what you can do by knowing the IP of a remote system. Now lets come to the point of finding out the IP of remote system.
Well you can easily figure out the IP of a remote system using the netstat utility available in the microsoft’s version of DOS. The netstat command shows the connections in which your system is engaged to and the ports they are using. Suppose you are checking your mail in hotmail and you want to find out the IP of msn. All you need to do is to open a dos window (command.com) and type netstat. You will see all the open connections of your system. There you will see something :

Proto Local Address Foreign Address State
TCP rahul:1031 64.4.xx.xx:80 ESTABLISHED

Now you got the IP address of hotmail ass 64.4.xx.xx .
Similarly you can figure out the IP address of most http or ftp connections.

To know your own IP type the following command in a dos windows
C:\netstat –n
[this commands converts the IP name into IP addresses]
this is what you will probably see on typing the above command :

Proto Local Address Foreign Address State
TCP 203.xx.251.161:1031 194.1.129.227:21 ESTABLISHED
TCP 203.xx.251.161:1043 207.138.41.181:80 FIN_WAIT_2
TCP 203.xx.251.161:1053 203.94.243.71:110 TIME_WAIT
TCP 203.xx.251.161:1058 194.1.129.227:20 TIME_WAIT
TCP 203.xx.251.161:1069 203.94.243.71:110 TIME_WAIT
TCP 203.xx.251.161:1071 194.98.93.244:80 ESTABLISHED
TCP 203.xx.251.161:1078 203.94.243.71:110 TIME_WAIT

Here 203.xx.251.161 is your IP address.

Now lets clarify the format used by netstat :

Proto : It shows the type of protocol the connection with the remote system is using.
Here TCP (transmission control protocol) is the protocol used by my system to connect to other systems.

Local Address : It shows the local address ie the local IP. When the netstat command is executed without –n switch then the name of the local system is displayed and when the netstat is executed with –n switch then the IP of the local system is displayed. Here you can also find out the port used by the connection.
xxx.yyy.zzz.aaa:1024
in this format you will see the local address. Here 1024 is the port to which the remote system is connected in your system

Foreign Address :: It shows the IP address of the remote system to which your system is connected. In this case also if the netstat command is excuted with –n switch then you directly get the IP of the victim but if the netstat is executed without –n switch then you will get the address of the remote system. Something like

C:\netstat
Proto Local Address Foreign Address State
TCP rahul:1031 msgr.lw4.gs681.hotmail.com:80 ESTABLISHED

Here msgr.lw4.gs681.hotmail.com is the address of the foreign system . putting this address in any IP lookup program and doing a whois lookup will reveal the IP of the remote system.

Note: The port to which your system is connected can be found from this in the same way as I have shown in the case of local address. The difference is that, this is the port of the remote system to which your computer is connected to.
Below I have produced a list of ports and popular services generally found to be running.
21 :: FTP port
80 :: http port
23 :: Telnet port

Note: If your execute the netstat command and find ports like 12345,27374 are open and are in use then make it sure that your sweat heart computer is infected with her boyfriend.. J J J J I mean your computer is infected with some sort of Trojan.
Below I have produced a list of commonly known Trojans and the ports they use by default. So if you find these ports open then get a good virus buster and get these stupid servers of the Trojans kicked out. Well if you want to play with these Trojan by keeping them in your computer but not letting them ruin your system performance then just disble it from the system registry run and they wont be loaded to memory each time when windows starts up[This trick doesn’t work for all Trojans].

Netbus :: 12345(TCP)
Subseven :: 27374(TCP)
Girl Friend :: 21554(TCP)
Back Oriface :: 31337 (UDP)

Well guys and gals I hope you are now well familiar with the term IP and what is the utility of IP in cyber world and how to get the IP of a remote system to which you are connected. I hope you find my writings very easy to undertstand. I know I lack the capacity of explaining myself but I try my level best to make things very easy and clear for you’ll.

How to get the IP of a remote system while chatting through msn messenger ::

This is a tutorial on how to get IP address from MSN messenger. This is actually
a really easy thing to do. It is not like going through the hard time and reversing
MSN messenger like many people think.
The IP address is only given when you accept or are sending a file through MSN
messenger. When you send IM's, the message is sent through the server thus hiding
your victims IP and your. But when you send a file or recieve a file, it is direct
connection between the two computers.
To obtain the IP accept a file transfer or send a file to the victim, when the file
sending is under way from the dos prompt type "netstat" without the quotation marks.
You should get a table like this:
Proto Local Address Foreign Address State
TCP kick:1033 msgr-ns29.msgr.hotmail.com:1863 ESTABLISHED
TCP kick:1040 msgr-sb36.msgr.hotmail.com:1863 ESTABLISHED
TCP kick: <REMOTE HOST> ESTABLISHED
The top name in the list is the server's address for IMing. There could be many of
the second name in the list, as a new connection is made to the server for every
room you are IMing to. You are looking for the address of the remote host in
this table it may be something similar to "host63-7-102-226.ppp.cal.vsnl.com" or “203..64.90.6”.
without the quotation marks.
All you need to do now is to put this address in you IP lookup programe and get the IP of the remote system.


Well 50%of the work is done now. Now you know how to get the IP of a remote system, so its time to trace it down and find some details about the IP.

Tracing an IP is quite simple. You can do it the easy way by using some sweet softwares like Visual Trace 6.0b
[ftp://ftp.visualware.com/pub/vr/vr.exe]
Neotrace
[http://www.neoworx.com/download/NTX325.exe]
or by our way ie. Using MS DOS or any other version of DOS.
Well I suggest you to use DOS and its tracert tool for tracing the IP cause using it will give you a clear conception about the art of tracing an IP and I guarantee that you will feel much satisfied on success than using a silly software. Furthur you will know how things work and how the IP is traced down and the different networks associated in this tracing process.

Let us take a look at tracert tool provided for DOS by Microsoft.
It is a very handy tool for peoples need to trace down an IP.
Just open any DOS windows and type tracert.

C:\windows>tracert

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name

Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list.
-w timeout Wait timeout milliseconds for each reply.

You will now see a description of the tracert command and the switches associated with it.
Well these switches doesn’t makes much difference. All you can do is to increase the timeout in milliseconds by using –w switch if you are using a slow connection and the –d switch if you wish not resolve address to hostnames by default.
By default tracert performs a maximum of 30 hops trace. Using the –h switch you can specify the number of hops to perform.
Now its time for execution.
Let us trace down the IP yahoo.com [216.115.108.243]

TIP: If you have done a long research (I mean a lot) then simply looking at the IP you can figure out some info from it. For example the IP 203.90.68.8 indicates that the system is in India. In India IPs generally begin with 203 and 202

C:\WINDOWS>tracert yahoo.com

Tracing route to yahoo.com [216.115.108.243] over a maximum of 30 hops:

1 308 ms 142 ms 127 ms 203.94.246.35
2 140 ms 135 ms * 203.94.246.1
3 213 ms 134 ms 132 ms 203.94.255.33
4 134 ms 130 ms 129 ms 203.200.64.29
5 122 ms 135 ms 131 ms 203.200.87.75
6 141 ms 137 ms 121 ms 203.200.87.15
7 143 ms 170 ms 154 ms vsb-delhi-stm1.Bbone.vsnl.net.in [202.54.2.241]
8 565 ms 589 ms 568 ms if-7-0.bb8.NewYork.Teleglobe.net [207.45.198.65]
9 596 ms 584 ms 600 ms if-3-0.core2.NewYork.teleglobe.net [207.45.221.66]
10 * * * Request timed out.
11 703 ms 701 ms 719 ms if-3-0.core2.PaloAlto.Teleglobe.net [64.86.83.205]
12 694 ms 683 ms 681 ms if-6-1.core1.PaloAlto.Teleglobe.net [207.45.202.33]
13 656 ms 677 ms 700 ms ix-5-0.core1.PaloAlto.Teleglobe.net [207.45.196.90]
14 667 ms 673 ms 673 ms ge-1-3-0.msr1.pao.yahoo.com [216.115.100.150]
15 653 ms 673 ms 673 ms vl20.bas1.snv.yahoo.com [216.115.100.225]
16 666 ms 676 ms 674 ms yahoo.com [216.115.108.243]
Trace complete.

Note: Here I have traced yahoo.com. In place of yahoo.com you can give the IP of yahoo or any other IP you want to trace, the result will be the same.

Now carefully looking at the results you can figure out many information about yahoo’s server [216.115.108.243]
First packets of data leave my ISP which is at 203.94.246.35 .Similarly you can find out the different routers through which the packets of data are send and received to and from the target system. Now take a look at the 13th line you’ll see that the router is in PaloAlto.Teleglobe.net from this you can easily figure out that the router is in Palo Alto. Now finally look at the target system ie. Yahoo’s server vl20.bas1.snv.yahoo.com . Now you got the address of yahoo’s server. Now put this address in any IP lookup programe and perform and reverse DNS lookup and you will get most of the info about this address,like the place where it is in.

Well another thing you can find out using the tracert tool is that the number of hops (routers) the target system is away from you. In case of tracerouting yahoo.com we find that the target system ie yahoo’s server is 16 hops away from my system. This indicates that there are 16 routers between my system and yahoo’s server.

Apart from tracing an IP you can find out many usefull details about the target system using the tracert tool.

Firewall Detection

While tracerouting a target system, if you get * as an output then it indicates timeout error. Now if you peform another tracerout to the same taeget system at some other time with a good connection and in this way few times more and if you always get * as the output then take it for sure that the target system is running a firewall which prevents sending of data packets from the target system.

Example

Some days ago I tried to tracert hotmail’s server in plain and simple way using tracert without any trick.This is what I found out :


c:\windows>tracert 64.4.53.7

Tracing route to lc2.law5.hotmail.com [64.4.53.7]

over a maximum of 30 hops:



1 * * * Request timed out.
2 161 ms 147 ms 85 ms 203.90.69.81
3 126 ms 261 ms 219 ms 203.90.66.9
4 121 ms 115 ms 228 ms delswp2.hclinfinet.com [203.90.66.133]
5 727 ms 725 ms 711 ms 203-195-147-250.now-india.net.in [203.195.147.250]
6 1006 ms 794 ms 952 ms core-fae-0-0.now-india.net.in [203.195.147.3]
7 826 ms 731 ms 819 ms 213.232.106.9
8 885 ms 744 ms 930 ms 213.166.3.209
9 851 ms 1020 ms 1080 ms 213.232.64.54
10 1448 ms 765 ms 1114 ms pos8-0.core2.London1.Level3.net [212.113.0.118]
11 748 ms 789 ms 750 ms ge-4-2-1.mp2.London1.Level3.net [212.187.131.146]
12 719 ms 733 ms 846 ms so-3-0-0.mp1.London2.Level3.net [212.187.128.46]
13 775 ms 890 ms 829 ms so-1-0-0.mp2.Weehawken1.Level3.net [212.187.128.138]
14 853 ms 852 ms 823 ms so-3-0-0.mp1.SanJose1.Level3.net [64.159.1.129]
15 889 ms 816 ms 803 ms so-7-0-0.gar1.SanJose1.Level3.net [64.159.1.74]
16 * * * Request timed out.
17 * * * Request timed out.
18 * * * Request timed out.
19 * * * Request timed out.
20 * * * Request timed out.
21 * * * Request timed out.
22 * * * Request timed out.
23 * * * Request timed out.
24 * * * Request timed out.
25 * * * Request timed out.
26 * * * Request timed out.
27 * * * Request timed out.
28 * * * Request timed out.
29 * * * Request timed out.
30 * * * Request timed out.
Trace complete.

I performed the same tracert many times a day but concluded with the same result. This indicates that the systems after the router SanJose1.Level3.net has firewalls installed which prevents the outgoing of data packets.

Detecting Traceroute Attempts on your System

You can detect that an attacker is performing a traceroute on your system, if you see the following symptoms:

1. If you observe port scans on very high UDP ports. This symptom means that the attacker has performed a traceroute on your system. However, it could also mean a simply port scan. Either way, it signifies the fact that your system is being scanned.

2. If the packet-monitoring tool installed in your network, picks up several outgoing TTL-exceeding messages, then it is yet another sign that someone is doing a traceroute on your system.

3. If in these log files, you also observer an outgoing ICMP port unreachable error message, then it means that since a traceroute was done on your system and as the target system i.e. your system, was reached, it responded with this error message.

You can also find our more information on the attacker (if he performs a traceroute on your system) by simply studying the sniffer log files. If you observer the TTL values, then we can easily figure out the following information on the attacker by making use of OS detection techniques discussed earlier in this white paper:

  1. The Operating System running on the attacker’s target system.
  2. Number of hops away, the attacker is from you.

All DOS Commands

All DOS command

ADDUSERS: Add or list users to/from a CSV file
ARP:
Address Resolution Protocol
ASSOC:
Change file extension associations
ASSOCIAT:
One step file association
AT:
Schedule a command to run at a later time
ATTRIB:
Change file attributes

BOOTCFG:
Edit Windows boot settings
BROWSTAT:
Get domain, browser and PDC info

CACLS:
Change file permissions
CALL:
Call one batch program from another
CD:
Change Directory - move to a specific Folder
CHANGE:
Change Terminal Server Session properties
CHKDSK:
Check Disk - check and repair disk problems
CHKNTFS:
Check the NTFS file system
CHOICE:
Accept keyboard input to a batch file
CIPHER:
Encrypt or Decrypt files/folders
CleanMgr:
Automated cleanup of Temp files, recycle bin
CLEARMEM:
Clear memory leaks
CLIP:
Copy STDIN to the Windows clipboard.
CLS:
Clear the screen
CLUSTER:
Windows Clustering
CMD:
Start a new CMD shell
COLOR:
Change colors of the CMD window
COMP:
Compare the contents of two files or sets of files
COMPACT:
Compress files or folders on an NTFS partition
COMPRESS:
Compress individual files on an NTFS partition
CON2PRT:
Connect or disconnect a Printer
CONVERT:
Convert a FAT drive to NTFS.
COPY:
Copy one or more files to another location
CSVDE:
Import or Export Active Directory data

DATE:
Display or set the date
Dcomcnfg:
DCOM Configuration Utility
DEFRAG:
Defragment hard drive
DEL:
Delete one or more files
DELPROF:
Delete NT user profiles
DELTREE:
Delete a folder and all subfolders
DevCon:
Device Manager Command Line Utility
DIR:
Display a list of files and folders
DIRUSE:
Display disk usage
DISKCOMP:
Compare the contents of two floppy disks
DISKCOPY:
Copy the contents of one floppy disk to another
DNSSTAT:
DNS Statistics
DOSKEY:
Edit command line, recall commands, and create macros
DSADD:
Add user (computer, group..) to active directory
DSQUERY:
List items in active directory
DSMOD:
Modify user (computer, group..) in active directory

ECHO:
Display message on screen
ENDLOCAL:
End localisation of environment changes in a batch file
ERASE:
Delete one or more files
EXIT:
Quit the CMD shell
EXPAND:
Uncompress files
EXTRACT:
Uncompress CAB files

FC:
Compare two files
FDISK:
Disk Format and partition
FIND:
Search for a text string in a file
FINDSTR:
Search for strings in files
FOR:
Conditionally perform a command several times
FORFILES:
Batch process multiple files
FORMAT:
Format a disk
FREEDISK:
Check free disk space (in bytes)
FSUTIL:
File and Volume utilities
FTP:
File Transfer Protocol
FTYPE:
Display or modify file types used in file extension associations

GLOBAL:
Display membership of global groups
GOTO:
Direct a batch program to jump to a labelled line

HELP:
Online Help
HFNETCHK:
Network Security Hotfix Checker

IF:
Conditionally perform a command
IFMEMBER:
Is the current user in an NT Workgroup
IPCONFIG:
Configure IP

KILL:
Remove a program from memory

LABEL:
Edit a disk label
LOCAL:
Display membership of local groups
LOGEVENT:
Write text to the NT event viewer.
LOGOFF:
Log a user off
LOGTIME:
Log the date and time in a file

MAPISEND:
Send email from the command line
MEM:
Display memory usage
MD:
Create new folders
MODE:
Configure a system device
MORE:
Display output, one screen at a time
MOUNTVOL:
Manage a volume mount point
MOVE:
Move files from one folder to another
MOVEUSER:
Move a user from one domain to another
MSG:
Send a message
MSIEXEC:
Microsoft Windows Installer
MSINFO:
Windows NT diagnostics
MSTSC:
Terminal Server Connection (Remote Desktop Protocol)
MUNGE:
Find and Replace text within file(s)
MV:
Copy in-use files

NET:
Manage network resources
NETDOM:
Domain Manager
NETSH:
Configure network protocols
NETSVC:
Command-line Service Controller
NBTSTAT:
Display networking statistics (NetBIOS over TCP/IP)
NETSTAT:
Display networking statistics (TCP/IP)
NOW:
Display the current Date and Time
NSLOOKUP:
Name server lookup
NTBACKUP:
Backup folders to tape
NTRIGHTS:
Edit user account rights

PATH:
Display or set a search path for executable files
PATHPING:
Trace route plus network latency and packet loss
PAUSE:
Suspend processing of a batch file and display a message
PERMS:
Show permissions for a user
PERFMON:
Performance Monitor
PING:
Test a network connection
POPD:
Restore the previous value of the current directory saved by PUSHD
PORTQRY:
Display the status of ports and services
PRINT:
Print a text file
PRNCNFG:
Display, configure or rename a printer
PRNMNGR:
Add, delete, list printers set the default printer
PROMPT:
Change the command prompt
PsExec:
Execute process remotely
PsFile: Show files opened remotely
PsGetSid:
Display the SID of a computer or a user
PsInfo:
List information about a system
PsKill:
Kill processes by name or process ID
PsList:
List detailed information about processes
PsLoggedOn:
Who's logged on (locally or via resource sharing)
PsLogList:
Event log records
PsPasswd:
Change account password
PsService:
View and control services
PsShutdown:
Shutdown or reboot a computer
PsSuspend:
Suspend processes
PUSHD:
Save and then change the current directory

QGREP:
Search file(s) for lines that match a given pattern.

RASDIAL:
Manage RAS connections
RASPHONE:
Manage RAS connections
RECOVER:
Recover a damaged file from a defective disk.
REG: Read,
Set or Delete registry keys and values
REGEDIT:
Import or export registry settings
REGSVR32:
Register or unregister a DLL
REGINI:
Change Registry Permissions
REM:
Record comments (remarks) in a batch file
REN:
Rename a file or files.
REPLACE:
Replace or update one file with another
RD:
Delete folder(s)
RDISK:
Create a Recovery Disk
RMTSHARE:
Share a folder or a printer
ROBOCOPY:
Robust File and Folder Copy
ROUTE:
Manipulate network routing tables
RUNAS:
Execute a program under a different user account
RUNDLL32:
Run a DLL command (add/remove print connections)

SC:
Service Control
SCHTASKS:
Create or Edit Scheduled Tasks
SCLIST:
Display NT Services
ScriptIt:
Control GUI applications
SET:
Display, set, or remove environment variables
SETLOCAL:
Begin localisation of environment changes in a batch file
SETX:
Set environment variables permanently
SHARE:
List or edit a file share or print share
SHIFT:
Shift the position of replaceable parameters in a batch file
SHORTCUT:
Create a windows shortcut (.LNK file)
SHOWGRPS:
List the NT Workgroups a user has joined
SHOWMBRS:
List the Users who are members of a Workgroup
SHUTDOWN:
Shutdown the computer
SLEEP:
Wait for x seconds
SOON:
Schedule a command to run in the near future
SORT:
Sort input
START:
Start a separate window to run a specified program or command
SU:
Switch User
SUBINACL:
Edit file and folder Permissions, Ownership and Domain
SUBST:
Associate a path with a drive letter
SYSTEMINFO:
List system configuration

TASKLIST:
List running applications and services
TIME:
Display or set the system time
TIMEOUT:
Delay processing of a batch file
TITLE:
Set the window title for a CMD.EXE session
TOUCH:
Change file timestamps
TRACERT:
Trace route to a remote host
TREE:
Graphical display of folder structure
TYPE:
Display the contents of a text file

USRSTAT:
List domain usernames and last login

VER:
Display version information
VERIFY:
Verify that files have been saved
VOL:
Display a disk label

WHERE:
Locate and display files in a directory tree
WHOAMI:
Output the current UserName and domain
WINDIFF:
Compare the contents of two files or sets of files
WINMSD:
Windows system diagnostics
WINMSDP:
Windows system diagnostics II
WMIC:
WMI Commands

XCACLS:
Change file permissions
XCOPY:
Copy files and folders

i recommend for all dos commands visit
http://www.ss64.com/nt/

How Trojan Horses Work

One of the most enduring stories of the Trojan War, the most important conflict in Greek mythology, is the tale of the Trojan horse. Trying to find a way into the city of Troy, the great warrior Odysseus ordered his men to build a massive wooden horse, one big enough for several Greek soldiers to fit in. Once the structure was finished, he and several other warriors climbed inside, while the rest of the Greeks sailed away from Troy. One man named Sinon, however, stayed behind in order to deceive the Trojans, convincing them that his fellow Greeks had betrayed him and fled from the city. The wooden horse, he told the Trojans, was safe and would bring them luck.

After some discussion over the matter, the Trojans agreed to wheel the horse through their gates, unknowingly giving the Greek enemy access to the city. After proclaiming victory and partying all night, the citizens of Troy went to sleep -- it was then that Odysseus and his men crept out of the Trojan horse and wreaked havoc on the city.

­Although you've probably heard of the Trojan horse from Greek mythology, chances are you've also heard of Trojan horses in reference to computers. Trojan horses are common but dangerous programs that hide within other seemingly harmless programs. They work the same way the ancient Trojan horse did: Once they're installed, the program will infect other files throughout your system and potentially wreak havoc on your computer. They can even send important information from your computer over the Internet to the developer of the virus. The developer can then essentially control your computer, slowing your system's activity or causing your machine to crash.

­Though they're not actually viruses, they're referred to as "Trojan horse viruses," "Trojan viruses," "Trojan horses" or just plain "Trojans." Regardless of what people call them, they all mean same thing. But what happened? How did you let this Trojan horse into your computer in the first place? And what can you do stop one from getting in?

Amazing New Motion Capture Tech Makes Games Look Like Films


Check out this amazing new video on YouTube.  It's a short clip on the making of the upcoming video game, L.A. Noire.  Specifically, it focuses on a new motion capture technology called MotionScan, which creates the most lifelike scenes yet.



Brendan McNamara, lead developer  for L A Noire, has said that “We’re definitely blurring the lines now. I want this game to be the flashpoint where people start to think of games and film as being on the same level, because I’m confident they already are.”  It's hard to argue after seeing the footage.  The company behind MotionScan is depth Analysis, based in Sydney, Australia. Depth Analysis announced the innovation earlier this year, and gave a few hints about how it works.

"MotionScan uses 32 High Definition cameras to capture true-to-life three-dimensional performances at up to 30 frames per second," the company revealed. "Capable of capturing up to 50 minutes of final footage and processing up to 20 minutes of facial animation automatically per day, the technology revolutionizes traditional motion-capture and post-production animation. MotionScan records every emotional detail, mannerism, and facial nuance accurately frame by frame as 3D models.  No markers or phosphorescent paint needs to be applied to the actors at the time of recording, and no manpower is required to clean up data and animate the finer details by hand after the shoot. For directors and cinematographers, an additional advantage of MotionScan is the ability to view an actor’s performance from any angle and re-light in any way from one take without the need for multiple camera and lighting setups that quickly drain production time and budgets."

This comes at a momentous time for motion-capture innovation.  Microsoft, of course, recently rolled out the Kinect motion-sensing camera for the Xbox 360.  The Kinect is sort of the DIY version of MotionScan, letting gamers transport themselves into the action.  It'll be interesting to see how this increased realism impacts game development in the coming year.  Perhaps most significantly, it may lead more A-List Hollywood actors into games.   After all, as one can see by the LA Noire footage (which features an actor from the hit show Mad Men) there's more "acting" that can actually come through now given the mocap precision.

LA Noire, which is made by Rockstar Games, will likely be a breakthrough title, ushering in a new era of cinematic game play.  With so much attention focused now on smaller, social games like Farmville, cinematic epics are primed for reinvention.   I have no doubt that while gamers may be spending more time on iPhones, there's always an appetite for big brash immersive epics like LA Noire. 

The “world’s most wanted hacker,” Kevin Mitnick, has gone straight (interview)

This story is taken from VentureBeat

Kevin Mitnick was once labeled the world’s most wanted hacker. Back in 1992, he tangled with a mystery hacker named Eric, setting off a duel that led to a chain of events that spun out of control.
 
After a FBI manhunt, he was caught in 1995 with the help of security expert Tsutomu Shimomura, who wrote about the experience with New York Times writer John Markoff. Mitnick spent five years in jail, including eight months in solitary confinement.

At first, Mitnick wasn’t allowed to tell his side of the story, thanks to a gag order. Now he has penned a book on about his life on the run, co-written with author William L. Simon.  Called “Ghost in the Wires: My Adventures as the World’s Most Wanted Hacker,” the title has stayed on the New York Times Bestseller list for several weeks.

After getting out of prison, Mitnick pulled his life together as a “white hat” hacker, or one who helps companies by testing the security of their networks via Mitnick Security Consulting. Now he frequently talks about how to protect yourself from wily cyber attacks.
Here’s an excerpt from the book. And below is an edited transcript of our interview with Mitnick.

VB: Hi Kevin. We’ve talked before when you published your books, The Art of Intrusion and The Art of Deception. At the time, you had a gag order that did not allow you to write about your arrest and the events leading up to it. Now that it has expired, you’ve revisited those memories. Why?

KM: I had a deal with the government for about, for seven years after I was released from custody. So it expired around Jan. 21, 2007.  After that, we decided to work on my memoir, Ghost in The Wires. That was finally published on August 15. The other two books mentioned my life on the run, but they were really about the lessons I learned with social engineering and how organizations could mitigate the risk of falling victim to it. That book was The Art of Deception. Art of Intrusion was really kind of just talking about the stories of other hackers that were in the news and some where the perpetrators were never identified.
So what I like about the best of all these three is my life story Ghost in The Wires because it’s kind of like a Catch Me If You Can version for a computer hacker. What is unique about it that it is a true story. People really seem to like it.

VB: Yeah I noticed you tweeted about how it’s still on the New York Times online bestseller list.

KM: Well this week it was 23 last week it was 12 the week before that it was 15, the week before that it was 16. So I have been on the New York Times best seller list a month so far.

VB: Congratulations. Why do people want to read it?

KM: Thank you so much. I never expected it but I guess it’s a great story and it’s written very well. So people are interested in it and I guess I’m the cyber version of Frank Abagnale.

VB: It’s probably only fair since there were other bestsellers that were written about you.

KM: I don’t think any of them actually made the bestsellers list. John Markoff’s book, [Takedown: The Pursuit and Capture of Kevin Mitnick, America's Most Wanted Computer Outlaw, By the Man Who Did It], never made it the bestsellers list.

VB: Oh it didn’t?

KM: As far as I am aware, the only hacking book that made the bestseller list was a book called The Cuckoo’s Egg by Cliff Stoll. The Takedown book never made it to the list and in fact it was a very poorly reviewed book.

VB: Did you ever figure out why the government had such an unusual gag order in place here because that seems pretty rare?
 
KM: Well one of the things was they wanted to profit off my story and they wanted to keep everything under a protect order meaning that I was essentially forbidden to talk about it. So I had to be very careful because there is still stuff that is still under protective order that I couldn’t reveal. And so I had to be very careful to still tread around that restriction. The seven-year restriction was to prevent me from earning any revenue from my free public expression. They learned that from cases like the (murderer) Son of Sam.

So they had to do it that way because there are laws that are usually applied to violent crime cases to prevent people from profiting by telling the story. But it’s a prior restraint on free speech, so the Supreme Court has since struck down those laws. That was how the federal government dealt with it back then. It was part of the plea agreement.

VB: So what really drove you to write this new book after the gag order lifted and you were free?

KM: To get the story out. It wasn’t really about making money. I mean I make money from my security business and my public speaking career because I go around in the world doing a lot of public speeches, keynoting at conferences. I make plenty of money doing that. So it wasn’t really about the money it was about getting my side of the story out. I thought it was a great story to tell that people would enjoy it. And I want to really to focus on the chase because my story is kind of a cat-and-mouse game with the federal government.

VB: Tell us some stories about being on the run.

KM: I think the federal government came down harder on me is because I was playing games on them. At one point the government sent an informant to come and trap me, around 1992, after I was released from an earlier prison sentence. I quickly worked out what was going on and in the process I compromised the local cell phone company. I was able to identify the cell phones in Los Angeles that were calling the informant. I didn’t know the guy was an informant at the time, as this was part of my usual investigation.

I learned that people calling him were the FBI and it was the agency cell phone numbers. So what I did is I programmed these cell phone numbers into a device at a company where I was working as a private investigator. So if any of the cell phones came within a few miles radius of me, it would send me an alert. It was an early warning detection system that I had set up.

So in September of 1992, I was walking to my office one morning and I disabled the alarm. But I kept hearing a beeping. And I figured out that the alarm was disabled and I starting walking around everyone’s office to find out what this weird beeping was. It turned out it was coming from my office and it was my early warning system going off. A few hours earlier one of the FBI agents was actually making a phone call from the pay phone across the street from my apartment. He was within a mile of where I was.

I realized that the FBI happened to be to at my apartment when I was sleeping and nobody knocked on the door. So I realized they weren’t there to like arrest me immediately. They were probably preparing to get the stuff on my computer. I thought they would do a search. So I cleaned out my floppy disks, computers, and notes. I moved them over to a friend’s house. I went to Winchell’s doughnuts and got a box. I took a Sharpie and wrote “FBI doughnuts” on the box and stuck it in the refrigerator. The next day, the FBI executed the search warrant. The day before they were just gathering a description of my apartment to get the warrant.They searched my apartment and found nothing but the doughnuts. I think they were really pissed off.

I did these immature things that were funny at the time and it irritated them to no end. I think the agents took it personally. So when I was prosecuted, it felt like it was because I was playing games with them. When I was running from the government and living in Denver, I was working for this law firm. I had a legitimate systems administrator job. My hacking was all about becoming the best at circumventing security. So when I was a fugitive, I worked systems administrator jobs to make money. I wasn’t stealing money or using other people’s credit cards. I was doing a 9-to-5 job. I was at this law firm in Denver for a year and a half. One of my jobs was supporting the firm’s telephone system. I put code into the system so that if anyone were to call the FBI in Los Angeles or Denver, or the U.S. Attorney’s office, it would send me a page. I would know if there was an internal investigation or someone working me. I lived under the name Eric Weisz, the real name of Harry Houdini. I did these smart ass things and the government really frowned on it. I made a mockery of them and that’s probably why they came down hard on me.

My hacking did cause losses. But the losses were minimal compared to what the government alleged. The government alleged that I caused $300 million worth of damage, where the damage was that I copied source code. I was interested in the source code for operating systems like [Digital Equipment Corp.'s] VMS. And I wanted to look at the source code; my only purpose was to examine the flaws within the operating system so I could bypass security. So it’s really just leveraging the source code to become a better hacker. Now certainly it was illegal to copy the source code but the government really took that and ran with it.

Some of the FBI agents solicited these companies to actually say their losses $80 million each, based on the value of the source code that I looked at. So basically that was the entire research cost for developing it. It’s kind of like stealing a can of Coke and then getting charged with stealing billions of dollars because you have Coca-Cola formula. In my case, the fair losses would have been like something a few hundred thousand dollars.

VB: So why didn’t that make sense?

KM: It was only in the thousands, not the millions. So what I had done was poked at the tiger too much. They were trying to get me a really substantial prison sentence. My lawyer checked with the Securities and Exchange Commission because any publicly traded company has to report it when they suffer a material loss. Otherwise, they are defrauding shareholders. My attorney founded that none of these companies had reported to the SEC any loss that was attributed to my hacking. So, again, I was punished for causing these multimillion dollar losses.

VB: So there was a mythology to being the world’s most wanted hacker.

KM: Yeah I was you know I was the world’s most-wanted hacker in the 1990s. I would hack in at all these companies and look at their source code and the source code was a trade secret. So the companies themselves had no idea why they have this mysterious person hacking into their system. They were doing investigations. There were some real losses for sure.  I’m sorry that I caused anybody any loss at the time. As a hacker, I was thinking that all they have to do is change a few passwords and they would fix it. They would patch a security hole in their operating system and then I would be locked out. It might take them 30 minutes for them to do that. What I didn’t realize was what the other side is doing. The other side is like rebuilding their operating system from scratch. They are auditing the source codes. They are going through all these significant measures because they don’t know who is on the other side. They don’t know it’s just me. So you know what I’m saying? The victims had to do a lot of work.

VB: Did you feel like you had to correct the record because of the book that John Markoff co-wrote?

KM: Oh my God. I mean we could go on for hours. For example when I hacked into DEC and I copied the VMS source code with the co-defendant. I remember my co-defendant actually set me up for a FBI sting and I was arrested. I ended up in federal prison. Three days later, they finally took me to court and I was expecting to get bail. What had happened was that a federal prosecutor told the judge not only do we have to detain this guy, we have to make sure he can’t get to a pay phone inside the prison. We have to make sure he can’t get to a pay phone because he could dial up to the North American Air Defense System (NORAD) and whistle tones and possibly start a nuclear war.

[Markoff declined comment, beyond pointing out that Mitnick pleaded guilty to computer and wire fraud in March 1999.]

When the prosecutor said this I started laughing because I had never heard something so ridiculous in my life. It’s kind of like you taking something out of the movie War Games and manipulating it to a ridiculous degree. The judge, however, bought it hook line and sinker. I guess the prosecutor was to be believed and I ended up being held in solitary confinement in a federal detention center for nearly a year based on this myth. Then all these other rumors the government started using as fact. They said that I hacked into the National Security Agency and got to their secret access codes.

VB: That sounds a little implausible.

KM:    Back in the beginning, around the mid-90s you could do a “who is” command on a site. Nowadays, you do that it shows who it belongs to. Back then, they used to list the registered users of the host and their phone numbers. So I had a file on my floppy disk at the time called “NSA.txt” and it was a file that the output of a system called Dock Master. And Dock Master was a system that was run by the National Computer Security Center, which was the public arm of the NSA. And it listed the user names in a four-digit number and the four-digit number was their telephone extension.

The prosecutor characterized that file as proof that I hacked into the NSA and got their secret access codes and those four-digit numbers were secret access codes. I was said to be stalking the actress Kristy McNichol. I was supposedly messing with her telephone and calling her at all times of the day and night. The rumor went so far I ended up on the front page of the National Examiner which was like The National Enquirer. And so I remember going to the supermarket and seeing a  front page photo of me where it says Mitnick is stalking Kristy McNichol and this is I couldn’t believe it. The government used this in court as to what a danger I was. My mom at the time was a waitress at Jerry’s Delicatessen in Studio City. She saw Kristy McNichol and walked up to her. She said my son is Kevin Mitnick. She told my mom that whatever was happening wasn’t true. Kristy McNichol was going to write a letter to the court and explain these things had never happened. Her agents stopped her because they didn’t want it in the news that she was supporting me. There was a report that I hacked into a news wire service and was trying to discredit Security Pacific Bank and that cause them a big loss. That was a totally made-up allegation. I mean the list just goes on and on you know I don’t want to bore you.

Then the true thing is that when I was younger I was able to get celebrities’ unlisted telephone numbers and then I would verify that they were indeed the right number. Then I would never call again. There was an allegation that I had wiretapped the entire Los Angeles office of the FBI, which wasn’t true. I did however monitor the locations of cell phones and looked at the call detail records. So I would know a person A is calling person B.  But actually, in the New York Times, it said that I was wiretapping their conversations which wasn’t true. One chapter of the book describes the court drama. Most of the book is focused on the adventure, the crazy things I did as a juvenile. The book isn’t about me whining about this.

VB: What was the hack that you were most proud of?

KM: The hack I was most proud was actually hacking the McDonald’s drive-through window. I did this when I was 17. It wasn’t about hacking a computer. It was actually hacking their drive up windows so that I could overtake the radio in the drive-through window. I could sit across the street and talk and pretend that I was the employee inside McDonald’s. The poor employee could hear what’s going on but my transmitter was more powerful than his.

So you can imagine what fun you can have as a teenager when customers would drive up. I would say, ‘can I take your order please?’ They give the order. And I would say, ‘OK I have your order you are the 50th customer today so please right forward. Your order is absolutely free. And then the cops would drive up to order something. And I would say, ‘I’m sorry we only serve doughnuts to cops. We don’t serve any type of other food.’ Or I would say, ‘Hide the cocaine, hide the cocaine. May I take your order sir?’ One time, a manager of a McDonald’s came out to find out what the hell was happening. He walked around the parking lot and couldn’t see anybody. He looked in cars. He walked up to the drive-through speaker and he put his face next to the speaker as if there were someone hiding inside. I yelled into the microphone, ‘What the f*** are you doing?’ and the guy flies back 15 feet. These are the types of hacks I enjoyed. As a young kids, I was a prankster. I hacked into my friend’s home telephone service so that it became a pay phone. Whenever his parents tried to make a call, it would say, ‘please deposit 25 cents.’

I was doing this starting in the late 1980s and there were no computer crime laws at the time. I had a teacher in high school where he encouraged it. One of my first programming assignments was to write a FORTRAN program that found Fibonacci numbers. I thought that’s kind of boring. So I wrote a password stealer so I could get any of the other students’ passwords in class. I spent a longer time working on developing that program because it was my first and I didn’t have time to do the other assignment. So I ended turning in my password stealer instead and the teacher was clearly impressed and even gave me an A. He started telling all the other students how smart and clever this was. So I was raised at a time where the instructors in high school encouraged hacking and there were no laws against it.

VB: You know today you are in the business of being an ethical hacker. Do you find that today that the issues that ethical hackers have to deal with are pretty difficult in terms of being able to stay on the right side of the law?

KM: Not really. I was a hacker for a number of years before I became involved in security because there was no such occupation for doing it legally. Companies dealt with security by having their internal IT departments deal with it. There was no the security industry. In fact, if that did exist when I was younger, I might have taken a different path. But I was so interested in learning about computers. My primary goal of hacking was the intellectual curiosity, the seduction of adventure. The No. 1 thing was the pursuit of knowledge and there was no way to get the knowledge back then because those avenues didn’t exist.

Now today, a 14-year-old can use a laptop and set up their own entire lab on a laptop with different operating systems. There are different frameworks that you can download for absolutely free. There are tons of material on the internet so you can learn all about hacking and all about security. You can learn about offensive and defensive measures.  So you can be a part of a red team are trying to hack into a target to test their security or you could be on the defense side.

So today’s world is completely changed where young kids and even adults have a more social acceptable way to learn about this stuff. In fact, at Defcon this year was the first time they had kids come. There were kids who were eight, nine or ten who were attending a hacking conference. Of course, they are interested in hacking games. And one ten-year-old girl found a vulnerability. The world has changed from 1978.

VB: It’s also easier to become a criminal hacker.

KM: The ethical thing is actually the easier thing to do. Now if you are a criminal, then you will use hacking techniques to steal money and property. The hackers of my time were never in it to steal money. They could break into systems to get access to information. But it wasn’t a for-profit venture. Today, you have organized crime using hacking.

VB: What do you think is relevant today, from the days when you were learning to be a hacker?
 
KM: Hacking is exploiting security controls either in a technical, physical or a human-based element. Back in my day you know, I learned a lot about the human factor in security. I manipulated the human operator into doing something that gives the hacker an advantage. The Art of Deception, which was published in 2011, was about social engineering. Google, RSA, and Lockheed Martin were all successfully compromised through what we call spear phishing attacks. That took advantage of human weaknesses, where you respond to a message from a friend.

Back in my day, we would find servers that were on the company’s perimeter network: a mail server, a web server, a DNS server or whatnot. And then we would attack the server and find a vulnerability in a service. We would get into the server that way. Now the trend has changed towards client-side exploitation, meaning the software that is on the user’s desktop. You take advantage of weaknesses in Adobe Acrobat, Adobe Flash, Java, Active X. They are riddled with vulnerabilities.

So the hacker could break into that person’s desktop or workstation by exploiting that vulnerability. But the problem is they would have you have one component that I have written about extensively called social engineering. You have to trick the target into doing something that triggers the technical exploit. And that’s precisely how they were able to hack Google. It was by finding a vulnerability in the Internet Explorer 6 that was unpatched. They still had to get the user to click a link and once they clicked the link it would go to a website that would exploit the vulnerability. With RSA’s hack, it was through an Excel spreadsheet I believe was labeled a ’2011 recruitment plan.’  The spreadsheet in the Excel document had an embedded Flash object that was vulnerable.

So now when the victim opened up that Excel doc, it triggers the Flash object, and then the hacker got into that person’s desktop, which was connected to RSA’s network. I mean now so now the trend is instead of attacking the server side you’re now attacking the client side. But any time you attack the client side, you must have a component of social engineering. So I’d say social engineering is still a viable threat.

VB: Does it surprise you that so many companies have been hacked this year, with things like the PlayStation Network going down for six weeks? 

KM: I don’t think it surprises me because there is a lot of low hanging fruit out there. A lot of companies do not bother testing their security. So really what they will do is they will do is compliance. They hire a firm that would run a  scanner. If they don’t find anything, they say the company is in compliance. That is the problem because companies are not concerned enough about the underlying security. They are more concerned about compliance. I have to explain what the difference is between scanning security companies and what we do. Albert Gonzalez, who was sentenced to 20 years for hacking TJ Maxx and others, found that his team could break into systems for these huge brands that had met compliance. So there is a lot of low-hanging fruit like Sony.

VB: What do you think of all the hacktivism that has happened, and what should companies be doing about it?

We ought to be doing security assessments and deploying top security controls. But I think it’s a waste of time for the people behind the attacks because they’re not going to change public policy. I think the only good thing that comes out of it is the security awareness. Even my company we got a few new clients because they were concerned about this Anonymous hacking spree. That is the greater good that occurred out of it. But at the end of the day Anonymous doesn’t really get what it wants other than a lot of attention by law enforcement. Their goal is to make to change. The change will never happen that way.

VB: Do you have conversations with young hackers?

KM: Not really. I mean I go to conferences around the world and I have a substantial Twitter following. But I don’t really talk to them. I get people emailing all the time. They want to learn how to hack or they want to hack into their girlfriend’s Facebook account. I pretty much ignore them. They try to social engineer me sometimes. I got an email where they said a family member was murdered and they had to get into a person’s Hotmail account to investigate it. I told them they had to get a subpoena from a judge to get the information. The crazy requests make me chuckle.

VB: How do you talk someone out of being a criminal hacker? 

KM: Nobody comes up to me and says they’re a black hat hacker. But if they did, I would certainly encourage them not to follow in my footsteps. Now there are so many resources for them to learn how to hack legally. If they were true criminals, and they wanted to steal credit card numbers, you can’t change them. But if they are just curious, you can change their direction by letting them know that there are tools today that weren’t available to me. You can learn in a socially acceptable and ethical way.

VB: Have you ever heard from anyone who was a significant player in the book? Like maybe Markoff or Shimomura?

KM: Not them. I heard from one person who was my old boss when I was pretending to be Eric Weisz in Denver, at a law firm. I described her in the book. I said she had a school teacher mentality. She found me on LinkedIn and said her husband was loving my book. She said that my description was right because she became a school teacher. That was ironic. I heard from one of my social engineering victims who worked at Novell. He was wondering how the government could have held me for so long without a trial. We became good friends and he works at Fusion-io now. We have been really good friends.

VB: You mention you used the Freedom of Information Act in the book. Did you find things out about your case you didn’t know?

KM: That’s a good question because when we were writing the book we submitted the request to the FBI and the FBI claims that the Los Angeles bureau of the FBI lost my file and they could not find it. We went to Senator Barbara Baxter to get her to help because we thought the FBI was lying. How can they lose my file? That was about as ludicrous that I could launch a nuclear weapon. Doesn’t the FBI make copies? Baxter wrote a letter on our behalf as a constituent and the FBI lawyers reaffirmed that they cannot find the file.

They did provide files from when I was juvenile that were largely blacked out and they gave us 8,000 pages of newspaper articles. In summary, I was an obsessive hacker because I enjoyed beating the system and getting through security for the intellectual challenge. I’m here today and am a respected security consultant, and I even work for the federal government. Now the companies and even the federal government have recognized that I have learned my lesson. And now I’m an asset to the community rather than being a pain in the ass.

VB: Thanks very much, that’s a great way to end the conversation.



Best Hacking Tools Available

There are many hacking tools that are useful for different purposes:

PCHelps Network Tracer is the other name that uses standard network query utilities in order to work up a handy report on a specified Internet address. This is done in a logical sequence automatically and with a fairly fast speed thereby gives some screen feedback during the time of processing.

Hacking websites

have become easy with the other strong and download hacking tools called IntelliTamper 2.07. This is a probe tool that scans websites for all types of information that the hacker programs is searching for by exploring into another system looking for the vulnerable points where to launch an attack from.

Trojan

is a program that acts as one of the salient causes of breaking into the systems with a hidden intent. The word Trojan adds subversive functionality to an existing program. A trojaned login program is created to accept a certain password for any user's account that the hackers can use to log into the system at any time and from wherever he wants.

Backdoor.IRC.ColdLife.30


is an undocumented tool of getting into a computer system, or software that uses such a tool to break into a system. In some cases the programmer places a backdoor in some software which allows them to get access to troubleshoot or change the program format. Software that is classified as a &backdoor& is created by the programmer to enjoy the greatest possible advantage of the vulnerability of a system, exposing it to the future attacks.

John The Ripper 1.0

is a password cracking tool, which is a program used to make an algorithmic approach to decrypt the passwords and password files. The program was actually designed for the legitimate use of finding and cracking the feeble password with a view to improve the security of the system by entering a stronger password. But the program has found its place within the hacker's colony.

NMap Win 1.2.12

is also one of the most important tools, which is used in planning an attack on a remote system. This also helps the programmer to develop other tools for such attacks.

Hackers Want to Understand the ip address of Other System

On the other hand, the ip address hacking is another significant part of the story. Every computer possesses its own ip address, which is unique for a particular network. The hackers may want to learn more about the ip address of another remote computer system. ip address hacking may be done by the dint of different techniques like hacking by using ICQ, hacking by using yahoo messengers and MSN. ICQ and MSN is a couple of well renowned tools that satisfy the hackers' hunger. With a thorough understanding of this unique address the hackers becomes highly equipped to bring severe devastation to the targeted systems.

There are many techniques like the Authentication hacking, SQL injections, CRLF injections, Directory traversal, Google hacking and last but not the least Cross site scripting used by the famous hackers for hacking websites. SQL injection is a strong and the most popular technique for hacking into the website, which hardly requires much knowledge and dexterity. With these tools and techniques the act of website hacking have now become very easy and artistic - an art that any one can master with a flicking of finger. 

Thursday 20 October 2011

How to Spy On a Windows Program: Tracking Main Window Activation

In this article I will walk you through the creation of a sample program that, each time I use any application on my pc, will record the application name, window title and time. While I do this, I will touch on techniques that, used for evil in spyware, are also applied with noble goals in areas like time tracking, application monitoring and computer-aided learning.
Practical information about this subject is hard to find. So, if you have ever been curious about how spyware programs work, how you can keep tabs on what a user does on a computer or how applications behave, read along.

Windows Architecture

To understand how you can “spy” on a running Windows program,  you first need to be familiar with the concept of event-driven applications.

Unlike applications that make function calls to obtain user input, Windows-based applications are event-driven. This simply means that they wait for the system to pass input to them.

The system passes all input for an application – for example, when the user types, moves the mouse, or clicks a control such as a scroll bar – to the various windows in the application. This input is passed in the form of messages. Besides the system, other applications can also generate windows messages.

If we could somehow inspect this message traffic, then we would have a way to know what it is that the system or other applications are asking any application to do. This is where you can put Windows Hooks to good use.

Windows Hooks

The MSDN documentation defines a hook as a point in the system message-handling mechanism where an application can install a subroutine to monitor the message traffic in the system and process certain types of messages before they reach the target window procedure.
There are different types of hooks, each providing access to different aspects of the system’s message handling mechanism. For example, keyboard hooks allow you to monitor keyboard messages (keyloggers make use this type of hook), mouse hooks allow you to monitor mouse messages and WindProc hooks allow you to monitor all messages processed by the Window Procedure, the message handling function in any window.

Armed with this knowledge, let’s go back to my sample program.

Tracking Window Activation

We know that when an application window becomes active, it is because the system sent it a message asking it to do so. Then, a way to track application usage is to install a system-wide hook that will inspect the messages the system sends to any application asking it to activate its main window.

To write my sample program I used C#, and to save time used an excellent Windows Hooks library written by Chris Wilson. In my sample program this is what I do:
  1. Install a global Shell hook. This type of hook allows me to intercept the messages sent by the system when a top-level window is activated.
  2. Upon intercepting a message indicating a top-level window activation, I record the time, the name of the application the window belongs to and the text displayed in the window’s title bar.
Sounds good? Let’s look at each step in detail.

The sample program is a Windows Form application with just one form.





Thanks to the excellent hooks library I am using (you can read more about it at The Code Project), all I need to do to be able to intercept top-level windows activation messages is subscribe to the WindowActivated event and install my shell hook. I subscribe to the event right inside the constructor for my only form.


public Form1()
{
InitializeComponent();
// Instantiate our GlobalHooks object
hooks = new GlobalHooks(this.Handle);
hooks.Shell.WindowActivated +=
new GlobalHooks.WindowEventHandler(hooks_ShellWindowActivated);
}
The hook is installed and uninstalled by pushing the “Start Monitoring” and “Stop Monitoring” buttons.
private void button1_Click(object sender, EventArgs e)
{
hooks.Shell.Start();
}
private void button2_Click(object sender, EventArgs e)
{
hooks.Shell.Stop();
}
Once the hook is installed, the message handling function of my form will start receiving not only messages directed to it, but also the messages intercepted by the shell hook.
Shell hooks intercept a variety of messages. Since I am just interested in top-level windows activations, I forward the messages to a utility function in the hooks library, which filters them and fires the WindowActivated event when the intercepted event indicates a top-level window activation.
protected override void WndProc(ref Message m)
{
// Send the messages to the library for filtering.
if (hooks != null)
hooks.ProcessWindowMessage(ref m);
base.WndProc(ref m);
}
Within the WindowActivated event handler, I use the window handle contained in the event arguments to lookup the application name and the window caption. Then I just display them in a listbox, together with the time the window was activated.
private void hooks_ShellWindowActivated(IntPtr Handle)
{
// Insert information at the top of the list.
listBox1.Items.Insert(0,"");
listBox1.Items.Insert(0, "Window caption: " + GetWindowCaption(Handle));
listBox1.Items.Insert(0,"Application: " + GetModuleName(Handle));
listBox1.Items.Insert(0,string.Format("Time: {0}", DateTime.Now.ToLongTimeString()));
listBox1.Items.Insert(0, "Window activation!");
}
You might have noticed how once you know when a top-level window was activated it becomes really easy to compute the time any application was actively used. I will leave the exercise to you.
Grabbing the window’s caption is accomplished with a call to the GetWindowText API function.
[DllImport("user32.dll")]
private static extern int GetWindowText(IntPtr hWnd, StringBuilder title, int size);
private string GetWindowCaption(IntPtr Hwnd)
{
// This function gets the name of a window from its handle
StringBuilder caption = new StringBuilder(256);
GetWindowText(Hwnd, caption, 256);
return caption.ToString().Trim();
}
Obtaining the application’s executable name is a a little more involved, yet easy.
[DllImport("user32.dll", SetLastError = true)]
public static extern uint GetWindowThreadProcessId(IntPtr hWnd,
out uint lpdwProcessId);
[DllImport("kernel32.dll")]
public static extern IntPtr OpenProcess(ProcessAccessFlags dwDesiredAccess,
[MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, uint dwProcessId);
[DllImport("psapi.dll")]
public static extern uint GetModuleFileNameEx(IntPtr hProcess,
IntPtr hModule, [Out] StringBuilder lpBaseName,
[In] [MarshalAs(UnmanagedType.U4)] int nSize);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool CloseHandle(IntPtr hHandle);
private string GetModuleName(IntPtr Hwnd)
{
uint processId = 0;
GetWindowThreadProcessId(Hwnd, out processId);
IntPtr hProcess = OpenProcess(ProcessAccessFlags.QueryInformation |
ProcessAccessFlags.VMRead, true, processId);
StringBuilder FileName = new StringBuilder(256);
GetModuleFileNameEx(hProcess, IntPtr.Zero, FileName, 256);
CloseHandle(hProcess);
return FileName.ToString().Trim();
}
And that is it. I hope you found the topic interesting and the sample useful. Here’s the source for the sample: HooksSample