<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pete Shanahan&#039;s Shack</title>
	<atom:link href="http://www.petesh.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.petesh.com</link>
	<description>If it wasn&#039;t for carbon-14, I wouldn&#039;t date at all</description>
	<lastBuildDate>Fri, 09 Mar 2012 19:36:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Is that a password in your pocket&#8230;</title>
		<link>http://www.petesh.com/archives/2012/03/is-that-a-password-in-your-pocket/</link>
		<comments>http://www.petesh.com/archives/2012/03/is-that-a-password-in-your-pocket/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 19:36:19 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[client-side]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.petesh.com/?p=759</guid>
		<description><![CDATA[I’ve seen it again and again… a developer wants to access some restricted data over the internet in a client application, but is unwilling to use a per-user login to access the data. As a result, they embed&#160; a password into the application. Then they discover that the password is readable via some mechanism once [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve seen it again and again… a developer wants to access some restricted data over the internet in a client application, but is unwilling to use a per-user login to access the data. As a result, they embed&#160; a password into the application. Then they discover that the password is readable via some mechanism once the application is on the client. Developer scratches their head and tries to figure out how to secure the password. Developer gets frustrated as people say ‘that doesn’t work’.</p>
<p>Fundamentally, you are trying to hide a secret in a client application. There is a long history of trying to do this in applications. It forms the basis for pretty much all forms of application protection – and it is fundamentally impossible. If there is everything you need to run an application on a system, it just requires a certain amount of effort to determine the secret. The amount of effort varies, but in general it is a continual fight between the developer and the person trying to determine the secret.</p>
<p>Mechanisms have been developed to try and make the secret ‘something you have’. One of the earlier disk-based methods was to have ‘malformed’ sectors on a floppy drive that needed to be read. These sectors were only ‘malformed’ in that they were laid on the disk in a method that made them difficult to read normally. The sectors that were read became part of the code that was used to execute the application.</p>
<p>The fix to this form of protection was to read the protected content from an original and then putting this data into a new copy of the program, replacing the invalid content with this good data, and then skip/remove the code that performed the read of the drive data into that location.</p>
<p>An extension to this protection was to actually encrypt the code that is loaded from disk, and then decrypting it at execution time – the encryption varied from simple byte-level xor-based to more fancy xor with rotate. Typically this decryption code butted up to the decrypted code (sometimes even overlaying it), preventing you from setting a breakpoint at the first instruction following the decryption code). Solving this problem involved manually decrypting a few bytes (which at the time was a pen-and-paper operation), and then starting the decryption from the subsequent instructions. Sometimes easy, sometimes more difficult. This would typically be used in conjunction with the ‘special’ media to give a dual layer of protection.</p>
<p>Another mechanism was the hardware dongle. An oft-loved feature of expensive software, it typically embedded some data on the dongle that was necessary for the use of the application. Without the dongle, the application was useless. Some even went so far as to corrupt the data created from the application if the dongle was not present – e.g. straight lines would no longer be quite straight following a save-load cycle, making the files deteriorate following the transition (I think Autocad used this method).</p>
<p>The issue with hardware-based mechanisms is that they have a high cost associated with them on a per-unit basis. A quick search revealed a per-unit cost of €25 for low order quantities, which would need to be added into the cost of the application. In other words, this can quite often not be an appropriate for software which has a low price goal.</p>
<p>For any of these mechanisms, if someone obtained only one part of the solution (application without special disk/dongle) then a well written protection would mean that the application was unusable without the second part. Poorly written protections would use perform a simple test against the special item, and not actually make use of any of the underlying data from it. In general, once you have all the items that are needed for the running of the application all that mattered after that was skill and time.</p>
<p>Special media, encryption, dongles, packers, obfuscation, anti-debugging tricks are many of the tools that have been used to secure applications.</p>
<p>What has this got to do with the opening paragraph? Well quite a bit, actually. The developer needs to store some kind of secret in the application. This secret can be anything, but in general it is some form of key to gain access to some form of resource. Nowadays, the application is not going to be shipped with any physical media – after all, this is the 21st century, and the use of physical media is archaic. This tends to rule out special media and dongles from the mix.</p>
<p>This leaves encryption, packers, obfuscation and other anti-debugging tricks. There are some very good solutions out there for the packer/encryption/anti-debugging. A quick Google for ‘<a href="https://www.google.com/search?q=executable+packer+anti-debugging">executable packer anti-debugging</a>’ yielded some <a href="http://www.symantec.com/connect/articles/windows-anti-debug-reference">interesting results</a>. It’s a fun and interesting area, where the developer is trying to outwit the villainous cracker. Some of the solutions are commercial – adding to the cost of application development, and reducing the ability to debug the application when deployed in the field. These generally are decisions that need to be made by the developer when deciding how to proceed to protect their application.</p>
<p>You have to do the math on it. If the cost of developing and implementing the protection exceeds the overall value that you have placed on the application then you simply cannot afford to spend time, effort and money on a solution that will cost you more than you will ever make.</p>
<p>The big take from this is that if you have a secret that you want to keep safe, don’t put it in the application – all that will accomplish is to keep it temporarily out of view. The truly wily hacker will be able to get it; and if the secret is a password to one of your important on-line accounts; then you should think of some other way to mediate access to the resource.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2012/03/is-that-a-password-in-your-pocket/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playstation Vita</title>
		<link>http://www.petesh.com/archives/2012/02/playstation-vita/</link>
		<comments>http://www.petesh.com/archives/2012/02/playstation-vita/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 08:59:07 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[Handheld]]></category>
		<category><![CDATA[playstation]]></category>
		<category><![CDATA[portable]]></category>
		<category><![CDATA[vita]]></category>

		<guid isPermaLink="false">http://www.petesh.com/?p=752</guid>
		<description><![CDATA[The Playstation Vita was launched in the last week this side of the pond, so I decided to see what it was like. I had bought the original PSP when it first came out a few years ago, but I had stopped using it since the advent of the iPod and other mobile devices – [...]]]></description>
			<content:encoded><![CDATA[<p>The Playstation Vita was launched in the last week this side of the pond, so I decided to see what it was like. I had bought the original PSP when it first came out a few years ago, but I had stopped using it since the advent of the iPod and other mobile devices – that and the fact that I end up with so much electronic stuff to carry around that it&#8217;s not a joke.</p>
<p>I went and bought the Wi-Fi model. This was because I really did not want to get another mobile data contract device while I have phones and other devices that are capable of taking up the slack. That saved me a few quid on the purchase price, but that saving was nearly doubled as it was a ‘returned item’, the previous purchaser had actually wanted one with 3G, but had made the wrong purchase. I did not think that it was going to be an Internet device on the go, but more of the traditional gaming handheld.</p>
<p>One of the first things you have to do is purchase a memory card – these systems cannot be used without an add-on card if you want to do anything complicated like, say, save a game. Rather than splashing out for a luxuriant 8gb card, I went for a 4gb model – enough for a few movies, a few downloaded games, and space for storing all that necessary data. These cards are not the traditional Sony memory stick model, so you can’t go about plugging them into a PC to see what’s bee transferred to them to make a quick copy – all transfers take place using the content management software, which can be downloaded from the web, or installed from the device itself (which almost immediately needs to be updated to make it work).</p>
<p>Additionally I bought a copy of Uncharted in the store – I’m a sucker for those Nathan Drake adventures, although I really should get to finish Uncharted 3 sooner rather than later – I just got caught at one of those interminable shooting scenes where you need to have the memory of a Demon’s Souls player to make sure you can maneuver your way through the scene. But enough of the complaining about that.</p>
<p>Configuration of the device was quite simple. Starting it up caused it to ask a few questions, then prompt you to connect to the PlayStation Network (soon to be Sony Entertainment Network). This triggered a connection to a local wireless network (using WPA2, so it wins against the original PSP), which supported the standard ‘type in the key’ mechanism or to use WPS or AOSS, which makes connection trivial. Once I had connected to the PlayStation Network, it allowed me to activate my Vita against the account, allowing me to download and play games on the system.</p>
<p>I downloaded a demo copy of ‘Lumines’, which I decided I would try out in transit – some people had been giving great recommendations about it and I could to with a little puzzle game.</p>
<p>I wanted to put a couple of albums and a few movies on the device, which entailed installing the ‘Connection Manager’ software on my PC – I could have transferred media from my PS3, but I didn’t actually have any to make that a goer (I use DNLA for all my media in the apartment, it saves copying things around, and for the most part just works). Installing the software on the PC required downloading it from the internet, as the ‘install from Vita’ option just didn’t seem to work for me. Installation took a little time, and then end product was another icon on the notification area (guys, isn’t there a better way to accomplish this any more????). The software seems to not take advantage of the Library feature of Windows 7, so I had to copy files into a fixed location to make them work with the transfer agent.</p>
<p>Once the agent is running, and you tap on the connection manager icon on the Vita, you can transfer movies and music from your PC – I installed 3 albums a couple of TV episodes. Transfer time seemed to be about on-par with an iPod, but there is some form of ‘database rebuild’ thing that takes place which I can see being very slow if you have a large collection of media on your PC; I don’t expect anyone’s library to get too large when using the Vita – after all the cards do not hold that much once you’ve added in a couple of GB for games, and the system doesn’t have any built-in storage for anything more than a small amount of data. I understand that the devices’ price point is intended to keep the amount of internal storage low, but not putting at least a few GB of internal storage on the system is a little bit silly; plus every time you want to change the card, the system requires a reboot. Hopefully this model can be improved in the future, as in this day and age, having to do something like that with a card that looks like it should be ‘poppable’ at any time is quite jarring.</p>
<p>On to using the device. I played about 30 minutes of Uncharted, which was fun, mind you some of the touch items such as the charcoal rubbings were slightly difficult to accomplish if you were stroking the front of the screen while trying to hold the device in your hands. Stereo output from the device itself is quite good, the position of the speakers facing the user allows for better direction of the audio. I didn’t check to see what the level of audio leakage was like to the environs, but in a crowded area, I could easily see the sound becoming an irritation.</p>
<p>Screen quality is excellent, lovely bright colors that could easily be seen in these cloudy climes. Pretty much everything on the device is managed from touch access to the front screen – when an application has something to say, it’s icon pulses and wobbles to grab your attention. An interesting approach to catching your attention, but I’m sure if they were all vying for your attention you would quickly become overwhelmed. Barring the PS button, none of the buttons on the device have any use on the home screen. This is an interesting design, as it allows for a system that doesn’t have an explicit focus-cursor. Unfortunately, it is a little bit tricky at times to determine what is clicky, and what is not – help icons look like little bubbles with question marks, and menus generally have a disclosure icon (a &gt; mark), or a check box to select them. Selection of check-boxes requires clicking only on the checkbox, while selection of disclosure items allows clicking anywhere on the line – this is a little bit of a user interface inconsistency that one hopes will be addressed in the future. I presume this is because the text and the check-box are actually separate user interface elements, and that you can have multiple items dangling off the end of the line, but in the case that there is a single item present on the line, it would make more sense that the entire line become the action for that item, rather than requiring the hitting of the smaller target-area.</p>
<p>When using the Vita on the train, I plugged in a set of head-phones which connected to the bottom of the device. It seems to be the only practical location for them so that cabling does not cause an issue for the screen (dangling from the top), the rear-touch pad (dangling off the back), or your hands (dangling from either side). This was fine while playing games, as the device was held in-hand for all the time.</p>
<p>Then I went to watch a TV show on it, and the position of the headphones made it difficult to place the device flat on any surface to watch it so I ended up holding it in-hand for the duration of the show. This is not an ideal position, as holding it stationary like that for an extended period without other interactions was quite fatiguing. With Bluetooth, though, you could use the device without having a connected headphone cable, and thus you could place the device on a flat surface for viewing. Now if only I could obtain a set of Bluetooth headphones that are a reasonable fit (gone through several pairs, and they’ve been inconsistent at best). The show viewing experience was fine; the colors were bright and vivid, but overall I would expect to enjoy more interactive experiences – the screen is just that little bit too small to enjoy at more than hand-held distance.</p>
<p>Charging the device means carrying around another power-brick, which really does not interest me, so I attempted to use either the iPhone or iPad power bricks. The Vita refused to charge from these devices. I don’t know if it is a Sony Vs. Apple thing, but guys please stop doing this!! Nobody is interested in carrying around another proprietary power brick when you have several others that you carry round by default. I bring my iPad charger as it supplies sufficient juice for all my devices, but if I have to carry around another charger for the Vita then I just get annoyed.</p>
<p>There is an option in the system menu that allows you to charge the device from USB, but this means that it will charge from the USB port on a PC when the device is <em>powered-off</em>, not when it is simply in standby mode. I presume this is to prevent system interaction while connected to USB in order to charge, but over-all the experience is less-than-ideal.</p>
<p>Once I got the device charged again, I used it on the return journey, and decided to devote as much time as possible to the Vita on the return journey. One 45 minute TV show, and gaming for the remainder of the journey. I got about 3h15m of use out of it before it prompted me that there was a ‘low battery level’. It looked like about 15% battery life by that point – I’m sure I could have probably got another 45 minutes out of it before it died completely, but I played on until my next checkpoint and then just put it to sleep. There seems to be a big margin for the battery once the warning appears; enough to finish up what you’re doing with some time to spare. The only complaint I had at the end of the gaming session was that the joints on my fingers hurt, which is something that happened with the PSP as well. I think that shorter gaming sessions on the device would be warranted to prevent this fro turning into something more serious.</p>
<p>There seem to be some minor hiccups on the WiFi connections, though. I’ve had a few times when it has just not connected to the wireless network, even though everything else in the area is able to connect without issue. This is generally transient as it seems to pick up the connection the second time round. I was trying to use the WiFi on the train, which uses an open access point, with a log-on screen. This works well on laptops and most modern phones, but for the Vita it simply didn’t work – I was told that the connection had failed and that was the end of it. This is something that needs addressing in the future.</p>
<p>Game prices on the PlayStation store are about €5 cheaper than buying them in the store – I presume the added mark-up is for the box and the media that it comes with; I don’t know if you can trade the media-based games once they have been played on your registered Vita. The versions bought in the on-line shop are most definitely tied to your account. Game prices are about 2/3 that of console games, which can add up to quite a chunk of change if you’re buying a lot of them. It is quite annoying that I can’t use any of my old PSP games on the new Vita, nor can I use any of my original PSone games that I downloaded on my PS3 – even though there is an option to transfer them to my Vita, there seems to be no actual way to get them onto it.</p>
<p>For a hand-held device, it’s price is a little on the high-side (€250). It features a proprietary memory-card device that is, relatively to other memory devices, quite pricy (€20, €35 and 50 for the 4, 8 and 16GB models), then the games are between €35 and €50 depending on where you purchase them. Before walking out the store with your new device, you would end forking out at least €305 for the bare essentials – device, minimum sized card, and one low-price game. That’s not a small chunk of change.</p>
<p>Overall, if you’ve got the spare change to put down on another expensive Sony device that could easily prove a White Elephant, then go ahead; otherwise I’d wait for the re-sale market where you should be able to pick one up for cheap once the initial lustre has worn off.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2012/02/playstation-vita/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Duelling birthdays</title>
		<link>http://www.petesh.com/archives/2012/02/duelling-birthdays/</link>
		<comments>http://www.petesh.com/archives/2012/02/duelling-birthdays/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 22:11:11 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Complaints]]></category>
		<category><![CDATA[Birthday]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[contacts]]></category>
		<category><![CDATA[off-by-one]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[whinge]]></category>

		<guid isPermaLink="false">http://www.petesh.com/?p=750</guid>
		<description><![CDATA[It’s definite, and I think the culprit is my calendars on windows live… Or maybe it’s the calendars on google, but it’s definitely not the calendar on my phone, which is freaking bizarre. I like to maintain birthday calendar entries for my friends and family. I’ve been doing this since I got a palm PDA, [...]]]></description>
			<content:encoded><![CDATA[<p>It’s definite, and I think the culprit is my calendars on windows live… Or maybe it’s the calendars on google, but it’s definitely not the calendar on my phone, which is freaking bizarre.<br />
I like to maintain birthday calendar entries for my friends and family. I’ve been doing this since I got a palm PDA, and it had been reasonably effective at maintaining this information between my one PDA and my one single calendar on my PC. Several years ago I signed up for a Plaxo, and for a brief time all my disparate calendars got synchronised with one another. Then I started to notice that birthdays ended up off by a day. Regularly they were off by a day, and it just seemed to happen as if ‘by magic’ — one day the sync would happen and the day would be off. I never noticed it until well after the change happened.<br />
Phones come and go, but the plethora of services I use has only got worse. I currently have 3 primary address books &#8211; Windows Live, Google and iCloud. Far and away, my most preferred is iCloud, but that address book will not migrate to any android or windows mobile devices I have. The reason for this is that it seems to support more numbers per contact than all the others, supports separating out all the mechanisms for contacting them like IM and Skype handles. The others do some insane form of remapping of the contact number, yielding multiple conflicting types of contact detail all mapping to the same piece of information, e.g. I will end up with ‘iPhone’ and ‘mobile’ entries for someone all mapping to the same phone number, complicating the contact information no-end.<br />
Then there’s the birthday problem. I store a birthday in the phone, and for the contact on Windows live it seems to drift by a day, I don’t know if this is cumulative, but it really is nutso — there is no reason for a date to drift away like that; I mean let’s be honest about this, they should be stored recording the day and month, and optionally the year (truth be told, we don’t want to all reveal how ageing we are these days).<br />
So on my last examination of contact information for my niece, it turns out that it had drifted her birthday by a day for one address book, but kept it the same for all the others… It is seriously making me consider dropping the other address books for a consistent one, but the my address book on non iCloud supporting devices is a bit of a deal breaker, which is why I try to keep them in sync. Maybe I’ll try a wipe and restart again; I’m sure that I’ll lose nothing in the process… and if you believe that, I have this wonderful bridge I’d like to sell you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2012/02/duelling-birthdays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Posting from the WordPress application on the iPad</title>
		<link>http://www.petesh.com/archives/2012/01/posting-from-the-wordpress-application-on-the-ipad/</link>
		<comments>http://www.petesh.com/archives/2012/01/posting-from-the-wordpress-application-on-the-ipad/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 14:30:09 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.petesh.com/?p=734</guid>
		<description><![CDATA[This is just a simple little test of the WordPress application for the iPad. It seems quite nice and easy to work with. Hopefully it will prompt me to post more than once a year.]]></description>
			<content:encoded><![CDATA[<p>This is just a simple little test of the WordPress application for the iPad. It seems quite nice and easy to work with. Hopefully it will prompt me to post more than once a year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2012/01/posting-from-the-wordpress-application-on-the-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raw data</title>
		<link>http://www.petesh.com/archives/2012/01/raw_data/</link>
		<comments>http://www.petesh.com/archives/2012/01/raw_data/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 22:19:28 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Complaints]]></category>

		<guid isPermaLink="false">http://www.petesh.com/wp/?p=720</guid>
		<description><![CDATA[Most of the times you experience data it has been massaged, interpreted and analyzed. This is a side effect of having so much data to process, and also having an agenda. We see papers regularly, with attached shiny graphs and tables. ehmmm, yeah, nice shiny graphs; pretty distracting, but not actually revealing the underlying information. [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the times you experience data it has been massaged, interpreted and analyzed. This is a side effect of having so much data to process, and also having an agenda.<br/><br />
We see papers regularly, with attached shiny graphs and tables. ehmmm, yeah, nice shiny graphs; pretty distracting, but not actually revealing the underlying information.<br/><br />
What I want is a link under every one of those damned graphs linking to the raw data.<br/><br />
Not much to ask for &#8211; raw unfiltered research data. I mean really??</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2012/01/raw_data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhones, activation and identifiers</title>
		<link>http://www.petesh.com/archives/2011/11/iphones_activation_and_identif/</link>
		<comments>http://www.petesh.com/archives/2011/11/iphones_activation_and_identif/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 22:26:56 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Apple iPhone]]></category>

		<guid isPermaLink="false">http://www.petesh.com/wp/?p=719</guid>
		<description><![CDATA[As I was talking to my mother on my phone this evening it was literally taken from my hand. My sister is currently in hospital, and I was reassuring her that things were going to be OK. When the phone was stolen, she literally was about to have a heart attack until I could get [...]]]></description>
			<content:encoded><![CDATA[<p>As I was talking to my mother on my phone this evening it was literally taken from my hand. My sister is currently in hospital, and I was reassuring her that things were going to be OK. When the phone was stolen, she literally was about to have a heart attack until I could get to a phone and call her back to reassure her that nothing had happened.<br />
<br/><br />
It was an iPhone. You cannot use an iPhone without activating it with Apple.<br/><br />
I want it to scream to the world that it was stolen. Every time it is able to make a data connection it should recognize that it is stolen and say &#8216;fuck you, I&#8217;m not working until you return me to my proper owner&#8217;. That&#8217;s what I want.<br/><br />
If a developer ever finds an iPhone 4S that returns a device identifier of efd79415f51aa99472c5149aa46b0897def18f9b, then know that it is stolen, and that they should return it to a cop-shop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2011/11/iphones_activation_and_identif/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>portable UI tip #1</title>
		<link>http://www.petesh.com/archives/2011/04/portable_ui_tip_1/</link>
		<comments>http://www.petesh.com/archives/2011/04/portable_ui_tip_1/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 08:44:25 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Complaints]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.petesh.com/wp/?p=715</guid>
		<description><![CDATA[if there is a blinking caret in the field then show a keyboard. There is nothing more annoying than having to &#8216;repick&#8217; the text field that is currently active, with the blinking caret what are you thinking android? focus is something explicit, not implicit. You do not have to have an active control on a [...]]]></description>
			<content:encoded><![CDATA[<p>if there is a blinking caret in the field then show a keyboard. There is nothing more annoying than having to &#8216;repick&#8217; the text field that is currently active, with the blinking caret<br />
<br/><br />
<br/><br />
what are you thinking android? focus is something explicit, not implicit. You do not have to have an active control on a form at all times. that and the fact that the keyboard is very tough to get rid of when you want to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2011/04/portable_ui_tip_1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu netbook edition&#8230; Not for amateurs</title>
		<link>http://www.petesh.com/archives/2011/03/ubuntu_netbook_edition_not_for/</link>
		<comments>http://www.petesh.com/archives/2011/03/ubuntu_netbook_edition_not_for/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 15:59:36 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Complaints]]></category>

		<guid isPermaLink="false">http://www.petesh.com/wp/?p=714</guid>
		<description><![CDATA[So this afternoon I was at a friend&#8217;s house trying to get his ubuntu netbook working with a broadband dongle. It just refused to connect, and on failure displayed a notification dialog that basically read &#8216;did not work&#8217;. Once this dialog appears, the only way to reattempt a connection is to unplug and replug the [...]]]></description>
			<content:encoded><![CDATA[<p>So this afternoon I was at a friend&#8217;s house trying to get his ubuntu netbook working with a broadband dongle. It just refused to connect, and on failure displayed a notification dialog that basically read &#8216;did not work&#8217;. Once this dialog appears, the only way to reattempt a connection is to unplug and replug the broadband dongle, as &#8216;networkmanager&#8217; disables the connection when it fails.<br/><br />
There were logs &#8211; the fine syslog.log file, which is almost completely useless for diagnosing the failure in the connection &#8211; it seems to be telling me that the connection succeeded, but then was immediately disconnected. About as useful as a slap in the face with a wet haddock.<br/><br />
armed with my iPhone I first attempted to ensure that the connection details were correct. The management tool added the settings, so I immediately did not trust them. Google pointed out some options, but every time the connection failed there was another 30+ second delay unplugging, replugging and reentering the PIN (it ignored the pin option in the network manager configuration).<br/><br />
I fired up my laptop running Windows. It installed the management tool, I looked at the settings, shouted at both the Internet and the ubuntu configuration, both of which were telling complete lies about the settings. Here&#8217;s a hint for all you mobile broadband providers &#8211; make the settings easily findable using google &#8211; there is a lot of outdated and completely invalid information out there that makes this an issue.<br/><br />
so, ultimately, a problem that I struggled with for quite a while under ubuntu was solved in less that 30 seconds under windows, and yet another reason why I think that NetworkManager is a thing of satanic horror that makes using computers under Linux a complete pain in the arse. This &#8216;solution&#8217; is probably the singularly worst example of dumbing down configuration to the point when something goes wrong, it is practically impossible to diagnose or fix the problem.<br/><br />
In this case, I will have to say&#8230; progressive disclosure is a good potential solution to complicated user interfaces. The complete excision of all forms of configuration into the magical tool of automagic only works if it works all the time, and as a friend is fond of saying &#8220;If you design a system that it cannot fail then the first thing that happens is that it will.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2011/03/ubuntu_netbook_edition_not_for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securely loading libraries (Linux)</title>
		<link>http://www.petesh.com/archives/2010/08/securely_loading_libraries_lin/</link>
		<comments>http://www.petesh.com/archives/2010/08/securely_loading_libraries_lin/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 22:39:47 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.petesh.com/wp/?p=709</guid>
		<description><![CDATA[Now that I&#8217;ve said loading libraries in Linux is insecure, let&#8217;s just cursorily examine how that is&#8230; I require a digitally signed .so. Being a decent sort of chap, I&#8217;ve decided to allow it to exist in a foo.so.signature file, alongside the library foo.so. it means that I don&#8217;t need to add it to the [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve said loading libraries in Linux is insecure, let&#8217;s just cursorily examine how that is&#8230;</p>
<p>I require a digitally signed .so. Being a decent sort of chap, I&#8217;ve decided to allow it to exist in a foo.so.signature file, alongside the library foo.so. it means that I don&#8217;t need to add it to the binary in another section of the .so. This generally complicates signature checking &#8211; you need to check the signature of the binary, while excluding the section containing the signature, which could itself be a mechanism for getting code into the system. This can be ameliorated by enforcing a size restriction on the signature section, but have you seen some of the code these days? it&#8217;s really fricking small.</p>
<p>the standard mechanism for loading foo.so, is to use the dlopen() call. Once you have completed this call any .init section of the library has been executed. you are pwned.</p>
<p>You need to open() the file, open() the signature. Compare the signature to the content of the file (you can use mmap(MAP_PRIVATE) to ensure that changes to the underlying file do not affect the contents of your memory. Then you re implement dlopen(), alowing it to take either a file descriptor or a raw handle to memory and a size&#8230; it&#8217;s your call</p>
<p>Feckers, not making linux secure by default&#8230; oh, wait, this has existed since before linux&#8230;</p>
<p>Security is an ever developing process. the APIs need to evolve with the threats.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2010/08/securely_loading_libraries_lin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is that a DLL in your pocket&#8230;</title>
		<link>http://www.petesh.com/archives/2010/08/is_that_a_dll_in_your_pocket/</link>
		<comments>http://www.petesh.com/archives/2010/08/is_that_a_dll_in_your_pocket/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 22:10:23 +0000</pubDate>
		<dc:creator>pete</dc:creator>
				<category><![CDATA[Complaints]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.petesh.com/wp/?p=708</guid>
		<description><![CDATA[Shock! Horror! Bug found where Windows applications will open DLLs that are in the current working directory of a process! Except it&#8217;s not a bug. It&#8217;s by design, and it&#8217;s existed since NT. Microsoft is being smacked in the head by a required feature of Windows due to the initial weakness of the LoadLibrary call. [...]]]></description>
			<content:encoded><![CDATA[<p>Shock! Horror! Bug found where Windows applications will open DLLs that are in the current working directory of a process!</p>
<p>Except it&#8217;s not a bug. It&#8217;s by design, and it&#8217;s existed since NT.</p>
<p>Microsoft is being smacked in the head by a <b>required feature</b> of Windows due to the initial weakness of the <a href="http://msdn.microsoft.com/en-us/library/ms684175%28VS.85%29.aspx">LoadLibrary</a> call. If you don&#8217;t specify a path to the file to load, it uses the <a href="http://msdn.microsoft.com/en-us/library/ms682586%28v=VS.85%29.aspx">standard library search path</a>.</p>
<p>Dear god, you would think that this was news. It is not news, nor has it been since the goddamned operating system shipped. Granted, the issue is severe, but the fact of the matter is if an application is executed using a working directory that isn&#8217;t under your control, then what can you do? if there are libraries in the same directory that launched the program that happen to share the name of system libraries then you&#8217;re hosed.</p>
<p>Hey, guess what asshole, if you link a linux binary with a search path containing &#8216;.&#8217;, then you get the same problem. It&#8217;s just as well that nobody links their binaries with -R. &#8230;. eh?</p>
<p>The documentation is blatant in this regard. I&#8217;ve known it was a security issue since I first learned of the LoadLibrary call, as any even half decent developer should have known when they started using the damned function.</p>
<p>The rule is simple. Resolve the full path to a library before you load it. Validate that it &#8216;looks right&#8217; at that point. Then load it.</p>
<p>BTW .init section in .so files &#8211; so totally a security hole. You can&#8217;t dlopen a file to determine if it&#8217;s good without executing the .init code. Game over man, game f**king over!</p>
<p>My .init code does a setenv(&#8220;LD_LIBRARY_PATH&#8221;, &#8220;.&#8221; + getenv(&#8220;LD_LIBRARY_PATH&#8221;)) &#8230; now piss off and write secure code for once&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.petesh.com/archives/2010/08/is_that_a_dll_in_your_pocket/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.223 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-15 01:58:19 -->
<!-- Compression = gzip -->
