
Tenía en mente el vestido con escote corazón ♥ y tenía un vestido, así que me animé a cortarlo y taran...!
Es necesario un vestido y tener las ganas de cortar, si no están seguras del tamaño del corazón , hagan el corazón chico por si hay errores :)





/*
Name:
Copyright:
Author: Confused
Date: 15/01/08 13:44
Description: Intento de cajero :P, carga valor inicial para que el cajero se informe
de cuantos billetes tiene. (con cero finaliza el programa).
Luego se ingresa un Importe a retirar. Si quedan billetes, el cajero da tantos billetes
dependiendo el importe, y dice cuantos restantes quedan. (mas que nada para informarme
que funciona bien).
Tambien el cajero sino tiene billetes de 100, va entregando lo que resta con billetes de abajo, es decir
50, sino tiene 20, sino 10 y asi hasta los que queden. En caso que no tenga mas te tira un printf que
no tiene billetes suficientes para el importe a retirar cargado.
Al final del programa cuando se aplica el 0, puse unas banderas para que digan
cual fue la operacion maxima y minima.
Nose borralo de ultima :P
Saludos. Cualquier cosa postea en el foro y te respondo.
*/
#include
#include
int main (void)
{
int billete100;
int billete50;
int billete20;
int billete10;
int billete5;
int billete2;
int billete1;
int importe;
int valor;
int contador100;
int contador50;
int contador20;
int contador10;
int contador5;
int contador2;
int contador1;
int max;
int min;
bool banderamax = true;
bool banderamin = true;
printf("Presione 0 para salir\n");
printf("Cargue valor 100: ");
scanf("%d",&billete100);
printf("Cargue valor 50: ");
scanf("%d",&billete50);
printf("Cargue valor 20: ");
scanf("%d",&billete20);
printf("Cargue valor 10: ");
scanf("%d",&billete10);
printf("Cargue valor 5: ");
scanf("%d",&billete5);
printf("Cargue valor 2: ");
scanf("%d",&billete2);
printf("Cargue valor 1: ");
scanf("%d",&billete1);
importe = (billete100*100)+
(billete50*50)+
(billete20*20)+
(billete10*10)+
(billete5*5)+
(billete2*2)+
(billete1*1);
printf ("Ingrese un valor: ");
scanf ("%d",&valor);
while (valor != 0 )
{
if(valor <= importe)
{
if(banderamax == true) //bandera max
{
banderamax = false;
max = valor;
}
else
{
if (valor > max)
{
max = valor;
}
}
if(banderamin == true)
{
banderamin = false;
min = valor;
}
else
{
if (valor < min)
{
min = valor;
}
}
importe = importe - valor;
contador100 = 0; //contador 100.
while (valor >= 100 && billete100 > 0)
{
valor = valor - 100;
contador100++;
billete100--;
}
contador50 = 0; //contador 50
while (valor >= 50 && billete50 > 0)
{
valor = valor - 50;
contador50++;
billete50--;
}
contador20 = 0; //contador 20
while (valor >= 20 && billete20 > 0)
{
valor = valor - 20;
contador20++;
billete20--;
}
contador10 = 0; //contador 10
while (valor >= 10 && billete10 > 0)
{
valor = valor - 10;
contador10++;
billete10--;
}
contador5 = 0; //contador 5
while (valor >= 5 && billete5 > 0)
{
valor = valor - 5;
contador5++;
billete5--;
}
contador2 = 0; //contador 2
while (valor >= 2 && billete2 > 0)
{
valor = valor - 2;
contador2++;
billete2--;
}
contador1= 0;
while (valor >= 1 && billete1 > 0) //contador 1
{
valor = valor - 1;
contador1++;
billete1--;
}
printf ("CANTIDAD DE BILLETES DE 100: %d RESTANTES %d\n",contador100,billete100);
printf ("CANTIDAD DE BILLETES DE 50: %d RESTANTES %d\n",contador50,billete50);
printf ("CANTIDAD DE BILLETES DE 20: %d RESTANTES %d\n",contador20,billete20);
printf ("CANTIDAD DE BILLETES DE 10:%d RESTANTES %d\n",contador10,billete10);
printf ("CANTIDAD DE BILLETES DE 5: %d RESTANTES %d\n",contador5,billete5);
printf ("CANTIDAD DE BILLETES DE 2: %d RESTANTES %d\n",contador2,billete2);
printf ("CANTIDAD DE BILLETES DE 1: %d RESTANTES %d\n",contador1,billete1);
}
else
{
printf ("NO QUEDAN BILLETES PARA COMPLETAR EL IMPORTE!\n\n");
}
printf ("Ingrese un valor: ");
scanf ("%d",&valor);
}
printf ("LA MAXIMA OPERACION FUE: %d\n",max);
printf ("LA MINIMA OPERACION FUE: %d\n",min);
printf (":D\n\n\n");
system("pause");
}
| | |
/*
Name:
Copyright:
Author: Confused
Date: 15/01/08 13:44
Description: Intento de cajero :P, carga valor inicial para que el cajero se informe
de cuantos billetes tiene. (con cero finaliza el programa).
Luego se ingresa un Importe a retirar. Si quedan billetes, el cajero da tantos billetes
dependiendo el importe, y dice cuantos restantes quedan. (mas que nada para informarme
que funciona bien).
Tambien el cajero sino tiene billetes de 100, va entregando lo que resta con billetes de abajo, es decir
50, sino tiene 20, sino 10 y asi hasta los que queden. En caso que no tenga mas te tira un printf que
no tiene billetes suficientes para el importe a retirar cargado.
Al final del programa cuando se aplica el 0, puse unas banderas para que digan
cual fue la operacion maxima y minima.
Nose borralo de ultima :P
Saludos. Cualquier cosa postea en el foro y te respondo.
*/
#include
#include
int main (void)
{
int billete100;
int billete50;
int billete20;
int billete10;
int billete5;
int billete2;
int billete1;
int importe;
int valor;
int contador100;
int contador50;
int contador20;
int contador10;
int contador5;
int contador2;
int contador1;
int max;
int min;
bool banderamax = true;
bool banderamin = true;
printf("Presione 0 para salir\n");
printf("Cargue valor 100: ");
scanf("%d",&billete100);
printf("Cargue valor 50: ");
scanf("%d",&billete50);
printf("Cargue valor 20: ");
scanf("%d",&billete20);
printf("Cargue valor 10: ");
scanf("%d",&billete10);
printf("Cargue valor 5: ");
scanf("%d",&billete5);
printf("Cargue valor 2: ");
scanf("%d",&billete2);
printf("Cargue valor 1: ");
scanf("%d",&billete1);
importe = (billete100*100)+
(billete50*50)+
(billete20*20)+
(billete10*10)+
(billete5*5)+
(billete2*2)+
(billete1*1);
printf ("Ingrese un valor: ");
scanf ("%d",&valor);
while (valor != 0 )
{
if(valor <= importe)
{
if(banderamax == true) //bandera max
{
banderamax = false;
max = valor;
}
else
{
if (valor > max)
{
max = valor;
}
}
if(banderamin == true)
{
banderamin = false;
min = valor;
}
else
{
if (valor < min)
{
min = valor;
}
}
importe = importe - valor;
contador100 = 0; //contador 100.
while (valor >= 100 && billete100 > 0)
{
valor = valor - 100;
contador100++;
billete100--;
}
contador50 = 0; //contador 50
while (valor >= 50 && billete50 > 0)
{
valor = valor - 50;
contador50++;
billete50--;
}
contador20 = 0; //contador 20
while (valor >= 20 && billete20 > 0)
{
valor = valor - 20;
contador20++;
billete20--;
}
contador10 = 0; //contador 10
while (valor >= 10 && billete10 > 0)
{
valor = valor - 10;
contador10++;
billete10--;
}
contador5 = 0; //contador 5
while (valor >= 5 && billete5 > 0)
{
valor = valor - 5;
contador5++;
billete5--;
}
contador2 = 0; //contador 2
while (valor >= 2 && billete2 > 0)
{
valor = valor - 2;
contador2++;
billete2--;
}
contador1= 0;
while (valor >= 1 && billete1 > 0) //contador 1
{
valor = valor - 1;
contador1++;
billete1--;
}
printf ("CANTIDAD DE BILLETES DE 100: %d RESTANTES %d\n",contador100,billete100);
printf ("CANTIDAD DE BILLETES DE 50: %d RESTANTES %d\n",contador50,billete50);
printf ("CANTIDAD DE BILLETES DE 20: %d RESTANTES %d\n",contador20,billete20);
printf ("CANTIDAD DE BILLETES DE 10:%d RESTANTES %d\n",contador10,billete10);
printf ("CANTIDAD DE BILLETES DE 5: %d RESTANTES %d\n",contador5,billete5);
printf ("CANTIDAD DE BILLETES DE 2: %d RESTANTES %d\n",contador2,billete2);
printf ("CANTIDAD DE BILLETES DE 1: %d RESTANTES %d\n",contador1,billete1);
}
else
{
printf ("NO QUEDAN BILLETES PARA COMPLETAR EL IMPORTE!\n\n");
}
printf ("Ingrese un valor: ");
scanf ("%d",&valor);
}
printf ("LA MAXIMA OPERACION FUE: %d\n",max);
printf ("LA MINIMA OPERACION FUE: %d\n",min);
printf (":D\n\n\n");
system("pause");
}
| | |
Essential Wireless Hacking Tools,& the most important wireless hacing tools ,here are the most essential tools for wireless hacking ,guys interested in gaining a deeper knowledge of wireless security and exploiting vulnerabilities will need a good set of base tools with which to work. Fortunately, there are an abundance of free tools available on the Internet. This list is not meant to be comprehensive in nature but rather to provide some general guidance on recommended tools to build your toolkit.

(NetStumbler Screenshot)
Kismet – One of the key functional elements missing from NetStumbler is the ability to display Wireless Networks that are not broadcasting their SSID. As a potential wireless security expert, you should realize that Access Points are routinely broadcasting this info; it just isn’t being read/deciphered. Kismet will detect and display SSIDs that are not being broadcast which is very critical in finding wireless networks.

(Kismet Screenshot)
Airsnort – This is a very easy to use tool that can be used to sniff and crack WEP keys. While many people bash the use of WEP, it is certainly better than using nothing at all. Something you’ll find in using this tool is that it takes a lot of sniffed packets to crack the WEP key. There are additional tools and strategies that can be used to force the generation of traffic on the wireless network to shorten the amount of time needed to crack the key, but this feature is not included in Airsnort.

(Screenshot of Airsnort in Action)
CowPatty – This tool is used as a brute force tool for cracking WPA-PSK, considered the “New WEP” for home Wireless Security. This program simply tries a bunch of different options from a dictionary file to see if one ends up matching what is defined as the Pre-Shared Key.

(Cowpatty Options Screenshot)
ASLeap – If a network is using LEAP, this tool can be used to gather the authentication data that is being passed across the network, and these sniffed credentials can be cracked. LEAP doesn’t protect the authentication like other “real” EAP types, which is the main reason why LEAP can be broken.

(Asleap Options Screenshot)
Whether you are directly connected to a wireless network or not, if there is wireless network in range, there is data flying through the air at any given moment. You will need a tool to be able to see this data.
Wireshark (formerly Ethereal) – While there has been much debate on the proper way to pronounce this utility, there is no question that it is an extremely valuable tool. Ethereal can scan wireless and Ethernet data and comes with some robust filtering capabilities. It can also be used to sniff-out 802.11 management beacons and probes and subsequently could be used as a tool to sniff-out non-broadcast SSIDs.

(Screenshot of Ethereal in Action)

(Yahoo IM Session being sniffed in Ethereal)
The aforementioned utilities, or similar ones, will be necessities in your own wireless security toolkit. The easiest way to become familiar with these tools is to simply use them in a controlled lab environment. And cost is no excuse as all of these tools are available freely on the Internet.
Just as it’s important to know how to utilize the aforementioned tools, it is important to know best practices on how to secure your Wireless Network Against these tools.
NetStumbler – Do not broadcast your SSID. Ensure your WLAN is protected by using advanced Authentication and Encryption.
Kismet – There’s really nothing you can do to stop Kismet from finding your WLAN, so ensure your WLAN is protected by using advanced Authentication and Encryption
Airsnort – Use a 128-bit, not a 40-bit WEP encryption key. This would take longer to crack. If your equipment supports it, use WPA or WPA2 instead of WEP (may require firmware or software update).
Cowpatty – Use a long and complex WPA Pre-Shared Key. This type of key would have less of a chance of residing in a dictionary file that would be used to try and guess your key and/or would take longer. If in a corporate scenario, don’t use WPA with Pre-Shared Key, use a good EAP type to protect the authentication and limit the amount of incorrect guesses that would take place before the account is locked-out. If using certificate-like functionality, it could also validate the remote system trying to gain access to the WLAN and not allow a rogue system access.
ASLeap – Use long and complex credentials, or better yet, switch to EAP-FAST or a different EAP type.
Ethereal – Use encryption, so that anything sniffed would be difficult or nearly impossible to break. WPA2, which uses AES, is essentially unrealistic to break by a normal hacker. Even WEP will encrypt the data. When in a Public Wireless Hotspot (which generally do not offer encryption), use application layer encryption, like Simplite to encrypt your IM sessions, or use SSL. For corporate users, use IPSec VPN with split-tunneling disabled. This will force all traffic leaving the machine through an encrypted tunnel that would be encrypted with DES, 3DES or AES.
Essential Wireless Hacking Tools,& the most important wireless hacing tools ,here are the most essential tools for wireless hacking ,guys interested in gaining a deeper knowledge of wireless security and exploiting vulnerabilities will need a good set of base tools with which to work. Fortunately, there are an abundance of free tools available on the Internet. This list is not meant to be comprehensive in nature but rather to provide some general guidance on recommended tools to build your toolkit.

(NetStumbler Screenshot)
Kismet – One of the key functional elements missing from NetStumbler is the ability to display Wireless Networks that are not broadcasting their SSID. As a potential wireless security expert, you should realize that Access Points are routinely broadcasting this info; it just isn’t being read/deciphered. Kismet will detect and display SSIDs that are not being broadcast which is very critical in finding wireless networks.

(Kismet Screenshot)
Airsnort – This is a very easy to use tool that can be used to sniff and crack WEP keys. While many people bash the use of WEP, it is certainly better than using nothing at all. Something you’ll find in using this tool is that it takes a lot of sniffed packets to crack the WEP key. There are additional tools and strategies that can be used to force the generation of traffic on the wireless network to shorten the amount of time needed to crack the key, but this feature is not included in Airsnort.

(Screenshot of Airsnort in Action)
CowPatty – This tool is used as a brute force tool for cracking WPA-PSK, considered the “New WEP” for home Wireless Security. This program simply tries a bunch of different options from a dictionary file to see if one ends up matching what is defined as the Pre-Shared Key.

(Cowpatty Options Screenshot)
ASLeap – If a network is using LEAP, this tool can be used to gather the authentication data that is being passed across the network, and these sniffed credentials can be cracked. LEAP doesn’t protect the authentication like other “real” EAP types, which is the main reason why LEAP can be broken.

(Asleap Options Screenshot)
Whether you are directly connected to a wireless network or not, if there is wireless network in range, there is data flying through the air at any given moment. You will need a tool to be able to see this data.
Wireshark (formerly Ethereal) – While there has been much debate on the proper way to pronounce this utility, there is no question that it is an extremely valuable tool. Ethereal can scan wireless and Ethernet data and comes with some robust filtering capabilities. It can also be used to sniff-out 802.11 management beacons and probes and subsequently could be used as a tool to sniff-out non-broadcast SSIDs.

(Screenshot of Ethereal in Action)

(Yahoo IM Session being sniffed in Ethereal)
The aforementioned utilities, or similar ones, will be necessities in your own wireless security toolkit. The easiest way to become familiar with these tools is to simply use them in a controlled lab environment. And cost is no excuse as all of these tools are available freely on the Internet.
Just as it’s important to know how to utilize the aforementioned tools, it is important to know best practices on how to secure your Wireless Network Against these tools.
NetStumbler – Do not broadcast your SSID. Ensure your WLAN is protected by using advanced Authentication and Encryption.
Kismet – There’s really nothing you can do to stop Kismet from finding your WLAN, so ensure your WLAN is protected by using advanced Authentication and Encryption
Airsnort – Use a 128-bit, not a 40-bit WEP encryption key. This would take longer to crack. If your equipment supports it, use WPA or WPA2 instead of WEP (may require firmware or software update).
Cowpatty – Use a long and complex WPA Pre-Shared Key. This type of key would have less of a chance of residing in a dictionary file that would be used to try and guess your key and/or would take longer. If in a corporate scenario, don’t use WPA with Pre-Shared Key, use a good EAP type to protect the authentication and limit the amount of incorrect guesses that would take place before the account is locked-out. If using certificate-like functionality, it could also validate the remote system trying to gain access to the WLAN and not allow a rogue system access.
ASLeap – Use long and complex credentials, or better yet, switch to EAP-FAST or a different EAP type.
Ethereal – Use encryption, so that anything sniffed would be difficult or nearly impossible to break. WPA2, which uses AES, is essentially unrealistic to break by a normal hacker. Even WEP will encrypt the data. When in a Public Wireless Hotspot (which generally do not offer encryption), use application layer encryption, like Simplite to encrypt your IM sessions, or use SSL. For corporate users, use IPSec VPN with split-tunneling disabled. This will force all traffic leaving the machine through an encrypted tunnel that would be encrypted with DES, 3DES or AES.
You go to a coffee shop for a cup of coffee and to utilize the shop’s Wi-Fi HotSpot to surf the web. You connect to the hotspot network and decide to perform some online banking or to purchase something online. By the way, this could happen to you at home, as well. As an end-user, you feel quite secure, as you see the lock in the bottom corner of your Internet browser, symbolizing that the online banking or online credit card transaction is safe from prying eyes. Your data, including username, password, credit card info, etc. will be encrypted with 128-bit encryption. So it's secure, right?
It is not uncommon to perform banking and to purchase products online with your credit card. It is also a common thought that doing so is secure, as this is done via SSL. For the most part, this is true and the sessions are secure. Discover Card, for example, posts the following statement on their website:

Figure 1
The problem is that it is not “virtually impossible” for someone else to see your data, such as login information or credit card numbers. It can actually be relatively easy, as you’ll see, if you as an end-user are not knowledgeable about how you can be exploited and know the signs that this is occurring.

Figure 2 (Indicates a Secure SSL Session)
Continuing with the scenario, what you didn’t realize is that a hacker has intercepted your Online Banking login credentials and credit card information and can now log into your Online Banking Website or purchase items with your credit card. How is this possible, since SSL was used and is hard to break? The answer is that you made a fatal mistake that subjected you to an SSL Man-in-the-Middle (MITM) attack.
The fatal flaw that enabled the sensitive information to be stolen is possible when an end-user is not properly educated on an easy to do and well-known SSL exploit – SSL MITM.
Here’s how it’s done:
The hacker goes to coffee shop and connects to the same Wi-Fi network you are connected to. He runs a series of utilities to redirect other user’s data through his machine. He runs a number of other utilities to sniff the data, act as an SSL Certificate Server and to be the Man-the-Middle. The following diagram shows a very simplified graphic of how your SSL Banking session should work under normal conditions, then how it would work during an attack:

Figure 3

Figure 4
An important concept to grasp here is that a certificate is used to establish the secure SSL connection. This is a good thing, if you have a good certificate and are connecting directly to the website to which you intended to use. Then all your data is encrypted from your browser to the SSL website where the bank’s website will use the information from the certificate it gave you to decrypt your data/credentials. If that is truly the case, then it is pretty darn hard for a hacker to decrypt the data/credentials being transmitted, even if he is able to sniff your data.
This is a bad thing if you have a “Fake” certificate being sent from the hacker, and you are actually connecting to his machine, not directly to the bank’s website. In this case, your credentials are being transmitted between your browser and the hacker’s machine. The hacker is able to grab that traffic, and, because he gave you the certificate to encrypt the data/credentials, he can use that same certificate to decrypt your data/credentials.
Here are the exact steps a hacker could use to perform this attack:
The first thing he would do is turn on Fragrouter, so that his machine can perform IP forwarding

Figure 5
After that, he’ll want to direct your Wi-Fi network traffic to his machine instead of your data traffic going directly to the Internet. This enables him to be the “Man-in-the-Middle” between your machine and the Internet. Using Arpspoof, a real easy way to do this, he determines your IP address is 192.168.1.15 and the Default Gateway of the Wi-Fi network is 192.168.1.1:

Figure 6
The next step is to enable DNS Spoofing via DNSSpoof:

Figure 7
Since he will be replacing the Bank's or Online Store’s valid certificate with his own fake one, he will need to turn on the utility to enable his system to be the Man-in-the-Middle for web sessions and to handle certificates. This is done via webmitm:

Figure 8
At this point, he is setup and ready to go, he now needs to begin actively sniffing your data passing through his machine including your login information and credit card info. He opts to do this with Ethereal, then saves his capture:

Figure 9
He now has the data, but it is still encrypted with 128-bit SSL. No problem, since he has the key. What he simply needs to do now is decrypt the data using the certificate that he gave you. He does this with SSL Dump:

Figure 10
The data is now decrypted and he runs a Cat command to view the now decrypted SSL information. Note that the username is “Bankusername” and the password is “BankPassword”. Conveniently, this dump also shows that the Banking site as National City. FYI, the better, more secure banking and online store websites will have you first connect to another, preceeding page via SSL, prior to connecting to the page where you enter the sensitive information such as bank login credentials or credit card numbers. The reason for this is to stop the MITM-type attack. How this helps is that if you were to access this preceeding page first with a "fake" certificate and then proceeded to the next page where you were to enter the sensitve information, that page where you would enter the sensitive information would not display. That is because the page gathering the sensitive information would be expecting a valid certificate, which it would not receive because of the Man-in-the-Middle. While some online banks and stores do implement this extra step/page for security reasons, the real flaw in this attack is the uneducated end-user, as you'll soon see:

Figure 11
With this information, he can now log into your Online Banking Account with the same access and privileges as you. He could transfer money, view account data, etc.
Below is an example of a sniffed SSL credit card purchase/transaction. You can see that Elvis Presley was attempting to make a purchase with his credit card 5440123412341234 with an expiration date of 5/06 and the billing address of Graceland in Memphis, TN (He is alive!). If this was your information, the hacker could easily make online purchases with your card.

Figure 12
This type of attack could be particularly bad for corporations. The reason for this is that Corporate SSL VPN solutions are also vulnerable to this type of attack. Corporate SSL VPN solutions will often authenticate against Active Directory, the NT Domain, LDAP or some other centralized credentials data store. Sniffing the SSL VPN login then gives an attacker valid credentials to the corporate network and other systems.
There’s a big step and end-user can take to prevent this from taking place. When the MITM Hacker uses the “bad” certificate instead of the “good”, valid certificate, the end-user is actually alerted to this. The problem is that most end-users don’t understand what this means and will unknowingly agree to use the fake certificate. Below is an example of the Security Alert an end-user would receive. Most uneducated end-users would simply click “Yes”… and this is the fatal flaw:

Figure 13
By clicking “Yes”, they have set themselves up to be hacked. By clicking the “View Certificate” button, the end-user would easily see that there is a problem. Below are examples of the various certificate views/tabs that show a good certificate compared to the bad certificate:

Figure 14
(Good Certificate) (Bad Certificate)

Figure 15
(Good Certificate) (Bad Certificate)

Figure 16
(Good Certificate) (Bad Certificate)
Again, the simple act of viewing the certificate and clicking “No” would have prevented this from happening.
Education is the key for an end-user. If you see this message, take the time to view the certificate. As you can see from the examples above, you can tell when something doesn’t look right. If you can’t tell, err on the side of caution and call your Online Bank or the Online store.
Take the time to read and understand all security messages you receive. Don’t just randomly click yes out of convenience.
Educate the end-user on the Security Alert and how to react to it.
Utilize One Time Passwords, such as RSA Tokens, to prevent the reuse of sniffed credentials.
When using SSL VPN, utilize mature products with advanced features, such as Juniper’s Secure Application Manager or Network Connect functionality.
You go to a coffee shop for a cup of coffee and to utilize the shop’s Wi-Fi HotSpot to surf the web. You connect to the hotspot network and decide to perform some online banking or to purchase something online. By the way, this could happen to you at home, as well. As an end-user, you feel quite secure, as you see the lock in the bottom corner of your Internet browser, symbolizing that the online banking or online credit card transaction is safe from prying eyes. Your data, including username, password, credit card info, etc. will be encrypted with 128-bit encryption. So it's secure, right?
It is not uncommon to perform banking and to purchase products online with your credit card. It is also a common thought that doing so is secure, as this is done via SSL. For the most part, this is true and the sessions are secure. Discover Card, for example, posts the following statement on their website:

Figure 1
The problem is that it is not “virtually impossible” for someone else to see your data, such as login information or credit card numbers. It can actually be relatively easy, as you’ll see, if you as an end-user are not knowledgeable about how you can be exploited and know the signs that this is occurring.

Figure 2 (Indicates a Secure SSL Session)
Continuing with the scenario, what you didn’t realize is that a hacker has intercepted your Online Banking login credentials and credit card information and can now log into your Online Banking Website or purchase items with your credit card. How is this possible, since SSL was used and is hard to break? The answer is that you made a fatal mistake that subjected you to an SSL Man-in-the-Middle (MITM) attack.
The fatal flaw that enabled the sensitive information to be stolen is possible when an end-user is not properly educated on an easy to do and well-known SSL exploit – SSL MITM.
Here’s how it’s done:
The hacker goes to coffee shop and connects to the same Wi-Fi network you are connected to. He runs a series of utilities to redirect other user’s data through his machine. He runs a number of other utilities to sniff the data, act as an SSL Certificate Server and to be the Man-the-Middle. The following diagram shows a very simplified graphic of how your SSL Banking session should work under normal conditions, then how it would work during an attack:

Figure 3

Figure 4
An important concept to grasp here is that a certificate is used to establish the secure SSL connection. This is a good thing, if you have a good certificate and are connecting directly to the website to which you intended to use. Then all your data is encrypted from your browser to the SSL website where the bank’s website will use the information from the certificate it gave you to decrypt your data/credentials. If that is truly the case, then it is pretty darn hard for a hacker to decrypt the data/credentials being transmitted, even if he is able to sniff your data.
This is a bad thing if you have a “Fake” certificate being sent from the hacker, and you are actually connecting to his machine, not directly to the bank’s website. In this case, your credentials are being transmitted between your browser and the hacker’s machine. The hacker is able to grab that traffic, and, because he gave you the certificate to encrypt the data/credentials, he can use that same certificate to decrypt your data/credentials.
Here are the exact steps a hacker could use to perform this attack:
The first thing he would do is turn on Fragrouter, so that his machine can perform IP forwarding

Figure 5
After that, he’ll want to direct your Wi-Fi network traffic to his machine instead of your data traffic going directly to the Internet. This enables him to be the “Man-in-the-Middle” between your machine and the Internet. Using Arpspoof, a real easy way to do this, he determines your IP address is 192.168.1.15 and the Default Gateway of the Wi-Fi network is 192.168.1.1:

Figure 6
The next step is to enable DNS Spoofing via DNSSpoof:

Figure 7
Since he will be replacing the Bank's or Online Store’s valid certificate with his own fake one, he will need to turn on the utility to enable his system to be the Man-in-the-Middle for web sessions and to handle certificates. This is done via webmitm:

Figure 8
At this point, he is setup and ready to go, he now needs to begin actively sniffing your data passing through his machine including your login information and credit card info. He opts to do this with Ethereal, then saves his capture:

Figure 9
He now has the data, but it is still encrypted with 128-bit SSL. No problem, since he has the key. What he simply needs to do now is decrypt the data using the certificate that he gave you. He does this with SSL Dump:

Figure 10
The data is now decrypted and he runs a Cat command to view the now decrypted SSL information. Note that the username is “Bankusername” and the password is “BankPassword”. Conveniently, this dump also shows that the Banking site as National City. FYI, the better, more secure banking and online store websites will have you first connect to another, preceeding page via SSL, prior to connecting to the page where you enter the sensitive information such as bank login credentials or credit card numbers. The reason for this is to stop the MITM-type attack. How this helps is that if you were to access this preceeding page first with a "fake" certificate and then proceeded to the next page where you were to enter the sensitve information, that page where you would enter the sensitive information would not display. That is because the page gathering the sensitive information would be expecting a valid certificate, which it would not receive because of the Man-in-the-Middle. While some online banks and stores do implement this extra step/page for security reasons, the real flaw in this attack is the uneducated end-user, as you'll soon see:

Figure 11
With this information, he can now log into your Online Banking Account with the same access and privileges as you. He could transfer money, view account data, etc.
Below is an example of a sniffed SSL credit card purchase/transaction. You can see that Elvis Presley was attempting to make a purchase with his credit card 5440123412341234 with an expiration date of 5/06 and the billing address of Graceland in Memphis, TN (He is alive!). If this was your information, the hacker could easily make online purchases with your card.

Figure 12
This type of attack could be particularly bad for corporations. The reason for this is that Corporate SSL VPN solutions are also vulnerable to this type of attack. Corporate SSL VPN solutions will often authenticate against Active Directory, the NT Domain, LDAP or some other centralized credentials data store. Sniffing the SSL VPN login then gives an attacker valid credentials to the corporate network and other systems.
There’s a big step and end-user can take to prevent this from taking place. When the MITM Hacker uses the “bad” certificate instead of the “good”, valid certificate, the end-user is actually alerted to this. The problem is that most end-users don’t understand what this means and will unknowingly agree to use the fake certificate. Below is an example of the Security Alert an end-user would receive. Most uneducated end-users would simply click “Yes”… and this is the fatal flaw:

Figure 13
By clicking “Yes”, they have set themselves up to be hacked. By clicking the “View Certificate” button, the end-user would easily see that there is a problem. Below are examples of the various certificate views/tabs that show a good certificate compared to the bad certificate:

Figure 14
(Good Certificate) (Bad Certificate)

Figure 15
(Good Certificate) (Bad Certificate)

Figure 16
(Good Certificate) (Bad Certificate)
Again, the simple act of viewing the certificate and clicking “No” would have prevented this from happening.
Education is the key for an end-user. If you see this message, take the time to view the certificate. As you can see from the examples above, you can tell when something doesn’t look right. If you can’t tell, err on the side of caution and call your Online Bank or the Online store.
Take the time to read and understand all security messages you receive. Don’t just randomly click yes out of convenience.
Educate the end-user on the Security Alert and how to react to it.
Utilize One Time Passwords, such as RSA Tokens, to prevent the reuse of sniffed credentials.
When using SSL VPN, utilize mature products with advanced features, such as Juniper’s Secure Application Manager or Network Connect functionality.