Cloaking Explained for Beginners

Ok you explained it in a simplified way.:)
well as the title says, its for beginners ;)

Honestly thanks for the share. Although I probably won't use cloaking it can be interesting.

Could this be used to fool the reddit thumbnail bot to put up a different thumbnail?

If so - how would one go about getting the required info (user agent or IP)

i'm not really familiar with that bot, what does it do exactly? is it like taking a thumbnail of the website?
if so then yes sure shouldnt be a problem. you can find the bots IP (or IP range) aswell as UA from your webserver access logs (typically somewhere in /var/log/httpd)
 
Cloaking is one of the oldest blackhat methods around. The idea is simple: show users an optimized landing page and give bots SEO optimized content stuffed with markov text, keywords etc. This can be archived in multiple ways, but here are the most common methods:

User Agent Cloaking:
When visiting a website, every browser sends what is called a "user agent" string that shows what kind of browser a user is using, so websites can be optimized for this particular brand, as some need special handling. Its offten just called UA, so next time you know what that is :)
Anyways so for firefox this looks something like this:
Code:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
All browsers have a different one and so do bots, for example the user agent from googlebot looks like this:
Code:
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Now with simple pattern matching cloaking scripts verify the user agent to determine which version of the website to show, the real one or the cloaked one. This works best with PHP or CGI as that code is executed first before the HTML is rendered, however this cloaking method can also be archived with javascript.

Referrer Cloaking:
This method is similar to user agent cloaking, however this time we look at the "referer" string which is sent by the browser if you click a link. It holds the referring domain. By the way, the real writing is "referrer", however the browser sends "referer" that is because there was a typo in the original RFC (request for comments) document and so everybody used the wrong writing as it was defined like that in the protocol specification. If you don't know what that is, rfc's exist for any protocol that exists in the computing world and describe every function in detail, also the HTTP standard which all this stuff with "user agent" and "referer" is based on. so if you are every curious about how things really work, look at the rfc! anyways just as little background...back to referer cloaking: as i said, the referrer is sent by the browser once a user follows a link.

To illustrate the point better i guess it would be a good idea to show you guys an actual header packet that is sent from the browser to the server in a so called GET request when requesting a website:

Code:
GET /url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved= HTTP/1.1
Host: www.google.de
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Referer: https://www.google.de
Cookie: NID=73=CxfcRkEuVWqfY6ZPQ_xEsHiF0nCywwmFO7O0EZbHr8OScN-
Connection: keep-alive

So here the same pattern matching technic is applied, simply with the "referer" field. If the user is coming from google search, then redirect him, otherwise show the real site.

IP Cloaking:
Here we have a bit more advanced method, as it involves keeping track of known bot IPs and cloak them based on IP.
There are existing bot lists with thousands of IP entries and there are also service providers offering updated IP lists via subscriptions,
however there is a downside - 1 new bot IP and the whole setup is fucked and the bot won't be blocked. Don't get me wrong this method is still kinda reliable for a while with updated lists, but its a constant hunt for the latest IPs.
How this works is simple: a script checks every visitor IP against the bot list (which can also slow down page load) and decides if its a bot or not.
What makes this more difficult is not the code, but keeping up with the bot IPs. I wrote a cloaker called FinalCloak that solves this problem reliably, but its still in private beta. More on it once its ready for public release (Its been tested since 2014 and works well ever since). Anyways just as hint that even this problem can be dealth with..

rDNS Checks
This is more like an additional check to other cloaking methods. "rDNS" stands for "reverse DNS" and is simply the main hostname of an IP. Since you probably know an IP can host many virtual websites, but the IP always resolves to 1 hostname. So for google this is "googlebot.com" and its a good idea to not only check the IP if its googlebot, but also see if the rDNS entry matches. Its easy to spoof the "user agent", anybody can set it freely so you can write a script (or install a browser plugin) that advertises itself with the UA from googlebot and so circumvent the cloaking i.e. to spy on competitors. Likely manual reviewers from google might try that aswell, however if there is an additional rDNS check they would still be cloaked properly, despite the google UA.

0day Methods
there are a few private technics out there, but obviously i won't disclose them here in public. otherwise a lot of people would bitch at me hehe ;)

Different Types of Cloaking:

In addition to the main methods, there are also different types of cloaking that you might encounter like:

- Mosaic Cloaking:
Usually we cloak the full page, but mosaic cloaking is only cloaking parts of the website in an effort to be more stealth.
Usually only specific parts like div's with extra content or "above the fold" ads that google doesn't like.

- Link Cloaking:
Cloaking of links only to avoid having too many (or at all) affiliate links on a website. So real users see the affiliate links, google doesn't.


Ok thats it for now, hope this little introduction helps you to get started :)

Hi ITZ

If social network company outsource their crawler work ,rdns possible not work well,
If social network outsource vendor used not their IP range,just like using normal home broadband to do the test ,
If User agent header just used normal web browser header ,do you think that still able to cloak it ?
I have study for an social network crawler ,obviously have outsource sign ,
they just need to compare two results as below with md5 check sum ,they know it you are using cloaker,
First result they can pretend as a normal user and normal browser agent with home broadband IP
second result they can indicate from the referer information,they are from social network,
Do you still think that still possible to cloak your website?
but if you using scripts to do like content lock ,may be still can hide cpa link ,
But if you home page can't cloak ,they just need to search by cpa keyword ,
they will still know it ,unless you can used mainly on photo design ,wouldn't used any sensitive cpa keyword,
But you know that is difficult purely on pictures websites without text ,
Even you can do that ,still have OCR can read out text from picture:)
 
As this is my first post.
Hi, Actually I want to run a cloaker I know the basics that what it does but exactly not sure how it does. I'll appreciate if you let me know how to use it for IP Cloaking to run a campaign on Juicyads or on any other adult traffic site. Thanks in advance!
 
Hi ITZ

If social network company outsource their crawler work ,rdns possible not work well,
If social network outsource vendor used not their IP range,just like using normal home broadband to do the test ,
If User agent header just used normal web browser header ,do you think that still able to cloak it ?
of course, just requires more research then and some extra code.

I have study for an social network crawler ,obviously have outsource sign ,
they just need to compare two results as below with md5 check sum ,they know it you are using cloaker,
First result they can pretend as a normal user and normal browser agent with home broadband IP
second result they can indicate from the referer information,they are from social network,
Do you still think that still possible to cloak your website?
yes sure, like i said just requires more research. of course if they keep manually checking your site over and over again it gets harder, but if you know who is doing it you can fingerprint them and then it doesn't matter what the IP is or what UA they use.

but if you using scripts to do like content lock ,may be still can hide cpa link ,
But if you home page can't cloak ,they just need to search by cpa keyword ,
they will still know it ,unless you can used mainly on photo design ,wouldn't used any sensitive cpa keyword,
But you know that is difficult purely on pictures websites without text ,
Even you can do that ,still have OCR can read out text from picture:)
sure if you are really dedicated you can spot cloaking, because its not possible to 100% hide anything. however most of the time cloaking works fine though and i haven't had problem with any social network yet facebook,twitter,IG and so on can all be cloaked. same goes for advertising networks and especially google and other search engines. as of date i have many sites in google that are cloaked since years ;)

As this is my first post.
Hi, Actually I want to run a cloaker I know the basics that what it does but exactly not sure how it does. I'll appreciate if you let me know how to use it for IP Cloaking to run a campaign on Juicyads or on any other adult traffic site. Thanks in advance!
deppends on the cloaking software you use, just enabled it and make sure to keep your IPs up to date.
 
Last edited by a moderator:
of course, just requires more research then and some extra code.


yes sure, like i said just requires more research. of course if they keep manually checking your site over and over again it gets harder, but if you know who is doing it you can fingerprint them and then it doesn't matter what the IP is or what UA they use.


sure if you are really dedicated you can spot cloaking, because its not possible to 100% hide anything. however most of the time cloaking works fine though and i haven't had problem with any social network yet facebook,twitter,IG and so on can all be cloaked. same goes for advertising networks and especially google and other search engines. as of date i have many sites in google that are cloaked since years ;)

Hi itz
Are you using your market software cloaker or you script it to cloak by yourself?
Actually example for Instagram whatever cpa you want to do ,must put certain cpa keyword in your bio,
If no call to action,click rate will be Low ,base on the bio cpa keyword,actually Instagram can detected and flagged,
Unless you always using a shout out without cta indication in bio,but shoutout not really efficient than bios indication
 
i have/coded different cloakers, but for myself i use a private one that i've developed and sometimes modify for my own needs.
i don't get what your point is with the IG stuff as it has nothing todo with cloaking whatever you do on your IG profile, so i don't really get the question? :)
 
i have/coded different cloakers, but for myself i use a private one that i've developed and sometimes modify for my own needs.
i don't get what your point is with the IG stuff as it has nothing todo with cloaking whatever you do on your IG profile, so i don't really get the question? :)
You can put your website link into IG profile ,somebody used it for cpa ,so will need to hide cpa link from Instagram,
Recently I just tested from a cloaker software called advertsafe ,most of the features are useful ,
Because my cloaker is too simple ,not powerful enough to record and statistic for those visitor log data ,
advertsafe source code is using php ,for me no time to do those programming for cloaker ,
even I have little bit concepts :)
 
oh yes sure thats one of the methods to get around the IG url ban, cloak links to already banned domains.
 
Thanks for this well explained subject matter, it's been long I've been reading shitty stuffs about cloacking but today BHW provide me with the best and understanding one Thanks Man.
 
No problem, glad i could help out! yes i've seen too much bullshit about cloaking too, hence why i thought i should post a small no-bs tutorial :)
 
Cloaking is one of the oldest blackhat methods around. The idea is simple: show users an optimized landing page and give bots SEO optimized content stuffed with markov text, keywords etc. This can be archived in multiple ways, but here are the most common methods:

User Agent Cloaking:
When visiting a website, every browser sends what is called a "user agent" string that shows what kind of browser a user is using, so websites can be optimized for this particular brand, as some need special handling. Its offten just called UA, so next time you know what that is :)
Anyways so for firefox this looks something like this:
Code:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
All browsers have a different one and so do bots, for example the user agent from googlebot looks like this:
Code:
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Now with simple pattern matching cloaking scripts verify the user agent to determine which version of the website to show, the real one or the cloaked one. This works best with PHP or CGI as that code is executed first before the HTML is rendered, however this cloaking method can also be archived with javascript.

Referrer Cloaking:
This method is similar to user agent cloaking, however this time we look at the "referer" string which is sent by the browser if you click a link. It holds the referring domain. By the way, the real writing is "referrer", however the browser sends "referer" that is because there was a typo in the original RFC (request for comments) document and so everybody used the wrong writing as it was defined like that in the protocol specification. If you don't know what that is, rfc's exist for any protocol that exists in the computing world and describe every function in detail, also the HTTP standard which all this stuff with "user agent" and "referer" is based on. so if you are every curious about how things really work, look at the rfc! anyways just as little background...back to referer cloaking: as i said, the referrer is sent by the browser once a user follows a link.

To illustrate the point better i guess it would be a good idea to show you guys an actual header packet that is sent from the browser to the server in a so called GET request when requesting a website:

Code:
GET /url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved= HTTP/1.1
Host: www.google.de
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
DNT: 1
Referer: https://www.google.de
Cookie: NID=73=CxfcRkEuVWqfY6ZPQ_xEsHiF0nCywwmFO7O0EZbHr8OScN-
Connection: keep-alive

So here the same pattern matching technic is applied, simply with the "referer" field. If the user is coming from google search, then redirect him, otherwise show the real site.

IP Cloaking:
Here we have a bit more advanced method, as it involves keeping track of known bot IPs and cloak them based on IP.
There are existing bot lists with thousands of IP entries and there are also service providers offering updated IP lists via subscriptions,
however there is a downside - 1 new bot IP and the whole setup is fucked and the bot won't be blocked. Don't get me wrong this method is still kinda reliable for a while with updated lists, but its a constant hunt for the latest IPs.
How this works is simple: a script checks every visitor IP against the bot list (which can also slow down page load) and decides if its a bot or not.
What makes this more difficult is not the code, but keeping up with the bot IPs. I wrote a cloaker called FinalCloak that solves this problem reliably, but its still in private beta. More on it once its ready for public release (Its been tested since 2014 and works well ever since). Anyways just as hint that even this problem can be dealth with..

rDNS Checks
This is more like an additional check to other cloaking methods. "rDNS" stands for "reverse DNS" and is simply the main hostname of an IP. Since you probably know an IP can host many virtual websites, but the IP always resolves to 1 hostname. So for google this is "googlebot.com" and its a good idea to not only check the IP if its googlebot, but also see if the rDNS entry matches. Its easy to spoof the "user agent", anybody can set it freely so you can write a script (or install a browser plugin) that advertises itself with the UA from googlebot and so circumvent the cloaking i.e. to spy on competitors. Likely manual reviewers from google might try that aswell, however if there is an additional rDNS check they would still be cloaked properly, despite the google UA.

0day Methods
there are a few private technics out there, but obviously i won't disclose them here in public. otherwise a lot of people would bitch at me hehe ;)

Different Types of Cloaking:

In addition to the main methods, there are also different types of cloaking that you might encounter like:

- Mosaic Cloaking:
Usually we cloak the full page, but mosaic cloaking is only cloaking parts of the website in an effort to be more stealth.
Usually only specific parts like div's with extra content or "above the fold" ads that google doesn't like.

- Link Cloaking:
Cloaking of links only to avoid having too many (or at all) affiliate links on a website. So real users see the affiliate links, google doesn't.


Ok thats it for now, hope this little introduction helps you to get started :)
Have you tried it? What's the result?
 
tried what exactly? you just quoted the entire post...
 
But as far as I know just detecting googlebot won't work. If one is cloaking entire site. Isn't that true. So you need a script with all google's IP.

yes if you are doing IP cloaking, then you need an IP list. however its not that hard to compile, or just buy it. there are also ways to get bot IPs on the fly like finalcloak does.
 
yes if you are doing IP cloaking, then you need an IP list. however its not that hard to compile, or just buy it. there are also ways to get bot IPs on the fly like finalcloak does.
Just prohibit for Google ip can be work ?i m curious ,until now don't really hear a people said his website can be permanently cloaked with Google,
I saw a explanation for some famous cloaker,it only can cloacked for 3 months if done correct setting,
let said if it does possible to cloaked permanently with Google,should hv many websites used for cpa earning.:)
 
QUESTION

Any ad approved by facebook/google/bing/ etc. is going to be relatively mild because you want the ad approved. No clickbait headlines, no provocative images because of facebook/google ad rules.

Also there is the challenge of the lack of congruence of the ad and the cloaked landing page. Very often a cloaked lander has little to do with the ad and users click away because they feel deceived. Another issue is the trouble finding a proper allowed ad analog for a prohibited product/service. If you want to have a cloaked sales page for sex toys or vape product, what is the ad that you will present to facebook?

With all these hurdles does Cloaking ads REALLY offer a competitive advantage?
 
Just prohibit for Google ip can be work ?i m curious ,until now don't really hear a people said his website can be permanently cloaked with Google,
I saw a explanation for some famous cloaker,it only can cloacked for 3 months if done correct setting,
let said if it does possible to cloaked permanently with Google,should hv many websites used for cpa earning.:)

i have sites that are cloaked since years and google hasn't banned them yet. even some with simpler forms of cloaking as i also run tests how google reacts to different cloaking from time to time.
whoever says its only max 3 months is doing it wrong and must be a shitty software, as you can never tell how long it will last for sure, but if the dev knows it lasts max 3 months must mean its the longest time he could keep a site up and thats a very bad result, so its a garbage cloaker thats for sure.

QUESTION

Also there is the challenge of the lack of congruence of the ad and the cloaked landing page. Very often a cloaked lander has little to do with the ad and users click away because they feel deceived. Another issue is the trouble finding a proper allowed ad analog for a prohibited product/service. If you want to have a cloaked sales page for sex toys or vape product, what is the ad that you will present to facebook?

With all these hurdles does Cloaking ads REALLY offer a competitive advantage?

first of all its not true that a cloaked lander has very little to do with the actual ad. its not like you promote say t-shirts and then when the user clicks he ends up at a sex toys page. i mean sure would work, but it wouldn't be lucrative enough i think. however if you have an ad for weight loss and you cloak the people who click on the ad and send them off to an affiliate that is banned by facebook then the users won't notice. they still get to a weight loss product and chances for complaints will be significantly lower (if any). so if i wanted to sell sex toys i would give facebook some innocent totally unrelated page that would pass their initial checks and then would put up some ad that isn't instantly saying "buy sex toys here", but more subtle so they can guess what it is. then also make sure to who you market that ad to, that also makes a huge difference. however that isn't really the point of this post, what you do with cloaking is up to you. of course you still need a good method like always, but it surely helps in many situations!
 
What do you guys use to cloak specific affiliate links? and what would you do in case of a manual reviewer visits your site?
 
PM me i'm not allowed to name my own programs here since i'm the developer and that would be mistaken as advertising.
 
Back
Top