Showing posts with label Website. Show all posts
Showing posts with label Website. Show all posts

Thursday, 23 June 2011

Website Security for Webmasters

Webmaster level: Intermediate to Advanced

Users are taught to protect themselves from malicious programs by installing sophisticated antivirus software, but often they may also entrust their private information to websites like yours, in which case it’s important to protect their data. It’s also very important to protect your own data; if you have an online store, you don’t want to be robbed.

Over the years companies and webmasters have learned—often the hard way—that web application security is not a joke; we’ve seen user passwords leaked due to SQL injection attacks, cookies stolen with XSS, and websites taken over by hackers due to negligent input validation.

Today we’ll show you some examples of how a web application can be exploited so you can learn from them; for this we’ll use Gruyere, an intentionally vulnerable application we use for security training internally, too. Do not probe others’ websites for vulnerabilities without permission as it may be perceived as hacking; but you’re welcome—nay, encouraged—to run tests on Gruyere.


Client state manipulation - What will happen if I alter the URL?

Let’s say you have an image hosting site and you’re using a PHP script to display the images users have uploaded:

http://www.example.com/showimage.php?imgloc=/garyillyes/kitten.jpg

So what will the application do if I alter the URL to something like this and userpasswords.txt is an actual file?

http://www.example.com/showimage.php?imgloc=/../../userpasswords.txt

Will I get the content of userpasswords.txt?

Another example of client state manipulation is when form fields are not validated. For instance, let’s say you have this form:



It seems that the username of the submitter is stored in a hidden input field. Well, that’s great! Does that mean that if I change the value of that field to another username, I can submit the form as that user? It may very well happen; the user input is apparently not authenticated with, for example, a token which can be verified on the server.
Imagine the situation if that form were part of your shopping cart and I modified the price of a $1000 item to $1, and then placed the order.

Protecting your application against this kind of attack is not easy; take a look at the third part of Gruyere to learn a few tips about how to defend your app.

Cross-site scripting (XSS) - User input can’t be trusted



A simple, harmless URL:
http://google-gruyere.appspot.com/611788451095/%3Cscript%3Ealert('0wn3d')%3C/script%3E
But is it truly harmless? If I decode the percent-encoded characters, I get:

Gruyere, just like many sites with custom error pages, is designed to include the path component in the HTML page. This can introduce security bugs, like XSS, as it introduces user input directly into the rendered HTML page of the web application. You might say, “It’s just an alert box, so what?” The thing is, if I can inject an alert box, I can most likely inject something else, too, and maybe steal your cookies which I could use to sign in to your site as you.

Another example is when the stored user input isn’t sanitized. Let’s say I write a comment on your blog; the comment is simple:
Click here to see a kitten

If other users click on my innocent link, I have their cookies:



You can learn how to find XSS vulnerabilities in your own web app and how to fix them in the second part of Gruyere; or, if you’re an advanced developer, take a look at the automatic escaping features in template systems we blogged about on our Online Security blog.

Cross-site request forgery (XSRF) - Should I trust requests from evil.com?

Oops, a broken picture. It can’t be dangerous--it’s broken, after all--which means that the URL of the image returns a 404 or it’s just malformed. Is that true in all of the cases?

No, it’s not! You can specify any URL as an image source, regardless of its content type. It can be an HTML page, a JavaScript file, or some other potentially malicious resource. In this case the image source was a simple page’s URL:



That page will only work if I’m logged in and I have some cookies set. Since I was actually logged in to the application, when the browser tried to fetch the image by accessing the image source URL, it also deleted my first snippet. This doesn’t sound particularly dangerous, but if I’m a bit familiar with the app, I could also invoke a URL which deletes a user’s profile or lets admins grant permissions for other users.

To protect your app against XSRF you should not allow state changing actions to be called via GET; the POST method was invented for this kind of state-changing request. This change alone may have mitigated the above attack, but usually it's not enough and you need to include an unpredictable value in all state changing requests to prevent XSRF. Please head to Gruyere if you want to learn more about XSRF.

Cross-site script inclusion (XSSI) - All your script are belong to us

Many sites today can dynamically update a page's content via asynchronous JavaScript requests that return JSON data. Sometimes, JSON can contain sensitive data, and if the correct precautions are not in place, it may be possible for an attacker to steal this sensitive information.

Let’s imagine the following scenario: I have created a standard HTML page and send you the link; since you trust me, you visit the link I sent you. The page contains only a few lines:


Since you’re signed in to Gruyere and you have a private snippet, you’ll see an alert box on my page informing you about the contents of your snippet. As always, if I managed to fire up an alert box, I can do whatever else I want; in this case it was a simple snippet, but it could have been your biggest secret, too.

It’s not too hard to defend your app against XSSI, but it still requires careful thinking. You can use tokens as explained in the XSRF section, set your script to answer only POST requests, or simply start the JSON response with ‘\n’ to make sure the script is not executable.

SQL Injection - Still think user input is safe?

What will happen if I try to sign in to your app with a username like
JohnDoe’; DROP TABLE members;--

While this specific example won’t expose user data, it can cause great headaches because it has the potential to completely remove the SQL table where your app stores information about members.

Generally, you can protect your app from SQL injection with proactive thinking and input validation. First, are you sure the SQL user needs to have permission to execute “DROP TABLE members”? Wouldn’t it be enough to grant only SELECT rights? By setting the SQL user’s permissions carefully, you can avoid painful experiences and lots of troubles. You might also want to configure error reporting in such way that the database and its tables’ names aren’t exposed in the case of a failed query.
Second, as we learned in the XSS case, never trust user input: what looks like a login form to you, looks like a potential doorway to an attacker. Always sanitize and quotesafe the input that will be stored in a database, and whenever possible make use of statements generally referred to as prepared or parametrized statements available in most database programming interfaces.

Knowing how web applications can be exploited is the first step in understanding how to defend them. In light of this, we encourage you to take the Gruyere course, take other web security courses from the Google Code University and check out skipfish if you're looking for an automated web application security testing tool. If you have more questions please post them in our Webmaster Help Forum.




Generated by BlogIt

BlogIt - Auto Blogging Software for YOU!

BlogIt - autoblogging software for YOU

BlogIt - autoblogging software for YOU

36 High Quality Templates & Tutorials To Design Business Website

It’s a solid fact that real world companies have been trying very hard to infuse their brand into the web, due to the popularity of the internet. Apple knows about that, Coca-cola knows about that, even local fresh mart near my home knows about that.


For giant corporation like Nike, they can probably invest a small part of their fund to hire top-notch web designer to build an epic site, but for small companies without funds and design experience, it will be a crucial challenge for them to get their website existed online with nice design and functionality.


business templates 36 High Quality Templates & Tutorials To Design Business Website


This post exists to solve this problem. Here we’ve collected 35 high quality resources which include WordPress themes, HTML templates, PSD mockups and even step-by-step tutorials to help you build a website that meets your business need. You can either download, work on a bit and put it online directly, or hire a web designer to perform the customization until it fulfills your company’s need.


Meanwhile, you can visit some of our collection posts to get more quality design resources:





HTML/CSS Templates


Art of Business


Designed by Template Monster, Art of Business provides you a completely professional corporate environment to showcase your company and products. I must say that the quality of this template exceeds most templates found in premium market.


art of business 36 High Quality Templates & Tutorials To Design Business Website


Corporattica


Another very high quality site template built with brilliant typography, great color scheme, and professional content slider.


corporattica 36 High Quality Templates & Tutorials To Design Business Website


Euphoria


Although the site is originally designed for personal work showcase, the site design itself suits very well for business site also.


euphoria 36 High Quality Templates & Tutorials To Design Business Website


First


First stands out from common business templates with its fresh, creative and elegant design, making it a great choice for business user.


first 36 High Quality Templates & Tutorials To Design Business Website


High Technologies


Just as its name suggests, IT Technologies is perfect for company related with tech.


high technologies 36 High Quality Templates & Tutorials To Design Business Website


Industrial Services


Here you go, a HTML5 powered, professionally designed layout with brilliant typography and corporate color scheme.


industrial services 36 High Quality Templates & Tutorials To Design Business Website


IT Technologies


Another nicely designed template which suits perfectly to tech-related company.


it technologies 36 High Quality Templates & Tutorials To Design Business Website


Lawyer And Attorney


While most business templates are designed with bright color scheme, Lawyer and Attorney offers you a dark yet elegant layout to showcase your company or service.


lawyer and attorney 36 High Quality Templates & Tutorials To Design Business Website


Mondays


If you are tired of business templates with heavy graphic and color scheme, Mondays probably meets your minimalistic needs with its clean and fresh design.


mondays 36 High Quality Templates & Tutorials To Design Business Website


Smart Biz


Smart Biz is an universal business template with modern touch, which makes it compatible to most kind of business.


smart biz 36 High Quality Templates & Tutorials To Design Business Website


WordPress Themes


Boldy


Boldy is a professional WordPress theme released exclusively by Site5 for business user. It includes WordPress-specific features such as image slider, real-time contact form and Twitter integration.


boldy 36 High Quality Templates & Tutorials To Design Business Website


Genoa


Genoa is a business-oriented WordPress theme designed with simplicity and elegance in mind. It also includes built-in page templates to allow you to change the way the content looks with different layouts.


genoa 36 High Quality Templates & Tutorials To Design Business Website


Simplybiz


Just as its name, Simplybiz impresses your site visitor with its simplicity and professionalism. The theme also contains large shortcode collection which makes your works even simpler.


simplybiz 36 High Quality Templates & Tutorials To Design Business Website


Webfolio


Webfolio comes with ads support, content slider and even Flickr photostream, absolutely a feature-rich theme for your various business needs.


webfolio 36 High Quality Templates & Tutorials To Design Business Website


Wise Business


Released by the same company that publishes Webfolio, Wise Business comes with business friendly features like testimonials page templates and real-time contact form with email validation.


wise business 36 High Quality Templates & Tutorials To Design Business Website


PSD Templates


Hongkiat Exclusive: Polo360


Released exclusively by our site, Polo360 is suitable for a wide range of site like portfolio, product page or main business site. The best part of this Photoshop template is it comes with home page, about page, service page, portfolio page, and contact page design, almost everything you need to build a complete website.


polo360 36 High Quality Templates & Tutorials To Design Business Website


Hongkiat Exclusive: Business


Yes, another high quality business template released by our site. The design features a clean, slick and professional layout ideal for modern company. The template also comes with necessary page design like home page, service page and portfolio page.


business 36 High Quality Templates & Tutorials To Design Business Website


Corporatix


Designed by GraphicsFuel, Corporatix is a modern business template with completely slick and creative design. Although it looks quite complicated, graphic layers inside the template are well-organized for your easier customization.


corporatix 36 High Quality Templates & Tutorials To Design Business Website


Crims Nite


Crims Nite has a completely different design approach with common business template by judging on its color scheme, so it’s suitable for business user who prefers a very different look to his/her company’s site.


crims nite 36 High Quality Templates & Tutorials To Design Business Website


Exponet


Exponet is a well designed Photoshop template available to you with a home page and an about page design.


exponet 36 High Quality Templates & Tutorials To Design Business Website


Handmade


Produced by Web Designer Raid, Handmade is another very slick Photoshop layout perfect for business site.


handmade 36 High Quality Templates & Tutorials To Design Business Website


Interpoint


A Photoshop business template built with simplicity and elegance in mind.


interpoint 36 High Quality Templates & Tutorials To Design Business Website


Openmint


Besides its clean and modern layout, Openmint includes a content part in the footer area that features company’s partners, which is greatly desired by most companies.


openmint 36 High Quality Templates & Tutorials To Design Business Website


Product Layout


Product layout is actually a freebie released by HVDesigns, followed by the tutorial that teaches how to create this slick layout.


product layout 36 High Quality Templates & Tutorials To Design Business Website


Purios


An one page Photoshop layout with elegance applied, looks simply nice.


purios 36 High Quality Templates & Tutorials To Design Business Website


Terrion


This free advanced Photoshop template is purposefully designed to suit portfolio, agency or business site.


terrion 36 High Quality Templates & Tutorials To Design Business Website


Tutorials


Create A Business Website Design


Guided by Journey Digital Media, this tutorial will show you the detail to design a clean and solid fictional business layout. You can download the finished result as a Photoshop file as well.


business website design 36 High Quality Templates & Tutorials To Design Business Website


Create A Detailed Portfolio Homepage Design In Photoshop


Let the First Web Designer teaches you the true way to create a slick home page design well-suited for portfolio and business use.


create detailed portfolio homepage 36 High Quality Templates & Tutorials To Design Business Website


Create A Professional Web 2.0 Layout


Published by web design giant PSDTuts, this tutorial will guide you to create a web 2.0 layout with many Photoshop techniques mentioned.


create professional web20 layout 36 High Quality Templates & Tutorials To Design Business Website


Create A Sleek, Corporate Web Design


From design to coding, you get to create a complete site template with corporate feel in this guided video series.


create sleek corporate web design 36 High Quality Templates & Tutorials To Design Business Website


Create A Stylish Design Agency Website


An easy to follow tutorial to produce a business site that stands out from other designs.


create stylish agency website 36 High Quality Templates & Tutorials To Design Business Website


Create An Amazing Personal Website From Scratch


Yet another comprehensive tutorial that teaches you to create a website from scratch with just shapes, layer styles and fonts. The result design of the tutorial suits very well to business site too.


create amazing personal website 36 High Quality Templates & Tutorials To Design Business Website


Create An Extremely Simple Dark Web Design in Photoshop


Here comes a rare tutorial that walks you through the process of creating a dark-theme website layout which features an almost pitch-black color theme with some glowing elements for contrast.


create dark web design 36 High Quality Templates & Tutorials To Design Business Website


Create Fantastic Landing Page


With proper use of spacing, typography and colors, you can create a professional landing page like below, just follow the tutorial!


create fantastic landing page 36 High Quality Templates & Tutorials To Design Business Website


Design A Beautiful Website From Scratch


From Nettuts, this tutorial will show you how to create a beautiful website with a modern touch.


design beautiful website 36 High Quality Templates & Tutorials To Design Business Website


Design A Clean Business Website


While most tutorials teach you to create a color-rich layout, this tutorial focuses on creating a very clean yet professional design for portfolio or small business use.


create clean business website 36 High Quality Templates & Tutorials To Design Business Website


Reflection


Although WordPress themes and site templates showcased here can be put online directly, I strongly recommend business owner to hire a web designer to perform customization until the template matches your brand like logo, color scheme, etc. After all, a great web design should not just look good or function well, but represent the precious brand and the very purpose of the company.


We are willing to hear what you think about these business templates, and possibly your favorite template from this showcase post, sincerely thanks.



Generated by BlogIt

BlogIt - Auto Blogging Software for YOU!

BlogIt - autoblogging software for YOU

BlogIt - autoblogging software for YOU