Showing posts with label Encryption. Show all posts
Showing posts with label Encryption. Show all posts

24/12/2014

SSH Tunnel Tutorial

SSH Tunnel Tutorial
Introduction: A SSH tunnel consists of an encrypted tunnel created through a SSH protocol connection. A SSH tunnel can be used to transfer unencrypted traffic over a network through an encrypted channel. For example we can use a ssh tunnel to securely transfer files between a FTP server and a client even though the FTP protocol itself is not encrypted. SSH tunnels also provide a means to bypass firewalls that prohibits or filter certain internet services. For example an organization will block certain sites using their proxy filter. But users may not wish to have their web traffic monitored or blocked by the organization proxy filter. If users can connect to an external SSH server, they can create a SSH tunnel to forward a given port on their local machine to port 80 on remote web-server via the external SSH server.
This ssh tunnel tutorial will deliberately bypass a firewall, and security admins will frown (at the very least) on you bypassing a corporate firewall. How to encrypt anything over SSH tunnel using a Socks Proxy.
*. How to Browse Securely from hotspots or hide from corporate firewalls/sniffers.

SSH Tunnel Summary
Using an ssh server that has internet access as a browsing point, you will create an ssh tunnel from your local PC to a remote server. Source all of your traffic from it, and encrypt communications to it using free software. This tutorial will show you how to setup an SSH Tunnel and use this to create aSocks Proxy. Requires an SSH account anywhere even your home PC with cygwin or ubuntu installed. You could then use this to tunnel from an unsafe place and browse as if you were at the safe, remote location instead. This is free.

SSH Tunnel Instructions
1. Find your current IP Go to whatismyip.com, look at your existing IP, without proxy.
Reason: compare later when we have a tunnel.
2. Packet Capture
Th: !(ipv6.dst == ff02::1) && !(ipv6.dst == ff02::c) && !stp && !cdp && !dtp && !dhcpv6 && !arp && !nbns && !browser && !icmpv6 && !ip.src== 192.168.1.105 &&
Reason: verify that you are truly encrypted. This filter just hides network chatter. It’s the same thing a snooper would see. your filter may be different, or not required. I was on a chatty network when I inspected and thought this example would be worth showing.
3. Setup Putty for SSH Tunnel:
*. Session: user@ yourserver.com:22
*. Connection > SSH: V2, Enable Compresion
*. Connection > SSH > Tunnels > Source: 7070, Dynamic, ADD
*. Session: Save, Open or, create an SSH tunnel via command line:
ssh -D 7070 -p 22 user@ yourserver.com sleep 9999
Reason: sets up loopback port (7070) on your local PC and connects over port 22 to the remote shell
4. Setup Firefox to encrypt to use the tunnel:
*. Tools > Options > Network > Settings > Manual
*. Socks: 127.0.0.1: 7070
*. Click OK.
5. Setup Firefox to use Remote DNS
about:config network.proxy.socks_remote_dns=true
Reason: By default, your local PC will do the DNS by default, but that will show what websites you are going to, so this steps ends DNS over the ssh tunnel.
6. Restart Browser
Reason: configures firefox to route traffic through the tunnel you just made
7. Test
*. View everything is over port 22
*. View IP is different from whatismyip.com
*. View filter in wireshark: dns, there should be no entries.
References
*. https://addons.mozilla.org /en-US/thunderbird /user/323/(foxyproxy allows quick proxy swaps in mozilla,thunderbird, etc).
*. ftp://ftp.chiark.greenend.o rg.uk/users/sgtatham/putty-latest/x86/putty.exe
*. http://www.wireshark.org/download.html

SSH Tunnel NOT SAFE
Is all browsing now encrypted? No, it’s only encrypted to the remote server. From that point on it’s normal. Though if you were browsing an https connection without cookies, it’s pretty hard to figure out what your traffic is. Cookies are relatively simple to capture, sniff then replay for a man in the middle type attack or privileged login.

16/12/2014

How to Use Math to Decrypt a Secret Messages

How to decrypt a secret message using math
Before we take you to the steps it's better to understand the Cryptography.
Introduction: Cryptography is the process of data translation into a secret code. On the other hand, Cryptography is a mothod of storing and transmitting data in a particular form so that only those for whom it is intended can read and process it. Cryptography involves into two processes, one in Encryption and the other in Decryption. Encryption: Encryption is the conversion of any data into unreadable form, called ciphertext, which cannot be easily understood by everyone except authorized parties. The term is most often associated with scrambling plaintext which referred to as cleartext into ciphertext this process is called encryption. e.g you've a girlfriend and her real names is Kaitlin but having a fear of her muscular brother(s), you always call her my heart, my soul, sweetie etc. That's means you have encrypted her name. Decryption: Decryption is the process of taking encoded/encrypted text or other data and converting it back into readable text/data that you or the computer are able to read and understand it. e.g (repeat the above example in opposite direction). Who Uses The Cryptography? Cryptography is usually used by the Government Spy Agents, Criminals, Hackers and other sensitive organisations in order to protect their data from being leaked.
You might have seen the army or police operators while talking on their wireless set. They use their secret codes to transmitte their messages securely. In world war II, Cryptography was used by many countries. You might think that the author is wasting your time by writting the stories. But as a true believer, believe me it would help you alot to understand the article very well.

How to Decrypt a Secret Message
Suppose, you are a police officer, Army officer, Cheif of an party or whatever. You pull out a small notepad that was issued to you before leaving on your trip. Its pages contain sequences of completely random numbers between zero and twenty-five. Armed with your notepad and the scrambled secret message, you begin the decryption process. Here’s how it works. Start by looking up the first random number in your notepad. In this case it’s two and then cross it out so you don’t accidentally use it again. This first number is used to decrypt the first letter of your or your enemies message. Beginning with the first letter in your message, P count forward through the alphabet two characters Q is one and R is two. So R is the first letter of your decoded message. All you have to do is repeat the process for each of the final two letters of your message. You look-up the next random number in your notepad nineteen. So start at the letter B the second letter in the scrambled message and count forward nineteen letters until, eventually, you reach the letter U This is the second letter in your decoded message. Finally, for the last letter A you see the next random number in your notepad is thirteen. You count forward thirteen letters from A and arrive at N. So, you’ve now got your entire message decrypted and it says Run. right?

The One-Time Pad Method of Encryption
Before we get to that, let’s take a minute to talk about this encryption method called the one-time pad that played a major role in sending secret messages throughout much of the 20th century. The name one-time pad comes from the fact that the series of random numbers in the notepad must be used only one time. If a pad is reused, patterns can emerge that give away the random numbers in the pad, and the encryption can then be broken quite easily by an intercepting party. Additionally, these numbers must be absolutely random (not just sort of random) or, once again, patterns can develop that make it easy to figure out the contents of the pad and, if someone knows the numbers in your pad, your encryption is useless.

Secret Agent Math II
Now, let’s get back to the story. Recall that you’ve just deciphered a secret message telling you to Run You ponder for a moment whether or not the message is a joke. if your running was that urgent, why wouldn’t your colleague just yell? But then you remember that this colleague is known for strictly over-following standard industry encryption protocols, so you realize it is a real message and make a mad dash for the door. But having taken so long to comprehend the urgency of the message, you’re grabbed and hustled into the trunk of a car and driven away leaving your colleague to ponder the folly of his ways. Apparently, he now realizes, encryption isn’t always necessary sometimes simple solutions are better. But, your alter-ego’s misfortune in our drama is your own good fortune in real life since, if for some bizarre reason you ever need to secretly share information with someone, you now can do it using a one-time pad.

The Math Behind One-Time Pad Encryption

Before wrapping-up, let’s take a minute to talk a little more about the math behind one-time pad encryption. Start by assigning each letter of the alphabet a corresponding integer value between 1 and 26. A=1, since A is the first letter of the alphabet, B=2, since B is the second letter, and so on until you get to Z=26, the last letter of the alphabet. If you take the integer value that corresponds to a particular scrambled letter in your encrypted message (say the letter is P with an integer value of 16) and add it to the associated random number from a one-time pad (say the number is two), then you get a new integer in this case 16, 2=18 which can then be converted back into the letter R which you’ll recognize to be the first decrypted letter in the message from our article.

How to Solve Math Problems

That’s all well and good, but here’s an interesting case: What would happen if the scrambled letter you were trying to decrypt was Y and the corresponding random number was 25? If we count forward through the alphabet from Y we’ll obviously get to Z but then what? Well, in this case, the answer is to loop back around and start again at A That’s the way the one-time pad system is defined to work. So you could start at Y count forward to Z jump back to A and then proceed 23 more letters forward and eventually arrive at X But how about this: Instead of counting forward 25 letters from Y couldn’t you also just count backward one letter? And isn’t counting backward one letter a lot easier? And a lot less error prone too? It is. So what’s my point here? Well, in math, as in life, there’s usually more than one way to solve a problem and some ways are easier than others. So here’s the quick tip work smart. Simply yelling Run. instead of going to the trouble of sending an encrypted message would be smart. Counting one letter backward through the alphabet instead of twenty-five forward would be smart too. Think before acting and you’ll solve more problems while working less that’s a pretty tough combination to beat.

16/11/2014

How to Encrypt Your Wireless Network


If you have Cable, DSL, or some other form of high-speed Internet, chances are, you've purchased a wireless-capable router so that you can connect to the Internet via your notebook PC, smartphone, or any other wireless-enabled device you have in your home. Many of you out there may be using a wireless router that is 5 years old or more. These devices tend to be set up and forgotten for the most part. Once it's set up, it just sort of does its thing, save for the occasional glitch that requires you to reboot it. When you first set up your wireless router did you turn on encryption so that a password was required to access your wireless network? Maybe you did, maybe you didn't.
Here's a quick way to find out if your wireless network is using encryption:
1. Open your smartphone's wireless network settings (check your smartphone's help manual for details).
2. Look for your wireless network's SSID (network name) in the list of available networks.
3. Check to see if your wireless network has a padlock icon next to it, if it does, then you are using at least basic encryption. Although you may have encryption turned on, you may be using an out dated and easily hacked form of wireless encryption so keep reading.
4. Check to see if your wireless network configuration tells you what type of wireless security is being used to protect your network. You will likely see either WEP, WPA, WPA2, or something similar. If you see anything besides WPA2, you will need to change the encryption settings on your wireless router or possibly upgrade its firmware, or buy a new wireless router if your current one is too old to support an upgrade to WPA2.
Read Also How to Hack Ethernet ADSL Router

Why You Need Encryption and Why WEP Encryption is Weak
If your wireless network is wide open with no encryption enabled, you are practically inviting neighbors and other free loaders to steal the bandwidth that you're paying good money for. Maybe you're the generous type, but if you are experiencing slow Internet speeds, it might be because you have a bunch of folks leeching off your wireless network. Just a few years ago, Wired Equivalent Privacy (WEP) was the standard for securing wireless networks. WEP was eventually cracked and is now easily bypassed by even the most novice hacker thanks to cracking tools available on the Internet. After WEP came Wi-Fi Protected Access (WPA). WPA too had flaws and was replaced by WPA2. WPA2 isn't perfect, but it is currently the best available offering for protecting home-based wireless networks. If you set up your Wi-Fi router many years ago then you could be using one of the old hackable encryption schemes such as WEP. You should consider changing to WPA2.

How To Enable WPA2 Encryption on Wireless Router
1. Log into your wireless router's administrator console. This is usually done by opening a browser window and typing in the address of your wireless router (usually http://192.168.0.1, http://192.168.1.1, http://10.0.0.1, or something similar). You will then be prompted for the admin name and password.
2. Locate the "Wireless Security" or "Wireless Network" settings page.
3. Look for the Wireless Encryption Type setting and change it to WPA2-PSK (you may see a WPA2-Enterprise settings. The enterprise version of WPA2 is intended more for corporate-type environments and requires a much more complicated set up process). If you don't see WPA2 as an option, then you may have to either upgrade your wireless router's firmware to add the capability (check your router manufacturer's website for details) or, if your router is too old to be upgraded via firmware, you may have to purchase a new wireless router that supports WPA2.
4. Create a strong wireless network name (SSID) coupled with a strong wireless network password (Pre-shared Key).
5. Click "Save" and "Apply". The wireless router may have to reboot for the settings to take effect.
6. Reconnect all your wireless devices by selecting the wireless network name and entering in the new password on each device. You should periodically check your router manufacturer's website for firmware updates that they might release to fix security vulnerabilities associated with your router. The updated firmware may also contain new security features as well.
Love this article?
Share it with your friends on Facebook