missing - Dave's Blog

Search
My timeline on Mastodon

Tweet from David_Risney

2015 Nov 9, 9:28
Missing planet Vulcan predicted by Newtonian physics+Mercury's orbit. Decades of mistaken Vulcan sightings before GR http://www.theatlantic.com/science/archive/2015/11/science-doesnt-work-the-way-you-think-it-does/414744/ …
PermalinkComments

Tweet from David_Risney

2015 Sep 21, 2:58
Enjoying Pixies Indie Cindy. Greens and Blues sounds like it's missing from the FLCL soundtrack or maybe Polaris.
PermalinkComments

YouTube - June System Update Walkthrough for Xbox One OneGuide...

2014 May 21, 6:15


YouTube - June System Update Walkthrough for Xbox One

OneGuide on SmartGlass is coming in the June Xbox One update! The feature I’ve been missing since day one. I don’t think I’m an average Xbox One user.

PermalinkCommentsxbox video tv

Stripe CTF - Input validation (Levels 1 & 2)

2012 Sep 6, 5:00

Stripe's web security CTF's Level 1 and level 2 of the Stripe CTF had issues with missing input validation solutions described below.

Level 1

Code

          $filename = 'secret-combination.txt';
extract($_GET);
if (isset($attempt)) {
$combination = trim(file_get_contents($filename));
if ($attempt === $combination) {

Issue

The issue here is the usage of the extract php method which extracts name value pairs from the map input parameter and creates corresponding local variables. However this code uses $_GET which contains a map of name value pairs passed in the query of the URI. The expected behavior is to get an attempt variable out, but since no input validation is done I can provide a filename variable and overwrite the value of $filename. Providing an empty string gives an empty string $combination which I can match with an empty string $attempt. So without knowing the combination I can get past the combination check.

Notes

Code review red flag in this case was the direct use of $_GET with no validation. Instead of using extract the developer could try to extract specifically the attempt variable manually without using extract.

Level 2

Code

    $dest_dir = "uploads/";
$dest = $dest_dir . basename($_FILES["dispic"]["name"]);
$src = $_FILES["dispic"]["tmp_name"];
if (move_uploaded_file($src, $dest)) {
$_SESSION["dispic_url"] = $dest;
chmod($dest, 0644);
echo "

Successfully uploaded your display picture.

";
}

Issue

This code accepts POST uploads of images but with no validation to ensure it is not an arbitrary file. And even though it uses chmod to ensure the file is not executable, things like PHP don't require a file to be executable in order to run them. Accordingly, one can upload a PHP script, then navigate to that script to run it. My PHP script dumped out the contents of the file we're interested in for this level:

Notes

Code review red flags include manual file management, chmod, and use of file and filename inputs without any kind of validation. If this code controlled the filename and ensured that the extension was one of a set of image extensions, this would solve this issue. Due to browser mime sniffing its additionally a good idea to serve a content-type that starts with "image/" for these uploads to ensure browsers treat these as images and not sniff for script or HTML.

PermalinkCommentsinput-validation php security technical

Command line for finding missing URLACTIONs

2011 May 28, 11:00

I wanted to ensure that my switch statement in my implementation of IInternetSecurityManager::ProcessURLAction had a case for every possible documented URLACTION. I wrote the following short command line sequence to see the list of all URLACTIONs in the SDK header file not found in my source file:

grep URLACTION urlmon.idl | sed 's/.*\(URLACTION[a-zA-Z0-9_]*\).*/\1/g;' | sort | uniq > allURLACTIONs.txt
grep URLACTION MySecurityManager.cpp | sed 's/.*\(URLACTION[a-zA-Z0-9_]*\).*/\1/g;' | sort | uniq > myURLACTIONs.txt
comm -23 allURLACTIONs.txt myURLACTIONs.txt
I'm not a sed expert so I had to read the sed documentation, and I heard about comm from Kris Kowal's blog which happilly was in the Win32 GNU tools pack I already run.

But in my effort to learn and use PowerShell I found the following similar command line:

diff 
(more urlmon.idl | %{ if ($_ -cmatch "URLACTION[a-zA-Z0-9_]*") { $matches[0] } } | sort -uniq)
(more MySecurityManager.cpp | %{ if ($_ -cmatch "URLACTION[a-zA-Z0-9_]*") { $matches[0] } } | sort -uniq)
In the PowerShell version I can skip the temporary files which is nice. 'diff' is mapped to 'compare-object' which seems similar to comm but with no parameters to filter out the different streams (although this could be done more verbosely with the ?{ } filter syntax). In PowerShell uniq functionality is built into sort. The builtin -cmatch operator (c is for case sensitive) to do regexp is nice plus the side effect of generating the $matches variable with the regexp results.
PermalinkCommentspowershell tool cli technical command line

Why the internet will fail (from 1995) « Three Word Chant!

2010 Feb 26, 8:50Did I read this already on Paleo-Future? Anyway still an awesome 1995 rant on why the Internet will fail. "Then there’s cyberbusiness. We’re promised instant catalog shopping–just point and click for great deals. We’ll order airline tickets over the network, make restaurant reservations and negotiate sales contracts. Stores will become obselete. So how come my local mall does more business in an afternoon than the entire Internet handles in a month? Even if there were a trustworthy way to send money over the Internet–which there isn’t–the network is missing a most essential ingredient of capitalism: salespeople."PermalinkCommentshumor internet fail article history

Profile for shimala - Reward! Have you seen my bicycle?

2009 Aug 21, 9:01Humorous no reward bike missing signs.
PermalinkCommentshumor bike missing sign photo

Etre Touchy - Welcome - Gloves for your iPhone, iPod Touch, Nintendo DS, Blackberry, PDA and more...

2009 Jan 8, 5:49Gloves with the ends of the index finger and thumb missing for using phones and the like while keeping the rest of your hands warm. Good idea!PermalinkCommentsglove design shopping wishlist phone cellphone clothing gloves

GPS Stolen

2008 Jun 6, 3:03

My GPS was stolen last night or this morning and I'm missing it already. For instance when I drove to Novus glass repair to get my front passenger window replaced I drove down the wrong road for a while.

When I got out of my apartment this morning there was a police car sitting in my parking lot and the officer asked me: "David? ... What'd you leave in your car?". My face must have changed a lot when I had the following sequence of realizations: (a) a police officer is asking for me by name, (b) I'm not in trouble, (c) my car must have been burgled, and (d) my GPS must be stolen.

The officer was waiting outside my complex because someone had reported my car's broken window to the police in the morning. The officer was very courteous and upon taking my date of birth noted that we were born on exactly the same day. The window's safety glass was shattered and lying in tons of tiny pieces all over the passenger seat, my glove box was open and the middle armrest where I keep my CDs was open. Nothing appears to be missing other than the GPS, the GPS power cable, and the GPS dash mount. Adding insult to theft, the their scattered my CDs throughout my car and didn't take any of them, insulting my taste in music.

My car's window should be repaired now and hopefully the rain that came in through the broken window until I covered it with plastic bags (classy!) didn't do any permanent damage.

PermalinkCommentsgps theft personal nontechnical

Paleo-Future: The Internet? Bah! (1995)

2008 Apr 1, 11:21'95 article on the Internet fad: "So how come my local mall does more business in an afternoon than the entire Internet handles in a month? Even if there were a trustworthy way to send money over the Internet--which there isn't--the network is missing a mPermalinkCommentshumor article internet news history future

Internet Explorer 8 Beta 1 Released with Activities

2008 Mar 5, 11:36

Internet Explorer 8 Beta 1 is available now. I can finally talk about some of the stuff I've been working on for the past year or so: activities. Activities let you select a document, some text on a document, or a link to a document and run that selection through a web service. For example, you could select a word on a webpage and look it up in Wikipedia, select an address and map it on Yahoo Maps, select a webpage and translate it into English with Windows Live Translator, or select a link and add it to Digg.

IE8 comes installed with some activities based on Microsoft web services but there's a page you can go to to install other activities. However, that page is missing some of my favorites that I use all the time, like del.icio.us. Accordingly, I've put together a page of the activities I use. MSDN has all the info on creating Activities.

Activities are very similar to other existing features in other browsers including the ability to add context menu items to IE. There's two important differences which make activities better. Activities have a preview window that pops out when you hover over an activity, which is useful to get in place information easily provided by developers. The other is that the interface is explicit and takes after HTML FORMs and OpenSearch descriptions. Because the interface is explicitly described in XML (unlike the context menu additions described above which run arbitrary script) we have the ability to use activities in places other than on a webpage in the future. And because activity definitions are similar to HTML FORMs, if your webservice has an HTML FORM describing it you can easily create an activity.

PermalinkCommentsmicrosoft technical activity openservice ie8 ie activities msdn

Excercise Bike and Tacoma Screw Products

2008 Jan 13, 11:07

Sarah and I got an exercise bike on sale and when attempting to put it together found that it was missing a bag of about ten different screws. The manufacturer website said we could order a replacement bag for thirty dollars (!!) but since the instructions listed the various kinds of screws we needed I figured we could just go to a hardware store and buy them.

We started at Home Depot because I didn't know better. The screws are all listed in metric sizes which is apparently uncommon and a helpful senior worker forwarded us to McLendons whose stock was better but we were again redirected this time to Tacoma Screw Products.

Tacoma Screw Products is great! See them for your hardware needs first! The store has a back area with every kind of screw ever. I felt a little out of place as as all the customers looked like contractors. The employee who helped me explained the various options I had in screws as the bike instructions weren't as explicit as they could have been. In the end I bought all my screws for only one dollar (much better than $30!) and they all fit correctly.

PermalinkCommentsscrew bike personal tacoma screw products nontechnical

IE7 Feed Display Update

2007 May 22, 3:22I've created an update to the IE7 feed display.

After working on my update to the XML source view I tried running my resourcelist program on other IE DLLs including ieframe. I found that one of the resources in ieframe is the XSLT used to turn an RSS feed into the IE7 feed display.

My first thought for this was that I could embed enclosures into the feed display. For instance, have controls for youtube.com videos or podcast audio files directly in the feed display. However, I found that I can't use object or embed tags that rely on ActiveX controls in the page or in frames in the feed display.

With that through I decided I could at least add support for some RSS extensions. Thanks to IE7's RSS platform which provides a normalized view of RSS feeds it was really easy to do this. I went to several popular RSS feeds and RSS feeds that I like and took a look at the source to see what extensions I might want to add support for.

For digg.com I added support for their RSS extension which includes digg count, and submitter name and icon. I added the digg count in a box on the right and tried to make it fit in stylistically. For the iTunes RSS extension I add the feed icon, feed author, and descriptions. I was surprised by how much of the podcasts content was missing from the feed view. I also added support for a few other misc things: the slash RSS extension's section and department, the feed description to the top of the feed display, and the atom author icon.

I wonder what other goodies lurk in IE's resources...PermalinkCommentsfeed res slashdot digg resource itunes technical browser ie rss extension

Opera Speed Dial Code-less Hack for IE7

2007 Apr 17, 11:45Opera (the fifth most popular web browser) has a new feature named Speed Dial (video of it in action). Whenever you open a new tab you get your Speed Dial view which consists of nine thumbnails of user-settable pages. Its like a quick-favorites that appears every time you open a new tab. I think this is a neat idea and was considering how I might do that in IE7. The following is my hack-y and ugly but no coding required version of Speed Dial for IE7. I like my hack and I'm about to expound upon it in unnecessary detail so skip to the last paragraph if you're afraid of losing interest.

By default in IE7, whenever you open a new tab you navigate to 'about:Tabs'. As noted in wikipedia the result of navigation to 'about:Tabs' is determined by values in the registry. Specifically, values in the key in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs". Usually this fact is exploited by malicious software to hijack "about:blank" and show you ads but we can hijack it too in order to display our Speed Dial-ish page.

Of course since this is a code-less hack we've got limited options on what to change 'about:Tabs' to display. It should have the following requirements.
  1. Something local so that our 'about:Tabs' doesn't disappear when we go offline and so that its relatively fast.
  2. The user should be able to modify its content.
  3. Show links that the user uses.
  4. Show thumbnails of those links
  5. Provide easy to use drag and drop interaction and generally look cool.
Now, I use del.icio.us which allows me to store all of my favorites online and which provides RSS feeds that list my saved links. New in IE7 is an RSS platform that will, among other things, cache RSS feeds locally. So, by pointing about:Tabs to my del.icio.us feed 'http://del.icio.us/rss/sequelguy/quickreference' I get (1) from IE7's RSS support, and (2) and (3) from del.icio.us. Of course requirements (4) and (5) are missing but hey, I said this was ugly.

In summary, if you change the registry value "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs!Tabs" to point to an RSS feed of your favorites you can get a hack-y version of Opera's Speed Dial. I should note that although its referenced on pages such as wikipedia changing your 'about:Tabs' URI in the manner I describe is not documented and not supported by Microsoft. There could be all kinds of horrible repercussions from this change of which I'm not aware. Yeah, actually you know what? Forget I said any of this. Pretend I never wrote it...PermalinkCommentsbrowser technical hack

Missing Bee Roundup

2007 Apr 15, 4:06For the past several months I've seen various articles suggesting why bees are disappearing. At first I thought this was another crackpot's article that somehow made it onto digg.com. But they keep coming and sometimes from credible sources. After the article I saw tonight I thought I should go back and put together the various articles I've read on this topic. Bees may be disappearing due to pesticides, new organic pathogens, genetically modified crops, mobile phones, or climate change. Apparently, the US hasn't been keeping accurate counts of its bees so we don't know the extent of the situation. There's an interview with Maryann Frazier, M.S., of the Dept. of Etymology at Penn State and a congressional hearing on the matter.

I know this is all very serious and could signal the end of our ecosystem as we know it, but I can't help throwing in the following links as well. The bees could be hiding in this Florida couple's kitchen. Or perhaps they're laying low while being trained by the government to fight terrorism. Or they're hiding in extra dimensions that we mere humans can't perceive (I'm fairly certain that's what this article is suggesting. Really. Read it. Seriously. Its awesome.)PermalinkCommentsroundup personal bees nontechnical

Show Missing Glyphs

2005 Jul 20, 7:26Displays Unicode strings using javascript and GIFs so as to avoid fonts that are missing glyphsPermalinkCommentslanguage unicode tools
Older Entries Creative Commons License Some rights reserved.