Archive for the ‘Uncategorized’ Category

How To Hide Your IP

Tuesday, January 26th, 2010

A lot of us love surfing the web because we can be whoever we want to be and no one knows who we really are. You post on message boards under different names, some of us even like to be multiple characters at the same time, and we can act out whatever we want under the veil of secrecy and privacy, right?

As far as knowing your real name, you are probably right, if you don’t tell them, they won’t know. However your internet activities are far from anonymous and your preferences of content are far from private, here’s why.

Did you know, your ISP (Internet Service Provider) records all the sites your IP (Internet Protocol) address accesses. If you visit some unsavoury sites this may become an issue if the content you access crosses legal boundaries for either taboo or copyright infringement reasons. You may have some real problems in the near future if you’re not careful.

Another problem is that on the other hand, websites that you visit can actually track your IP for a variety of reasons from the relatively harmless exercise of gathering data on your internet activities for marketing goals to the very real and very scary reason of identity/credit card theft and/or to hack your computer.

You may think your identity and details are perfectly safe but if someone really wants them, all they have to do is link your IP to your ISP which they then access to find out all they need about you.

This can happen to people who least expect it, including you!

HOW CAN YOU PROTECT YOURSELF???

Hiding your IP address is the only way to really keep your internet activity (including browsing history) totally secret.

Hiding your IP address is done by using a proxy server which is totally independent from your actual ISP. The proxy server acts as an intermediary between you and the website you are visiting basically protecting your internet identity from these sites as the website now only deals back and forth with the proxy server, not your ISP, therefore hiding your unique IP.

Be aware however, that the proxy server will know your IP, so choose wisely!

There are two main proxy server solutions to consider; Website based proxy service and Software based proxy service.

Website based proxy service – A website based proxy service works by the user going to a website that is linked to a proxy server. You simply enter the URL of the website you wish to visit with a hidden IP and it takes you there through the proxy server. Website based proxy servers are a good quick-fix or short term solution but they offer minimal data protection and encryption services and they cannot access sites that use SSL (Secure Socket Layer) or SSE (Secure Shell Encryption) such as order forms or financial institutions.

Web based proxy servers are good of you are at work and you want to view blocked sites such as Myspace or Facebook, but pretty much nothing beyond that for a long term solution. Web based are usually free and due to their limitations, they should be. If you paid subscription to one, chances are you’ve been ripped off. http://www.sweetproxies.com is a good place to start if you are looking for a free website based proxy server.

Software based proxy service – A software based proxy service works by the user installing software that runs with your current internet browser. This option is recommended because unlike the website based proxy service where you actually have to manually enter every URL you want to visit through their website, a software based service will work with your browser running all your internet activity through a proxy server giving you the most complete and secure solution (along with 24-7 effectiveness, software based services also encrypts all data being transmitted, something the web site based service does not).

As I just mentioned, a software based solution is a lot more comprehensive and much safer than the free website based options, this usually means that software based solutions come with a subscription fee that ranges from $30/lifetime to ridiculous amounts of around $10/month. Again, it all depends how much you need this service. As I said earlier web based proxy services are great at work to check Facebook, but if you really want your IP hidden, therefore your identity and surfing habits protected you need a software based proxy service.

HOW TO FIND THE RIGHT SOFTWARE BASED PROXY SERVICE???

As with any downloadable software purchase you really need to know what you are installing on your PC as there is a lot of rubbish out there asking you for your cash, and software based proxy services are no exception, from overpriced to ineffective – it’s all out there.

1) Research the company, Google is a wealth of information from company background to other users’ experience it’s all recorded so make sure you do your homework. Only when a company passes the Google test should you consider it further.

2) Not all services support every protocol (FTP, HTTPS, and HTTP) so make sure the one you download meets your requirements.

3) Good software based proxy services will set up a TLS or SSL tunnel for your use. This is further protection which stops network sniffers from viewing and tracking your internet activities.

4) The software based proxy service you choose should go further that just hiding your IP, it should also remove scripts, cookies, banners, pop-ups and referrer data. This will give you complete protection. Don’t worry though; you can adjust settings to protect the sites you require cookies, scripts and other elements for.

While everyone’s needs are different and one’s fantastic solution can be total rubbish to another, I will tell you that I use Hide-My-Ip 2009

Why? Because a lifetime membership is under $30 (which is what some products cost you for a month) uses 128-bit SSL encryption (which is great for wireless as well), fake locations to go with the fake IP’s to really confuse hackers, it supports all browsers, it allows you to send anonymous emails from web based email services (such as hotmail and Gmail) and it also hides your IP address when you are gaming online (which is great for me).

Best of all, you can try it FREE!!! No Risk, No wasted $$$!!!

Hide Ip to Stop Spam

Monday, January 25th, 2010

How spammers get your e-mail?

There are a lot of methods that they may use. Whereas there are also a lot of spammers’ tricks which can’t be explained even today.

I will try to introduce some of them, known to me at this point.

 

Automated Software and Scripts

There are different programs and scripts collecting e-mails in an automatic mode which are left by users on website contact forms.

They search for symbols sequence in HTML code:

 

 

 

 

 

Common Words Dictionary:

A spammer combines common words and names and sends e-mail using different variations: test1@askldhaskld.com, test2@askldhaskld.com, test3@askldhaskld.com.

Spammers usually use free big e-mail providers for their experiments.

 

E-mail spoofing:

A spammer makes a fake e-mail header which was seemingly sent from your own address or from an apparently credible source. The goal of this trick is to get you to open and respond to their e-mail.

Remember! Do not respond to unsolicited e-mail ever. Use spam filters.

 

Social engineering:

A spammer makes a “personal” subject line that a user wants to open. Typical subject lines are: “Hey, how are you?” “Urgent and Confidential,” “We need to meet,” “I have money for you,” or “It snowed again.”

Remember! Do not respond to unsolicited e-mail ever. Use spam filters.

 

Message boards and chat rooms mining:

Do not provide your e-mail address in public places if you are not sure that a webmaster uses special software to protect your e-mail in HTML code. If your e-mail address appears on a message board, in a chat room, or in any public place, a spammer will surely find it.

 

Open Proxy Servers:

Spammers use open proxies to send mail anonymously. Many spammers use these open proxy servers to help maintain anonymity. They hide IP address of their own to hide their location. Everybody knows that not all Proxy Servers are anonymous.

Fortunately, there is a service that provides anonymity for Internet users and persecutes illegal actions because of the strict privacy policy to stop spamming and illegal actions through its services.

This service is called SmartHide. The software encodes all the information (passwords, logins, buying, e-mailing, downloading, ICQ, etc.), hides IP address for anonymous surfing and thus helps Internet users to stop some form of spam.

 

Web beacons:

An image can be put inside an e-mail which is invisible to the recipient. It is known as an “invisible GIF” or “a web beacon.” Once the e-mail is opened, the spammer is notified that your e-mail address is “alive”.

Do not open e-mail messages if they appear to be spam.

 

Text random strings and characters:

Spammers insert random strings of text to make the spam appear unique. Sometimes they do this with e-mail headers by adding spaces and characters like this: P_R_I_V_A_C_Y.

Remember! Do not respond to unsolicited e-mail ever. Use spam filters.

 

 Chain Letters:

Letters that suggest you should send them on to your friends (different number of friends may be required). They may promise you some money for every letter you send or bad luck if you send to less than five people or so.

Remember! Do not respond to unsolicited e-mail ever. Use spam filters.

 

How to stop spammers?

It is a collection of all my thoughts, common tips and tricks to stop spamming.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

How to use mod_rewrite to simplify URL Rewriting in Apache – A basic guide to the mod_rewrite module

Sunday, January 24th, 2010

URL Rewriting is the process of manipulating an URL or a link, which is send to a web server in such a way that the link is dynamically modified at the server to include additional parameters and information along with a server initiated redirection. The web server performs all these manipulations on the fly so that the browser is kept out of the loop regarding the change made in URL and the redirection.

URL Rewriting can benefit your websites and web based applications by providing better security, better visibility or friendliness with Search Engines and helps in keeping the structure of the website more easy to maintain for future changes.

You can read about the theory and benefits of URL Rewriting from my Previous article, which can be accessed from here. In this article we will be taking a look at how we can implement URL Rewriting on an Apache based web server environment using the mod_rewrite module for Apache.

Mod_rewrite is one of the most favored modules for the Apache web server and there are many web developers and administrators who will vote this module as the best thing to happen on Apache. This module has a lot of tricks up its sleeve so that it can be called the Swiss Army Knife of all Apache Modules. Apart from providing simple URL Rewriting functionality for an Apache based website, this module arms the website with better URL protection, better search engine visibility, protection against bandwidth thieves by stopping hot linking, hassle free restructuring possibilities and options to provide friendliest of URLs for the website users. This module due to its versatility and functionality can at times feel a bit daunting to master, but getting a through understanding of the basics can make you a master of the craft of URL Rewriting.

First and foremost you should have a properly configured Apache Web Server on your test machine. Mod_rewrite is usually installed along with the Apache server, but in case it is missing – this can be the case on a Linux machine where the mod_rewrite module was not compiled along with the installation – you will have to get it installed. For using mod_rewrite on your Apache box you will have to configure this module to load dynamically on demand made by Apache. On a shared server you will have to contact your web hosting company to get this module installed and loaded on Apache.

On your local machine you can find if the module is installed along with Apache by having a look at the modules directory of Apache. Check for a file named mod_rewrite.so and if it is there then the module can be made to load in to the Apache server dynamically. By default this module is not loaded when Apache starts and you need to tell Apache to enable this module for dynamic loading by making changes in the web servers configuration file, which is explained below.

You can make the mod_rewrite module load dynamically in to the Apache web server environment using the LoadModule Directive in the httpd.conf file. Load this file in a text editor and find a line similar to the one given below.

#LoadModule rewrite_module modules/mod_rewrite.so

Uncomment this line by removing the # and save the httpd.conf file. Restart your Apache server and if all went well mod_rewrite module will now be enabled on your web server.

Ok, now the mod_rewrite module is enabled on your server. Lets have a look at how to make this module load itself and to make it work for us.

In order to load the module dynamically you have to add a single line to your .htaccess file. The .htaccess files are configuration files with Apache directives defined in them and they provide distributed directory level configuration for a website. Create a .htaccess file in your web servers test directory – or any other directory on which you want to make URL Rewriting active – and add the below given line to it.

RewriteEngine on

Now we have the rewrite engine turned on and Apache is ready to rewrite URLs for you. Lets look at a sample rewrite instruction for making a request to our server for first.html redirected to second.html at server level. Add the below given line to your .htaccess file along with the RewriteEngine directive that we have added before.

RewriteRule ^first.html$ second.html

I will explain what we have done here at the next section, but if all went well then any requests for first.html made on your server will be transferred to second.html. This is one of the simplest forms of URL Rewritting.

A point to note here is that the redirect is kept totally hidden from client and this differs from the classic HTTP Redirects. The client or the browser is given the impression that the content of the second.html is being fetched from first.html. This enables websites to generate on the fly URLs with out the clients awareness and is what makes URL Rewriting very powerful.

Now we know that mod_rewrite can be enabled for an entire website or a specific directory by using .htaccess file and have done a basic rewrite directive in the previous example. Here I will explain what exactly have we done in the first sample rewrite.

Mod_rewrite module provides a set of configuration directive statements for URL Rewriting and the RewriteRule directive – that we saw in the previous sample – is the most important one. The mod_rewrite engine uses pattern-matching substitutions for making the translations and this means a good grasp of Regular Expressions can help you a lot.

Note: Regular Expressions are so vast that they will not fit in to the scope of this article. I will try to write another article on that topic someday.

The general syntax of the RewriteRule is very straightforward. RewriteRule Pattern Substitution [Flags]

The Pattern part is the pattern which the rewrite engine will look for in the incoming URL to catch. So in our first sample ^first.html$ is the Pattern. The pattern is written as a regular expression.

The Substitution is the replacement or translation that is to be done on the caught pattern in the URL. In our sample second.html is the Substitution part.

Flags are optional and they make the rewrite engine to do certain other tasks apart from just doing the substitution on the URL string. The flags if present are defined with in square brackets and should be separated by commas.

Lets take a look at a more complex rewrite rule. Take a look at the following URL.

http://yourwebsite/articles.php?category=stamps&id=122

Now we will convert the above URL in to a search engine and user friendly URL like the one given below.

http://yourwebsite/articles/stamps/122

Create a page called articles.php with the following code:

$category = $_GET['category'];

$id = $_GET['id'];

echo “Category : ” . $category . ” “;

echo “ID : ” . $id;

This page simply prints the two GET variables passed to it on the webpage.

Open the .htaccess file and write in the below given Rule.

RewriteEngine on RewriteRule ^articles/(w+)/([0-9]+)$ /articles.php?category=$1&id=$2

The pattern ^articles/(w+)/([0-9]+)$ can be bisected as:

^articles/ – checks if the request starts with ‘articles/’

(w+)/ – checks if this part is a single word followed by a forward slash. The parenthesis is used for extracting the parameter values, which we need for replacing in the actual query string, in the substituted URL. The pattern, which is placed in parenthesis will be stored in a special variable which can be back-referenced in the substitution part using variables like $1, $2 so on for each pair of parenthesis.

([0-9]+)$ – this checks for digits at the last part of the url.

Try requesting the articles.php file in your test server with the below given url.

http://yourwebsite/articles/coins/1222

The URL Rewrite rule you have written will kick in and you will be seeing the result as if the url requested where:

http://yourwebsite/articles.php?category=coins&id=1222

Now you can work on this sample to build more and more complex URL Rewritting rules. By using URL rewriting in the above example we have achieved a search engine and user friendly URL, which is also tamper proof against casual script kiddie injection sort of attacks.

RewriteRule flags provide us with a way to control the way mod_rewrite handles each rule. These flags are defined inside a common set of square brackets separated by commas and there are about 15 flags to choose from. These flags range from those which controls the way rules are interpreted to complex one’s like those which sent specific HTTP headers back to the client when a match is found on the pattern. Lets look at some of the basic flags.

There are other flags too but they are complex to explain with in the scope of this article so you can find more info on them by referring the mod_rewrite manual.

This directive gives you the additional power of conditional checking on a range of parameters and conditions. This statement when combined with RewriteRule will let you rewrite URLs based on the success of conditions. RewriteCond are like the if() statement in your programming language but here they are for deciding whether a RewriteRule directive’s substitution should take place or not. Things like preventing hot linking and checking whether the client meets certain criteria’s before rewriting the URL etc can be achieved by using this directive.

The general syntax of the RewriteCond is:

RewriteCond string-to-test condition-pattern

The string-to-test part of the RewriteCond has access to a large set of Variables like the HTTP Header variables, Request Variables, Server Variables, Time variables etc so you can do a lot of complex conditional checking while writing directives. You can use any of these variables as a string to test by putting it in a %{string} format. Suppose you want to use the HTTP_REFERER variable then it can be used as %{HTTP_REFERER }.

The condition part can be a simple string or a very complex regular expression as your imagination is the only limit with this module.

Lets take a look at an example for conditional rewriting using RewriteCond directive:

RewriteCond %{HTTP_USER_AGENT} ^Mozilla/4(.*)MSIE RewriteRule ^index.html$ /index.ie.html [L] RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5(.*)Gecko RewriteRule ^index.html$ /index.netscape.html [L] RewriteRule ^index.html$ /index.other.html [L]

This example uses the HTTP_USER_AGENT as the test string with the RewriteCond directive. What it does is that it uses the HTTP_USER_AGENT header variable to find the browser of the visiting user and match it against a set of pre known values to detect the browser and serve different pages to the visitor based on the match result. The first RewriteCond checks the HTTP_USER_AGENT to find a match for the ^Mozilla/4(.*)MSIE pattern. This match will occur when a user visits the page using IE as browser. Then the RewriteRule given just under that statement will kick in and will rewrite the URL to server index.ie.html page to the IE visitor.

Similarly a checking is made for mozilla specific browsers in the second RewriteCond and the RewriteRule will do the substitution for index.netscape.html when a positive match is made on the ^Mozilla/5(.*)Gecko pattern. The third RewriteRule is there to catch other browsers. If both the first and second RewriteCond fails then the last RewriteRule will be considered. A point to note in the above example is the usage of the [L] flag with all the RewriteRule directives. This is used to avoid the cascading of applying the rules when a positive RewriteRule is applied.

Two flags which can be used to further control the way the RewriteCond directive behave are [NC] – case-insensitive – and [OR] – chaining of multiple RewriteCond directives with logical OR.

By using these two directives – RewriteRule and RewriteCond – you can implement a lot of powerfull URL Rewriting functionality on your website.

In this article we have taken only a brief look at the power of the mod_rewrite module. It is only a scratch on the surface but I hope it is enough to get you started on using this module on your web server environment.