e3 page 2 - Dave's Blog

Search
My timeline on Mastodon

theatlantic: 'Please Contact Us': It's Been a Tough Week for...

2013 Oct 11, 9:25


theatlantic:

'Please Contact Us': It's Been a Tough Week for the Nobel Prize's Twitter Feed

Tales of temporary rejection from an organization not used to being ignored.

Read more.

PermalinkCommentshumor nobelprize twitter

laughingsquid: Fake Movie Posters Based on Fictional Films...

2013 Aug 26, 4:12


laughingsquid:

Fake Movie Posters Based on Fictional Films Mentioned on ‘Seinfeld’

PermalinkCommentshumor seinfeld jason-bateman tina-fey

solarbird: Perfect.

2013 Jul 28, 1:46


solarbird:

Perfect.

PermalinkCommentshumor glasses cosplay

URI functions in Windows Store Applications

2013 Jul 25, 1:00PermalinkCommentsc# c++ javascript technical uri windows windows-runtime windows-store

Words with Hints Windows 8 App Development Notes

2013 Jul 4, 1:00

My second completed app for the Windows Store was Words with Hints a companion to Words with Friends or other Scrabble like games that gives you *ahem* hints. You provide your tiles and optionally letters placed in a line on the board and Words with Hints gives you word options.

I wrote this the first time by building a regular expression to check against my dictionary of words which made for a slow app on the Surface. In subsequent release of the app I now spawn four web workers (one for each of the Surface's cores) each with its own fourth of my dictionary. Each fourth of the dictionary is a trie which makes it easy for me to discard whole chunks of possible combinations of Scrabble letters as I walk the tree of possibilities.

The dictionaries are large and takes a noticeable amount of time to load on the Surface. The best performing mechanism I found to load them is as JavaScript source files that simply define their portion of the dictionary on the global object and synchronously (only on the worker so not blocking the UI thread). Putting them into .js files means they take advantage of bytecode caching making them load faster. However because the data is mostly strings and not code there is a dramatic size increase when the app is installed. The total size of the four dictionary .js files is about 44Mb. The bytecode cache for the dictionary files is about double that 88Mb meaning the dictionary plus the bytecode cache is 132Mb.

To handle the bother of postMessage communication and web workers this was the first app in which I used my promise MessagePort project which I'll discuss more in the future.

This is the first app in which I used the Microsoft Ad SDK. It was difficult to find the install for the SDK and difficult to use their website, but once setup, the Ad SDK was easy to import into VS and easy to use in my app.

PermalinkCommentsdevelopment technical windows windows-store words-with-hints

wilwheaton: cameron-stewart: My contribution in full to the...

2013 Apr 4, 5:34








wilwheaton:

cameron-stewart:

My contribution in full to the #bartkira project. This was tons of fun to do.

Holy shit.

Everything’s coming up Milhouse

PermalinkCommentshumor comic art mashup simpsons akira

laughingsquid: An ‘American Psycho’ Parody Starring Huey Lewis...

2013 Apr 4, 5:33


laughingsquid:

An ‘American Psycho’ Parody Starring Huey Lewis & Weird Al

Hey its the high school band audition judge from Back to the Future.

PermalinkCommentshumor weird-al huey-lewis american-psycho video

It is not just another Team Fortress 2 map. No.  It has a laser...

2012 Sep 21, 4:26


It is not just another Team Fortress 2 map. No.  It has a laser death cat.

THE GRIND (by Thecorp303)

PermalinkCommentshumor mod tf2 game video-game video

Stripe CTF - SQL injections (Levels 0 & 3)

2012 Sep 5, 9:10

Stripe's web security CTF's level 0 and level 3 had SQL injection solutions described below.

Level 0

Code

app.get('/*', function(req, res) {
var namespace = req.param('namespace');

if (namespace) {
var query = 'SELECT * FROM secrets WHERE key LIKE ? || ".%"';
db.all(query, namespace, function(err, secrets) {

Issue

There's no input validation on the namespace parameter and it is injected into the SQL query with no encoding applied. This means you can use the '%' character as the namespace which is the wildcard character matching all secrets.

Notes

Code review red flag was using strings to query the database. Additional levels made this harder to exploit by using an API with objects to construct a query rather than strings and by running a query that only returned a single row, only ran a single command, and didn't just dump out the results of the query to the caller.

Level 3

Code

@app.route('/login', methods=['POST'])
def login():
username = flask.request.form.get('username')
password = flask.request.form.get('password')

if not username:
return "Must provide username\n"

if not password:
return "Must provide password\n"

conn = sqlite3.connect(os.path.join(data_dir, 'users.db'))
cursor = conn.cursor()

query = """SELECT id, password_hash, salt FROM users
WHERE username = '{0}' LIMIT 1""".format(username)
cursor.execute(query)

res = cursor.fetchone()
if not res:
return "There's no such user {0}!\n".format(username)
user_id, password_hash, salt = res

calculated_hash = hashlib.sha256(password + salt)
if calculated_hash.hexdigest() != password_hash:
return "That's not the password for {0}!\n".format(username)

Issue

There's little input validation on username before it is used to constrcut a SQL query. There's no encoding applied when constructing the SQL query string which is used to, given a username, produce the hashed password and the associated salt. Accordingly one can make username a part of a SQL query command which ensures the original select returns nothing and provide a new SELECT via a UNION that returns some literal values for the hash and salt. For instance the following in blue is the query template and the red is the username injected SQL code:

SELECT id, password_hash, salt FROM users WHERE username = 'doesntexist' UNION SELECT id, ('5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8') AS password_hash, ('word') AS salt FROM users WHERE username = 'bob' LIMIT 1
In the above I've supplied my own salt and hash such that my salt (word) plus my password (pass) hashed produce the hash I provided above. Accordingly, by providing the above long and interesting looking username and password as 'pass' I can login as any user.

Notes

Code review red flag is again using strings to query the database. Although this level was made more difficult by using an API that returns only a single row and by using the execute method which only runs one command. I was forced to (as a SQL noob) learn the syntax of SELECT in order to figure out UNION and how to return my own literal values.

PermalinkCommentssecurity sql sql-injection technical web-security

paulftompkins: shahruz: Promo on IFC for the upcoming Comedy...

2012 Feb 29, 10:13
[Flash 10 is required to watch video.]

paulftompkins:

shahruz:

Promo on IFC for the upcoming Comedy Bang Bang TV show!!!

BE EXCITED.

I am excited Paul.

PermalinkCommentshumor video comedy-bang-bang

Dad holding bear suit Alex

2011 Dec 31, 11:21

PermalinkComments

Dad holding bear suit Alex

2011 Dec 31, 11:19

PermalinkComments

Hey, Bethesda! Let's settle this! : The Word of Notch

2011 Aug 17, 4:52This is awesome: "I challenge Bethesda to a game of Quake 3. ... If we win, you drop the lawsuit. If you win, we will change the name of Scrolls to something you’re fine with." I could have been a lawyer if things worked this way.PermalinkCommentsminecraft game law quake3

YouTube - Fallout New Vegas E3 2010 Official Trailer

2010 Aug 14, 3:29PermalinkCommentsvideo fallout fallout4 videogame avlater

Sarah by Atlantis Resort

2010 Feb 28, 11:35

sequelguy posted a photo:

Sarah by Atlantis Resort

PermalinkCommentssarah bahamas nassau atlantisresort

Diversity Inc Photoshopped Cover Closeup

2010 Feb 26, 5:00

sequelguy posted a photo:

Diversity Inc Photoshopped Cover Closeup

Jen's going away surprise for me was to add to my Diversity Inc cover artwork with my own photoshopped cover. Note the attention to detail in the headlines.

PermalinkCommentsme photoshop office diversity microsoft billgates

Wedding Cake Table

2010 Feb 25, 1:18

sequelguy posted a photo:

Wedding Cake Table

PermalinkCommentswedding beach cake club bahama abacos

Video: Project Natal invades Late Night with Jimmy Fallon

2009 Jun 12, 12:37"Last night on Late Night with Jimmy Fallon, Microsoft's Kudo Tsunoda brought along his baby, Project Natal, and let Jimmy Fallon, John Krasinski, and Stephen Moyer go to town. The footage has made its way onto Hulu and while these are pretty much the same demos for Ricochet and Burnout Paradise that we saw at E3 last week, they're still impressive."PermalinkCommentsvideo humor videogame natal xbox360 jimmy-fallon

E309: Scribblenauts DS settles Kraken vs. God vs. Keyboard Cat debate

2009 Jun 5, 3:27Looks cool and includes things like Keyboard Cat and Looong Cat.PermalinkCommentsgame nintendo video scribblenauts internet meme

E309: New Super Mario Bros Wii, the trailer

2009 Jun 3, 3:40The New Super Mario Bros for the Wii looks cool. I always wanted the multiplayer featured here in the previous games.PermalinkCommentsfor:hellosarah mario wii nintendo video videogame
Older EntriesNewer Entries Creative Commons License Some rights reserved.